114 if (std::fabs(cut/emax-1.)<1.
e-10)
return xs;
124 TotalXSection(xmin,xmax,gam,
128 TotalXSection(xmin,xmax,gam,
131 if (crossUnpol>0.) factor=crossPol/crossUnpol;
161 if (targetIsPolarized)
168 if(tmin >= tmax)
return;
172 polL=std::fabs(polL);
175 polT=std::fabs(polT);
179 G4double totalMomentum = std::sqrt(kineticEnergy*(energy + electron_mass_c2));
198 G4double G = ((2.0*gam - 1.0)/gamma2)*(1. - polT - polL*gam);
199 G4double H = (
sqr(gam - 1.0)/gamma2)*(1. + polT + polL*((gam + 3.)/(gam - 1.)));
202 grej = 1.0 - G*xmax + xmax*xmax*(H + (1.0 - G*
y)/(y*y));
203 grej2 = 1.0 - G*xmin + xmin*xmin*(H + (1.0 - G*
y)/(y*y));
204 if (grej2 > grej) grej = grej2;
209 x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
217 G4cout<<
"WARNING : error in Moller rejection routine! \n"
218 <<
" z = "<<z<<
" grej="<<grej<<
"\n";
230 grej += y*y*gmo3*(1. + (polL + polT)*(gam + 3.)/gmo);
231 grej += -2.*xmin*xmin*xmin*gam*gmo2*(1. - (polL + polT)*(gam + 3.)/gmo);
232 grej += y*y*gmo*(3.*gamma2 + 6.*gam + 4.)*(1. + (polL*(3.*gam + 1.)*(gamma2 + gam + 1.) + polT*((gam + 2.)*gamma2 + 1.))/(gmo*(3.*gam*(gam + 2.) + 4.)));
234 grej += -xmin*(2.*gamma2 + 4.*gam + 1.)*(1. - gam*(polL*(2.*gam + 1.) + polT)/(2.*gam*(gam + 2.) + 1.))/gpo2;
235 grej += gamma2/(gamma2 - 1.);
241 x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
253 G4cout<<
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"<<
G4endl;
254 G4cout <<
"G4PolarizedMollerBhabhaModel::SampleSecondaries Warning! "<<G4endl
255 <<
"Majorant " << grej <<
" < "
256 << z <<
" for x= " << x<<G4endl
257 <<
" e+e- (Bhabha) scattering"<<
" at KinEnergy "<<kineticEnergy<<
G4endl;
258 G4cout<<
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"<<
G4endl;
279 G4cout <<
"G4PolarizedMollerBhabhaModel::SampleSecondaries Warning! "<<
G4endl
280 <<
"Majorant " << grej <<
" < "
281 << xs <<
" for phi= " << phi<<
G4endl
282 <<
" e-e- (Moller) scattering"<<
G4endl
285 G4cout <<
"G4PolarizedMollerBhabhaModel::SampleSecondaries Warning! "<<
G4endl
286 <<
"Majorant " << grej <<
" < "
287 << xs <<
" for phi= " << phi<<
G4endl
288 <<
" e+e- (Bhabha) scattering"<<
G4endl
299 std::sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
301 (deltaMomentum * totalMomentum);
303 if(sint > 0.0) sint = std::sqrt(sint);
306 G4ThreeVector deltaDirection(-sint*std::cos(phi),-sint*std::sin(phi), cost) ;
310 kineticEnergy -= deltaKinEnergy;
315 direction = dir.
unit();
321 vdp->push_back(delta);
static G4ThreeVector GetFrame(const G4ThreeVector &, const G4ThreeVector &)
CLHEP::Hep3Vector G4ThreeVector
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4LogicalVolume * GetLogicalVolume() const
virtual G4StokesVector GetPol2()
G4VPolarizedCrossSection * crossSectionCalculator
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
const G4ThreeVector & GetMomentumDirection() const
G4StokesVector theTargetPolarization
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
G4StokesVector theBeamPolarization
Hep3Vector & rotateUz(const Hep3Vector &)
static const G4double emax
G4StokesVector fElectronPolarization
void SetProposedMomentumDirection(const G4ThreeVector &dir)
static constexpr double classic_electr_radius
void ProposePolarization(const G4ThreeVector &dir)
virtual G4StokesVector GetPol3()
static constexpr double electron_mass_c2
void InvRotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
G4StokesVector fPositronPolarization
static constexpr double twopi
void RotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
const G4Track * GetCurrentTrack() const
G4PolarizedMollerBhabhaModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="PolarizedMollerBhabha")
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kinEnergy, G4double cut, G4double emax) override
static const G4StokesVector ZERO
virtual G4double XSection(const G4StokesVector &pol2, const G4StokesVector &pol3)=0
const G4ThreeVector & GetPolarization() const
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) final
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4ParticleDefinition * theElectron
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
virtual ~G4PolarizedMollerBhabhaModel()
static G4PolarizationManager * GetInstance()
virtual void Initialize(G4double, G4double, G4double, const G4StokesVector &p0, const G4StokesVector &p1, G4int flag=0)
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4VPhysicalVolume * GetVolume() const
bool IsPolarized(G4LogicalVolume *lVol) const
G4ParticleChangeForLoss * fParticleChange