150{
151
152
153
154
155#ifdef G4VERBOSE
157#endif
158
161
162
164
165
166 const G4int N_DAUGHTER=3;
168 for (
G4int index=0; index<N_DAUGHTER; ++index)
169 {
171 }
172
173
177
179 delete parentparticle;
180
181
182 G4double daughtermomentum[N_DAUGHTER];
183
184
185 G4double pmax = (parentmass*parentmass
186 - daughtermass[0]*daughtermass[0])/2./parentmass;
189 const std::size_t MAX_LOOP=10000;
190 for (std::size_t loop_counter=0; loop_counter<MAX_LOOP; ++loop_counter)
191 {
192
195 e = std::sqrt(p*p + daughtermass[0]*daughtermass[0]);
196 if (r < spectrum(p,e,parentmass,daughtermass[0]) ) break;
197 }
198
199
200
201 daughtermomentum[0] = p;
202 G4double costheta, sintheta, phi, sinphi, cosphi;
204 sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
206 sinphi = std::sin(phi);
207 cosphi = std::cos(phi);
208 G4ThreeVector direction0(sintheta*cosphi,sintheta*sinphi,costheta);
212
213
214
216 G4double vmass = std::sqrt((energy2-daughtermomentum[0])
217 *(energy2+daughtermomentum[0]));
218 G4double beta = -1.0*daughtermomentum[0]/energy2;
220 G4double sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
224
225 G4ThreeVector direction1(sinthetan*cosphin,sinthetan*sinphin,costhetan);
230
231
234 p4.
boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta);
237 p4.
boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta);
243
244
245#ifdef G4VERBOSE
247 {
248 G4cout <<
"G4TauLeptonicDecayChannel::DecayIt ";
249 G4cout <<
" create decay products in rest frame " <<
G4endl;
251 }
252#endif
253 return products;
254}
HepLorentzVector & boost(double, double, double)
G4int PushProducts(G4DynamicParticle *aParticle)
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetTotalMomentum() const
G4double GetPDGMass() const
G4ParticleDefinition ** G4MT_daughters
void CheckAndFillParent()
G4ParticleDefinition * G4MT_parent
void CheckAndFillDaughters()