Geant4 Cross Reference |
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 // 15.03.2016 V.Ivanchenko 27 // 28 // List of parameters of the pre-compound model 29 // and the deexcitation module 30 // 31 32 #include "G4DeexPrecoParameters.hh" 33 #include "G4ApplicationState.hh" 34 #include "G4StateManager.hh" 35 #include "G4SystemOfUnits.hh" 36 #include "G4UnitsTable.hh" 37 #include "G4PhysicsModelCatalog.hh" 38 #include "G4DeexParametersMessenger.hh" 39 #include "G4HadronicParameters.hh" 40 #include "G4Threading.hh" 41 42 G4DeexPrecoParameters::G4DeexPrecoParameters() 43 { 44 fStateManager = G4StateManager::GetStateManager(); 45 theMessenger = new G4DeexParametersMessenger(this); 46 Initialise(); 47 } 48 49 G4DeexPrecoParameters::~G4DeexPrecoParameters() 50 { 51 delete theMessenger; 52 } 53 54 void G4DeexPrecoParameters::SetDefaults() 55 { 56 if(!IsLocked()) { Initialise(); } 57 } 58 59 void G4DeexPrecoParameters::Initialise() 60 { 61 // common parameters 62 fVerbose = 1; 63 fLevelDensity = 0.075/CLHEP::MeV; 64 fR0 = 1.5*CLHEP::fermi; 65 fTransitionsR0 = 0.6*CLHEP::fermi; 66 67 // preco parameters 68 fPrecoLowEnergy = 0.1*CLHEP::MeV; 69 fPrecoHighEnergy = 30*CLHEP::MeV; 70 fPhenoFactor = 1.0; 71 72 fPrecoType = 1; 73 fMinZForPreco = 3; 74 fMinAForPreco = 5; 75 76 fNeverGoBack = false; 77 fUseSoftCutoff = false; 78 fUseCEM = true; 79 fUseGNASH = false; 80 fUseHETC = false; 81 fUseAngularGen = true; 82 fPrecoDummy = false; 83 84 // de-exitation parameters 85 fMinExcitation = 10*CLHEP::eV; 86 fNuclearLevelWidth = 0.2*CLHEP::MeV; 87 fFBUEnergyLimit = 20.0*CLHEP::MeV; 88 fFermiEnergy = 35.0*CLHEP::MeV; 89 fMaxLifeTime = 1*CLHEP::nanosecond; 90 fMinExPerNucleounForMF = 200*CLHEP::GeV; 91 92 fDeexChannelType = fCombined; 93 fDeexType = 3; 94 fTwoJMAX = 10; 95 96 fCorrelatedGamma = false; 97 fStoreAllLevels = true; 98 fInternalConversion = true; 99 fLD = true; // use simple level density model 100 fFD = false; // use transition to discrete level 101 fIsomerFlag = true; // enable isomere production 102 } 103 104 void G4DeexPrecoParameters::SetLevelDensity(G4double val) 105 { 106 if(IsLocked() || val <= 0.0) { return; } 107 fLevelDensity = val/CLHEP::MeV; 108 } 109 110 void G4DeexPrecoParameters::SetR0(G4double val) 111 { 112 if(IsLocked() || val <= 0.0) { return; } 113 fR0 = val; 114 } 115 116 void G4DeexPrecoParameters::SetTransitionsR0(G4double val) 117 { 118 if(IsLocked() || val <= 0.0) { return; } 119 fTransitionsR0 = val; 120 } 121 122 void G4DeexPrecoParameters::SetFBUEnergyLimit(G4double val) 123 { 124 if(IsLocked() || val <= 0.0) { return; } 125 fFBUEnergyLimit = val; 126 } 127 128 void G4DeexPrecoParameters::SetFermiEnergy(G4double val) 129 { 130 if(IsLocked() || val <= 0.0) { return; } 131 fFermiEnergy = val; 132 } 133 134 void G4DeexPrecoParameters::SetPrecoLowEnergy(G4double val) 135 { 136 if(IsLocked() || val < 0.0) { return; } 137 fPrecoLowEnergy = val; 138 } 139 140 void G4DeexPrecoParameters::SetPrecoHighEnergy(G4double val) 141 { 142 if(IsLocked() || val < 0.0) { return; } 143 fPrecoHighEnergy = val; 144 } 145 146 void G4DeexPrecoParameters::SetPhenoFactor(G4double val) 147 { 148 if(IsLocked() || val <= 0.0) { return; } 149 fPhenoFactor = val; 150 } 151 152 void G4DeexPrecoParameters::SetMinExcitation(G4double val) 153 { 154 if(IsLocked() || val < 0.0) { return; } 155 fMinExcitation = val; 156 } 157 158 void G4DeexPrecoParameters::SetNuclearLevelWidth(G4double val) 159 { 160 if(IsLocked() || val < 0.0) { return; } 161 fNuclearLevelWidth = val; 162 } 163 164 void G4DeexPrecoParameters::SetMaxLifeTime(G4double val) 165 { 166 if(IsLocked() || val < 0.0) { return; } 167 fMaxLifeTime = val; 168 } 169 170 void G4DeexPrecoParameters::SetMinExPerNucleounForMF(G4double val) 171 { 172 if(IsLocked() || val < 0.0) { return; } 173 fMinExPerNucleounForMF = val; 174 } 175 176 void G4DeexPrecoParameters::SetMinZForPreco(G4int n) 177 { 178 if(IsLocked() || n < 2) { return; } 179 fMinZForPreco = n; 180 } 181 182 void G4DeexPrecoParameters::SetMinAForPreco(G4int n) 183 { 184 if(IsLocked() || n < 0) { return; } 185 fMinAForPreco = n; 186 } 187 188 void G4DeexPrecoParameters::SetPrecoModelType(G4int n) 189 { 190 if(IsLocked() || n < 0 || n > 3) { return; } 191 fPrecoType = n; 192 } 193 194 void G4DeexPrecoParameters::SetDeexModelType(G4int n) 195 { 196 if(IsLocked() || n < 0 || n > 3) { return; } 197 fDeexType = n; 198 } 199 200 void G4DeexPrecoParameters::SetTwoJMAX(G4int n) 201 { 202 if(IsLocked() || n < 0) { return; } 203 fTwoJMAX = n; 204 } 205 206 void G4DeexPrecoParameters::SetVerbose(G4int n) 207 { 208 if(IsLocked()) { return; } 209 fVerbose = n; 210 } 211 212 void G4DeexPrecoParameters::SetNeverGoBack(G4bool val) 213 { 214 if(IsLocked()) { return; } 215 fNeverGoBack = val; 216 } 217 218 void G4DeexPrecoParameters::SetUseSoftCutoff(G4bool val) 219 { 220 if(IsLocked()) { return; } 221 fUseSoftCutoff = val; 222 } 223 224 void G4DeexPrecoParameters::SetUseCEM(G4bool val) 225 { 226 if(IsLocked()) { return; } 227 fUseCEM = val; 228 } 229 230 void G4DeexPrecoParameters::SetUseGNASH(G4bool val) 231 { 232 if(IsLocked()) { return; } 233 fUseGNASH = val; 234 } 235 236 void G4DeexPrecoParameters::SetUseHETC(G4bool val) 237 { 238 if(IsLocked()) { return; } 239 fUseHETC = val; 240 } 241 242 void G4DeexPrecoParameters::SetUseAngularGen(G4bool val) 243 { 244 if(IsLocked()) { return; } 245 fUseAngularGen = val; 246 } 247 248 void G4DeexPrecoParameters::SetPrecoDummy(G4bool val) 249 { 250 if(IsLocked()) { return; } 251 fPrecoDummy = val; 252 fDeexChannelType = fDummy; 253 } 254 255 void G4DeexPrecoParameters::SetCorrelatedGamma(G4bool val) 256 { 257 if(IsLocked()) { return; } 258 fCorrelatedGamma = val; 259 } 260 261 void G4DeexPrecoParameters::SetStoreICLevelData(G4bool val) 262 { 263 if(IsLocked()) { return; } 264 fStoreAllLevels = val; 265 } 266 267 void G4DeexPrecoParameters::SetStoreAllLevels(G4bool val) 268 { 269 SetStoreICLevelData(val); 270 } 271 272 void G4DeexPrecoParameters::SetInternalConversionFlag(G4bool val) 273 { 274 if(IsLocked()) { return; } 275 fInternalConversion = val; 276 } 277 278 void G4DeexPrecoParameters::SetLevelDensityFlag(G4bool val) 279 { 280 if(IsLocked()) { return; } 281 fLD = val; 282 } 283 284 void G4DeexPrecoParameters::SetDiscreteExcitationFlag(G4bool val) 285 { 286 if(IsLocked()) { return; } 287 fFD = val; 288 } 289 290 void G4DeexPrecoParameters::SetIsomerProduction(G4bool val) 291 { 292 if(IsLocked()) { return; } 293 fIsomerFlag = val; 294 } 295 296 void G4DeexPrecoParameters::SetDeexChannelsType(G4DeexChannelType val) 297 { 298 if(IsLocked()) { return; } 299 fDeexChannelType = val; 300 } 301 302 std::ostream& G4DeexPrecoParameters::StreamInfo(std::ostream& os) const 303 { 304 static const G4String namm[5] = {"Evaporation","GEM","Evaporation+GEM","GEMVI","Dummy"}; 305 static const G4int nmm[5] = {8, 68, 68, 31, 0}; 306 G4int idx = fDeexChannelType; 307 308 G4long prec = os.precision(5); 309 os << "=======================================================================" << "\n"; 310 os << "====== Geant4 Native Pre-compound Model Parameters ========" << "\n"; 311 os << "=======================================================================" << "\n"; 312 os << "Type of pre-compound inverse x-section " << fPrecoType << "\n"; 313 os << "Pre-compound model active " << (!fPrecoDummy) << "\n"; 314 os << "Pre-compound excitation low energy " 315 << G4BestUnit(fPrecoLowEnergy, "Energy") << "\n"; 316 os << "Pre-compound excitation high energy " 317 << G4BestUnit(fPrecoHighEnergy, "Energy") << "\n"; 318 os << "Angular generator for pre-compound model " << fUseAngularGen << "\n"; 319 os << "Use NeverGoBack option for pre-compound model " << fNeverGoBack << "\n"; 320 os << "Use SoftCutOff option for pre-compound model " << fUseSoftCutoff << "\n"; 321 os << "Use CEM transitions for pre-compound model " << fUseCEM << "\n"; 322 os << "Use GNASH transitions for pre-compound model " << fUseGNASH << "\n"; 323 os << "Use HETC submodel for pre-compound model " << fUseHETC << "\n"; 324 os << "=======================================================================" << "\n"; 325 os << "====== Nuclear De-excitation Module Parameters ========" << "\n"; 326 os << "=======================================================================" << "\n"; 327 os << "Type of de-excitation inverse x-section " << fDeexType << "\n"; 328 os << "Type of de-excitation factory " << namm[idx] << "\n"; 329 os << "Number of de-excitation channels " << nmm[idx] << "\n"; 330 os << "Min excitation energy " 331 << G4BestUnit(fMinExcitation, "Energy") << "\n"; 332 os << "Min energy per nucleon for multifragmentation " 333 << G4BestUnit(fMinExPerNucleounForMF, "Energy") << "\n"; 334 os << "Limit excitation energy for Fermi BreakUp " 335 << G4BestUnit(fFBUEnergyLimit, "Energy") << "\n"; 336 os << "Level density (1/MeV) " 337 << fLevelDensity*CLHEP::MeV << "\n"; 338 os << "Use simple level density model " << fLD << "\n"; 339 os << "Use discrete excitation energy of the residual " << fFD << "\n"; 340 os << "Time limit for long lived isomeres " 341 << G4BestUnit(fMaxLifeTime, "Time") << "\n"; 342 os << "Isomer production flag " << fIsomerFlag << "\n"; 343 os << "Internal e- conversion flag " 344 << fInternalConversion << "\n"; 345 os << "Store e- internal conversion data " << fStoreAllLevels << "\n"; 346 os << "Correlated gamma emission flag " << fCorrelatedGamma << "\n"; 347 os << "Max 2J for sampling of angular correlations " << fTwoJMAX << "\n"; 348 os << "=======================================================================" << G4endl; 349 os.precision(prec); 350 return os; 351 } 352 353 G4int G4DeexPrecoParameters::GetVerbose() const 354 { 355 G4int verb = G4HadronicParameters::Instance()->GetVerboseLevel(); 356 return (verb > 0) ? std::max(fVerbose, verb) : verb; 357 } 358 359 void G4DeexPrecoParameters::Dump() 360 { 361 if(!fIsPrinted && GetVerbose() > 0 && G4Threading::IsMasterThread()) { 362 StreamInfo(G4cout); 363 fIsPrinted = true; 364 } 365 } 366 367 std::ostream& operator<< (std::ostream& os, const G4DeexPrecoParameters& par) 368 { 369 return par.StreamInfo(os); 370 } 371 372 G4bool G4DeexPrecoParameters::IsLocked() const 373 { 374 return (!G4Threading::IsMasterThread() || 375 (fStateManager->GetCurrentState() != G4State_PreInit)); 376 } 377