101{
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123 if(frameFlag == 1)
124 {
125 G4double en = aHadron.GetTotalMomentum();
127 boosted.
Lorentz(*fCache.
Get().theProjectileRP, *fCache.
Get().theTarget);
130
131
132
133
134
135
136
138 else if(theAngularDistributionType == 1) {cosTh = theCoefficients->
SampleMax(kineticEnergy);}
139 else if(theAngularDistributionType == 2) {cosTh = theProbArray->
Sample(kineticEnergy);}
140 else{
141 G4cout <<
"unknown distribution found for Angular: "<< theAngularDistributionType <<
G4endl;
142 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
143 }
144
148 G4ThreeVector temp(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
149 aHadron.SetMomentum( temp );
150 }
151 else if(frameFlag == 2)
152 {
154 boostedN.
Lorentz(*fCache.
Get().theProjectileRP, *fCache.
Get().theTarget);
156
158
159
160
161
162
163
164
166 else if(theAngularDistributionType == 1) {cosTh = theCoefficients->
SampleMax(kineticEnergy);}
167 else if(theAngularDistributionType == 2) {cosTh = theProbArray->
Sample(kineticEnergy);}
168 else{
169 G4cout <<
"unknown distribution found for Angular: "<< theAngularDistributionType <<
G4endl;
170 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
171 }
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
200
201 G4ThreeVector temp(sinth*std::cos(phi), sinth*std::sin(phi), std::cos(theta) );
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251 G4double QValue = aHadron.GetKineticEnergy() - kineticEnergy;
254 G4double kinE = (A1+1-A1prim)/(A1+1)/(A1+1)*(A1*kineticEnergy+(1+A1)*QValue);
255 G4double totalE = kinE + aHadron.GetMass();
256 G4double mom2 = totalE*totalE - aHadron.GetMass()*aHadron.GetMass();
258 if ( mom2 > 0.0 ) mom = std::sqrt( mom2 );
259 else mom = 0.0;
260
261 aHadron.SetMomentum( mom*temp );
262 aHadron.SetKineticEnergy(kinE);
263
264
266 boostedT.
Lorentz(*fCache.
Get().theTarget, *fCache.
Get().theTarget);
267
276 G4double cmsMom = std::sqrt(the3trafo*the3trafo);
277 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
280
281 aHadron.Lorentz(aHadron, trafo);
282
283 }
284 else
285 {
286 throw G4HadronicException(__FILE__, __LINE__,
"Tried to sample non isotropic neutron angular");
287 }
288 aHadron.Lorentz(aHadron, -1.*(*fCache.
Get().theTarget));
289
290
291}
G4double SampleMax(G4double energy)
G4double Sample(G4double x)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetMass(const G4double mas)