Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4StatMFMacroCanonical Class Reference

#include <G4StatMFMacroCanonical.hh>

Inheritance diagram for G4StatMFMacroCanonical:
Collaboration diagram for G4StatMFMacroCanonical:

Public Member Functions

 G4StatMFMacroCanonical (G4Fragment const &theFragment)
 
 ~G4StatMFMacroCanonical ()
 
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 49 of file G4StatMFMacroCanonical.hh.

Constructor & Destructor Documentation

G4StatMFMacroCanonical::G4StatMFMacroCanonical ( G4Fragment const &  theFragment)

Definition at line 44 of file G4StatMFMacroCanonical.cc.

45 {
46 
47  // Get memory for clusters
48  _theClusters.push_back(new G4StatMFMacroNucleon); // Size 1
49  _theClusters.push_back(new G4StatMFMacroBiNucleon); // Size 2
50  _theClusters.push_back(new G4StatMFMacroTriNucleon); // Size 3
51  _theClusters.push_back(new G4StatMFMacroTetraNucleon); // Size 4
52  for (G4int i = 4; i < theFragment.GetA_asInt(); i++)
53  _theClusters.push_back(new G4StatMFMacroMultiNucleon(i+1)); // Size 5 ... A
54 
55  // Perform class initialization
56  Initialize(theFragment);
57 
58 }
int G4int
Definition: G4Types.hh:78

Here is the call graph for this function:

Here is the caller graph for this function:

G4StatMFMacroCanonical::~G4StatMFMacroCanonical ( )

Definition at line 61 of file G4StatMFMacroCanonical.cc.

62 {
63  // garbage collection
64  if (!_theClusters.empty())
65  {
66  std::for_each(_theClusters.begin(),_theClusters.end(),DeleteFragment());
67  }
68 }

Member Function Documentation

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

Implements G4VStatMFEnsemble.

Definition at line 123 of file G4StatMFMacroCanonical.cc.

125 {
126  G4int A = theFragment.GetA_asInt();
127  G4int Z = theFragment.GetZ_asInt();
128 
129  std::vector<G4int> ANumbers(A);
130 
131  G4double Multiplicity = ChooseA(A,ANumbers);
132 
133  std::vector<G4int> FragmentsA;
134 
135  G4int i = 0;
136  for (i = 0; i < A; i++)
137  {
138  for (G4int j = 0; j < ANumbers[i]; j++) FragmentsA.push_back(i+1);
139  }
140 
141  // Sort fragments in decreasing order
142  G4int im = 0;
143  for (G4int j = 0; j < Multiplicity; j++)
144  {
145  G4int FragmentsAMax = 0;
146  im = j;
147  for (i = j; i < Multiplicity; i++)
148  {
149  if (FragmentsA[i] <= FragmentsAMax) { continue; }
150  else
151  {
152  im = i;
153  FragmentsAMax = FragmentsA[im];
154  }
155  }
156  if (im != j)
157  {
158  FragmentsA[im] = FragmentsA[j];
159  FragmentsA[j] = FragmentsAMax;
160  }
161  }
162  return ChooseZ(Z,FragmentsA);
163 }
int G4int
Definition: G4Types.hh:78
double A(double temperature)
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:

Here is the caller graph for this function:


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