176 if(posiKinEnergy == 0.0) {
178 G4double sint = sqrt((1. - cost)*(1. + cost));
189 pol.
set(-sinphi, cosphi, 0.0);
203 G4double sqgrate = sqrt(tau/tau2)*0.5;
209 G4double epsilqot = epsilmax/epsilmin;
218 greject = 1. - epsil + (2.*gam*epsil-1.)/(epsil*tau2*tau2);
220 }
while( greject < rndmEngine->
flat());
226 G4double cost = (epsil*tau2-1.)/(epsil*sqg2m1);
227 if(std::abs(cost) > 1.0) {
228 G4cout <<
"### G4eeToTwoGammaModel WARNING cost= " << cost
229 <<
" positron Ekin(MeV)= " << posiKinEnergy
230 <<
" gamma epsil= " << epsil
232 if(cost > 1.0) cost = 1.0;
235 G4double sint = sqrt((1.+cost)*(1.-cost));
243 G4double phot1Energy = epsil*totalEnergy;
245 G4ThreeVector phot1Direction(sint*cos(phi), sint*sin(phi), cost);
246 phot1Direction.
rotateUz(posiDirection);
255 G4double phot2Energy =(1.-epsil)*totalEnergy;
264 pol.
set(-sinphi, cosphi, 0.0);
266 cost = pol*phot2Direction;
267 pol -= cost*phot2Direction;
280 vdp->push_back(aGamma1);
281 vdp->push_back(aGamma2);
void set(double x, double y, double z)
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
void SetPolarization(G4double polX, G4double polY, G4double polZ)
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX) override
G4ParticleChangeForGamma * fParticleChange
const G4ThreeVector & GetMomentumDirection() const
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
Hep3Vector & rotateUz(const Hep3Vector &)
virtual G4double ComputeCrossSectionPerElectron(G4double kinEnergy)
static constexpr double classic_electr_radius
G4double G4Log(G4double x)
static constexpr double electron_mass_c2
static constexpr double twopi
static constexpr double eV
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0., G4double maxEnergy=DBL_MAX) override
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
static constexpr double pi
G4ParticleChangeForGamma * GetParticleChangeForGamma()
virtual ~G4eeToTwoGammaModel()
G4ParticleDefinition * theGamma
void ProposeTrackStatus(G4TrackStatus status)
G4double GetElectronDensity() const
G4eeToTwoGammaModel(const G4ParticleDefinition *p=0, const G4String &nam="eplus2gg")