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

#include <G4LENDManager.hh>

Public Member Functions

G4GIDI_targetGetLENDTarget (G4ParticleDefinition *, G4String, G4int iZ, G4int iA, G4int iM=0)
 
std::vector< G4StringIsLENDTargetAvailable (G4ParticleDefinition *, G4int iZ, G4int iA, G4int iM=0)
 
G4int GetNucleusEncoding (G4int iZ, G4int iA, G4int iM)
 
G4NistElementBuilderGetNistElementBuilder ()
 
G4int GetVerboseLevel ()
 
G4bool RequestChangeOfVerboseLevel (G4int)
 
G4double GetExcitationEnergyOfExcitedIsomer (G4int, G4int, G4int)
 

Static Public Member Functions

static G4LENDManagerGetInstance ()
 

Detailed Description

Definition at line 63 of file G4LENDManager.hh.

Member Function Documentation

◆ GetExcitationEnergyOfExcitedIsomer()

G4double G4LENDManager::GetExcitationEnergyOfExcitedIsomer ( G4int  iZ,
G4int  iA,
G4int  iM 
)

Definition at line 407 of file G4LENDManager.cc.

408{
409 G4double EE = 0.0;
410 G4int nucCode = GetNucleusEncoding( iZ , iA , iM );
411 auto it = mExcitationEnergy.find( nucCode );
412 if ( it != mExcitationEnergy.end() ) {
413 EE = it->second;
414 } else {
415 if ( iM == 0 ) {
416 G4cout << "G4LENDManager::GetExcitationEnergyOfExcitedIsomer is called for ground state (iM=0) nucleus" << G4endl;
417 } else {
418 G4cout << "Can not find excitation energy for Z = " << iZ << ", A = " << iA << ", M = " << iM << " and the energy set to 0." << G4endl;
419 }
420 }
421 return EE;
422}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4int GetNucleusEncoding(G4int iZ, G4int iA, G4int iM)

Referenced by G4LENDElastic::ApplyYourself().

◆ GetInstance()

static G4LENDManager * G4LENDManager::GetInstance ( )
inlinestatic

Definition at line 77 of file G4LENDManager.hh.

78 {
79 if ( lend_manager == NULL) lend_manager = new G4LENDManager();
80 return lend_manager;
81 };

Referenced by G4LENDElastic::ApplyYourself(), G4LENDCrossSection::G4LENDCrossSection(), and G4LENDModel::G4LENDModel().

◆ GetLENDTarget()

G4GIDI_target * G4LENDManager::GetLENDTarget ( G4ParticleDefinition proj,
G4String  evaluation,
G4int  iZ,
G4int  iA,
G4int  iM = 0 
)

Definition at line 208 of file G4LENDManager.cc.

