Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4StatMFMicroCanonical Class Reference

#include <G4StatMFMicroCanonical.hh>

Inheritance diagram for G4StatMFMicroCanonical:
Collaboration diagram for G4StatMFMicroCanonical:

Public Types

enum  { MaxAllowedMultiplicity = 4 }
 

Public Member Functions

 G4StatMFMicroCanonical (const G4Fragment &theFragment)
 
 ~G4StatMFMicroCanonical ()
 
G4StatMFChannelChooseAandZ (const G4Fragment &theFragment)
 
- Public Member Functions inherited from G4VStatMFEnsemble
 G4VStatMFEnsemble ()
 
virtual ~G4VStatMFEnsemble ()
 
G4double GetMeanMultiplicity (void) const
 
G4double GetMeanTemperature (void) const
 

Additional Inherited Members

- Protected Attributes inherited from G4VStatMFEnsemble
G4double __FreeInternalE0
 
G4double __MeanTemperature
 
G4double __MeanEntropy
 
G4double __MeanMultiplicity
 

Detailed Description

Definition at line 47 of file G4StatMFMicroCanonical.hh.

Member Enumeration Documentation

anonymous enum
Enumerator
MaxAllowedMultiplicity 

Definition at line 77 of file G4StatMFMicroCanonical.hh.

Constructor & Destructor Documentation

G4StatMFMicroCanonical::G4StatMFMicroCanonical ( const G4Fragment theFragment)

Definition at line 41 of file G4StatMFMicroCanonical.cc.

42 {
43  // Perform class initialization
44  Initialize(theFragment);
45 }

Here is the call graph for this function:

Here is the caller graph for this function:

G4StatMFMicroCanonical::~G4StatMFMicroCanonical ( )

Definition at line 48 of file G4StatMFMicroCanonical.cc.

49 {
50  // garbage collection
51  if (!_ThePartitionManagerVector.empty()) {
52  std::for_each(_ThePartitionManagerVector.begin(),
53  _ThePartitionManagerVector.end(),
54  DeleteFragment());
55  }
56 }

Member Function Documentation

G4StatMFChannel * G4StatMFMicroCanonical::ChooseAandZ ( const G4Fragment theFragment)
virtual

Implements G4VStatMFEnsemble.

Definition at line 234 of file G4StatMFMicroCanonical.cc.

236 {
237  // We choose a multiplicity (1,2,3,...) and then a channel
238  G4double RandNumber = G4UniformRand();
239 
240  if (RandNumber < _WCompoundNucleus) {
241 
242  G4StatMFChannel * aChannel = new G4StatMFChannel;
243  aChannel->CreateFragment(theFragment.GetA_asInt(),theFragment.GetZ_asInt());
244  return aChannel;
245 
246  } else {
247 
248  G4double AccumWeight = _WCompoundNucleus;
249  std::vector<G4StatMFMicroManager*>::iterator it;
250  for (it = _ThePartitionManagerVector.begin(); it != _ThePartitionManagerVector.end(); ++it) {
251  AccumWeight += (*it)->GetProbability();
252  if (RandNumber < AccumWeight) {
253  return (*it)->ChooseChannel(theFragment.GetA_asInt(),theFragment.GetZ_asInt(),__MeanTemperature);
254  }
255  }
256  throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroCanonical::ChooseAandZ: wrong normalization!");
257  }
258 
259  return 0;
260 }
void CreateFragment(G4int A, G4int Z)
#define G4UniformRand()
Definition: Randomize.hh:97
G4int GetA_asInt() const
Definition: G4Fragment.hh:266
G4int GetZ_asInt() const
Definition: G4Fragment.hh:271
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:


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