91 lowEnergyLimit (250*
eV),
92 highEnergyLimit(100*
GeV),
93 intrinsicLowEnergyLimit(10*
eV),
94 intrinsicHighEnergyLimit(100*
GeV)
99 G4Exception(
"G4LowEnergyPolarizedCompton::G4LowEnergyPolarizedCompton()",
101 "Energy outside intrinsic process validity range!");
108 G4String scatterFile =
"comp/ce-sf-";
145 G4String crossSectionFile =
"comp/ce-cs-";
151 G4String file =
"/doppler/shell-doppler";
186 if(!(gammaPolarization0.isOrthogonal(gammaDirection0, 1e-6))||(gammaPolarization0.mag()==0))
192 if ( gammaPolarization0.howOrthogonal(gammaDirection0) != 0)
210 G4double E0_m = gammaEnergy0 / electron_mass_c2 ;
221 G4double epsilon0 = 1./(1. + 2*E0_m);
222 G4double epsilon0Sq = epsilon0*epsilon0;
223 G4double alpha1 = - std::log(epsilon0);
224 G4double alpha2 = 0.5*(1.- epsilon0Sq);
226 G4double wlGamma = h_Planck*c_light/gammaEnergy0;
239 epsilon = std::sqrt(epsilonSq);
242 onecost = (1.-
epsilon)/(epsilon*E0_m);
243 sinThetaSqr = onecost*(2.-onecost);
246 if (sinThetaSqr > 1.)
249 <<
" -- Warning -- G4LowEnergyPolarizedCompton::PostStepDoIt "
250 <<
"sin(theta)**2 = "
256 if (sinThetaSqr < 0.)
259 <<
" -- Warning -- G4LowEnergyPolarizedCompton::PostStepDoIt "
260 <<
"sin(theta)**2 = "
268 G4double x = std::sqrt(onecost/2.) / (wlGamma/
cm);;
270 greject = (1. - epsilon*sinThetaSqr/(1.+ epsilonSq))*scatteringFunction;
292 <<
" -- Warning -- G4LowEnergyPolarizedCompton::PostStepDoIt "
302 <<
" -- Warning -- G4LowEnergyPolarizedCompton::PostStepDoIt "
312 G4double sinTheta = std::sqrt (sinThetaSqr);
318 <<
" -- Warning -- G4LowEnergyPolarizedCompton::PostStepDoIt "
328 <<
" -- Warning -- G4LowEnergyPolarizedCompton::PostStepDoIt "
338 G4double dirx = sinTheta*std::cos(phi);
339 G4double diry = sinTheta*std::sin(phi);
354 G4int maxDopplerIterations = 1000;
356 G4double photonEoriginal = epsilon * gammaEnergy0;
368 eMax = gammaEnergy0 - bindingE;
373 G4double pDoppler = pSample * fine_structure_const;
374 G4double pDoppler2 = pDoppler * pDoppler;
375 G4double var2 = 1. + onecost * E0_m;
376 G4double var3 = var2*var2 - pDoppler2;
377 G4double var4 = var2 - pDoppler2 * cosTheta;
378 G4double var = var4*var4 - var3 + pDoppler2 * var3;
382 G4double scale = gammaEnergy0 / var3;
384 if (
G4UniformRand() < 0.5) photonE = (var4 - varSqrt) * scale;
385 else photonE = (var4 + varSqrt) * scale;
391 }
while ( iteration <= maxDopplerIterations &&
392 (photonE < 0. || photonE > eMax || photonE < eMax*
G4UniformRand()) );
396 if (iteration >= maxDopplerIterations)
398 photonE = photonEoriginal;
402 gammaEnergy1 = photonE;
428 gammaDirection1 = tmpDirection1;
433 gammaPolarization0,gammaPolarization1);
435 if (gammaEnergy1 > 0.)
451 G4double ElecKineEnergy = gammaEnergy0 - gammaEnergy1 -bindingE;
461 G4double ElecMomentum = std::sqrt(ElecKineEnergy*(ElecKineEnergy+2.*electron_mass_c2));
462 G4ThreeVector ElecDirection((gammaEnergy0 * gammaDirection0 -
463 gammaEnergy1 * gammaDirection1) * (1./ElecMomentum));
498 b = energyRate + 1/energyRate;
500 phiProbability = 1 - (a/b)*(std::cos(phi)*std::cos(phi));
505 while ( rand2 > phiProbability );
538 c.setX(std::cos(angle)*(a0.x())+std::sin(angle)*b0.x());
539 c.setY(std::cos(angle)*(a0.y())+std::sin(angle)*b0.y());
540 c.setZ(std::cos(angle)*(a0.z())+std::sin(angle)*b0.z());
563 return gammaPolarization - gammaPolarization.dot(gammaDirection)/gammaDirection.dot(gammaDirection) * gammaDirection;
576 G4double sinTheta = std::sqrt(sinSqrTh);
580 G4double normalisation = std::sqrt(1. - cosSqrPhi*sinSqrTh);
619 if (rand1<(epsilon+1.0/epsilon-2)/(2.0*(epsilon+1.0/epsilon)-4.0*sinSqrTh*cosSqrPhi))
634 G4double sinBeta = std::sqrt(1-cosBeta*cosBeta);
638 G4double xParallel = normalisation*cosBeta;
639 G4double yParallel = -(sinSqrTh*cosPhi*sinPhi)*cosBeta/normalisation;
640 G4double zParallel = -(costheta*sinTheta*cosPhi)*cosBeta/normalisation;
642 G4double yPerpendicular = (costheta)*sinBeta/normalisation;
643 G4double zPerpendicular = -(sinTheta*sinPhi)*sinBeta/normalisation;
645 G4double xTotal = (xParallel + xPerpendicular);
646 G4double yTotal = (yParallel + yPerpendicular);
647 G4double zTotal = (zParallel + zPerpendicular);
649 gammaPolarization1.setX(xTotal);
650 gammaPolarization1.setY(yTotal);
651 gammaPolarization1.setZ(zTotal);
653 return gammaPolarization1;
670 G4double direction_x = direction1.getX();
671 G4double direction_y = direction1.getY();
672 G4double direction_z = direction1.getZ();
674 direction1 = (direction_x*Axis_X0 + direction_y*Axis_Y0 + direction_z*Axis_Z0).unit();
675 G4double polarization_x = polarization1.getX();
676 G4double polarization_y = polarization1.getY();
677 G4double polarization_z = polarization1.getZ();
679 polarization1 = (polarization_x*Axis_X0 + polarization_y*Axis_Y0 + polarization_z*Axis_Z0).unit();
697 size_t materialIndex = couple->
GetIndex();
void BuildPhysicsTable(const G4ParticleDefinition &photon)
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
G4LowEnergyPolarizedCompton(const G4String &processName="polarLowEnCompt")
const G4DynamicParticle * GetDynamicParticle() const
std::vector< ExP01TrackerHit * > a
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
G4double BindingEnergy(G4int Z, G4int shellIndex) const
static G4double angle[DIM]
void ProposePolarization(G4double Px, G4double Py, G4double Pz)
G4RDVEMDataSet * BuildMeanFreePathForMaterials(const G4DataVector *energyCuts=0)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
static constexpr double twopi
G4RDDopplerProfile profileData
G4ThreeVector SetNewPolarization(G4double epsilon, G4double sinSqrTheta, G4double phi, G4double cosTheta)
void LoadData(const G4String &fileName)
~G4LowEnergyPolarizedCompton()
G4GLOB_DLL std::ostream G4cout
G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
const G4double intrinsicLowEnergyLimit
const G4ThreeVector & GetMomentumDirection() const
static constexpr double cm
const G4double intrinsicHighEnergyLimit
static constexpr double eV
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
G4ThreeVector GetPerpendicularPolarization(const G4ThreeVector &direction0, const G4ThreeVector &polarization0) const
const G4String & GetProcessName() const
void SystemOfRefChange(G4ThreeVector &direction0, G4ThreeVector &direction1, G4ThreeVector &polarization0, G4ThreeVector &polarization1)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double RandomSelectMomentum(G4int Z, G4int shellIndex) const
G4RDVRangeTest * rangeTest
virtual G4bool Escape(const G4ParticleDefinition *particle, const G4MaterialCutsCouple *couple, G4double energy, G4double safety) const =0
virtual void Initialize(const G4Track &)
G4RDVCrossSectionHandler * crossSectionHandler
G4RDVEMDataSet * meanFreePathTable
G4double SetPhi(G4double, G4double)
G4double energy(const ThreeVector &p, const G4double m)
void SetNumberOfSecondaries(G4int totSecondaries)
G4StepPoint * GetPostStepPoint() const
G4int SelectRandomAtom(const G4MaterialCutsCouple *couple, G4double e) const
const G4ThreeVector & GetPolarization() const
void ProposeEnergy(G4double finalEnergy)
G4ThreeVector SetPerpendicularVector(G4ThreeVector &a)
G4ParticleChange aParticleChange
static constexpr double GeV
G4double GetSafety() const
G4RDVEMDataSet * scatterFunctionData
void AddSecondary(G4Track *aSecondary)
static G4Electron * Electron()
void LoadData(const G4String &dataFile)
static constexpr double pi
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeTrackStatus(G4TrackStatus status)
static constexpr double keV
G4int SelectRandomShell(G4int Z) const
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
double epsilon(double density, double temperature)
G4bool IsApplicable(const G4ParticleDefinition &definition)
virtual G4bool LoadData(const G4String &fileName)=0
G4ThreeVector GetRandomPolarization(G4ThreeVector &direction0)