G4XrayRayleighModel Class Reference

#include <G4XrayRayleighModel.hh>

Inheritance diagram for G4XrayRayleighModel:

G4VEmModel

Public Member Functions

 G4XrayRayleighModel (const G4ParticleDefinition *p=0, const G4String &nam="XrayRayleigh")
virtual ~G4XrayRayleighModel ()
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)

Protected Attributes

G4ParticleChangeForGammafParticleChange

Detailed Description

Definition at line 42 of file G4XrayRayleighModel.hh.


Constructor & Destructor Documentation

G4XrayRayleighModel::G4XrayRayleighModel ( const G4ParticleDefinition p = 0,
const G4String nam = "XrayRayleigh" 
)

Definition at line 49 of file G4XrayRayleighModel.cc.

References fParticleChange, G4cout, G4endl, and G4VEmModel::SetHighEnergyLimit().

00051   :G4VEmModel(nam),isInitialised(false)
00052 {
00053   fParticleChange = 0;
00054   lowEnergyLimit  = 250*eV; 
00055   highEnergyLimit = 10.*MeV;
00056   fFormFactor     = 0.0;
00057   
00058   //  SetLowEnergyLimit(lowEnergyLimit);
00059   SetHighEnergyLimit(highEnergyLimit);
00060   //
00061   verboseLevel= 0;
00062   // Verbosity scale:
00063   // 0 = nothing 
00064   // 1 = warning for energy non-conservation 
00065   // 2 = details of energy budget
00066   // 3 = calculation of cross sections, file openings, sampling of atoms
00067   // 4 = entering in methods
00068 
00069   if(verboseLevel > 0) 
00070   {
00071     G4cout << "Xray Rayleigh is constructed " << G4endl
00072            << "Energy range: "
00073            << lowEnergyLimit / eV << " eV - "
00074            << highEnergyLimit / MeV << " MeV"
00075            << G4endl;
00076   }
00077 }

G4XrayRayleighModel::~G4XrayRayleighModel (  )  [virtual]

Definition at line 81 of file G4XrayRayleighModel.cc.

00082 {  
00083 
00084 }


Member Function Documentation

G4double G4XrayRayleighModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition ,
G4double  kinEnergy,
G4double  Z,
G4double  A = 0,
G4double  cut = 0,
G4double  emax = DBL_MAX 
) [virtual]

Reimplemented from G4VEmModel.

Definition at line 107 of file G4XrayRayleighModel.cc.

References G4InuclParticleNames::alpha, G4cout, and G4endl.

00112 {
00113   if (verboseLevel > 3) 
00114   {
00115     G4cout << "Calling CrossSectionPerAtom() of G4XrayRayleighModel" << G4endl;
00116   }
00117   if (gammaEnergy < lowEnergyLimit || gammaEnergy > highEnergyLimit) 
00118   {
00119     return 0.0;
00120   }
00121   G4double k   = gammaEnergy/hbarc;
00122            k  *= Bohr_radius;
00123   G4double p0  =  0.680654;  
00124   G4double p1  = -0.0224188;
00125   G4double lnZ = std::log(Z);    
00126 
00127   G4double lna = p0 + p1*lnZ; 
00128 
00129   G4double  alpha = std::exp(lna);
00130 
00131   G4double fo   = std::pow(k, alpha); 
00132 
00133   p0 = 3.68455;
00134   p1 = -0.464806;
00135   lna = p0 + p1*lnZ; 
00136 
00137   fo *= 0.01*std::exp(lna);
00138 
00139   fFormFactor = fo;
00140 
00141   G4double b    = 1. + 2.*fo;
00142   G4double b2   = b*b;
00143   G4double b3   = b*b2;
00144 
00145   G4double xsc  = fCofR*Z*Z/b3;
00146            xsc *= fo*fo + (1. + fo)*(1. + fo);  
00147 
00148 
00149   return   xsc;   
00150 
00151 }

void G4XrayRayleighModel::Initialise ( const G4ParticleDefinition ,
const G4DataVector  
) [virtual]

Implements G4VEmModel.

Definition at line 88 of file G4XrayRayleighModel.cc.

References fParticleChange, G4cout, G4endl, G4VEmModel::GetParticleChangeForGamma(), and G4VEmModel::InitialiseElementSelectors().

