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;