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;
205 G4double prefM = gamma2*classic_electr_radius*classic_electr_radius/(gmo2*(gam + 1.0));
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.);
236 G4double prefB = classic_electr_radius*classic_electr_radius/(gam - 1.0);
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
297 G4double deltaKinEnergy = x * kineticEnergy;
299 std::sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
300 G4double cost = deltaKinEnergy * (energy + 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) ;
307 deltaDirection.rotateUz(direction);
310 kineticEnergy -= deltaKinEnergy;
314 G4ThreeVector dir = totalMomentum*direction - deltaMomentum*deltaDirection;
315 direction = dir.unit();
321 vdp->push_back(delta);
void ProposePolarization(const G4ThreeVector &dir)
G4StokesVector theTargetPolarization
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
G4StokesVector theBeamPolarization
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kinEnergy, G4double cut, G4double emax)
static G4PolarizationManager * GetInstance()
virtual G4double XSection(const G4StokesVector &pol2, const G4StokesVector &pol3)=0
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual ~G4PolarizedMollerBhabhaModel()
G4StokesVector fElectronPolarization
virtual G4StokesVector GetPol2()
G4GLOB_DLL std::ostream G4cout
G4ParticleChangeForLoss * fParticleChange
G4StokesVector fPositronPolarization
const G4ThreeVector & GetMomentumDirection() const
static const double twopi
void SetProposedKineticEnergy(G4double proposedKinEnergy)
static G4ThreeVector GetFrame(const G4ThreeVector &, const G4ThreeVector &)
G4VPolarizedCrossSection * crossSectionCalculator
void SetPolarization(G4double polX, G4double polY, G4double polZ)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
static const G4double emax
void InvRotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
G4ParticleDefinition * theElectron
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
static const G4double factor
G4LogicalVolume * GetLogicalVolume() const
G4double energy(const ThreeVector &p, const G4double m)
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
const G4double x[NPOINTSGL]
bool IsPolarized(G4LogicalVolume *lVol) const
const G4ThreeVector & GetPolarization() const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4PolarizedMollerBhabhaModel(const G4ParticleDefinition *p=0, const G4String &nam="PolarizedMollerBhabha")
G4VPhysicalVolume * GetVolume() const
virtual G4StokesVector GetPol3()
const G4Track * GetCurrentTrack() const
static const G4StokesVector ZERO
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
void RotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
virtual void Initialize(G4double, G4double, G4double, const G4StokesVector &p0, const G4StokesVector &p1, G4int flag=0)