54 lowEnergyLimit = 250*
eV;
55 highEnergyLimit = 10.*
MeV;
73 << lowEnergyLimit /
eV <<
" eV - "
74 << highEnergyLimit /
MeV <<
" MeV"
93 G4cout <<
"Calling G4XrayRayleighModel::Initialise()" <<
G4endl;
99 if(isInitialised)
return;
101 isInitialised =
true;
113 if (verboseLevel > 3)
115 G4cout <<
"Calling CrossSectionPerAtom() of G4XrayRayleighModel" <<
G4endl;
117 if (gammaEnergy < lowEnergyLimit || gammaEnergy > highEnergyLimit)
137 fo *= 0.01*std::exp(lna);
146 xsc *= fo*fo + (1. + fo)*(1. + fo);
161 if ( verboseLevel > 3)
163 G4cout <<
"Calling SampleSecondaries() of G4XrayRayleighModel" <<
G4endl;
173 G4double cosDipole, cosTheta, sinTheta;
174 G4double c, delta, cofA, signc = 1., a, power = 1./3.;
184 delta = std::sqrt(a*a+4.);
187 cofA = -signc*std::pow(delta, power);
188 cosDipole = cofA - 1./cofA;
210 fo *= 0.01*
pi*std::exp(lna);
215 cosTheta = (cosDipole + beta)/(1. + cosDipole*beta);
218 if( cosTheta > 1.) cosTheta = 1.;
219 if( cosTheta < -1.) cosTheta = -1.;
221 sinTheta = std::sqrt( (1. - cosTheta)*(1. + cosTheta) );
226 G4double dirX = sinTheta*std::cos(phi);
227 G4double dirY = sinTheta*std::sin(phi);
233 photonDirection1.
rotateUz(photonDirection0);
G4XrayRayleighModel(const G4ParticleDefinition *p=0, const G4String &nam="XrayRayleigh")
G4ParticleChangeForGamma * fParticleChange
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
G4double GetKineticEnergy() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
static constexpr double Bohr_radius
static constexpr double hbarc
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
static constexpr double twopi
void SetHighEnergyLimit(G4double)
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
static constexpr double classic_electr_radius
Hep3Vector & rotateUz(const Hep3Vector &)
static constexpr double eV
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
const G4ParticleDefinition * GetParticleDefinition() const
virtual ~G4XrayRayleighModel()
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
static constexpr double MeV
static constexpr double pi
static const G4double alpha
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
static constexpr double pi2