53G4SynchrotronRadiationInMat::fLambdaConst = std::sqrt(3.0)*electron_mass_c2/
54 (2.5*fine_structure_const*eplus*c_light) ;
62G4SynchrotronRadiationInMat::fEnergyConst = 1.5*c_light*c_light*eplus*hbar_Planck/
73G4SynchrotronRadiationInMat::fIntegralProbabilityOfSR[200] =
75 1.000000e+00, 9.428859e-01, 9.094095e-01, 8.813971e-01, 8.565154e-01,
76 8.337008e-01, 8.124961e-01, 7.925217e-01, 7.735517e-01, 7.554561e-01,
77 7.381233e-01, 7.214521e-01, 7.053634e-01, 6.898006e-01, 6.747219e-01,
78 6.600922e-01, 6.458793e-01, 6.320533e-01, 6.185872e-01, 6.054579e-01,
79 5.926459e-01, 5.801347e-01, 5.679103e-01, 5.559604e-01, 5.442736e-01,
80 5.328395e-01, 5.216482e-01, 5.106904e-01, 4.999575e-01, 4.894415e-01,
81 4.791351e-01, 4.690316e-01, 4.591249e-01, 4.494094e-01, 4.398800e-01,
82 4.305320e-01, 4.213608e-01, 4.123623e-01, 4.035325e-01, 3.948676e-01,
83 3.863639e-01, 3.780179e-01, 3.698262e-01, 3.617858e-01, 3.538933e-01,
84 3.461460e-01, 3.385411e-01, 3.310757e-01, 3.237474e-01, 3.165536e-01,
85 3.094921e-01, 3.025605e-01, 2.957566e-01, 2.890784e-01, 2.825237e-01,
86 2.760907e-01, 2.697773e-01, 2.635817e-01, 2.575020e-01, 2.515365e-01,
87 2.456834e-01, 2.399409e-01, 2.343074e-01, 2.287812e-01, 2.233607e-01,
88 2.180442e-01, 2.128303e-01, 2.077174e-01, 2.027040e-01, 1.977885e-01,
89 1.929696e-01, 1.882457e-01, 1.836155e-01, 1.790775e-01, 1.746305e-01,
90 1.702730e-01, 1.660036e-01, 1.618212e-01, 1.577243e-01, 1.537117e-01,
91 1.497822e-01, 1.459344e-01, 1.421671e-01, 1.384791e-01, 1.348691e-01,
92 1.313360e-01, 1.278785e-01, 1.244956e-01, 1.211859e-01, 1.179483e-01,
93 1.147818e-01, 1.116850e-01, 1.086570e-01, 1.056966e-01, 1.028026e-01,
94 9.997405e-02, 9.720975e-02, 9.450865e-02, 9.186969e-02, 8.929179e-02,
95 8.677391e-02, 8.431501e-02, 8.191406e-02, 7.957003e-02, 7.728192e-02,
96 7.504872e-02, 7.286944e-02, 7.074311e-02, 6.866874e-02, 6.664538e-02,
97 6.467208e-02, 6.274790e-02, 6.087191e-02, 5.904317e-02, 5.726079e-02,
98 5.552387e-02, 5.383150e-02, 5.218282e-02, 5.057695e-02, 4.901302e-02,
99 4.749020e-02, 4.600763e-02, 4.456450e-02, 4.315997e-02, 4.179325e-02,
100 4.046353e-02, 3.917002e-02, 3.791195e-02, 3.668855e-02, 3.549906e-02,
101 3.434274e-02, 3.321884e-02, 3.212665e-02, 3.106544e-02, 3.003452e-02,
102 2.903319e-02, 2.806076e-02, 2.711656e-02, 2.619993e-02, 2.531021e-02,
103 2.444677e-02, 2.360897e-02, 2.279620e-02, 2.200783e-02, 2.124327e-02,
104 2.050194e-02, 1.978324e-02, 1.908662e-02, 1.841151e-02, 1.775735e-02,
105 1.712363e-02, 1.650979e-02, 1.591533e-02, 1.533973e-02, 1.478250e-02,
106 1.424314e-02, 1.372117e-02, 1.321613e-02, 1.272755e-02, 1.225498e-02,
107 1.179798e-02, 1.135611e-02, 1.092896e-02, 1.051609e-02, 1.011712e-02,
108 9.731635e-03, 9.359254e-03, 8.999595e-03, 8.652287e-03, 8.316967e-03,
109 7.993280e-03, 7.680879e-03, 7.379426e-03, 7.088591e-03, 6.808051e-03,
110 6.537491e-03, 6.276605e-03, 6.025092e-03, 5.782661e-03, 5.549027e-03,
111 5.323912e-03, 5.107045e-03, 4.898164e-03, 4.697011e-03, 4.503336e-03,
112 4.316896e-03, 4.137454e-03, 3.964780e-03, 3.798649e-03, 3.638843e-03,
113 3.485150e-03, 3.337364e-03, 3.195284e-03, 3.058715e-03, 2.927469e-03,
114 2.801361e-03, 2.680213e-03, 2.563852e-03, 2.452110e-03, 2.344824e-03
124 LowestKineticEnergy (10.*keV),
128 fAlpha(0.0), fRootNumber(80),
129 fVerboseLevel( verboseLevel )
135 CutInRange = GammaCutInKineticEnergyNow = ElectronCutInKineticEnergyNow =
136 PositronCutInKineticEnergyNow = ParticleCutInKineticEnergyNow = fKsi =
137 fPsiGamma = fEta = fOrderAngleK = 0.0;
196 if ( KineticEnergy < LowestKineticEnergy || gamma < 1.0e3 ) MeanFreePath =
DBL_MAX;
201 const G4Field* pField =
nullptr;
204 G4bool fieldExertsForce =
false;
206 if( (particleCharge != 0.0) )
210 if ( fieldMgr !=
nullptr )
217 if ( fieldExertsForce )
222 G4double globPosVec[4], FieldValueVec[6];
224 globPosVec[0] = globPosition.
x();
225 globPosVec[1] = globPosition.
y();
226 globPosVec[2] = globPosition.
z();
243 if( perpB > 0.0 ) MeanFreePath = fLambdaConst*beta/perpB;
248 if(fVerboseLevel > 0)
250 G4cout<<
"G4SynchrotronRadiationInMat::MeanFreePath = "<<MeanFreePath/m<<
" m"<<
G4endl;
269 (aDynamicParticle->
GetMass() );
278 const G4Field* pField = nullptr ;
281 G4bool fieldExertsForce =
false;
283 if( (particleCharge != 0.0) )
286 if ( fieldMgr !=
nullptr )
293 if ( fieldExertsForce )
297 G4double globPosVec[4], FieldValueVec[6] ;
298 globPosVec[0] = globPosition.
x() ;
299 globPosVec[1] = globPosition.
y() ;
300 globPosVec[2] = globPosition.
z() ;
317 if(fVerboseLevel > 0)
319 G4cout<<
"SR photon energy = "<<energyOfSR/keV<<
" keV"<<
G4endl;
323 if( energyOfSR <= 0.0 )
340 fcos = (1 + cosTheta*cosTheta)*0.5;
345 beta = std::sqrt(1. - 1./(gamma*gamma));
347 cosTheta = (cosTheta + beta)/(1. + beta*cosTheta);
349 if( cosTheta > 1. ) cosTheta = 1.;
350 if( cosTheta < -1. ) cosTheta = -1.;
352 sinTheta = std::sqrt(1. - cosTheta*cosTheta );
356 G4double dirx = sinTheta*std::cos(Phi) ,
357 diry = sinTheta*std::sin(Phi) ,
361 gammaDirection.
rotateUz(particleDirection);
370 gammaPolarization = gammaPolarization.
unit();
381 gammaPolarization.
y(),
382 gammaPolarization.
z() );
390 G4double newKinEnergy = kineticEnergy - energyOfSR ;
392 if (newKinEnergy > 0.)
434 (aDynamicParticle->
GetMass() ) ;
439 const G4Field* pField = nullptr ;
442 G4bool fieldExertsForce =
false;
444 if( (particleCharge != 0.0) )
447 if ( fieldMgr !=
nullptr )
454 if ( fieldExertsForce )
458 G4double globPosVec[3], FieldValueVec[3];
460 globPosVec[0] = globPosition.
x();
461 globPosVec[1] = globPosition.
y();
462 globPosVec[2] = globPosition.
z();
479 if(random >= fIntegralProbabilityOfSR[i]) break ;
481 energyOfSR = 0.0001*i*i*fEnergyConst*gamma*gamma*perpB ;
485 if(energyOfSR <= 0.0)
524 for( i = 0; i < iMax; i++ )
526 if( random >= fIntegralProbabilityOfSR[i] )
break;
537 if( energySR < 0. ) energySR = 0.;
548 G4double result, hypCos2, hypCos=std::cosh(t);
550 hypCos2 = hypCos*hypCos;
551 result = std::cosh(5.*t/3.)*std::exp(t-fKsi*hypCos);
564 if (ksi <= 0.)
return 1.0;
574 result = integral.Laguerre(
this,
588 G4double result, hypCos=std::cosh(t);
590 result = std::cosh(5.*t/3.)*std::exp(t - fKsi*hypCos);
603 if (ksi <= 0.)
return 1.0;
613 result = integral.Laguerre(
this,
616 result *= 9.*std::sqrt(3.)*ksi/8./pi;
627 G4double result, hypCos=std::cosh(t);
629 result = std::cosh(fOrderAngleK*t)*std::exp(t - fEta*hypCos);
649 result = integral.Laguerre(
this,
661 G4double result, funK, funK2, gpsi2 = gpsi*gpsi;
664 fEta = 0.5*fKsi*(1. + gpsi2)*std::sqrt(1. + gpsi2);
666 fOrderAngleK = 1./3.;
670 result = gpsi2*funK2/(1. + gpsi2);
672 fOrderAngleK = 2./3.;
677 result *= (1. + gpsi2)*fKsi;
G4double condition(const G4ErrorSymMatrix &m)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
G4double fcos(G4double arg)
Hep3Vector cross(const Hep3Vector &) const
Hep3Vector & rotateUz(const Hep3Vector &)
void SetPolarization(const G4ThreeVector &)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4double GetTotalMomentum() const
const G4Field * GetDetectorField() const
virtual void GetFieldValue(const G4double Point[4], G4double *fieldArr) const =0
void AddSecondary(G4Track *aSecondary)
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
virtual void Initialize(const G4Track &)
G4double GetPDGCharge() const
G4FieldManager * FindAndSetFieldManager(G4VPhysicalVolume *pCurrentPhysVol)
G4double GetEnergyProbSR(G4double)
G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &Step) override
static G4double GetEnergyConst()
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
static G4double GetLambdaConst()
G4double GetAngleNumberAtGammaKsi(G4double)
G4SynchrotronRadiationInMat(const G4String &processName="SynchrotronRadiation", G4ProcessType type=fElectromagnetic)
G4double GetRandomEnergySR(G4double, G4double)
G4double GetProbSpectrumSRforEnergy(G4double)
G4double GetIntProbSR(G4double)
G4double GetIntegrandForAngleK(G4double)
G4double GetPhotonEnergy(const G4Track &trackData, const G4Step &stepData)
G4bool IsApplicable(const G4ParticleDefinition &) override
G4double GetAngleK(G4double)
virtual ~G4SynchrotronRadiationInMat()
G4double GetProbSpectrumSRforInt(G4double)
G4VPhysicalVolume * GetVolume() const
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
const G4DynamicParticle * GetDynamicParticle() const
static G4TransportationManager * GetTransportationManager()
G4PropagatorInField * GetPropagatorInField() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetNumberOfSecondaries(G4int totSecondaries)
G4ParticleChange aParticleChange
void SetProcessSubType(G4int)