Belle II Software  release-05-01-25
G4LongLivedNeutralDecay.h
1 
2 
3 #pragma once
4 #include "G4ios.hh"
5 #include "globals.hh"
6 #include "G4VRestDiscreteProcess.hh"
7 #include "G4ParticleChangeForDecay.hh"
8 #include "G4DecayProcessType.hh"
9 #include <framework/core/Module.h>
10 
11 namespace Belle2 {
18  class G4LongLivedNeutral;
22  class G4LongLivedNeutralDecay : public G4VRestDiscreteProcess {
23 
24  public:
29  G4LongLivedNeutralDecay(const G4String& processName = "LongLivedNeutralDecay");
30 
34  virtual ~G4LongLivedNeutralDecay();
35 
36  private:
42 
48 
49  public:
50 
58  virtual G4VParticleChange* PostStepDoIt(
59  const G4Track& aTrack,
60  const G4Step& aStep
61  ) override;
62 
68  virtual G4VParticleChange* AtRestDoIt(
69  const G4Track& aTrack,
70  const G4Step& aStep
71  ) override;
72 
73  virtual void BuildPhysicsTable(const G4ParticleDefinition&) override;
80  virtual G4bool IsApplicable(const G4ParticleDefinition&) override;
84  protected:
85 
94  virtual G4VParticleChange* DecayIt(
95  const G4Track& aTrack,
96  const G4Step& aStep
97  );
98 
99  public:
100 
108  virtual G4double AtRestGetPhysicalInteractionLength(
109  const G4Track& track,
110  G4ForceCondition* condition
111  ) override;
112 
122  virtual G4double PostStepGetPhysicalInteractionLength(
123  const G4Track& track,
124  G4double previousStepSize,
125  G4ForceCondition* condition
126  ) override;
127 
128  protected:
129 
130 
131  virtual G4double GetMeanFreePath(const G4Track& aTrack,
132  G4double previousStepSize,
133  G4ForceCondition* condition
134  ) override;
137  virtual G4double GetMeanLifeTime(const G4Track& aTrack,
138  G4ForceCondition* condition
139  ) override;
144  public:
145 
146  virtual void StartTracking(G4Track*) override;
148  virtual void EndTracking() override;
152  public:
153 
154  G4double GetRemainderLifeTime() const;
157  protected:
164  protected:
165 
166  const G4double HighestValue;
170  G4ParticleChangeForDecay fParticleChangeForDecay;
172  };
173 
181  inline
183  const G4Track& aTrack,
184  const G4Step& aStep
185  )
186  {
187  return DecayIt(aTrack, aStep);
188  }
189 
190 
191  inline
193  {
194  return fRemainderLifeTime;
195  }
198 }
199 
200 
201 
202 
203 
204 
205 
Belle2::G4LongLivedNeutralDecay::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &) override
returns "true" if the decay process can be applied to the particle type.
Definition: G4LongLivedNeutralDecay.cc:42
Belle2::G4LongLivedNeutralDecay::HighestValue
const G4double HighestValue
Remainder of life time at rest.
Definition: G4LongLivedNeutralDecay.h:166
Belle2::G4LongLivedNeutralDecay::PostStepDoIt
virtual G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep) override
G4VProcess::PostStepDoIt() implemention.
Definition: G4LongLivedNeutralDecay.cc:273
Belle2::G4LongLivedNeutralDecay::GetRemainderLifeTime
G4double GetRemainderLifeTime() const
Get Remainder of life time at rest decay.
Belle2::G4LongLivedNeutralDecay
This class is a decay process.
Definition: G4LongLivedNeutralDecay.h:22
Belle2::G4LongLivedNeutralDecay::GetMeanLifeTime
virtual G4double GetMeanLifeTime(const G4Track &aTrack, G4ForceCondition *condition) override
GetMeanLifeTime returns ctau for decay at rest.
Definition: G4LongLivedNeutralDecay.cc:52
Belle2::G4LongLivedNeutralDecay::BuildPhysicsTable
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
In G4Decay, thePhysicsTable stores values of beta * std::sqrt( 1 - beta*beta) as a function of normal...
Definition: G4LongLivedNeutralDecay.cc:73
Belle2::G4LongLivedNeutralDecay::DecayIt
virtual G4VParticleChange * DecayIt(const G4Track &aTrack, const G4Step &aStep)
G4Decay::DecayIt() implemention.
Definition: G4LongLivedNeutralDecay.cc:78
Belle2::G4LongLivedNeutralDecay::GetMeanFreePath
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition) override
GetMeanFreePath returns ctau*beta*gamma for decay in flight.
Definition: G4LongLivedNeutralDecay.cc:62
Belle2::G4LongLivedNeutralDecay::fParticleChangeForDecay
G4ParticleChangeForDecay fParticleChangeForDecay
ParticleChange for decay process.
Definition: G4LongLivedNeutralDecay.h:170
Belle2::G4LongLivedNeutralDecay::AtRestDoIt
virtual G4VParticleChange * AtRestDoIt(const G4Track &aTrack, const G4Step &aStep) override
G4VProess::AtRestDoIt() implemention for decay at rest.
Definition: G4LongLivedNeutralDecay.h:182
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::G4LongLivedNeutralDecay::PostStepGetPhysicalInteractionLength
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
G4VProcess::PostStepGetPhysicalInteractionLength() implemention.
Definition: G4LongLivedNeutralDecay.cc:222
Belle2::G4LongLivedNeutralDecay::verboseLevel
G4int verboseLevel
controle flag for output message 0: Silent 1: Warning message 2: More
Definition: G4LongLivedNeutralDecay.h:158
Belle2::G4LongLivedNeutralDecay::operator=
G4LongLivedNeutralDecay & operator=(const G4LongLivedNeutralDecay &right)
Assignment Operator.
Belle2::G4LongLivedNeutralDecay::EndTracking
virtual void EndTracking() override
inform End of tracking for each track to the physics process
Definition: G4LongLivedNeutralDecay.cc:213
Belle2::G4LongLivedNeutralDecay::G4LongLivedNeutralDecay
G4LongLivedNeutralDecay(const G4String &processName="LongLivedNeutralDecay")
Constructor.
Definition: G4LongLivedNeutralDecay.cc:18
Belle2::G4LongLivedNeutralDecay::~G4LongLivedNeutralDecay
virtual ~G4LongLivedNeutralDecay()
Destructor.
Definition: G4LongLivedNeutralDecay.cc:37
Belle2::G4LongLivedNeutralDecay::fRemainderLifeTime
G4double fRemainderLifeTime
ParticleChange for decay process.
Definition: G4LongLivedNeutralDecay.h:168
Belle2::G4LongLivedNeutralDecay::AtRestGetPhysicalInteractionLength
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition) override
G4VProcess::AtRestGetPhysicalInteractionLength() implemention.
Definition: G4LongLivedNeutralDecay.cc:253
Belle2::G4LongLivedNeutralDecay::StartTracking
virtual void StartTracking(G4Track *) override
inform Start of tracking for each track to the physics process
Definition: G4LongLivedNeutralDecay.cc:204