86{
87#ifdef G4VERBOSE
89#endif
92
93
95
96
99
100
102
103
104 G4double xmin = 2.0 * std::log(2.0 * leptonmass);
105 G4double xmax = 2.0 * std::log(parentmass);
108 const std::size_t MAX_LOOP = 10000;
109 for (std::size_t loop_counter = 0; loop_counter < MAX_LOOP; ++loop_counter) {
112 t = std::exp(x);
113 w1 = (1.0 - 4.0 * leptonmass * leptonmass / t);
114 if (w1 > 0.0) {
115 w2 = (1.0 + 2.0 * leptonmass * leptonmass / t);
116 w3 = (1.0 - t / parentmass / parentmass);
117 w3 = w3 * w3 * w3;
118 ww = w3 * w2 * std::sqrt(w1);
119 }
120 else {
121 ww = 0.0;
122 }
123 if (w <= ww) break;
124 }
125
126
129 G4double sintheta = std::sqrt((1.0 - costheta) * (1.0 + costheta));
131 G4ThreeVector gdirection(sintheta * std::cos(phi), sintheta * std::sin(phi), costheta);
132
133
135
136
137 G4double beta = Pgamma / (parentmass - Pgamma);
138
139
141 G4double Elepton = std::sqrt(Plepton * Plepton + leptonmass * leptonmass);
143 sintheta = std::sqrt((1.0 - costheta) * (1.0 + costheta));
145 G4ThreeVector ldirection(sintheta * std::cos(phi), sintheta * std::sin(phi), costheta);
146
147 auto leptonparticle =
149 auto antileptonparticle =
151
153 p4.
boost(-1.0 * gdirection.x() * beta, -1.0 * gdirection.y() * beta,
154 -1.0 * gdirection.z() * beta);
155 leptonparticle->Set4Momentum(p4);
156 p4 = antileptonparticle->Get4Momentum();
157 p4.
boost(-1.0 * gdirection.x() * beta, -1.0 * gdirection.y() * beta,
158 -1.0 * gdirection.z() * beta);
159 antileptonparticle->Set4Momentum(p4);
160
161
163 delete parentparticle;
164 products->PushProducts(gammaparticle);
165 products->PushProducts(leptonparticle);
166 products->PushProducts(antileptonparticle);
167
168#ifdef G4VERBOSE
170 G4cout <<
"G4DalitzDecayChannel::DecayIt ";
171 G4cout <<
" create decay products in rest frame " <<
G4endl;
172 products->DumpInfo();
173 }
174#endif
175 return products;
176}
G4GLOB_DLL std::ostream G4cout
HepLorentzVector & boost(double, double, double)
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()