135{
136#ifdef G4VERBOSE
138 G4cout <<
"G4MuonRadiativeDecayChannelWithSpin::DecayIt()";
139#endif
140
143
144
146
148
149
152 for (
G4int index=0; index<4; ++index)
153 {
155 sumofdaughtermass += daughtermass[index];
156 }
157
159
160
164
165
167 delete parentparticle;
168
170
172
174 G4double cthetaE, cthetaG, cthetaGE, phiE, phiG;
175 const std::size_t MAX_LOOP=10000;
176
177 for (std::size_t loop_counter1=0; loop_counter1<MAX_LOOP; ++loop_counter1)
178 {
179
180
181 ++i;
182
183
184
185 for (std::size_t loop_counter2=0; loop_counter2<MAX_LOOP; ++loop_counter2)
186 {
187
188
189
190
191
192
193
194
195
197
198 rn3dim(xx,yy,zz,x);
199
200 if(std::fabs((xx*xx)+(yy*yy)+(zz*zz)-(x*x))>0.001)
201 {
203 }
204
205 phiE = atan4(xx,yy);
206 cthetaE = zz/x;
207 G4double sthetaE = std::sqrt((xx*xx)+(yy*yy))/x;
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
225
226 rn3dim(xx,yy,zz,y);
227
228 if(std::fabs((xx*xx)+(yy*yy)+(zz*zz)-(y*y))>0.001)
229 {
231 }
232
233 phiG = atan4(xx,yy);
234 cthetaG = zz/y;
235 G4double sthetaG = std::sqrt((xx*xx)+(yy*yy))/y;
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252 cthetaGE = cthetaE*cthetaG+sthetaE*sthetaG*std::cos(phiE-phiG);
253
254
255
256
257
259 G4double term1 = x*((1.0-eps)*(1.0-eps))+2.0*eps;
260 G4double beta = std::sqrt( x*((1.0-eps)*(1.0-eps))*
261 (x*((1.0-eps)*(1.0-eps))+4.0*eps))/term1;
263
266
267 G4double Qsqr = (1.0-term1-term3+term0+0.5*term6)/((1.0-eps)*(1.0-eps));
268
269
270
271 if ( Qsqr>=0.0 && Qsqr<=1.0 ) break;
272
273 }
274
275
276
279
280 som0 = fron(Pmu,x,y,cthetaE,cthetaG,cthetaGE);
281
282
283
285 }
286
287 G4double E = EMMU/2.*(x*((1.-eps)*(1.-eps))+2.*eps);
288 G4double G = EMMU/2.*y*(1.-eps*eps);
289
290 if(E < EMASS) E = EMASS;
291
292
294
295 daughtermomentum[0] = std::sqrt(E*E - EMASS*EMASS);
296
297 G4double sthetaE = std::sqrt(1.-cthetaE*cthetaE);
300
301
302
306
308
310
313
315
316 daughtermomentum[1] = G;
317
318 G4double sthetaG = std::sqrt(1.-cthetaG*cthetaG);
321
322
323
324 px = sthetaG*cphiG;
325 py = sthetaG*sphiG;
326 pz = cthetaG;
327
329
331
334
336
337
338
339
341
343 +daughtermomentum[1]*direction1);
346
348 G4double sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
352
353 G4ThreeVector direction2(sinthetan*cosphin,sinthetan*sinphin,costhetan);
354
359
360
363
365 p4.
boost(direction34.
x()*beta,direction34.
y()*beta,direction34.
z()*beta);
367
369 p4.
boost(direction34.
x()*beta,direction34.
y()*beta,direction34.
z()*beta);
371
374
377
378
379#ifdef G4VERBOSE
381 {
382 G4cout <<
"G4MuonRadiativeDecayChannelWithSpin::DecayIt() -";
383 G4cout <<
" create decay products in rest frame " <<
G4endl;
394 }
395#endif
396
397 return products;
398}
HepLorentzVector & boost(double, double, double)
G4int PushProducts(G4DynamicParticle *aParticle)
G4LorentzVector Get4Momentum() const
G4double GetTotalEnergy() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetTotalMomentum() const
G4double GetPDGMass() const
G4ParticleDefinition ** G4MT_daughters
void CheckAndFillParent()
const G4String & GetParentName() const
G4ParticleDefinition * G4MT_parent
void CheckAndFillDaughters()
G4ThreeVector parent_polarization