00090 {
00091   if (verboseLevel > 3) 
00092   {
00093     G4cout << "Calling G4XrayRayleighModel::Initialise()" << G4endl;
00094   }
00095 
00096   InitialiseElementSelectors(particle,cuts);
00097 
00098 
00099   if(isInitialised) return; 
00100   fParticleChange = GetParticleChangeForGamma();
00101   isInitialised = true;
00102 
00103 }

void G4XrayRayleighModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  ,
const G4MaterialCutsCouple ,
const G4DynamicParticle ,
G4double  tmin,
G4double  maxEnergy 
) [virtual]

Implements G4VEmModel.

Definition at line 155 of file G4XrayRayleighModel.cc.

References G4InuclParticleNames::alpha, fParticleChange, G4cout, G4endl, G4UniformRand, G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMomentumDirection(), G4DynamicParticle::GetParticleDefinition(), G4Element::GetZ(), G4INCL::Math::pi, G4ParticleChangeForGamma::ProposeMomentumDirection(), G4VEmModel::SelectRandomAtom(), and G4ParticleChangeForGamma::SetProposedKineticEnergy().

00160 {
00161   if ( verboseLevel > 3)
00162   {
00163     G4cout << "Calling SampleSecondaries() of G4XrayRayleighModel" << G4endl;
00164   }
00165   G4double photonEnergy0 = aDynamicGamma->GetKineticEnergy();
00166 
00167   G4ParticleMomentum photonDirection0 = aDynamicGamma->GetMomentumDirection();
00168 
00169 
00170   // Sample the angle of the scattered photon
00171   // according to 1 + cosTheta*cosTheta distribution
00172 
00173   G4double cosDipole, cosTheta, sinTheta;
00174   G4double c, delta, cofA, signc = 1., a, power = 1./3.;
00175 
00176   c = 4. - 8.*G4UniformRand();
00177   a = c;
00178  
00179   if( c < 0. )
00180   {
00181     signc = -1.;
00182     a     = -c;
00183   }
00184   delta  = std::sqrt(a*a+4.);
00185   delta += a;
00186   delta *= 0.5; 
00187   cofA = -signc*std::pow(delta, power);
00188   cosDipole = cofA - 1./cofA;
00189 
00190   // select atom
00191   const G4Element* elm = SelectRandomAtom(couple, aDynamicGamma->GetParticleDefinition(), photonEnergy0);
00192   G4double Z = elm->GetZ();
00193 
00194   G4double k   = photonEnergy0/hbarc;
00195            k  *= Bohr_radius;
00196   G4double p0  =  0.680654;  
00197   G4double p1  = -0.0224188;
00198   G4double lnZ = std::log(Z);    
00199 
00200   G4double lna = p0 + p1*lnZ; 
00201 
00202   G4double  alpha = std::exp(lna);
00203 
00204   G4double fo   = std::pow(k, alpha); 
00205 
00206   p0 = 3.68455;
00207   p1 = -0.464806;
00208   lna = p0 + p1*lnZ; 
00209 
00210   fo *= 0.01*pi*std::exp(lna);
00211 
00212   
00213   G4double beta = fo/(1 + fo);
00214 
00215   cosTheta = (cosDipole + beta)/(1. + cosDipole*beta);
00216 
00217 
00218   if( cosTheta >  1.) cosTheta =  1.;
00219   if( cosTheta < -1.) cosTheta = -1.;
00220 
00221   sinTheta = std::sqrt( (1. - cosTheta)*(1. + cosTheta) );
00222 
00223   // Scattered photon angles. ( Z - axis along the parent photon)
00224 
00225   G4double phi = twopi * G4UniformRand() ;
00226   G4double dirX = sinTheta*std::cos(phi);
00227   G4double dirY = sinTheta*std::sin(phi);
00228   G4double dirZ = cosTheta;
00229 
00230   // Update G4VParticleChange for the scattered photon
00231 
00232   G4ThreeVector photonDirection1(dirX, dirY, dirZ);
00233   photonDirection1.rotateUz(photonDirection0);
00234   fParticleChange->ProposeMomentumDirection(photonDirection1);
00235 
00236   fParticleChange->SetProposedKineticEnergy(photonEnergy0); 
00237 }


Field Documentation

G4ParticleChangeForGamma* G4XrayRayleighModel::fParticleChange [protected]

Definition at line 70 of file G4XrayRayleighModel.hh.

Referenced by G4XrayRayleighModel(), Initialise(), and SampleSecondaries().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:54:01 2013 for Geant4 by  doxygen 1.4.7