94 fParticleChange =
nullptr;
107 if(isInitialised) {
return; }
109 isInitialised =
true;
130 G4double cross = pi_rcl2*((gamma2+4*gam+1.)*
G4Log(gam+bg) - (gam+3.)*bg)
180 if(PositKinEnergy == 0.0) {
182 G4double sint = sqrt((1. - cost)*(1. + cost));
193 pol.
set(-sinphi, cosphi, 0.0);
204 G4double sqgrate = sqrt(tau/tau2)*0.5;
210 G4double epsilqot = epsilmax/epsilmin;
219 greject = 1. - epsil + (2.*gam*epsil-1.)/(epsil*tau2*tau2);
221 }
while( greject < rndmEngine->
flat());
227 G4double cost = (epsil*tau2-1.)/(epsil*sqg2m1);
228 if(std::abs(cost) > 1.0) {
229 G4cout <<
"### G4eeToTwoGammaModel WARNING cost= " << cost
230 <<
" positron Ekin(MeV)= " << PositKinEnergy
231 <<
" gamma epsil= " << epsil
233 if(cost > 1.0) cost = 1.0;
236 G4double sint = sqrt((1.+cost)*(1.-cost));
244 G4double Phot1Energy = epsil*TotalAvailableEnergy;
246 G4ThreeVector Phot1Direction(sint*cos(phi), sint*sin(phi), cost);
247 Phot1Direction.
rotateUz(PositDirection);
256 G4double Phot2Energy =(1.-epsil)*TotalAvailableEnergy;
258 G4ThreeVector dir = PositDirection*PositP - Phot1Direction*Phot1Energy;
265 pol.
set(-sinphi, cosphi, 0.0);
267 cost = pol*Phot2Direction;
268 pol -= cost*Phot2Direction;
281 vdp->push_back(aGamma1);
282 vdp->push_back(aGamma2);
void set(double x, double y, double z)
G4double GetKineticEnergy() const
static constexpr double twopi
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) final
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4GLOB_DLL std::ostream G4cout
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kinEnergy, G4double cutEnergy=0., G4double maxEnergy=DBL_MAX)
G4double GetElectronDensity() const
const G4ThreeVector & GetMomentumDirection() const
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0., G4double maxEnergy=DBL_MAX) final
Hep3Vector & rotateUz(const Hep3Vector &)
static constexpr double eV
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4eeToTwoGammaModel(const G4ParticleDefinition *p=0, const G4String &nam="eplus2gg")
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
static constexpr double pi
void ProposeTrackStatus(G4TrackStatus status)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
virtual ~G4eeToTwoGammaModel()