133{
134
135#ifdef G4VERBOSE
137 G4cout <<
"G4MuonRadiativeDecayChannelWithSpin::DecayIt ";
138#endif
139
142
143
145
147
148
151 for (
G4int index=0; index<4; index++){
153 sumofdaughtermass += daughtermass[index];
154 }
155
157
158
162
164 delete parentparticle;
165
167
169
170 G4double som0, Qsqr, x, y, xx, yy, zz;
171 G4double cthetaE, cthetaG, cthetaGE, phiE, phiG;
172
173 do {
174
175
176
177 i++;
178
179
180
181 do {
182
183
184
185
186
187
188
189
190
191
193
194 rn3dim(xx,yy,zz,x);
195
196 if(std::fabs((xx*xx)+(yy*yy)+(zz*zz)-(x*x))>0.001){
198 }
199
200 phiE = atan4(xx,yy);
201 cthetaE = zz/x;
202 G4double sthetaE = std::sqrt((xx*xx)+(yy*yy))/x;
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
222
223 rn3dim(xx,yy,zz,y);
224
225 if(std::fabs((xx*xx)+(yy*yy)+(zz*zz)-(y*y))>0.001){
227 }
228
229 phiG = atan4(xx,yy);
230 cthetaG = zz/y;
231 G4double sthetaG = std::sqrt((xx*xx)+(yy*yy))/y;
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259 cthetaGE = cthetaE*cthetaG+sthetaE*sthetaG*std::cos(phiE-phiG);
260
261
262
263
264
265
266
268 G4double term1 = x*((1.0-eps)*(1.0-eps))+2.0*eps;
269 G4double beta = std::sqrt( x*((1.0-eps)*(1.0-eps))*
270 (x*((1.0-eps)*(1.0-eps))+4.0*eps))/term1;
272
275
276 Qsqr = (1.0-term1-term3+term0+0.5*term6)/((1.0-eps)*(1.0-eps));
277
278
279
280
281
282 } while ( Qsqr<0.0 || Qsqr>1.0 );
283
284
285
286
287
290
291
292
293
294
295 som0 = fron(Pmu,x,y,cthetaE,cthetaG,cthetaGE);
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
315
316
317
318
319
320 G4double E = EMMU/2.*(x*((1.-eps)*(1.-eps))+2.*eps);
321 G4double G = EMMU/2.*y*(1.-eps*eps);
322
323
324
325
326 if(E < EMASS) E = EMASS;
327
328
330
331 daughtermomentum[0] = std::sqrt(E*E - EMASS*EMASS);
332
333 G4double sthetaE = std::sqrt(1.-cthetaE*cthetaE);
336
337
338
342
344
345 direction0.rotateUz(parent_polarization);
346
349
351
352 daughtermomentum[1] = G;
353
354 G4double sthetaG = std::sqrt(1.-cthetaG*cthetaG);
357
358
359
360 px = sthetaG*cphiG;
361 py = sthetaG*sphiG;
362 pz = cthetaG;
363
365
366 direction1.rotateUz(parent_polarization);
367
370
372
373
374
375
376 G4double energy2 = parentmass*(1.0 - (x+y)/2.0);
377
378 G4double vmass = std::sqrt((energy2-
379 (daughtermomentum[0]+daughtermomentum[1]))*
380 (energy2+
381 (daughtermomentum[0]+daughtermomentum[1])));
382 G4double beta = (daughtermomentum[0]+daughtermomentum[1])/energy2;
383 beta = -1.0 * std::min(beta,0.99);
384
386 G4double sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
390
391 G4ThreeVector direction2(sinthetan*cosphin,sinthetan*sinphin,costhetan);
392
397
398
399
401 direction0.y()+direction1.y(),
402 direction0.z()+direction1.z());
403 direction34 = direction34.unit();
404
406 p4.
boost(direction34.x()*beta,direction34.y()*beta,direction34.z()*beta);
408
410 p4.
boost(direction34.x()*beta,direction34.y()*beta,direction34.z()*beta);
412
415
418
419
420#ifdef G4VERBOSE
422 G4cout <<
"G4MuonRadiativeDecayChannelWithSpin::DecayIt ";
423 G4cout <<
" create decay products in rest frame " <<
G4endl;
425 }
426#endif
427 return products;
428}
HepLorentzVector & boost(double, double, double)
G4int PushProducts(G4DynamicParticle *aParticle)
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetTotalMomentum() const
G4double GetPDGMass() const
const G4String & GetParentName() const
G4ParticleDefinition * parent
G4ParticleDefinition ** daughters