Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4StatMFMacroCanonical Class Reference

#include <G4StatMFMacroCanonical.hh>

+ Inheritance diagram for G4StatMFMacroCanonical:

Public Member Functions

 G4StatMFMacroCanonical (G4Fragment const &theFragment)
 
 ~G4StatMFMacroCanonical ()
 
G4StatMFChannelChooseAandZ (const G4Fragment &theFragment)
 
- Public Member Functions inherited from G4VStatMFEnsemble
 G4VStatMFEnsemble ()
 
virtual ~G4VStatMFEnsemble ()
 
virtual G4StatMFChannelChooseAandZ (const G4Fragment &aFragment)=0
 
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::G4StatMFMacroCanonical ( G4Fragment const &  theFragment)

Definition at line 43 of file G4StatMFMacroCanonical.cc.

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

Referenced by G4StatMFMacroCanonical().

◆ ~G4StatMFMacroCanonical()

G4StatMFMacroCanonical::~G4StatMFMacroCanonical ( )

Definition at line 60 of file G4StatMFMacroCanonical.cc.

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

Member Function Documentation

◆ ChooseAandZ()

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

Implements G4VStatMFEnsemble.

Definition at line 122 of file G4StatMFMacroCanonical.cc.

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

Referenced by G4StatMF::BreakItUp().


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