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

#include <G4FissionStore.hh>

Public Member Functions

 G4FissionStore ()
 
void setVerboseLevel (G4int verbose=1)
 
void addConfig (G4double a, G4double z, G4double ez, G4double ek, G4double ev)
 
void clear ()
 
size_t size () const
 
G4FissionConfiguration generateConfiguration (G4double amax, G4double rand) const
 

Detailed Description

Definition at line 36 of file G4FissionStore.hh.

Constructor & Destructor Documentation

◆ G4FissionStore()

G4FissionStore::G4FissionStore ( )

Definition at line 38 of file G4FissionStore.cc.

38 : verboseLevel(0) {
39 if (verboseLevel > 1)
40 G4cout << " >>> G4FissionStore::G4FissionStore" << G4endl;
41}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

Member Function Documentation

◆ addConfig()

void G4FissionStore::addConfig ( G4double a,
G4double z,
G4double ez,
G4double ek,
G4double ev )

Definition at line 43 of file G4FissionStore.cc.

44 {
45 G4FissionConfiguration config(a, z, ez, ek, ev);
46 configurations.push_back(config);
47 if (verboseLevel > 2) G4cout << config << G4endl;
48}
struct config_s config

Referenced by G4Fissioner::deExcite().

◆ clear()

void G4FissionStore::clear ( )
inline

Definition at line 44 of file G4FissionStore.hh.

44{ configurations.clear(); }

Referenced by G4Fissioner::deExcite().

◆ generateConfiguration()

G4FissionConfiguration G4FissionStore::generateConfiguration ( G4double amax,
G4double rand ) const

Definition at line 50 of file G4FissionStore.cc.

51 {
52 if (verboseLevel > 1)
53 G4cout << " >>> G4FissionStore::generateConfiguration" << G4endl;
54
55 const G4double small = -30.0;
56
57 G4double totProb = 0.0;
58 configProbs.resize(size(),0.);
59
60 if (verboseLevel > 3)
61 G4cout << " amax " << amax << " ic " << size() << G4endl;
62
63 for (size_t i = 0; i < size(); i++) {
64 G4double ez = configurations[i].ezet;
65 G4double pr = ez - amax;
66
67 if (pr < small) pr = small;
68 pr = G4Exp(pr);
69 if (verboseLevel > 2) {
70 G4cout << configurations[i] << "\n probability " << pr << G4endl;
71 }
72 totProb += pr;
73 configProbs[i] = totProb;
74 };
75
76 G4double st = totProb * rand;
77
78 size_t igen = 0;
79 /* Loop checking 08.06.2015 MHK */
80 while (configProbs[igen] <= st && igen < size()) igen++;
81
82 if (verboseLevel > 3) G4cout << " igen " << igen << G4endl;
83
84 return configurations[igen];
85}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition G4Exp.hh:180
double G4double
Definition G4Types.hh:83
size_t size() const

Referenced by G4Fissioner::deExcite().

◆ setVerboseLevel()

void G4FissionStore::setVerboseLevel ( G4int verbose = 1)
inline

Definition at line 40 of file G4FissionStore.hh.

40{ verboseLevel = verbose; }

Referenced by G4Fissioner::deExcite().

◆ size()

size_t G4FissionStore::size ( ) const
inline

Definition at line 46 of file G4FissionStore.hh.

46{ return configurations.size(); }

Referenced by G4Fissioner::deExcite(), and generateConfiguration().


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