Belle II Software  release-05-02-19
ExtEnergyLoss.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2011 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Leo Piilonen *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef EXTENERGYLOSS_H_
12 #define EXTENERGYLOSS_H_
13 
14 #include <globals.hh>
15 #include <G4VContinuousProcess.hh>
16 
17 class G4ParticleDefinition;
18 class G4Track;
19 class G4Step;
20 
21 namespace Belle2 {
27  namespace Simulation {
28 
29  class EnergyLossForExtrapolator;
30 
34  class ExtEnergyLoss: public G4VContinuousProcess {
35 
36  public:
37 
39  ExtEnergyLoss(const G4String& processName = "ExtEnergyLoss", G4ProcessType aType = fElectromagnetic);
40 
42  virtual ~ExtEnergyLoss();
43 
45  inline G4bool IsApplicable(const G4ParticleDefinition&);
46 
48  G4double GetContinuousStepLimit(const G4Track&, G4double, G4double, G4double&);
49 
51  G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);
52 
54  inline G4double GetStepLimit();
55 
57  inline void SetStepLimit(G4double);
58 
59  private:
60 
63 
65  G4double m_StepLimit;
66 
67  };
68 
69  inline G4bool ExtEnergyLoss::IsApplicable(const G4ParticleDefinition& aParticle)
70  {
71  // This process applies to all geant4e-specific charged particles.
72  // (Verified that it is only called for these - but let's check anyway.)
73  return ((aParticle.GetPDGCharge() != 0) && (aParticle.GetParticleName().compare(0, 4, "g4e_") == 0));
74  }
75 
76  inline G4double ExtEnergyLoss::GetStepLimit()
77  {
78  return m_StepLimit;
79  }
80 
81  inline void ExtEnergyLoss::SetStepLimit(G4double val)
82  {
83  m_StepLimit = val;
84  }
85 
86  } //end namespace Simulation
87 
89 } //end Belle2 namespace
90 
91 #endif /* EXTENERGYLOSS_H_ */
Belle2::Simulation::ExtEnergyLoss::GetStepLimit
G4double GetStepLimit()
Gets the step limit for this process.
Definition: ExtEnergyLoss.h:76
Belle2::Simulation::ExtEnergyLoss::m_StepLimit
G4double m_StepLimit
Step limit for this process (fraction of KE that could be lost in one step)
Definition: ExtEnergyLoss.h:65
Belle2::Simulation::ExtEnergyLoss
Define physics process to calculate energy loss without fluctuations.
Definition: ExtEnergyLoss.h:34
Belle2::Simulation::EnergyLossForExtrapolator
Calculate energy loss, fluctuation, and multiple-scattering angle for extrapolator.
Definition: EnergyLossForExtrapolator.h:37
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Simulation::ExtEnergyLoss::IsApplicable
G4bool IsApplicable(const G4ParticleDefinition &)
Reports if this process is applicable to the particle being swum.
Definition: ExtEnergyLoss.h:69
Belle2::Simulation::ExtEnergyLoss::m_energyLossForExtrapolator
EnergyLossForExtrapolator * m_energyLossForExtrapolator
Pointer to the geant4e-specific energy-loss and mult-scat class.
Definition: ExtEnergyLoss.h:62
Belle2::Simulation::ExtEnergyLoss::AlongStepDoIt
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
Apply energy loss process along the step.
Definition: ExtEnergyLoss.cc:46
Belle2::Simulation::ExtEnergyLoss::ExtEnergyLoss
ExtEnergyLoss(const G4String &processName="ExtEnergyLoss", G4ProcessType aType=fElectromagnetic)
constructor
Definition: ExtEnergyLoss.cc:22
Belle2::Simulation::ExtEnergyLoss::SetStepLimit
void SetStepLimit(G4double)
Sets the step limit for this process.
Definition: ExtEnergyLoss.h:81
Belle2::Simulation::ExtEnergyLoss::GetContinuousStepLimit
G4double GetContinuousStepLimit(const G4Track &, G4double, G4double, G4double &)
Gets step limit for the particle being swum.
Definition: ExtEnergyLoss.cc:106
Belle2::Simulation::ExtEnergyLoss::~ExtEnergyLoss
virtual ~ExtEnergyLoss()
destructor
Definition: ExtEnergyLoss.cc:39