Belle II Software development
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
19namespace Belle2 {
26 class G4LongLivedNeutral;
30 class G4LongLivedNeutralDecay : public G4VRestDiscreteProcess {
31
32 public:
37 G4LongLivedNeutralDecay(const G4String& processName = "LongLivedNeutralDecay");
38
43
44 private:
50
56
57 public:
58
66 virtual G4VParticleChange* PostStepDoIt(
67 const G4Track& aTrack,
68 const G4Step& aStep
69 ) override;
70
78 virtual G4VParticleChange* AtRestDoIt(
79 const G4Track& aTrack,
80 const G4Step& aStep
81 ) override;
82
83 virtual void BuildPhysicsTable(const G4ParticleDefinition&) override;
90 virtual G4bool IsApplicable(const G4ParticleDefinition&) override;
94 protected:
95
104 virtual G4VParticleChange* DecayIt(
105 const G4Track& aTrack,
106 const G4Step& aStep
107 );
108
109 public:
110
118 virtual G4double AtRestGetPhysicalInteractionLength(
119 const G4Track& track,
120 G4ForceCondition* condition
121 ) override;
122
133 const G4Track& track,
134 G4double previousStepSize,
135 G4ForceCondition* condition
136 ) override;
137
138 protected:
139
140
141 virtual G4double GetMeanFreePath(const G4Track& aTrack,
142 G4double previousStepSize,
143 G4ForceCondition* condition
144 ) override;
147 virtual G4double GetMeanLifeTime(const G4Track& aTrack,
148 G4ForceCondition* condition
149 ) override;
154 public:
155
156 virtual void StartTracking(G4Track*) override;
158 virtual void EndTracking() override;
162 public:
163
164 G4double GetRemainderLifeTime() const;
167 protected:
174 protected:
175
176 const G4double HighestValue;
180 G4ParticleChangeForDecay fParticleChangeForDecay;
182 };
183
184 inline
186 const G4Track& aTrack,
187 const G4Step& aStep
188 )
189 {
190 return DecayIt(aTrack, aStep);
191 }
192
193
194 inline
196 {
197 return fRemainderLifeTime;
198 }
201}
202
203
204
205
206
207
208
This class is a decay process.
virtual G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep) override
G4VProcess::PostStepDoIt() implemention.
G4LongLivedNeutralDecay & operator=(const G4LongLivedNeutralDecay &right)
Assignment Operator.
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.
G4ParticleChangeForDecay fParticleChangeForDecay
ParticleChange for decay process.
G4LongLivedNeutralDecay(const G4LongLivedNeutralDecay &right)
Copy 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
G4VProcess::AtRestDoIt() implementation for decay at rest.
Abstract base class for different kinds of events.