179{
180
182 const G4double eps0 = CLHEP::electron_mass_c2/gammaEnergy;
183
184
185 if (eps0 > 0.5) { return; }
186
187
190
191
192
194
195
196
197
198
199
201
202 static const G4double Egsmall = 2.*CLHEP::MeV;
203 if (gammaEnergy < Egsmall) {
204 eps = eps0 + (0.5-eps0)*rndmEngine->
flat();
205 } else {
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222 static const G4double midEnergy = 50.*CLHEP::MeV;
227 if (gammaEnergy > midEnergy) {
230 }
231 const G4double deltaMin = 4.*deltaFactor;
232
233
234 const G4double epsp = 0.5 - 0.5*std::sqrt(1. - deltaMin/deltaMax) ;
235 const G4double epsMin = std::max(eps0,epsp);
236 const G4double epsRange = 0.5 - epsMin;
237
238
243 const G4double NormF1 = std::max(
F10 * epsRange * epsRange, 0.);
245 const G4double NormCond = NormF1/(NormF1 + NormF2);
246
249 do {
251 if (NormCond > rndmv[0]) {
252 eps = 0.5 - epsRange *
fG4Calc->
A13(rndmv[1]);
253 const G4double delta = deltaFactor/(eps*(1.-eps));
255 } else {
256 eps = epsMin + epsRange*rndmv[1];
257 const G4double delta = deltaFactor/(eps*(1.-eps));
259 }
260
261 } while (greject < rndmv[2]);
262 }
263
264
266 if (rndmEngine->
flat() > 0.5) {
267 eTotEnergy = (1.-eps)*gammaEnergy;
268 pTotEnergy = eps*gammaEnergy;
269 } else {
270 pTotEnergy = (1.-eps)*gammaEnergy;
271 eTotEnergy = eps*gammaEnergy;
272 }
273
274
275 const G4double eKinEnergy = std::max(0.,eTotEnergy - CLHEP::electron_mass_c2);
276 const G4double pKinEnergy = std::max(0.,pTotEnergy - CLHEP::electron_mass_c2);
277
279
281 eKinEnergy, pKinEnergy,
282 eDirection, pDirection);
283
285
287
288 fvect->push_back(aParticle1);
289 fvect->push_back(aParticle2);
290
293}
virtual void flatArray(const int size, double *vect)=0
void ScreenFunction12(const G4double delta, G4double &f1, G4double &f2)
G4double ScreenFunction1(const G4double delta)
G4double ScreenFunction2(const G4double delta)
G4double GetLogKineticEnergy() const
G4double GetKineticEnergy() const
G4double GetfCoulomb() const
G4IonisParamElm * GetIonisation() const
G4double GetlogZ3() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double A13(G4double A) const
virtual void SamplePairDirections(const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr)
G4VEmAngularDistribution * GetAngularDistribution()
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void ProposeTrackStatus(G4TrackStatus status)