76 fParticleChange =
nullptr;
104 for(
G4int i=0; i<= nbins; ++i) {
111 f3GProbability->
PutValue(i, cs3/cs2);
119 if(fParticleChange) {
return; }
132 G4double ekin = std::max(eV,kinEnergy);
133 G4double tau = ekin/electron_mass_c2;
139 - (gam+3.)/(sqrt(gam*gam - 1.));
141 static const G4double pir2 = pi*classic_electr_radius*classic_electr_radius;
142 G4double cross = (pir2*rho + alpha_rcl2*2.*
G4Log(fDelta)*rho*rho)/(gam+1.);
169 G4double cross = eDensity*fCrossSection->
Value(kineticEnergy);
187 if(rndmEngine->
flat() < f3GProbability->
Value(posiKinEnergy)) {
189 /(posiKinEnergy + electron_mass_c2);
195 if(rndmEngine->
flat()*cs30 < cs3) {
208 if(posiKinEnergy == 0.0) {
210 G4double sint = sqrt((1. - cost)*(1. + cost));
213 phi = twopi * rndmEngine->
flat();
221 pol.
set(-sinphi, cosphi, 0.0);
229 G4double tau = posiKinEnergy/electron_mass_c2;
232 G4double sqgrate = sqrt(tau/tau2)*0.5;
238 G4double epsilqot = epsilmax/epsilmin;
247 greject = 1. - epsil + (2.*gam*epsil-1.)/(epsil*tau2*tau2);
249 }
while( greject < rndmEngine->flat());
255 G4double cost = (epsil*tau2-1.)/(epsil*sqg2m1);
256 if(std::abs(cost) > 1.0) {
257 G4cout <<
"### G4eplusTo2GammaOKVIModel WARNING cost= " << cost
258 <<
" positron Ekin(MeV)= " << posiKinEnergy
259 <<
" gamma epsil= " << epsil
261 if(cost > 1.0) cost = 1.0;
264 G4double sint = sqrt((1.+cost)*(1.-cost));
271 G4double TotalAvailableEnergy = posiKinEnergy + 2.0*electron_mass_c2;
272 G4double phot1Energy = epsil*TotalAvailableEnergy;
274 G4ThreeVector phot1Direction(sint*cos(phi), sint*sin(phi), cost);
275 phot1Direction.
rotateUz(posiDirection);
277 phi = twopi * rndmEngine->
flat();
284 G4double phot2Energy =(1.-epsil)*TotalAvailableEnergy;
285 G4double posiP= sqrt(posiKinEnergy*(posiKinEnergy+2.*electron_mass_c2));
286 G4ThreeVector dir = posiDirection*posiP - phot1Direction*phot1Energy;
293 pol.
set(-sinphi, cosphi, 0.0);
295 cost = pol*phot2Direction;
296 pol -= cost*phot2Direction;
309 vdp->push_back(aGamma1);
310 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)
void PutValue(const std::size_t index, const G4double value)
G4double Energy(const std::size_t index) const
G4double Value(const G4double energy, std::size_t &lastidx) const
void FillSecondDerivatives(const G4SplineType=G4SplineType::Base, const G4double dir1=0.0, const G4double dir2=0.0)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
void SetTripletModel(G4VEmModel *)
void ProposeTrackStatus(G4TrackStatus status)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeCrossSectionPerElectron(G4double kinEnergy)
G4eplusTo2GammaOKVIModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="eplus2ggOKVI")
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double maxEnergy=DBL_MAX) final
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0., G4double maxEnergy=DBL_MAX) final
~G4eplusTo2GammaOKVIModel() override
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX) final
G4double ComputeCrossSectionPerElectron(G4double kinEnergy)
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double maxEnergy=DBL_MAX) final
void SetDelta(G4double val)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) final