76 fParticleChange =
nullptr;
108 for(
G4int i=0; i<= nbins; ++i) {
115 f3GProbability->
PutValue(i, cs3/cs2);
120 if(fParticleChange) {
return; }
133 G4double ekin = std::max(eV,kinEnergy);
134 G4double tau = ekin/electron_mass_c2;
140 - (gam+3.)/(sqrt(gam*gam - 1.));
142 static const G4double pir2 = pi*classic_electr_radius*classic_electr_radius;
143 G4double cross = (pir2*rho + alpha_rcl2*2.*
G4Log(fDelta)*rho*rho)/(gam+1.);
170 G4double cross = eDensity*fCrossSection->
Value(kineticEnergy);
188 if(rndmEngine->
flat() < f3GProbability->
Value(posiKinEnergy)) {
190 /(posiKinEnergy + electron_mass_c2);
196 if(rndmEngine->
flat()*cs30 < cs3) {
209 if(posiKinEnergy == 0.0) {
211 G4double sint = sqrt((1. - cost)*(1. + cost));
214 phi = twopi * rndmEngine->
flat();
222 pol.
set(-sinphi, cosphi, 0.0);
230 G4double tau = posiKinEnergy/electron_mass_c2;
233 G4double sqgrate = sqrt(tau/tau2)*0.5;
239 G4double epsilqot = epsilmax/epsilmin;
248 greject = 1. - epsil + (2.*gam*epsil-1.)/(epsil*tau2*tau2);
250 }
while( greject < rndmEngine->flat());
256 G4double cost = (epsil*tau2-1.)/(epsil*sqg2m1);
257 if(std::abs(cost) > 1.0) {
258 G4cout <<
"### G4eplusTo2GammaOKVIModel WARNING cost= " << cost
259 <<
" positron Ekin(MeV)= " << posiKinEnergy
260 <<
" gamma epsil= " << epsil
262 if(cost > 1.0) cost = 1.0;
265 G4double sint = sqrt((1.+cost)*(1.-cost));
272 G4double TotalAvailableEnergy = posiKinEnergy + 2.0*electron_mass_c2;
273 G4double phot1Energy = epsil*TotalAvailableEnergy;
275 G4ThreeVector phot1Direction(sint*cos(phi), sint*sin(phi), cost);
276 phot1Direction.
rotateUz(posiDirection);
278 phi = twopi * rndmEngine->
flat();
285 G4double phot2Energy =(1.-epsil)*TotalAvailableEnergy;
286 G4double posiP= sqrt(posiKinEnergy*(posiKinEnergy+2.*electron_mass_c2));
287 G4ThreeVector dir = posiDirection*posiP - phot1Direction*phot1Energy;
294 pol.
set(-sinphi, cosphi, 0.0);
296 cost = pol*phot2Direction;
297 pol -= cost*phot2Direction;
310 vdp->push_back(aGamma1);
311 vdp->push_back(aGamma2);
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
void SetPolarization(const G4ThreeVector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4EmParameters * Instance()
G4double LowestTripletEnergy() const
G4double GetElectronDensity() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double Energy(std::size_t index) const
G4double Value(G4double theEnergy, std::size_t &lastidx) const
void PutValue(std::size_t index, G4double theValue)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
void SetTripletModel(G4VEmModel *)
void ProposeTrackStatus(G4TrackStatus status)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeCrossSectionPerElectron(G4double kinEnergy)
virtual ~G4eplusTo2GammaOKVIModel()
G4eplusTo2GammaOKVIModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="eplus2ggOKVI")
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double maxEnergy=DBL_MAX) final
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0., G4double maxEnergy=DBL_MAX) final
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX) final
G4double ComputeCrossSectionPerElectron(G4double kinEnergy)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double maxEnergy=DBL_MAX) final
void SetDelta(G4double val)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) final