161 if (targetIsPolarized)
168 if(tmin >= tmax)
return;
171 G4double polL = theBeamPolarization.
z()*theTargetPolarization.
z();
172 polL=std::fabs(polL);
173 G4double polT = theBeamPolarization.
x()*theTargetPolarization.
x() +
174 theBeamPolarization.
y()*theTargetPolarization.
y();
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);
210 if (crossSectionCalculator) {
211 crossSectionCalculator->
Initialize(x,gam,phi,theBeamPolarization,
212 theTargetPolarization,1);
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);
242 if (crossSectionCalculator) {
243 crossSectionCalculator->
Initialize(x,gam,phi,theBeamPolarization,
244 theTargetPolarization,1);
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;
268 if (crossSectionCalculator) {
273 crossSectionCalculator->
Initialize(x,gam,phi,theBeamPolarization,
274 theTargetPolarization,1);
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));
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);
327 if (crossSectionCalculator) {
330 theBeamPolarization.
InvRotateAz(nInteractionFrame,direction);
331 theTargetPolarization.
InvRotateAz(nInteractionFrame,direction);
332 crossSectionCalculator->
Initialize(x,gam,phi,theBeamPolarization,
333 theTargetPolarization,2);
336 fPositronPolarization=crossSectionCalculator->
GetPol2();
337 fPositronPolarization.
RotateAz(nInteractionFrame,direction);
342 fElectronPolarization=crossSectionCalculator->
GetPol3();
343 fElectronPolarization.
RotateAz(nInteractionFrame,deltaDirection);
345 fElectronPolarization.
y(),
346 fElectronPolarization.
z());
void ProposePolarization(const G4ThreeVector &dir)
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
static G4PolarizationManager * GetInstance()
virtual G4double XSection(const G4StokesVector &pol2, const G4StokesVector &pol3)=0
static constexpr double twopi
static constexpr double electron_mass_c2
virtual G4StokesVector GetPol2()
G4GLOB_DLL std::ostream G4cout
G4ParticleChangeForLoss * fParticleChange
const G4ThreeVector & GetMomentumDirection() const
static constexpr double classic_electr_radius
Hep3Vector & rotateUz(const Hep3Vector &)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
static G4ThreeVector GetFrame(const G4ThreeVector &, const G4ThreeVector &)
void SetPolarization(G4double polX, G4double polY, G4double polZ)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
void InvRotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
G4ParticleDefinition * theElectron
G4LogicalVolume * GetLogicalVolume() const
G4double energy(const ThreeVector &p, const G4double m)
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
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)