135{
136#ifdef G4VERBOSE
138 G4cout <<
"G4MuonRadiativeDecayChannelWithSpin::DecayIt()";
139#endif
140
143
144
146
148
149
151
152 for (
G4int index=0; index<4; ++index)
153 {
155
156 }
157
159
160
164
165
167 delete parentparticle;
168
170
172 G4double cthetaE, cthetaG, cthetaGE, phiE, phiG;
173 const std::size_t MAX_LOOP=10000;
174
175 for (std::size_t loop_counter1=0; loop_counter1<MAX_LOOP; ++loop_counter1)
176 {
177 for (std::size_t loop_counter2=0; loop_counter2<MAX_LOOP; ++loop_counter2)
178 {
179
180
181
182
183
184
185
186
187
189
190 rn3dim(xx,yy,zz,x);
191
192 if(std::fabs((xx*xx)+(yy*yy)+(zz*zz)-(x*x))>0.001)
193 {
195 }
196
197 phiE = atan4(xx,yy);
198 cthetaE = zz/x;
199 G4double sthetaE = std::sqrt((xx*xx)+(yy*yy))/x;
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
217
218 rn3dim(xx,yy,zz,y);
219
220 if(std::fabs((xx*xx)+(yy*yy)+(zz*zz)-(y*y))>0.001)
221 {
223 }
224
225 phiG = atan4(xx,yy);
226 cthetaG = zz/y;
227 G4double sthetaG = std::sqrt((xx*xx)+(yy*yy))/y;
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244 cthetaGE = cthetaE*cthetaG+sthetaE*sthetaG*std::cos(phiE-phiG);
245
246
247
248
249
251 G4double term1 = x*((1.0-eps)*(1.0-eps))+2.0*eps;
252 G4double beta = std::sqrt( x*((1.0-eps)*(1.0-eps))*
253 (x*((1.0-eps)*(1.0-eps))+4.0*eps))/term1;
255
258
259 G4double Qsqr = (1.0-term1-term3+term0+0.5*term6)/((1.0-eps)*(1.0-eps));
260
261
262
263 if ( Qsqr>=0.0 && Qsqr<=1.0 ) break;
264
265 }
266
267
268
271
272 som0 = fron(Pmu,x,y,cthetaE,cthetaG,cthetaGE);
273
274
275
277 }
278
279 G4double E = EMMU/2.*(x*((1.-eps)*(1.-eps))+2.*eps);
280 G4double G = EMMU/2.*y*(1.-eps*eps);
281
282 if(E < EMASS) E = EMASS;
283
284
286
287 daughtermomentum[0] = std::sqrt(E*E - EMASS*EMASS);
288
289 G4double sthetaE = std::sqrt(1.-cthetaE*cthetaE);
292
293
294
298
300
302
305
307
308 daughtermomentum[1] = G;
309
310 G4double sthetaG = std::sqrt(1.-cthetaG*cthetaG);
313
314
315
316 px = sthetaG*cphiG;
317 py = sthetaG*sphiG;
318 pz = cthetaG;
319
321
323
326
328
329
330
331
333
335 +daughtermomentum[1]*direction1);
338
340 G4double sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
344
345 G4ThreeVector direction2(sinthetan*cosphin,sinthetan*sinphin,costhetan);
346
351
352
355
357 p4.
boost(direction34.
x()*beta,direction34.
y()*beta,direction34.
z()*beta);
359
361 p4.
boost(direction34.
x()*beta,direction34.
y()*beta,direction34.
z()*beta);
363
366
369
370
371#ifdef G4VERBOSE
373 {
374 G4cout <<
"G4MuonRadiativeDecayChannelWithSpin::DecayIt() -";
375 G4cout <<
" create decay products in rest frame " <<
G4endl;
386 }
387#endif
388
389 return products;
390}
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