Belle II Software  release-08-01-10
G4LongLivedNeutralDecay.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 // modified from GEANT4 G4Transportation class
10 
11 #pragma once
12 #include "G4ios.hh"
13 #include "globals.hh"
14 #include "G4VRestDiscreteProcess.hh"
15 #include "G4ParticleChangeForDecay.hh"
16 #include "G4DecayProcessType.hh"
17 #include <framework/core/Module.h>
18 
19 namespace Belle2 {
26  class G4LongLivedNeutral;
30  class G4LongLivedNeutralDecay : public G4VRestDiscreteProcess {
31 
32  public:
37  G4LongLivedNeutralDecay(const G4String& processName = "LongLivedNeutralDecay");
38 
42  virtual ~G4LongLivedNeutralDecay();
43 
44  private:
50 
56 
57  public:
58 
66  virtual G4VParticleChange* PostStepDoIt(
67  const G4Track& aTrack,
68  const G4Step& aStep
69  ) override;
70 
76  virtual G4VParticleChange* AtRestDoIt(
77  const G4Track& aTrack,
78  const G4Step& aStep
79  ) override;
80 
81  virtual void BuildPhysicsTable(const G4ParticleDefinition&) override;
88  virtual G4bool IsApplicable(const G4ParticleDefinition&) override;
92  protected:
93 
102  virtual G4VParticleChange* DecayIt(
103  const G4Track& aTrack,
104  const G4Step& aStep
105  );
106 
107  public:
108 
116  virtual G4double AtRestGetPhysicalInteractionLength(
117  const G4Track& track,
118  G4ForceCondition* condition
119  ) override;
120 
130  virtual G4double PostStepGetPhysicalInteractionLength(
131  const G4Track& track,
132  G4double previousStepSize,
133  G4ForceCondition* condition
134  ) override;
135 
136  protected:
137 
138 
139  virtual G4double GetMeanFreePath(const G4Track& aTrack,
140  G4double previousStepSize,
141  G4ForceCondition* condition
142  ) override;
145  virtual G4double GetMeanLifeTime(const G4Track& aTrack,
146  G4ForceCondition* condition
147  ) override;
152  public:
153 
154  virtual void StartTracking(G4Track*) override;
156  virtual void EndTracking() override;
160  public:
161 
162  G4double GetRemainderLifeTime() const;
165  protected:
172  protected:
173 
174  const G4double HighestValue;
178  G4ParticleChangeForDecay fParticleChangeForDecay;
180  };
181 
189  inline
191  const G4Track& aTrack,
192  const G4Step& aStep
193  )
194  {
195  return DecayIt(aTrack, aStep);
196  }
197 
198 
199  inline
201  {
202  return fRemainderLifeTime;
203  }
206 }
207 
208 
209 
210 
211 
212 
213 
This class is a decay process.
virtual G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep) override
G4VProcess::PostStepDoIt() implemention.
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition) override
GetMeanFreePath returns ctau*beta*gamma for decay in flight.
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
G4VProcess::PostStepGetPhysicalInteractionLength() implemention.
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition) override
G4VProcess::AtRestGetPhysicalInteractionLength() implemention.
G4LongLivedNeutralDecay & operator=(const G4LongLivedNeutralDecay &right)
Assignment Operator.
G4ParticleChangeForDecay fParticleChangeForDecay
ParticleChange for decay process.
G4LongLivedNeutralDecay(const G4LongLivedNeutralDecay &right)
Copy Constructor.
G4LongLivedNeutralDecay(const G4String &processName="LongLivedNeutralDecay")
Constructor.
G4double fRemainderLifeTime
ParticleChange for decay process.
virtual void EndTracking() override
inform End of tracking for each track to the physics process
virtual G4VParticleChange * DecayIt(const G4Track &aTrack, const G4Step &aStep)
G4Decay::DecayIt() implemention.
const G4double HighestValue
Remainder of life time at rest.
G4int verboseLevel
controle flag for output message 0: Silent 1: Warning message 2: More
virtual G4double GetMeanLifeTime(const G4Track &aTrack, G4ForceCondition *condition) override
GetMeanLifeTime returns ctau for decay at rest.
virtual G4bool IsApplicable(const G4ParticleDefinition &) override
returns "true" if the decay process can be applied to the particle type.
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
In G4Decay, thePhysicsTable stores values of beta * std::sqrt( 1 - beta*beta) as a function of normal...
virtual void StartTracking(G4Track *) override
inform Start of tracking for each track to the physics process
G4double GetRemainderLifeTime() const
Get Remainder of life time at rest decay.
virtual G4VParticleChange * AtRestDoIt(const G4Track &aTrack, const G4Step &aStep) override
G4VProess::AtRestDoIt() implemention for decay at rest.
Abstract base class for different kinds of events.