105{
106#ifdef G4VERBOSE
108#endif
111
112
114
115
119
120
122
123
124 G4double xmin = 2.0*std::log(2.0*leptonmass);
125 G4double xmax = 2.0*std::log(parentmass);
128 const std::size_t MAX_LOOP = 10000;
129 for (std::size_t loop_counter=0; loop_counter<MAX_LOOP; ++loop_counter)
130 {
133 t = std::exp(x);
134 w1 = (1.0-4.0*leptonmass*leptonmass/t);
135 if ( w1 > 0.0)
136 {
137 w2 = ( 1.0 + 2.0*leptonmass*leptonmass/t );
138 w3 = ( 1.0 - t/parentmass/parentmass );
139 w3 = w3 * w3 * w3;
140 ww = w3 * w2 * std::sqrt(w1);
141 }
142 else
143 {
144 ww = 0.0;
145 }
146 if (w <= ww) break;
147 }
148
149
153 G4double sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
156 sintheta*std::sin(phi),
157 costheta);
158
159
162
163
164 G4double beta = Pgamma/(parentmass-Pgamma);
165
166
169 G4double Elepton = std::sqrt(Plepton*Plepton + leptonmass*leptonmass );
171 sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
174 sintheta*std::sin(phi),
175 costheta);
176
179 ldirection, Elepton-leptonmass );
182 -1.0*ldirection, Elepton-leptonmass );
183
185 p4.
boost( -1.0*gdirection.x()*beta,
186 -1.0*gdirection.y()*beta,
187 -1.0*gdirection.z()*beta);
190 p4.
boost( -1.0*gdirection.x()*beta,
191 -1.0*gdirection.y()*beta,
192 -1.0*gdirection.z()*beta);
194
195
197 delete parentparticle;
201
202#ifdef G4VERBOSE
204 {
205 G4cout <<
"G4DalitzDecayChannel::DecayIt ";
206 G4cout <<
" create decay products in rest frame " <<
G4endl;
208 }
209#endif
210 return products;
211}
G4GLOB_DLL std::ostream G4cout
HepLorentzVector & boost(double, double, double)
G4int PushProducts(G4DynamicParticle *aParticle)
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetPDGMass() const
static G4double Pmx(G4double e, G4double p1, G4double p2)
G4ParticleDefinition ** G4MT_daughters
void CheckAndFillParent()
G4int GetVerboseLevel() const
G4ParticleDefinition * G4MT_parent
void CheckAndFillDaughters()