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

#include <G4StatMFMacroCanonical.hh>

Inheritance diagram for G4StatMFMacroCanonical:
G4VStatMFEnsemble

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.

References G4StatMFMacroCanonical(), and G4Fragment::GetA_asInt().

Referenced by G4StatMFMacroCanonical().

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
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 127 of file G4StatMFMacroCanonical.cc.

References G4Fragment::GetA_asInt(), and G4Fragment::GetZ_asInt().

Referenced by G4StatMF::BreakItUp().

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