Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 37 of file G4FissionStore.hh.

Constructor & Destructor Documentation

G4FissionStore::G4FissionStore ( )

Definition at line 39 of file G4FissionStore.cc.

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

Member Function Documentation

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

Definition at line 44 of file G4FissionStore.cc.

45  {
46  G4FissionConfiguration config(a, z, ez, ek, ev);
47  configurations.push_back(config);
48  if (verboseLevel > 2) G4cout << config << G4endl;
49 }
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
G4GLOB_DLL std::ostream G4cout
struct config_s config
G4double ek
tuple z
Definition: test.py:28
#define G4endl
Definition: G4ios.hh:61
void G4FissionStore::clear ( void  )
inline

Definition at line 45 of file G4FissionStore.hh.

45 { configurations.clear(); }
G4FissionConfiguration G4FissionStore::generateConfiguration ( G4double  amax,
G4double  rand 
) const

Definition at line 51 of file G4FissionStore.cc.

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

Here is the call graph for this function:

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

Definition at line 41 of file G4FissionStore.hh.

41 { verboseLevel = verbose; }
size_t G4FissionStore::size ( ) const
inline

Definition at line 47 of file G4FissionStore.hh.

47 { return configurations.size(); }

Here is the caller graph for this function:


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