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

#include <G4DiscreteGammaDeexcitation.hh>

+ Inheritance diagram for G4DiscreteGammaDeexcitation:

Public Member Functions

 G4DiscreteGammaDeexcitation ()
 
virtual ~G4DiscreteGammaDeexcitation ()
 
virtual G4VGammaTransitionCreateTransition ()
 
virtual G4bool CanDoTransition ()
 
void SetICM (G4bool hl)
 
void SetRDM (G4bool hl)
 
void SetHL (G4double hl)
 
- Public Member Functions inherited from G4VGammaDeexcitation
 G4VGammaDeexcitation ()
 
virtual ~G4VGammaDeexcitation ()
 
virtual G4VGammaTransitionCreateTransition ()=0
 
virtual G4bool CanDoTransition ()=0
 
G4FragmentVectorDoTransition ()
 
G4FragmentVectorDoChain ()
 
G4FragmentGenerateGamma ()
 
G4FragmentGetNucleus ()
 
void SetNucleus (G4Fragment *nucleus)
 
void SetVerboseLevel (G4int verbose)
 
void Initialize ()
 
void SetEO (G4ElectronOccupancy eo)
 
void SetVaccantSN (G4int val)
 
G4ElectronOccupancy GetEO ()
 
G4int GetVacantSN ()
 
void SetTimeLimit (G4double value)
 

Additional Inherited Members

- Protected Member Functions inherited from G4VGammaDeexcitation
void Update ()
 
- Protected Attributes inherited from G4VGammaDeexcitation
G4VGammaTransition_transition
 
G4int _verbose
 

Detailed Description

Definition at line 68 of file G4DiscreteGammaDeexcitation.hh.

Constructor & Destructor Documentation

◆ G4DiscreteGammaDeexcitation()

G4DiscreteGammaDeexcitation::G4DiscreteGammaDeexcitation ( )

Definition at line 67 of file G4DiscreteGammaDeexcitation.cc.

67 :
68 _nucleusZ(0), _nucleusA(0), _max_hl(1e-6*second), _icm(false),
69 _rdm(false), _levelManager(0)
70{
71 _tolerance = CLHEP::keV;
72}

◆ ~G4DiscreteGammaDeexcitation()

G4DiscreteGammaDeexcitation::~G4DiscreteGammaDeexcitation ( )
virtual

Definition at line 74 of file G4DiscreteGammaDeexcitation.cc.

75{}

Member Function Documentation

◆ CanDoTransition()

G4bool G4DiscreteGammaDeexcitation::CanDoTransition ( )
virtual

Implements G4VGammaDeexcitation.

Definition at line 129 of file G4DiscreteGammaDeexcitation.cc.

130{
131
132 G4bool canDo = true;
133
134 if (_transition == 0) {
135 canDo = false;
136
137 if (_verbose > 0)
138 G4cout
139 << "G4DiscreteGammaDeexcitation::CanDoTransition - Null transition "
140 << G4endl;
141 }
142 if (canDo) {
143 //remove the _nucleusZ>98 limit L. Desorgher Sept. 2011
144 //if (_nucleusZ<2 || _nucleusA<3 || _nucleusZ>98)
145 if (_nucleusZ<2 || _nucleusA<3 )
146 {
147 canDo = false;
148 if (_verbose > 0)
149 G4cout
150 << "G4DiscreteGammaDeexcitation::CanDoTransition - n/p/H/>Cf"
151 << G4endl;
152 }
153 }
154
155 G4Fragment* nucleus = GetNucleus();
156 G4double excitation = nucleus->GetExcitationEnergy();
157 //G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition: " << nucleus << G4endl;
158
159 if (canDo) {
160 if (excitation <= _tolerance) {
161 canDo = false;
162 if (_verbose > 0) {
163 G4cout
164 << "G4DiscreteGammaDeexcitation::CanDoTransition - Excitation <= 0"
165 << excitation << " " << excitation - _tolerance
166 << G4endl;
167 }
168 } else {
169 if (excitation > _levelManager->MaxLevelEnergy() + _tolerance) { canDo = false; }
170 //if (excitation < _levelManager->MinLevelEnergy() - _tolerance) canDo = false;
171 // The following is a protection to avoid looping in case of elements with very low
172 // ensdf levels
173 //if (excitation < _levelManager->MinLevelEnergy() * 0.9) canDo = false;
174
175 if (_verbose > 0) {
176 G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition - Excitation "
177 << excitation << ", Min-Max are "
178 << _levelManager->MinLevelEnergy() << " "
179 << _levelManager->MaxLevelEnergy() << G4endl;
180 }
181 }
182 }
183
184 if (canDo) {
185 const G4NuclearLevel* level = _levelManager->NearestLevel(excitation);
186 if (!level) {
187 canDo = false;
188
189 } else {
190 if (level->HalfLife() > _max_hl && !_rdm ) { canDo = false; }
191
192 if (_verbose > 0) {
193 G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition - Halflife "
194 << level->HalfLife() << ", Calling from RDM "
195 << (_rdm ? " True " : " False ") << ", Max-HL = " << _max_hl
196 << G4endl;
197 }
198 }
199 }
200 if (_verbose > 0) {
201 G4cout <<"G4DiscreteGammaDeexcitation::CanDoTransition - CanDo: "
202 << (canDo ? " True " : " False ") << G4endl;
203 }
204
205 return canDo;
206
207}
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:235
const G4NuclearLevel * NearestLevel(G4double energy, G4double eDiffMax=9999.*CLHEP::GeV) const
G4double HalfLife() const
G4VGammaTransition * _transition

