Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4DiscreteGammaDeexcitation Class Reference

#include <G4DiscreteGammaDeexcitation.hh>

Inheritance diagram for G4DiscreteGammaDeexcitation:
G4VGammaDeexcitation

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 ()
 
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 ( )

Definition at line 67 of file G4DiscreteGammaDeexcitation.cc.

References G4NuclearLevelStore::GetInstance().

67  :
68  _nucleusZ(0), _nucleusA(0), _max_hl(1e-6*second), _icm(false),
69  _rdm(false), _levelManager(0)
70 {
71  _tolerance = CLHEP::keV;
73 }
static G4NuclearLevelStore * GetInstance()
G4DiscreteGammaDeexcitation::~G4DiscreteGammaDeexcitation ( )
virtual

Definition at line 75 of file G4DiscreteGammaDeexcitation.cc.

76 {}

Member Function Documentation

G4bool G4DiscreteGammaDeexcitation::CanDoTransition ( )
virtual

Implements G4VGammaDeexcitation.

Definition at line 130 of file G4DiscreteGammaDeexcitation.cc.

References G4VGammaDeexcitation::_transition, G4VGammaDeexcitation::_verbose, G4cout, G4endl, G4Fragment::GetExcitationEnergy(), G4VGammaDeexcitation::GetNucleus(), G4NuclearLevel::HalfLife(), G4NuclearLevelManager::MaxLevelEnergy(), G4NuclearLevelManager::MinLevelEnergy(), and G4NuclearLevelManager::NearestLevel().

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

Implements G4VGammaDeexcitation.

Definition at line 78 of file G4DiscreteGammaDeexcitation.cc.

References G4VGammaDeexcitation::_verbose, G4NuclearLevel::Energy(), G4cout, G4endl, G4Fragment::GetA_asInt(), G4Fragment::GetExcitationEnergy(), G4NuclearLevelStore::GetInstance(), G4NuclearLevelStore::GetManager(), G4VGammaDeexcitation::GetNucleus(), G4Fragment::GetZ_asInt(), G4NuclearLevelManager::IsValid(), G4NuclearLevelManager::NearestLevel(), and G4DiscreteGammaTransition::SetICM().

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

Definition at line 89 of file G4DiscreteGammaDeexcitation.hh.

89 { _max_hl = hl; };
void G4DiscreteGammaDeexcitation::SetICM ( G4bool  hl)
inline

Definition at line 85 of file G4DiscreteGammaDeexcitation.hh.

Referenced by G4PhotonEvaporation::G4PhotonEvaporation().

85 { _icm = hl; };
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: