74 G4int IterationsLimit = 100000;
84 G4double theMeanMult = theMicrocanonicalEnsemble->GetMeanMultiplicity();
85 if (theMeanMult <= MaxAverageMultiplicity) {
88 theChannel = theMicrocanonicalEnsemble->ChooseAandZ(theFragment);
103 theChannel = theMacrocanonicalEnsemble->
ChooseAandZ(theFragment);
107 if (!ChannelOk)
delete theChannel;
110 }
while (!ChannelOk);
115 theResult->push_back(
new G4Fragment(theFragment));
116 delete theMicrocanonicalEnsemble;
117 if (theMacrocanonicalEnsemble != 0)
delete theMacrocanonicalEnsemble;
140 }
while (Iterations++ < IterationsLimit );
145 if (Iterations >= IterationsLimit)
146 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMF::BreakItUp: Was not possible to solve for temperature of breaking channel");
157 InitialMomentum.
boost(-InitialMomentum.boostVector());
162 G4FragmentVector::iterator j;
163 for (j = theResult->begin(); j != theResult->end(); j++)
164 FragmentsEnergy += (*j)->GetMomentum().
e();
165 SavedScaleFactor = ScaleFactor;
166 ScaleFactor = InitialMomentum.e()/FragmentsEnergy;
168 for (j = theResult->begin(); j != theResult->end(); j++) {
169 ScaledMomentum = ScaleFactor * (*j)->GetMomentum().vect();
170 G4double Mass = (*j)->GetMomentum().m();
172 NewMomentum.
setVect(ScaledMomentum);
173 NewMomentum.
setE(std::sqrt(ScaledMomentum.
mag2()+Mass*Mass));
174 (*j)->SetMomentum(NewMomentum);
177 }
while (ScaleFactor > 1.0+1.
e-5 && std::abs(ScaleFactor-SavedScaleFactor)/ScaleFactor > 1.
e-10);
181 G4FragmentVector::iterator i;
182 for (i = theResult->begin(); i != theResult->end(); i++) {
185 (*i)->SetMomentum(FourMom);
189 delete theMicrocanonicalEnsemble;
190 if (theMacrocanonicalEnsemble != 0)
delete theMacrocanonicalEnsemble;
217 }
else if (Da < 0.0) {
220 if (T < 0.001*
MeV)
return false;
224 Db = (U - TotalEnergy)/U;
234 Db = (U - TotalEnergy)/U;
243 for (
G4int j = 0; j < 1000; j++) {
245 if (std::abs(Ta-Tc) <=
eps) {
270 Temperature = (Ta+T)*0.5;
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4LorentzVector & GetMomentum() const
G4bool CheckFragments(void)
static constexpr double MeV
G4double CalcEnergy(G4int A, G4int Z, const G4StatMFChannel *aChannel, G4double T)
void setVect(const Hep3Vector &)
G4VStatMFEnsemble * _theEnsemble
static G4double GetCoulomb()
size_t GetMultiplicity(void)
G4double GetFragmentsEnergy(G4double T) const
G4double GetMeanTemperature(void) const
double A(double temperature)
G4bool FindTemperatureOfBreakingChannel(const G4Fragment &theFragment, const G4StatMFChannel *aChannel, G4double &Temperature)
Hep3Vector boostVector() const
static const G4double eps
static G4double GetMaxAverageMultiplicity(G4int A)
G4double GetExcitationEnergy() const
std::vector< G4Fragment * > G4FragmentVector
static G4double GetMassExcess(const G4int A, const G4int Z)
HepLorentzVector & boost(double, double, double)
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
G4StatMFChannel * ChooseAandZ(const G4Fragment &theFragment)