68 G4int IterationsLimit = 100000;
79 if (theMeanMult <= MaxAverageMultiplicity) {
82 theChannel = theMicrocanonicalEnsemble->
ChooseAandZ(theFragment);
83 _theEnsemble = theMicrocanonicalEnsemble;
91 _theEnsemble = theMacrocanonicalEnsemble;
97 theChannel = theMacrocanonicalEnsemble->
ChooseAandZ(theFragment);
101 if (!ChannelOk)
delete theChannel;
104 }
while (!ChannelOk);
109 theResult->push_back(
new G4Fragment(theFragment));
110 delete theMicrocanonicalEnsemble;
111 if (theMacrocanonicalEnsemble != 0)
delete theMacrocanonicalEnsemble;
123 if (FindTemperatureOfBreakingChannel(theFragment,theChannel,Temperature))
break;
134 }
while (Iterations++ < IterationsLimit );
137 if (Iterations >= IterationsLimit)
138 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMF::BreakItUp: Was not possible to solve for temperature of breaking channel");
151 G4FragmentVector::iterator j;
152 for (j = theResult->begin(); j != theResult->end(); j++)
153 FragmentsEnergy += (*j)->GetMomentum().
e();
154 SavedScaleFactor = ScaleFactor;
155 ScaleFactor = InitialMomentum.
e()/FragmentsEnergy;
157 for (j = theResult->begin(); j != theResult->end(); j++) {
158 ScaledMomentum = ScaleFactor * (*j)->GetMomentum().vect();
159 G4double Mass = (*j)->GetMomentum().m();
161 NewMomentum.
setVect(ScaledMomentum);
162 NewMomentum.
setE(std::sqrt(ScaledMomentum.
mag2()+Mass*Mass));
163 (*j)->SetMomentum(NewMomentum);
166 }
while (ScaleFactor > 1.0+1.e-5 && std::abs(ScaleFactor-SavedScaleFactor)/ScaleFactor > 1.e-10);
170 G4FragmentVector::iterator i;
171 for (i = theResult->begin(); i != theResult->end(); i++) {
174 (*i)->SetMomentum(FourMom);
175 (*i)->SetCreatorModelID(_secID);
179 delete theMicrocanonicalEnsemble;
180 if (theMacrocanonicalEnsemble != 0)
delete theMacrocanonicalEnsemble;
187G4bool G4StatMF::FindTemperatureOfBreakingChannel(
const G4Fragment & theFragment,
196 G4double T = std::max(Temperature,0.0012*MeV);
198 G4double TotalEnergy = CalcEnergy(
A,
Z,aChannel,T);
207 }
else if (Da < 0.0) {
210 if (T < 0.001*MeV)
return false;
212 TotalEnergy = CalcEnergy(
A,
Z,aChannel,T);
214 Db = (U - TotalEnergy)/U;
222 TotalEnergy = CalcEnergy(
A,
Z,aChannel,T);
224 Db = (U - TotalEnergy)/U;
229 G4double eps = 1.0e-14 * std::abs(T-Ta);
233 for (
G4int j = 0; j < 1000; j++) {
235 if (std::abs(Ta-Tc) <= eps) {
241 TotalEnergy = CalcEnergy(
A,
Z,aChannel,T);
257 Temperature = (Ta+T)*0.5;
std::vector< G4Fragment * > G4FragmentVector
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
void setVect(const Hep3Vector &)
G4double GetExcitationEnergy() const
const G4LorentzVector & GetMomentum() const
static G4double GetMassExcess(const G4int A, const G4int Z)
static G4int GetModelID(const G4int modelIndex)
G4bool CheckFragments(void)
G4double GetFragmentsEnergy(G4double T) const
size_t GetMultiplicity(void)
G4StatMFChannel * ChooseAandZ(const G4Fragment &theFragment)
G4StatMFChannel * ChooseAandZ(const G4Fragment &theFragment)
static G4double GetMaxAverageMultiplicity(G4int A)
static G4double GetCoulomb()
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus) override
G4double GetMeanTemperature(void) const
G4double GetMeanMultiplicity(void) const