209{
210
211 G4GIDI_target* anLENDTarget = NULL;
212
213 if ( iM > 9 ) {
214 throw G4HadronicException(__FILE__, __LINE__, "Requested isomer level of target is too high." );
215 }
216
217 G4int iTarg = GetNucleusEncoding( iZ , iA , iM );
218
219 // Searching in current map
220 for ( std::vector < lend_target >::iterator
221 it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
222 {
223 if ( it->proj == proj && it->target_code == iTarg && it->evaluation == evaluation )
224 {
225 //find!
226 return it->target;
227 }
228 }
229
230
231 if ( proj_lend_map.find ( proj ) == proj_lend_map.end() ) {
232 G4cout << proj->GetParticleName() << " is not supported by this LEND library." << G4endl;
233 return anLENDTarget; // return NULL
234 }
235
236 G4GIDI* xlend = proj_lend_map.find ( proj ) -> second;
237
238 if ( xlend->isThisDataAvailable( evaluation, iZ, iA , iM ) )
239 {
240
241 if ( verboseLevel > 1 ) {
242 G4cout << evaluation << " for " << ionTable->GetIonName( iZ , iA , 0 )
243 << " with Isomer level of " << iM << " is exist in this LEND." << G4endl;
244 }
245
246 anLENDTarget = xlend->readTarget( evaluation , iZ , iA , iM );
247
248 lend_target new_target;
249 new_target.lend = xlend;
250 new_target.target = anLENDTarget;
251 new_target.proj = proj;
252 new_target.evaluation = evaluation;
253 new_target.target_code = iTarg;
254
255 v_lend_target.push_back( new_target );
256
257// found EXACT
258 return anLENDTarget;
259
260 }
261 else
262 {
263// NO EXACT DATA (Evaluatino & Z,A,M)
264
265 //Searching available evaluation and natural abundance data and give suggestions.
266 //
267 if ( verboseLevel > 1 )
268 G4cout << evaluation << " for " << ionTable->GetIonName( iZ , iA , 0 )
269 << " with Isomer level of " << iM << " is not exist in this LEND." << G4endl;
270
271 std::vector< std::string >* available = xlend->getNamesOfAvailableLibraries( iZ, iA , iM );
272 if ( available->size() > 0 ) {
273// EXACT Z,A,M but Evaluation is different
274 if ( verboseLevel > 1 )
275 {
276 G4cout << " However you can use following evaluation(s) for the target. " << G4endl;
277
278 std::vector< std::string >::iterator its;
279 for ( its = available->begin() ; its != available->end() ; its++ )
280 G4cout << *its << G4endl;
281
282 G4cout << G4endl;
283 }
284 } else if ( xlend->isThisDataAvailable( evaluation, iZ, 0 , iM ) ) {
285//
286// checking natural abundance data for Z
287//
288// EXACT natural abundance data for the evaluation
289 if ( verboseLevel > 1 )
290 G4cout << " However you can use natural abundance data for the target. " << G4endl;
291 }
292 else
293 {
294 std::vector< std::string >* available_nat = xlend->getNamesOfAvailableLibraries( iZ, 0 , iM );
295//
296 if ( available_nat->size() > 0 ) {
297// EXACT natural abundance data for Z but differnet evaluation
298 if ( verboseLevel > 1 ) {
299 G4cout << " However you can use following evaluation(s) for natural abundace of the target. " << G4endl;
300
301 std::vector< std::string >::iterator its;
302 for ( its = available_nat->begin() ; its != available_nat->end() ; its++ )
303 G4cout << *its << G4endl;
304 G4cout << G4endl;
305 }
306 }
307 delete available_nat;
308 }
309 delete available;
310// return NULL if exact data is not available
311 return anLENDTarget; // return NULL
312 }
313
314 return anLENDTarget;
315}
Definition: G4GIDI.hh:43
bool isThisDataAvailable(std::string &lib_name, int iZ, int iA, int iM=0)
Definition: G4GIDI.cc:169
G4GIDI_target * readTarget(std::string &lib_name, int iZ, int iA, int iM=0, bool bind=true)
Definition: G4GIDI.cc:289
std::vector< std::string > * getNamesOfAvailableLibraries(int iZ, int iA, int iM=0)
Definition: G4GIDI.cc:237
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1229
const G4String & GetParticleName() const
G4int target_code
G4ParticleDefinition * proj
G4GIDI_target * target
G4GIDI * lend
G4String evaluation

◆ GetNistElementBuilder()

G4NistElementBuilder * G4LENDManager::GetNistElementBuilder ( )
inline

Definition at line 87 of file G4LENDManager.hh.

87{ return nistElementBuilder; };

Referenced by G4LENDCrossSection::create_used_target_map(), and G4LENDModel::create_used_target_map().

◆ GetNucleusEncoding()

G4int G4LENDManager::GetNucleusEncoding ( G4int  iZ,
G4int  iA,
G4int  iM 
)

◆ GetVerboseLevel()

G4int G4LENDManager::GetVerboseLevel ( )
inline

Definition at line 89 of file G4LENDManager.hh.

89{ return verboseLevel; };

Referenced by G4LENDCrossSection::DumpLENDTargetInfo(), G4LENDModel::DumpLENDTargetInfo(), and G4LENDModel::returnUnchanged().

◆ IsLENDTargetAvailable()

std::vector< G4String > G4LENDManager::IsLENDTargetAvailable ( G4ParticleDefinition proj,
G4int  iZ,
G4int  iA,
G4int  iM = 0 
)

Definition at line 318 of file G4LENDManager.cc.

319{
320
321 std::vector< G4String > vEvaluation;
322 if ( proj_lend_map.find ( proj ) == proj_lend_map.end() )
323 {
324 G4cout << proj->GetParticleName() << " is not supported by this LEND." << G4endl;
325 return vEvaluation; // return empty
326 }
327
328 G4GIDI* xlend = proj_lend_map.find ( proj ) -> second;
329 std::vector< std::string >* available = xlend->getNamesOfAvailableLibraries( iZ, iA , iM );
330
331 if ( available->size() > 0 ) {
332 std::vector< std::string >::iterator its;
333 for ( its = available->begin() ; its != available->end() ; its++ )
334 vEvaluation.push_back ( *its );
335 }
336 delete available;
337
338 return vEvaluation;
339}

◆ RequestChangeOfVerboseLevel()

G4bool G4LENDManager::RequestChangeOfVerboseLevel ( G4int  newValue)

Definition at line 391 of file G4LENDManager.cc.

392{
393 G4bool result=false;
394 if ( newValue >= verboseLevel)
395 {
396 verboseLevel = newValue;
397 result=true;
398 }
399 else
400 {
401 G4cout << "Since other LEND model or cross section have set the higher verbose level (" << verboseLevel << ") in LENDManager, you cannot change the value now." << G4endl;
402 }
403
404 return result;
405}
bool G4bool
Definition: G4Types.hh:86

Referenced by G4LENDCrossSection::create_used_target_map(), and G4LENDModel::create_used_target_map().


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