107{
108#ifdef G4VERBOSE
110#endif
113
114
116
117
120
121
123
124
125 G4double xmin = 2.0*std::log(2.0*leptonmass);
126 G4double xmax = 2.0*std::log(parentmass);
129 do {
132 t = std::exp(x);
133 w1 = (1.0-4.0*leptonmass*leptonmass/t);
134 if ( w1 > 0.0) {
135 w2 = ( 1.0 + 2.0*leptonmass*leptonmass/t );
136 w3 = ( 1.0 - t/parentmass/parentmass );
137 w3 = w3 * w3 * w3;
138 ww = w3 * w2 * std::sqrt(w1);
139 } else {
140 ww = 0.0;
141 }
142 } while (w > ww);
143
144
148 G4double sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
150 G4ThreeVector gdirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
151
152
155
156
157 G4double beta = Pgamma/(parentmass-Pgamma);
158
159
162 G4double Elepton = std::sqrt(Plepton*Plepton + leptonmass*leptonmass );
164 sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
166 G4ThreeVector ldirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
167
170 ldirection, Elepton-leptonmass );
173 -1.0*ldirection, Elepton-leptonmass );
174
176 p4.
boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
179 p4.
boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
181
182
184 delete parentparticle;
188
189#ifdef G4VERBOSE
191 G4cout <<
"G4DalitzDecayChannel::DecayIt ";
192 G4cout <<
" create decay products in rest frame " <<
G4endl;
194 }
195#endif
196 return products;
197}
G4DLLIMPORT 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)
G4int GetVerboseLevel() const
G4ParticleDefinition * parent
G4ParticleDefinition ** daughters