Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Public Types | Public Member Functions
G4StatMFMicroCanonical Class Reference

#include <G4StatMFMicroCanonical.hh>

Inheritance diagram for G4StatMFMicroCanonical:
G4VStatMFEnsemble

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.

References G4StatMFMicroCanonical().

Referenced by G4StatMFMicroCanonical().

42 {
43  // Perform class initialization
44  Initialize(theFragment);
45 
46 }
G4StatMFMicroCanonical::~G4StatMFMicroCanonical ( )

Definition at line 50 of file G4StatMFMicroCanonical.cc.

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

Member Function Documentation

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

Implements G4VStatMFEnsemble.

Definition at line 245 of file G4StatMFMicroCanonical.cc.

References G4VStatMFEnsemble::__MeanTemperature, G4StatMFChannel::CreateFragment(), G4UniformRand, G4Fragment::GetA_asInt(), and G4Fragment::GetZ_asInt().

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

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