45{
46 if (theFragment.GetExcitationEnergy() <= 0.0) {
47 return nullptr;
48 }
49
50
51
54
55
56
59
60
61
62
63
64
66
68 G4int IterationsLimit = 100000;
70
73
75 do {
76 do {
77
79 if (theMeanMult <= MaxAverageMultiplicity) {
80
81
82 theChannel = theMicrocanonicalEnsemble->
ChooseAandZ(theFragment);
83 _theEnsemble = theMicrocanonicalEnsemble;
84 } else {
85
86
87
88 if (FirstTime) {
89
91 _theEnsemble = theMacrocanonicalEnsemble;
92 FirstTime = false;
93 }
94
95
96
97 theChannel = theMacrocanonicalEnsemble->
ChooseAandZ(theFragment);
98 }
99
101 if (!ChannelOk) delete theChannel;
102
103
104 } while (!ChannelOk);
105
106
109 theResult->push_back(
new G4Fragment(theFragment));
110 delete theMicrocanonicalEnsemble;
111 if (theMacrocanonicalEnsemble != 0) delete theMacrocanonicalEnsemble;
112 delete theChannel;
113 return theResult;
114 }
115
116
117
118
119
120
122
123 if (FindTemperatureOfBreakingChannel(theFragment,theChannel,Temperature)) break;
124
125
126
127
128
129
130
131 delete theChannel;
132
133
134 } while (Iterations++ < IterationsLimit );
135
136
137 if (Iterations >= IterationsLimit)
138 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMF::BreakItUp: Was not possible to solve for temperature of breaking channel");
139
141 GetFragments(theFragment.GetA_asInt(),theFragment.GetZ_asInt(),Temperature);
142
143
144
146 InitialMomentum.boost(-InitialMomentum.boostVector());
149 do {
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);
164 }
165
166 } while (ScaleFactor > 1.0+1.e-5 && std::abs(ScaleFactor-SavedScaleFactor)/ScaleFactor > 1.e-10);
167
168
169
170 G4FragmentVector::iterator i;
171 for (i = theResult->begin(); i != theResult->end(); i++) {
173 FourMom.
boost(theFragment.GetMomentum().boostVector());
174 (*i)->SetMomentum(FourMom);
175 (*i)->SetCreatorModelID(_secID);
176 }
177
178
179 delete theMicrocanonicalEnsemble;
180 if (theMacrocanonicalEnsemble != 0) delete theMacrocanonicalEnsemble;
181 delete theChannel;
182
183 return theResult;
184}
std::vector< G4Fragment * > G4FragmentVector
HepLorentzVector & boost(double, double, double)
void setVect(const Hep3Vector &)
G4bool CheckFragments(void)
size_t GetMultiplicity(void)
G4StatMFChannel * ChooseAandZ(const G4Fragment &theFragment)
G4StatMFChannel * ChooseAandZ(const G4Fragment &theFragment)
static G4double GetMaxAverageMultiplicity(G4int A)
G4double GetMeanTemperature(void) const
G4double GetMeanMultiplicity(void) const