75 lowEnergyLimit(250*
eV),
76 highEnergyLimit(100*
GeV),
77 intrinsicLowEnergyLimit(10*
eV),
78 intrinsicHighEnergyLimit(100*
GeV)
80 if (lowEnergyLimit < intrinsicLowEnergyLimit ||
81 highEnergyLimit > intrinsicHighEnergyLimit)
83 G4Exception(
"G4LowEnergyRayleigh::G4LowEnergyRayleigh()",
85 "Energy limit outside intrinsic process validity range!");
91 G4String formFactorFile =
"rayl/re-ff-";
93 formFactorData->
LoadData(formFactorFile);
95 meanFreePathTable = 0;
101 << lowEnergyLimit /
keV <<
" keV - "
102 << highEnergyLimit /
GeV <<
" GeV"
109 delete meanFreePathTable;
110 delete crossSectionHandler;
111 delete formFactorData;
117 crossSectionHandler->
Clear();
118 G4String crossSectionFile =
"rayl/re-cs-";
119 crossSectionHandler->
LoadData(crossSectionFile);
121 delete meanFreePathTable;
134 if (photonEnergy0 <= lowEnergyLimit)
164 fcostheta = ( 1. + cosTheta*cosTheta)/2.;
167 G4double sinThetaHalf = std::sqrt((1. - cosTheta) / 2.);
168 x = sinThetaHalf / (wlPhoton/
cm);
170 dataFormFactor = formFactorData->
FindValue(x,Z-1);
172 dataFormFactor = formFactorData->
FindValue(0.,Z-1);
174 sinTheta = std::sqrt(1. - cosTheta*cosTheta);
175 gReject = dataFormFactor * dataFormFactor;
177 }
while( gReject < randomFormFactor);
181 G4double dirX = sinTheta*std::cos(phi);
182 G4double dirY = sinTheta*std::sin(phi);
188 photonDirection1.
rotateUz(photonDirection0);
209 size_t materialIndex = couple->
GetIndex();
212 if (energy > highEnergyLimit) meanFreePath = meanFreePathTable->
FindValue(highEnergyLimit,materialIndex);
213 else if (energy < lowEnergyLimit) meanFreePath =
DBL_MAX;
214 else meanFreePath = meanFreePathTable->
FindValue(energy,materialIndex);
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
G4RDVEMDataSet * BuildMeanFreePathForMaterials(const G4DataVector *energyCuts=0)
G4LowEnergyRayleigh(const G4String &processName="LowEnRayleigh")
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
static constexpr double twopi
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
static constexpr double cm
Hep3Vector & rotateUz(const Hep3Vector &)
G4bool IsApplicable(const G4ParticleDefinition &)
static constexpr double eV
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
void BuildPhysicsTable(const G4ParticleDefinition &photon)
const G4String & GetProcessName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void Initialize(const G4Track &)
G4double energy(const ThreeVector &p, const G4double m)
void SetNumberOfSecondaries(G4int totSecondaries)
G4int SelectRandomAtom(const G4MaterialCutsCouple *couple, G4double e) const
void ProposeEnergy(G4double finalEnergy)
G4ParticleChange aParticleChange
static constexpr double GeV
void LoadData(const G4String &dataFile)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeTrackStatus(G4TrackStatus status)
static constexpr double keV
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
virtual G4bool LoadData(const G4String &fileName)=0