◆ CreateTransition()

G4VGammaTransition * G4DiscreteGammaDeexcitation::CreateTransition ( )
virtual

Implements G4VGammaDeexcitation.

Definition at line 77 of file G4DiscreteGammaDeexcitation.cc.

78{
79 G4Fragment* nucleus = GetNucleus();
80 G4int A = nucleus->GetA_asInt();
81 G4int Z = nucleus->GetZ_asInt();
82 // _verbose =2;
83 // G4cout << "G4DiscreteGammaDeexcitation::CreateTransition: " << nucleus << G4endl;
84 if (_nucleusA != A || _nucleusZ != Z)
85 {
86 _nucleusA = A;
87 _nucleusZ = Z;
88 _levelManager = G4NuclearLevelStore::GetInstance()->GetManager(Z,A);
89 }
90
91 if (_levelManager->IsValid())
92 {
93 if (_verbose > 1)
94 {
95 G4cout
96 << "G4DiscreteGammaDeexcitation::CreateTransition - (A,Z) is valid "
97 << G4endl;
98 }
99
100 G4double excitation = nucleus->GetExcitationEnergy();
101 const G4NuclearLevel* level =_levelManager->NearestLevel(excitation);
102
103 if (level != 0)
104 {
105 if (_verbose > 0) {
106 G4cout
107 << "G4DiscreteGammaDeexcitation::CreateTransition - Created from level energy "
108 << level->Energy() << ", excitation is "
109 << excitation << G4endl;
110 }
111 G4DiscreteGammaTransition* dtransit = new G4DiscreteGammaTransition(*level,Z,A);
112 dtransit->SetICM(_icm);
113 return dtransit;
114 }
115 else
116 {
117 if (_verbose > 0) {
118 G4cout
119 << "G4DiscreteGammaDeexcitation::CreateTransition - No transition created from "
120 << excitation << " within tolerance " << _tolerance << G4endl;
121 }
122 return 0;
123 }
124 }
125 return 0;
126}
int G4int
Definition: G4Types.hh:66
G4int GetZ_asInt() const
Definition: G4Fragment.hh:223
G4int GetA_asInt() const
Definition: G4Fragment.hh:218
G4NuclearLevelManager * GetManager(G4int Z, G4int A)
static G4NuclearLevelStore * GetInstance()
G4double Energy() const

◆ SetHL()

void G4DiscreteGammaDeexcitation::SetHL ( G4double  hl)
inline

Definition at line 89 of file G4DiscreteGammaDeexcitation.hh.

89{ _max_hl = hl; };

◆ SetICM()

void G4DiscreteGammaDeexcitation::SetICM ( G4bool  hl)
inline

Definition at line 85 of file G4DiscreteGammaDeexcitation.hh.

85{ _icm = hl; };

Referenced by G4PhotonEvaporation::G4PhotonEvaporation().

◆ SetRDM()

void G4DiscreteGammaDeexcitation::SetRDM ( G4bool  hl)
inline

Definition at line 87 of file G4DiscreteGammaDeexcitation.hh.

87{ _rdm = hl; };

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