Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DiscreteGammaTransition Class Reference

#include <G4DiscreteGammaTransition.hh>

+ Inheritance diagram for G4DiscreteGammaTransition:

Public Member Functions

 G4DiscreteGammaTransition (const G4NuclearLevel &level, G4int Z, G4int A)
 
virtual ~G4DiscreteGammaTransition ()
 
virtual void SetEnergyFrom (G4double energy)
 
virtual G4double GetGammaEnergy ()
 
virtual G4double GetGammaCreationTime ()
 
virtual void SelectGamma ()
 
void SetICM (G4bool ic)
 
G4bool GetICM () const
 
G4double GetBondEnergy ()
 
G4int GetOrbitNumber ()
 
G4bool IsAGamma ()
 
- Public Member Functions inherited from G4VGammaTransition
 G4VGammaTransition ()
 
virtual ~G4VGammaTransition ()
 
virtual void SelectGamma ()=0
 
virtual G4double GetGammaEnergy ()=0
 
virtual G4double GetGammaCreationTime ()=0
 
virtual void SetEnergyFrom (G4double energy)=0
 

Additional Inherited Members

- Protected Attributes inherited from G4VGammaTransition
G4int _verbose
 

Detailed Description

Definition at line 79 of file G4DiscreteGammaTransition.hh.

Constructor & Destructor Documentation

◆ G4DiscreteGammaTransition()

G4DiscreteGammaTransition::G4DiscreteGammaTransition ( const G4NuclearLevel level,
G4int  Z,
G4int  A 
)

Definition at line 75 of file G4DiscreteGammaTransition.cc.

75 :
76 _nucleusZ(Z), _orbitE(-1), _bondE(0.), _aGamma(true), _icm(false), _gammaEnergy(0.),
77 _level(level), _excitation(0.), _gammaCreationTime(0.),_A(A),_Z(Z)
78{
79 _levelManager = 0;
80 _verbose = 0;
81 //JMQ: added tolerence in the mismatch
82 //VI: increased tolerence
83 _tolerance = 10*CLHEP::keV;
84}

◆ ~G4DiscreteGammaTransition()

G4DiscreteGammaTransition::~G4DiscreteGammaTransition ( )
virtual

Definition at line 86 of file G4DiscreteGammaTransition.cc.

87{}

Member Function Documentation

◆ GetBondEnergy()

G4double G4DiscreteGammaTransition::GetBondEnergy ( )
inline

Definition at line 100 of file G4DiscreteGammaTransition.hh.

100{return _bondE;};

Referenced by G4VGammaDeexcitation::GenerateGamma().

◆ GetGammaCreationTime()

G4double G4DiscreteGammaTransition::GetGammaCreationTime ( )
virtual

Implements G4VGammaTransition.

Definition at line 232 of file G4DiscreteGammaTransition.cc.

233{
234 return _gammaCreationTime;
235}

◆ GetGammaEnergy()

G4double G4DiscreteGammaTransition::GetGammaEnergy ( )
virtual

Implements G4VGammaTransition.

Definition at line 227 of file G4DiscreteGammaTransition.cc.

228{
229 return _gammaEnergy;
230}

◆ GetICM()

G4bool G4DiscreteGammaTransition::GetICM ( ) const
inline

Definition at line 99 of file G4DiscreteGammaTransition.hh.

99{ return _icm;};

Referenced by G4VGammaDeexcitation::GenerateGamma().

◆ GetOrbitNumber()

G4int G4DiscreteGammaTransition::GetOrbitNumber ( )
inline

Definition at line 101 of file G4DiscreteGammaTransition.hh.

101{return _orbitE;};

Referenced by G4VGammaDeexcitation::GenerateGamma().

◆ IsAGamma()

G4bool G4DiscreteGammaTransition::IsAGamma ( )
inline

Definition at line 102 of file G4DiscreteGammaTransition.hh.

102{return _aGamma;};

Referenced by G4VGammaDeexcitation::GenerateGamma().

