100{
101
102
103
104
105#ifdef G4VERBOSE
107#endif
108
111
112
114
116
117
119
120 for (
G4int index=0; index<3; ++index)
121 {
123
124 }
125
127
128
132
134 delete parentparticle;
135
136
137
142
144
147
148 G4double W_mue = (EMMU*EMMU+EMASS*EMASS)/(2.*EMMU);
150
152
153
154
155
156
157
158
159
160
161 const std::size_t MAX_LOOP=10000;
162 for (std::size_t loop_count=0; loop_count<MAX_LOOP; ++loop_count)
163 {
164
165
167
168 x = x0 + rndm*(1.-x0);
169
171
173
174 F_IS = 1./6.*(-2.*x_squared+3.*x-x0_squared);
175 F_AS = 1./6.*std::sqrt(x_squared-x0_squared)
176 *(2.*x-2.+std::sqrt(1.-x0_squared));
177
178 G_IS = 2./9.*(michel_rho-0.75)*(4.*x_squared-3.*x-x0_squared);
179 G_IS = G_IS + michel_eta*(1.-x)*x0;
180
181 G_AS = 3.*(michel_xsi-1.)*(1.-x);
182 G_AS = G_AS+2.*(michel_xsi*michel_delta-0.75)
183 *(4.*x-4.+std::sqrt(1.-x0_squared));
184 G_AS = 1./9.*std::sqrt(x_squared-x0_squared)*G_AS;
185
186 F_IS = F_IS + G_IS;
187 F_AS = F_AS + G_AS;
188
189
190
191 const G4double omega = std::log(EMMU/EMASS);
193
194 G4double F = 6.*F_IS + R_IS/std::sqrt(x_squared-x0_squared);
195
196
197
198 G4double R_AS = F_theta(x,x0,omega);
199
201
202 ctheta = 2.*rndm-1.;
203
204 G4double G = 6.*F_AS - R_AS/std::sqrt(x_squared-x0_squared);
205
206 FG = std::sqrt(x_squared-x0_squared)*F*(1.+(G/F)*ctheta);
207
208 if(FG>FG_max)
209 {
210 G4Exception(
"G4MuonDecayChannelWithSpin::DecayIt()",
212 "Problem in Muon Decay: FG > FG_max");
213 FG_max = FG;
214 }
215
217
218 if (FG >= rndm*FG_max) break;
219 }
220
222
224
226
227 if(energy < EMASS)
energy = EMASS;
228
229
231
232 daughtermomentum[0] = std::sqrt(energy*energy - EMASS*EMASS);
233
234 G4double stheta = std::sqrt(1.-ctheta*ctheta);
237
238
242
244
246
249
251
252
253
254
256 G4double vmass = std::sqrt((energy2-daughtermomentum[0])
257 * (energy2+daughtermomentum[0]));
258 G4double beta = -1.0*daughtermomentum[0]/energy2;
260 G4double sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
264
265 G4ThreeVector direction1(sinthetan*cosphin,sinthetan*sinphin,costhetan);
270
271
274 p4.
boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta);
277 p4.
boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta);
283
284
285#ifdef G4VERBOSE
287 {
288 G4cout <<
"G4MuonDecayChannelWithSpin::DecayIt ";
289 G4cout <<
" create decay products in rest frame " <<
G4endl;
298 }
299#endif
300
301 return products;
302}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
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()
G4int GetVerboseLevel() const
G4ParticleDefinition * G4MT_parent
void CheckAndFillDaughters()
G4ThreeVector parent_polarization
G4double energy(const ThreeVector &p, const G4double m)