17 #ifndef G4RadioactiveDecay_h
18 #define G4RadioactiveDecay_h 1
23 #include <CLHEP/Units/SystemOfUnits.h>
27 #include "G4VRestDiscreteProcess.hh"
28 #include "G4ParticleChangeForRadDecay.hh"
30 #include "G4NucleusLimits.hh"
31 #include "G4ThreeVector.hh"
32 #include "G4RadioactiveDecayMode.hh"
35 class G4RadioactiveDecayMessenger;
36 class G4PhotonEvaporation;
41 typedef std::map<G4String, G4DecayTable*> DecayTableMap;
59 const G4double timeThreshold=-1.0);
62 G4bool IsApplicable(
const G4ParticleDefinition&)
override;
67 G4VParticleChange* AtRestDoIt(
const G4Track& theTrack,
68 const G4Step& theStep)
override;
70 G4VParticleChange* PostStepDoIt(
const G4Track& theTrack,
71 const G4Step& theStep)
override;
73 void BuildPhysicsTable(
const G4ParticleDefinition &)
override;
75 void ProcessDescription(std::ostream& outFile)
const override;
77 virtual G4VParticleChange* DecayIt(
const G4Track& theTrack,
78 const G4Step& theStep);
81 G4DecayTable* GetDecayTable(
const G4ParticleDefinition*);
84 void SelectAVolume(
const G4String& aVolume);
87 void DeselectAVolume(
const G4String& aVolume);
90 void SelectAllVolumes();
93 void DeselectAllVolumes();
96 void SetARM(G4bool arm) {applyARM = arm;}
98 G4DecayTable* LoadDecayTable(
const G4Ions*);
101 void AddUserDecayDataFile(G4int Z, G4int A,
const G4String& filename);
105 inline void SetNucleusLimits(G4NucleusLimits theNucleusLimits1)
106 {theNucleusLimits = theNucleusLimits1 ;}
112 inline G4NucleusLimits GetNucleusLimits()
const {
return theNucleusLimits;}
114 inline void SetDecayDirection(
const G4ThreeVector& theDir) {
115 forceDecayDirection = theDir.unit();
118 inline const G4ThreeVector& GetDecayDirection()
const {
119 return forceDecayDirection;
122 inline void SetDecayHalfAngle(G4double halfAngle=0.*CLHEP::deg) {
123 forceDecayHalfAngle = std::min(std::max(0.*CLHEP::deg,halfAngle),180.*CLHEP::deg);
126 inline G4double GetDecayHalfAngle()
const {
return forceDecayHalfAngle;}
130 inline void SetDecayCollimation(
const G4ThreeVector& theDir,
131 G4double halfAngle = 0.*CLHEP::deg) {
132 SetDecayDirection(theDir);
133 SetDecayHalfAngle(halfAngle);
137 inline void SetThresholdForVeryLongDecayTime(
const G4double inputThreshold) {
138 fThresholdForVeryLongDecayTime = std::max( 0.0, inputThreshold );
140 inline G4double GetThresholdForVeryLongDecayTime()
const {
return fThresholdForVeryLongDecayTime;}
142 void StreamInfo(std::ostream& os,
const G4String& endline);
148 G4VParticleChange* TerminateDecay();
149 G4double GetMeanFreePath(
const G4Track& theTrack, G4double previousStepSize,
150 G4ForceCondition* condition)
override;
152 G4double GetMeanLifeTime(
const G4Track& theTrack,
153 G4ForceCondition* condition)
override;
156 void DecayAnalog(
const G4Track& theTrack, G4DecayTable*);
159 G4DecayProducts* DoDecay(
const G4ParticleDefinition&, G4DecayTable*);
162 void CollimateDecay(G4DecayProducts* products);
163 void CollimateDecayProduct(G4DynamicParticle* product);
164 G4ThreeVector ChooseCollimationDirection()
const;
167 G4ParticleChangeForRadDecay fParticleChangeForRadDecay;
169 G4RadioactiveDecayMessenger* theRadioactiveDecayMessenger;
170 G4PhotonEvaporation* photonEvaporation;
173 std::vector<G4String> ValidVolumes;
174 bool isAllVolumesMode{
true};
176 static const G4double levelTolerance;
179 static DecayTableMap* master_dkmap;
183 G4NucleusLimits theNucleusLimits;
185 G4bool isInitialised{
false};
186 G4bool applyARM{
true};
189 G4ThreeVector forceDecayDirection{G4ThreeVector(0., 0., 0.)};
190 G4double forceDecayHalfAngle{0.0};
191 static const G4ThreeVector origin;
194 static G4String dirPath;
197 static std::map<G4int, G4String>* theUserRDataFiles;
200 G4RadioactiveDecayMode theRadDecayMode{G4RadioactiveDecayMode::IT};
203 G4double fThresholdForVeryLongDecayTime;
Definition: OMSimG4RadioactiveDecay.hh:45