◆ SelectGamma()

void G4DiscreteGammaTransition::SelectGamma ( )
virtual

Implements G4VGammaTransition.

Definition at line 89 of file G4DiscreteGammaTransition.cc.

90{
91 // default gamma
92 _aGamma = true;
93 _gammaEnergy = 0.;
94
95 G4int nGammas = _level.NumberOfGammas();
96 if (nGammas > 0)
97 {
98 G4int iGamma = 0;
99 if(1 < nGammas) {
100 G4double random = G4UniformRand();
101
102 //G4cout << "G4DiscreteGammaTransition::SelectGamma N= "
103 // << nGammas << " rand= " << random << G4endl;
104 for(iGamma=0; iGamma<nGammas; ++iGamma)
105 {
106 //G4cout << iGamma << " prob= "
107 // << (_level.GammaCumulativeProbabilities())[iGamma] << G4endl;
108 if(random <= (_level.GammaCumulativeProbabilities())[iGamma])
109 { break; }
110 }
111 }
112 /*
113 G4cout << "Elevel(MeV)= " << _level.Energy()/MeV
114 << " Etran(MeV)= " << (_level.GammaEnergies())[iGamma]/MeV
115 << " Eexc(MeV)= " << _excitation/MeV << G4endl;
116 */
117
118 // VI: do not apply correction here in order do not make
119 // double correction
120 //G4double eCorrection = _level.Energy() - _excitation;
121 //_gammaEnergy = (_level.GammaEnergies())[iGamma] - eCorrection;
122 _gammaEnergy = (_level.GammaEnergies())[iGamma];
123
124 //JMQ:
125 //1)If chosen gamma energy is close enough to excitation energy,
126 // the later is used instead for gamma dacey to gs (it guarantees
127 // energy conservation)
128 //2)For energy conservation, level energy differences instead of
129 // tabulated gamma energies must be used (origin of final fake photons)
130
131 // VI: remove fake photons - applied only for the last transition
132 // do not applied on each transition
133 if(std::fabs(_excitation - _gammaEnergy) < _tolerance) {
134 _gammaEnergy =_excitation;
135 }
136
137 // JMQ: Warning: the following check is needed to avoid loops:
138 // Due essentially to missing nuclear levels in data files, it is
139 // possible that _gammaEnergy is so low as the nucleus doesn't change
140 // its level after the transition.
141 // When such case is found, force the full deexcitation of the nucleus.
142 //
143 // NOTE: you should force the transition to the next lower level,
144 // but this change needs a more complex revision of actual
145 // design.
146 // I leave this for a later revision.
147
148 // VI: the check has no sence and we make this very simple
149 if (_gammaEnergy < _tolerance) {
150 _gammaEnergy = _excitation;
151 }
152
153 //G4cout << "G4DiscreteGammaTransition::SelectGamma: " << _gammaEnergy
154 // << " _icm: " << _icm << G4endl;
155
156 // now decide whether Internal Coversion electron should be emitted instead
157 if (_icm) {
158 G4double random = G4UniformRand();
159 if ( random <= (_level.TotalConvertionProbabilities())[iGamma]
160 *(_level.GammaWeights())[iGamma]
161 /((_level.TotalConvertionProbabilities())[iGamma]*(_level.GammaWeights())[iGamma]
162 +(_level.GammaWeights())[iGamma]))
163 {
164 G4int iShell = 9;
165 random = G4UniformRand() ;
166 if ( random <= (_level.KConvertionProbabilities())[iGamma])
167 { iShell = 0;}
168 else if ( random <= (_level.L1ConvertionProbabilities())[iGamma])
169 { iShell = 1;}
170 else if ( random <= (_level.L2ConvertionProbabilities())[iGamma])
171 { iShell = 2;}
172 else if ( random <= (_level.L3ConvertionProbabilities())[iGamma])
173 { iShell = 3;}
174 else if ( random <= (_level.M1ConvertionProbabilities())[iGamma])
175 { iShell = 4;}
176 else if ( random <= (_level.M2ConvertionProbabilities())[iGamma])
177 { iShell = 5;}
178 else if ( random <= (_level.M3ConvertionProbabilities())[iGamma])
179 { iShell = 6;}
180 else if ( random <= (_level.M4ConvertionProbabilities())[iGamma])
181 { iShell = 7;}
182 else if ( random <= (_level.M5ConvertionProbabilities())[iGamma])
183 { iShell = 8;}
184 // the following is needed to match the ishell to that used in G4AtomicShells
185 if ( iShell == 9) {
186 if ( (_nucleusZ < 28) && (_nucleusZ > 20)) {
187 iShell--;
188 } else if ( _nucleusZ == 20 || _nucleusZ == 19 ) {
189 iShell = iShell -2;
190 }
191 }
192 //L.Desorgher 02/11/2011
193 //Atomic shell information is available in Geant4 only up top Z=100
194 //To extend the photo evaporation code to Z>100 the call
195 // to G4AtomicShells::GetBindingEnergy should be forbidden for Z>100
196 _bondE = 0.;
197 if (_nucleusZ <=100)
198 _bondE = G4AtomicShells::GetBindingEnergy(_nucleusZ, iShell);
199 if (_verbose > 0) {
200 G4cout << "G4DiscreteGammaTransition: _nucleusZ = " <<_nucleusZ
201 << " , iShell = " << iShell
202 << " , Shell binding energy = " << _bondE/keV
203 << " keV " << G4endl;
204 }
205
206 // 09.05.2010 VI : it is an error - cannot subtract bond energy from
207 // transition energy here
208 //_gammaEnergy = _gammaEnergy - _bondE;
209 //G4cout << "_gammaEnergy = " << _gammaEnergy << G4endl;
210
211 _orbitE = iShell;
212 _aGamma = false ; // emitted is not a gamma now
213 }
214 }
215
216 G4double tau = _level.HalfLife() / G4Pow::GetInstance()->logZ(2);
217
218 //09.05.2010 VI rewrite samling of decay time
219 // assuming ordinary exponential low
220 _gammaCreationTime = 0.;
221 if(tau > 0.0) { _gammaCreationTime = -tau*std::log(G4UniformRand()); }
222
223 }
224 return;
225}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:53
static G4double GetBindingEnergy(G4int Z, G4int SubshellNb)
const std::vector< G4double > & M4ConvertionProbabilities() const
const std::vector< G4double > & GammaEnergies() const
G4double HalfLife() const
const std::vector< G4double > & M1ConvertionProbabilities() const
const std::vector< G4double > & L3ConvertionProbabilities() const
const std::vector< G4double > & L1ConvertionProbabilities() const
const std::vector< G4double > & M5ConvertionProbabilities() const
const std::vector< G4double > & GammaWeights() const
const std::vector< G4double > & L2ConvertionProbabilities() const
const std::vector< G4double > & GammaCumulativeProbabilities() const
const std::vector< G4double > & TotalConvertionProbabilities() const
G4int NumberOfGammas() const
const std::vector< G4double > & KConvertionProbabilities() const
const std::vector< G4double > & M3ConvertionProbabilities() const
const std::vector< G4double > & M2ConvertionProbabilities() const
static G4Pow * GetInstance()
Definition: G4Pow.cc:50
G4double logZ(G4int Z)
Definition: G4Pow.hh:146

◆ SetEnergyFrom()

void G4DiscreteGammaTransition::SetEnergyFrom ( G4double  energy)
virtual

Implements G4VGammaTransition.

Definition at line 237 of file G4DiscreteGammaTransition.cc.

238{
239 _excitation = energy;
240}

◆ SetICM()

void G4DiscreteGammaTransition::SetICM ( G4bool  ic)
inline

Definition at line 98 of file G4DiscreteGammaTransition.hh.

98{ _icm = ic; };

Referenced by G4DiscreteGammaDeexcitation::CreateTransition().


The documentation for this class was generated from the following files: