Belle II Software  release-08-01-10
ExtEnergyLoss.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #ifndef EXTENERGYLOSS_H_
10 #define EXTENERGYLOSS_H_
11 
12 #include <globals.hh>
13 #include <G4VContinuousProcess.hh>
14 
15 class G4ParticleDefinition;
16 class G4Track;
17 class G4Step;
18 
19 namespace Belle2 {
25  namespace Simulation {
26 
27  class EnergyLossForExtrapolator;
28 
32  class ExtEnergyLoss: public G4VContinuousProcess {
33 
34  public:
35 
37  ExtEnergyLoss(const G4String& processName = "ExtEnergyLoss", G4ProcessType aType = fElectromagnetic);
38 
40  virtual ~ExtEnergyLoss();
41 
43  inline G4bool IsApplicable(const G4ParticleDefinition&);
44 
46  G4double GetContinuousStepLimit(const G4Track&, G4double, G4double, G4double&);
47 
49  G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);
50 
52  inline G4double GetStepLimit();
53 
55  inline void SetStepLimit(G4double);
56 
57  private:
58 
61 
63  G4double m_StepLimit;
64 
65  };
66 
67  inline G4bool ExtEnergyLoss::IsApplicable(const G4ParticleDefinition& aParticle)
68  {
69  // This process applies to all geant4e-specific charged particles.
70  // (Verified that it is only called for these - but let's check anyway.)
71  return ((aParticle.GetPDGCharge() != 0) && (aParticle.GetParticleName().compare(0, 4, "g4e_") == 0));
72  }
73 
74  inline G4double ExtEnergyLoss::GetStepLimit()
75  {
76  return m_StepLimit;
77  }
78 
79  inline void ExtEnergyLoss::SetStepLimit(G4double val)
80  {
81  m_StepLimit = val;
82  }
83 
84  } //end namespace Simulation
85 
87 } //end Belle2 namespace
88 
89 #endif /* EXTENERGYLOSS_H_ */
Calculate energy loss, fluctuation, and multiple-scattering angle for extrapolator.
Define physics process to calculate energy loss without fluctuations.
Definition: ExtEnergyLoss.h:32
G4double GetContinuousStepLimit(const G4Track &, G4double, G4double, G4double &)
Gets step limit for the particle being swum.
G4bool IsApplicable(const G4ParticleDefinition &)
Reports if this process is applicable to the particle being swum.
Definition: ExtEnergyLoss.h:67
EnergyLossForExtrapolator * m_energyLossForExtrapolator
Pointer to the geant4e-specific energy-loss and mult-scat class.
Definition: ExtEnergyLoss.h:60
G4double GetStepLimit()
Gets the step limit for this process.
Definition: ExtEnergyLoss.h:74
G4double m_StepLimit
Step limit for this process (fraction of KE that could be lost in one step)
Definition: ExtEnergyLoss.h:63
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
Apply energy loss process along the step.
void SetStepLimit(G4double)
Sets the step limit for this process.
Definition: ExtEnergyLoss.h:79
virtual ~ExtEnergyLoss()
destructor
ExtEnergyLoss(const G4String &processName="ExtEnergyLoss", G4ProcessType aType=fElectromagnetic)
constructor
Abstract base class for different kinds of events.