145{
146
148
150
151
153
154
159
160
161 if (targetIsPolarized)
163
164
165
166
168 if(tmin >= tmax) return;
169
170
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);
176
178 G4double energy = kineticEnergy + electron_mass_c2;
179 G4double totalMomentum = std::sqrt(kineticEnergy*(energy + electron_mass_c2));
194
195
197
199 G4double H = (
sqr(gam - 1.0)/gamma2)*(1. + polT + polL*((gam + 3.)/(gam - 1.)));
200
201 y = 1.0 - xmax;
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));
206 grej *= prefM;
207 do {
209 x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
210 if (crossSectionCalculator) {
211 crossSectionCalculator->
Initialize(x,gam,phi,theBeamPolarization,
212 theTargetPolarization,1);
216 if (grej < z) {
217 G4cout<<
"WARNING : error in Moller rejection routine! \n"
218 <<" z = "<<z<<" grej="<<grej<<"\n";
219 }
220 } else {
222 }
224
225 } else {
226
227 y = xmax*xmax;
228 grej = 0.;
229 grej += y*y*gmo3*(1. + (polL + polT)*(gam + 3.)/gmo);
230 grej += -2.*xmin*xmin*xmin*
gam*gmo2*(1. - (polL + polT)*(gam + 3.)/gmo);
231 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.)));
232 grej /= gpo3;
233 grej += -xmin*(2.*gamma2 + 4.*
gam + 1.)*(1. - gam*(polL*(2.*gam + 1.) + polT)/(2.*
gam*(
gam + 2.) + 1.))/gpo2;
234 grej += gamma2/(gamma2 - 1.);
235 G4double prefB = classic_electr_radius*classic_electr_radius/(
gam - 1.0);
236 grej *= prefB;
237
238 do {
240 x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
241 if (crossSectionCalculator) {
242 crossSectionCalculator->
Initialize(x,gam,phi,theBeamPolarization,
243 theTargetPolarization,1);
247 } else {
249 }
250
251 if(z > grej) {
252 G4cout<<
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"<<
G4endl;
253 G4cout <<
"G4PolarizedMollerBhabhaModel::SampleSecondaries Warning! "<<
G4endl
254 << "Majorant " << grej << " < "
255 << z <<
" for x= " << x<<
G4endl
256 <<
" e+e- (Bhabha) scattering"<<
" at KinEnergy "<<kineticEnergy<<
G4endl;
257 G4cout<<
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"<<
G4endl;
258 }
260 }
261
262
263
264
265
266 if (crossSectionCalculator) {
267
268 grej=xs*2.;
269 do {
271 crossSectionCalculator->
Initialize(x,gam,phi,theBeamPolarization,
272 theTargetPolarization,1);
275 if(xs > grej) {
277 G4cout <<
"G4PolarizedMollerBhabhaModel::SampleSecondaries Warning! "<<
G4endl
278 << "Majorant " << grej << " < "
279 << xs <<
" for phi= " << phi<<
G4endl
280 <<
" e-e- (Moller) scattering"<<
G4endl
282 } else {
283 G4cout <<
"G4PolarizedMollerBhabhaModel::SampleSecondaries Warning! "<<
G4endl
284 << "Majorant " << grej << " < "
285 << xs <<
" for phi= " << phi<<
G4endl
286 <<
" e+e- (Bhabha) scattering"<<
G4endl
288 }
289 }
291 }
292
293
294 G4double deltaKinEnergy = x * kineticEnergy;
296 std::sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
297 G4double cost = deltaKinEnergy * (energy + electron_mass_c2) /
298 (deltaMomentum * totalMomentum);
300 if(sint > 0.0) sint = std::sqrt(sint);
301
302
303 G4ThreeVector deltaDirection(-sint*std::cos(phi),-sint*std::sin(phi), cost) ;
304 deltaDirection.rotateUz(direction);
305
306
307 kineticEnergy -= deltaKinEnergy;
309
311 G4ThreeVector dir = totalMomentum*direction - deltaMomentum*deltaDirection;
312 direction = dir.
unit();
314 }
315
316
318 vdp->push_back(delta);
319
320
323
324 if (crossSectionCalculator) {
325
326
327 theBeamPolarization.
InvRotateAz(nInteractionFrame,direction);
328 theTargetPolarization.
InvRotateAz(nInteractionFrame,direction);
329 crossSectionCalculator->
Initialize(x,gam,phi,theBeamPolarization,
330 theTargetPolarization,2);
331
332
333 fPositronPolarization=crossSectionCalculator->
GetPol2();
334 fPositronPolarization.
RotateAz(nInteractionFrame,direction);
335
337
338
339 fElectronPolarization=crossSectionCalculator->
GetPol3();
340 fElectronPolarization.
RotateAz(nInteractionFrame,deltaDirection);
342 fElectronPolarization.
y(),
343 fElectronPolarization.
z());
344 }
345 else {
348 }
349}
CLHEP::Hep3Vector G4ThreeVector
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4ParticleChangeForLoss * fParticleChange
void SetProposedKineticEnergy(G4double proposedKinEnergy)
const G4Track * GetCurrentTrack() const
void ProposePolarization(const G4ThreeVector &dir)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
static G4ThreeVector GetFrame(const G4ThreeVector &, const G4ThreeVector &)
bool IsPolarized(G4LogicalVolume *lVol) const
static G4PolarizationManager * GetInstance()
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
void InvRotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
void RotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
G4VPhysicalVolume * GetVolume() const
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
G4LogicalVolume * GetLogicalVolume() const
virtual G4double XSection(const G4StokesVector &pol2, const G4StokesVector &pol3)=0
virtual G4StokesVector GetPol3()
virtual G4StokesVector GetPol2()
virtual void Initialize(G4double, G4double, G4double, const G4StokesVector &p0, const G4StokesVector &p1, G4int flag=0)