47{
48
49
50 if (theFragment.GetExcitationEnergy() <= 0.0) {
51
52
53 return 0;
54 }
55
56
57
58
61
62
63
66
67
68
69
70
71
72
74
76 G4int IterationsLimit = 100000;
78
81
83 do {
84 do {
85
87 if (theMeanMult <= MaxAverageMultiplicity) {
88
89
90 theChannel = theMicrocanonicalEnsemble->
ChooseAandZ(theFragment);
91 _theEnsemble = theMicrocanonicalEnsemble;
92 } else {
93
94
95
96 if (FirstTime) {
97
99 _theEnsemble = theMacrocanonicalEnsemble;
100 FirstTime = false;
101 }
102
103
104
105 theChannel = theMacrocanonicalEnsemble->
ChooseAandZ(theFragment);
106 }
107
109 if (!ChannelOk) delete theChannel;
110
111 } while (!ChannelOk);
112
113
116 theResult->push_back(
new G4Fragment(theFragment));
117 delete theMicrocanonicalEnsemble;
118 if (theMacrocanonicalEnsemble != 0) delete theMacrocanonicalEnsemble;
119 delete theChannel;
120 return theResult;
121 }
122
123
124
125
126
127
129
130 if (FindTemperatureOfBreakingChannel(theFragment,theChannel,
Temperature))
break;
131
132
133
134
135
136
137
138 delete theChannel;
139
140 } while (Iterations++ < IterationsLimit );
141
142
143
144
145 if (Iterations >= IterationsLimit)
146 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMF::BreakItUp: Was not possible to solve for temperature of breaking channel");
147
148
150 GetFragments(theFragment.GetA_asInt(),theFragment.GetZ_asInt(),
Temperature);
151
152
153
154
155
157 InitialMomentum.boost(-InitialMomentum.boostVector());
160 do {
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);
175 }
176 } while (ScaleFactor > 1.0+1.e-5 && std::abs(ScaleFactor-SavedScaleFactor)/ScaleFactor > 1.e-10);
177
178
179
180 G4FragmentVector::iterator i;
181 for (i = theResult->begin(); i != theResult->end(); i++) {
183 FourMom.
boost(theFragment.GetMomentum().boostVector());
184 (*i)->SetMomentum(FourMom);
185#ifdef PRECOMPOUND_TEST
186 (*i)->SetCreatorModel(
G4String(
"G4StatMF"));
187#endif
188 }
189
190
191 delete theMicrocanonicalEnsemble;
192 if (theMacrocanonicalEnsemble != 0) delete theMacrocanonicalEnsemble;
193 delete theChannel;
194
195 return theResult;
196}
const double &G4Chips::Temperature Temperature
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(const G4int A)
G4double GetMeanTemperature(void) const
G4double GetMeanMultiplicity(void) const