52{
53
54
55 G4int A = theFragment.GetA_asInt();
57
58
59 theMicrocanonicalEnsemble->Initialise(theFragment);
60
61 const G4int iLimit = 20;
63
64 G4StatMFChannel* theChannel = nullptr;
65
66 for (
G4int i=0; i<iLimit; ++i) {
67 for (
G4int j=0; j<iLimit; ++j) {
68
69 G4double theMeanMult = theMicrocanonicalEnsemble->GetMeanMultiplicity();
70 if (theMeanMult <= MaxAverageMultiplicity) {
71
72
73
74 theChannel = theMicrocanonicalEnsemble->ChooseAandZ(theFragment);
75 fEnsemble = theMicrocanonicalEnsemble;
76 } else {
77
78
79
80
81 theMacrocanonicalEnsemble->Initialise(theFragment);
82 fEnsemble = theMacrocanonicalEnsemble;
83
84
85
86
87 theChannel = theMacrocanonicalEnsemble->ChooseAandZ(theFragment);
88 }
89
91 delete theChannel;
92 theChannel = nullptr;
93 }
94
96 delete theChannel;
97 theChannel = nullptr;
98 break;
99 }
100
101
102
103
104
105
106
107 Temperature = fEnsemble->GetMeanTemperature();
108
109 if (FindTemperatureOfBreakingChannel(theFragment, theChannel, Temperature)) {
110 break;
111 }
112
113
114
115
116
117
118 delete theChannel;
119 theChannel = nullptr;
120 }
121
122
124
125
128 theResult->push_back(new G4Fragment(theFragment));
129 delete theChannel;
130 return theResult;
131 }
132
133 G4int Z = theFragment.GetZ_asInt();
134 G4double m0 = theFragment.GetGroundStateMass() + theFragment.GetExcitationEnergy();
135 auto bs = theFragment.GetMomentum().boostVector();
136
139 for (
G4int i=0; i<iLimit; ++i) {
141 if (nullptr == theResult) { continue; }
142 etot = 0.0;
143 ekin = 0.0;
144 for (auto const & ptr : *theResult) {
145 G4double e = ptr->GetMomentum().e();
146 G4double m1 = ptr->GetGroundStateMass() + ptr->GetExcitationEnergy();
147 etot += e;
148 ekin += std::max(e - m1, 0.0);
149 }
150
151 if (etot - m0 + ekin > 0.0 && ekin > 0.0) { break; }
152
153
154 for (auto const & ptr : *theResult) {
155 delete ptr;
156 }
157 delete theResult;
158 theResult = nullptr;
159 }
160 delete theChannel;
161
162
163 if (nullptr == theResult || ekin <= 0.0) {
165 theResult->push_back(new G4Fragment(theFragment));
166 return theResult;
167 }
168
169 G4double x = 1.0 + (etot - m0)/ekin;
171
172
173 for (auto const & ptr : *theResult) {
174 G4double m1 = ptr->GetGroundStateMass() + ptr->GetExcitationEnergy();
175 G4double ek = std::max((ptr->GetMomentum().e() - m1)*x, 0.0);
176 auto mom = ptr->GetMomentum().vect().unit();
177 mom *= std::sqrt(ek * (ek + 2.0*m1));
178 lv1.
set(mom.x(), mom.y(), mom.z(), ek + m1);
180 ptr->SetMomentum(lv1);
181 }
182 return theResult;
183}
std::vector< G4Fragment * > G4FragmentVector
CLHEP::HepLorentzVector G4LorentzVector
HepLorentzVector & boost(double, double, double)
void set(double x, double y, double z, double t)
G4bool CheckFragments(void)
size_t GetMultiplicity(void)
G4FragmentVector * GetFragments(G4int anA, G4int anZ, G4double T)
static G4double GetMaxAverageMultiplicity(G4int A)