Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4DeexPrecoParameters.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4DeexPrecoParameters.cc 68028 2013-03-13 13:48:15Z gcosmo $
27 //
28 // 15.03.2016 V.Ivanchenko
29 //
30 // List of parameters of the pre-compound model
31 // and the deexcitation module
32 //
33 
34 #include "G4DeexPrecoParameters.hh"
35 #include "G4ApplicationState.hh"
36 #include "G4StateManager.hh"
37 #include "G4SystemOfUnits.hh"
38 
39 #ifdef G4MULTITHREADED
40 G4Mutex G4DeexPrecoParameters::deexPrecoMutex = G4MUTEX_INITIALIZER;
41 #endif
42 
44 {
45  fStateManager = G4StateManager::GetStateManager();
46  SetDefaults();
47 }
48 
50 {
51 #ifdef G4MULTITHREADED
52  G4MUTEXLOCK(&G4DeexPrecoParameters::deexPrecoMutex);
53 #endif
54  fLevelDensity = 0.10/CLHEP::MeV;
55  fR0 = 1.5*CLHEP::fermi;
56  fTransitionsR0 = 0.6*CLHEP::fermi;
57  fFermiEnergy = 35.0*CLHEP::MeV;
58  fPrecoLowEnergy = 0.1*CLHEP::MeV;
59  fPhenoFactor = 1.0;
60  fMinExcitation = 10*CLHEP::eV;
61  fMaxLifeTime = 1000*CLHEP::second;
62  fMinExPerNucleounForMF = 100*CLHEP::GeV;
63  fMinZForPreco = 3;
64  fMinAForPreco = 5;
65  fPrecoType = 3;
66  fDeexType = 3;
67  fNeverGoBack = false;
68  fUseSoftCutoff = false;
69  fUseCEM = true;
70  fUseGNASH = false;
71  fUseHETC = false;
72  fUseAngularGen = false;
73  fUseLongFiles = true;
74  fCorrelatedGamma = false;
75  fStoreAllLevels = false;
76  fDeexChannelType = fEvaporation;
77 #ifdef G4MULTITHREADED
78  G4MUTEXUNLOCK(&G4DeexPrecoParameters::deexPrecoMutex);
79 #endif
80 }
81 
83 {
84  if(IsLocked()) { return; }
85  fLevelDensity = val/CLHEP::MeV;
86 }
87 
89 {
90  if(IsLocked()) { return; }
91  fR0 = val;
92 }
93 
95 {
96  if(IsLocked()) { return; }
97  fTransitionsR0 = val;
98 }
99 
101 {
102  if(IsLocked()) { return; }
103  fFermiEnergy = val;
104 }
105 
107 {
108  if(IsLocked()) { return; }
109  fPrecoLowEnergy = val;
110 }
111 
113 {
114  if(IsLocked()) { return; }
115  fPhenoFactor = val;
116 }
117 
119 {
120  if(IsLocked()) { return; }
121  fMinExcitation = val;
122 }
123 
125 {
126  if(IsLocked()) { return; }
127  fMaxLifeTime = val;
128 }
129 
131 {
132  if(IsLocked()) { return; }
133  fMinExPerNucleounForMF = val;
134 }
135 
137 {
138  if(IsLocked()) { return; }
139  fMinZForPreco = n;
140 }
141 
143 {
144  if(IsLocked()) { return; }
145  fMinAForPreco = n;
146 }
147 
149 {
150  if(IsLocked()) { return; }
151  fPrecoType = n;
152 }
153 
155 {
156  if(IsLocked()) { return; }
157  fDeexType = n;
158 }
159 
161 {
162  if(IsLocked()) { return; }
163  fNeverGoBack = val;
164 }
165 
167 {
168  if(IsLocked()) { return; }
169  fUseSoftCutoff = val;
170 }
171 
173 {
174  if(IsLocked()) { return; }
175  fUseCEM = val;
176 }
177 
179 {
180  if(IsLocked()) { return; }
181  fUseGNASH = val;
182 }
183 
185 {
186  if(IsLocked()) { return; }
187  fUseHETC = val;
188 }
189 
191 {
192  if(IsLocked()) { return; }
193  fUseAngularGen = val;
194 }
195 
197 {
198  if(IsLocked()) { return; }
199  fUseLongFiles = val;
200 }
201 
203 {}
204 
206 {
207  if(IsLocked()) { return; }
208  fStoreAllLevels = val;
209 }
210 
212 {
213  if(IsLocked()) { return; }
214  fDeexChannelType = val;
215 }
216 
217 std::ostream& G4DeexPrecoParameters::StreamInfo(std::ostream& os) const
218 {
219  G4int prec = os.precision(5);
220  os << "=======================================================================" << "\n";
221  os << "====== Pre-compound/De-excitation Physics Parameters ========" << "\n";
222  os << "=======================================================================" << "\n";
223  os << "Type of pre-compound inverse x-section " << fPrecoType << "\n";
224  os << "Type of de-excitation inverse x-section " << fDeexType << "\n";
225  os << "Min excitation energy (keV) "
226  << fMinExcitation/CLHEP::keV << "\n";
227  os << "Level density (1/MeV) "
228  << fLevelDensity*CLHEP::MeV << "\n";
229  os << "Time limit for long lived isomeres (ns) "
230  << fMaxLifeTime/CLHEP::ns << "\n";
231  os << "Use new data files " << fUseLongFiles << "\n";
232  os << "Use complete data files " << fStoreAllLevels << "\n";
233  os << "Correlated gamma emission flag " << fCorrelatedGamma << "\n";
234  os << "=======================================================================" << "\n";
235  os.precision(prec);
236  return os;
237 }
238 
240 {
242 }
243 
244 std::ostream& operator<< (std::ostream& os, const G4DeexPrecoParameters& par)
245 {
246  return par.StreamInfo(os);
247 }
248 
249 G4bool G4DeexPrecoParameters::IsLocked() const
250 {
251  return (!G4Threading::IsMasterThread() ||
252  (fStateManager->GetCurrentState() != G4State_PreInit));
253 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
void SetDeexChannelsType(G4DeexChannelType)
static constexpr double keV
static constexpr double ns
int G4int
Definition: G4Types.hh:78
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:175
static G4StateManager * GetStateManager()
static const double prec
Definition: RanecuEngine.cc:58
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static constexpr double MeV
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
G4ApplicationState GetCurrentState() const
const G4int n
static constexpr double eV
static constexpr double GeV
G4int G4Mutex
Definition: G4Threading.hh:173
void SetMinExPerNucleounForMF(G4double)
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
static constexpr double fermi
Definition: SystemOfUnits.h:83
static constexpr double second
G4bool IsMasterThread()
Definition: G4Threading.cc:146
std::ostream & StreamInfo(std::ostream &os) const
double G4double
Definition: G4Types.hh:76