55 Initialize(theFragment);
63 if (!_theClusters.empty())
65 std::for_each(_theClusters.begin(),_theClusters.end(),DeleteFragment());
70void G4StatMFMacroCanonical::Initialize(
const G4Fragment & theFragment)
85 CalculateTemperature(theFragment);
89void G4StatMFMacroCanonical::CalculateTemperature(
const G4Fragment & theFragment)
98 G4double FragMult = std::max((1.0+(2.31/MeV)*(U/A - 3.5*MeV))*A/100.0, 2.0);
102 _Kappa = (1.0+elm_coupling*(g4calc->
A13(FragMult)-1)/
104 _Kappa = _Kappa*_Kappa*_Kappa - 1.0;
128 std::vector<G4int> ANumbers(
A);
130 G4double Multiplicity = ChooseA(
A,ANumbers);
132 std::vector<G4int> FragmentsA;
135 for (i = 0; i <
A; i++)
137 for (
G4int j = 0; j < ANumbers[i]; j++) FragmentsA.push_back(i+1);
142 for (
G4int j = 0; j < Multiplicity; j++)
144 G4int FragmentsAMax = 0;
146 for (i = j; i < Multiplicity; i++)
148 if (FragmentsA[i] <= FragmentsAMax) {
continue; }
152 FragmentsAMax = FragmentsA[im];
157 FragmentsA[im] = FragmentsA[j];
158 FragmentsA[j] = FragmentsAMax;
161 return ChooseZ(Z,FragmentsA);
164G4double G4StatMFMacroCanonical::ChooseA(
G4int A, std::vector<G4int> & ANumbers)
170 std::vector<G4double> AcumMultiplicity;
171 AcumMultiplicity.reserve(A);
173 AcumMultiplicity.push_back((*(_theClusters.begin()))->GetMeanMultiplicity());
174 for (std::vector<G4VStatMFMacroCluster*>::iterator it = _theClusters.begin()+1;
175 it != _theClusters.end(); ++it)
177 AcumMultiplicity.push_back((*it)->GetMeanMultiplicity()+AcumMultiplicity.back());
186 for (i = 0; i <
A; i++) ANumbers[i] = 0;
189 for (i = 0; i <
A; i++) {
190 if (RandNumber < AcumMultiplicity[i]) {
196 ANumbers[ThisOne] = ANumbers[ThisOne]+1;
201 }
while (CheckA > 0);
210 std::vector<G4int> & FragmentsA)
214 std::vector<G4int> FragmentsZ;
218 G4int multiplicity = FragmentsA.size();
223 for (
G4int i = 0; i < multiplicity; i++)
229 if (RandNumber < (*_theClusters.begin())->GetZARatio())
231 FragmentsZ.push_back(1);
232 SumZ += FragmentsZ[i];
234 else FragmentsZ.push_back(0);
240 + 2*CP*g4calc->
Z23(FragmentsA[i]);
242 if (FragmentsA[i] > 1 && FragmentsA[i] < 5) { ZMean = 0.5*FragmentsA[i]; }
245 + _ChemPotentialNu)/CC;
251 RandZ = G4RandGauss::shoot(ZMean,ZDispersion);
254 }
while (z < 0 || z > A);
255 FragmentsZ.push_back(z);
261 }
while (std::abs(DeltaZ) > 1);
267 while (FragmentsZ[idx] < 1) { ++idx; }
269 FragmentsZ[idx] += DeltaZ;
272 for (
G4int i = multiplicity-1; i >= 0; i--)
double A(double temperature)
G4double GetExcitationEnergy() const
static G4Pow * GetInstance()
G4double A13(G4double A) const
G4double Z13(G4int Z) const
G4double Z23(G4int Z) const
void CreateFragment(G4int A, G4int Z)
~G4StatMFMacroCanonical()
G4StatMFMacroCanonical(G4Fragment const &theFragment)
G4StatMFChannel * ChooseAandZ(const G4Fragment &theFragment)
G4double GetEntropy(void) const
G4double GetChemicalPotentialMu(void) const
G4double GetChemicalPotentialNu(void) const
G4double CalcTemperature(void)
G4double GetMeanMultiplicity(void) const
static G4double GetBeta0()
static G4double GetGamma0()
static G4double GetCoulomb()
G4double __FreeInternalE0
G4double __MeanTemperature
G4double __MeanMultiplicity