G4ICRU73QOModel Class Reference

#include <G4ICRU73QOModel.hh>

Inheritance diagram for G4ICRU73QOModel:

G4VEmModel G4ICRU73NoDeltaModel

Public Member Functions

 G4ICRU73QOModel (const G4ParticleDefinition *p=0, const G4String &nam="ICRU73QO")
virtual ~G4ICRU73QOModel ()
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
virtual G4double ComputeCrossSectionPerElectron (const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy)
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double)
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)

Protected Member Functions

virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kinEnergy)

Detailed Description

Definition at line 71 of file G4ICRU73QOModel.hh.


Constructor & Destructor Documentation

G4ICRU73QOModel::G4ICRU73QOModel ( const G4ParticleDefinition p = 0,
const G4String nam = "ICRU73QO" 
)

Definition at line 64 of file G4ICRU73QOModel.cc.

References G4Electron::Electron(), and G4VEmModel::SetHighEnergyLimit().

00065   : G4VEmModel(nam),
00066     particle(0),
00067     isInitialised(false)
00068 {
00069   mass = charge = chargeSquare = massRate = ratio = 0.0;
00070   if(p) { SetParticle(p); }
00071   SetHighEnergyLimit(10.0*MeV);
00072 
00073   lowestKinEnergy  = 5.0*keV;
00074 
00075   sizeL0 = 67;
00076   sizeL1 = 22;
00077   sizeL2 = 14;
00078 
00079   theElectron = G4Electron::Electron();
00080 
00081   for (G4int i = 0; i < 100; ++i)
00082     {
00083       indexZ[i] = -1;
00084     }
00085   for(G4int i = 0; i < NQOELEM; ++i) 
00086     {
00087       if(ZElementAvailable[i] > 0) {
00088         indexZ[ZElementAvailable[i]] = i;
00089       }
00090     }
00091   fParticleChange = 0;
00092   denEffData = 0;
00093 }

G4ICRU73QOModel::~G4ICRU73QOModel (  )  [virtual]

Definition at line 97 of file G4ICRU73QOModel.cc.

00098 {}


Member Function Documentation

G4double G4ICRU73QOModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double  Z,
G4double  A,
G4double  cutEnergy,
G4double  maxEnergy 
) [virtual]

Reimplemented from G4VEmModel.

Definition at line 146 of file G4ICRU73QOModel.cc.

References ComputeCrossSectionPerElectron().

00152 {
00153   G4double cross = Z*ComputeCrossSectionPerElectron
00154                                          (p,kineticEnergy,cutEnergy,maxEnergy);
00155   return cross;
00156 }

G4double G4ICRU73QOModel::ComputeCrossSectionPerElectron ( const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
) [virtual]

Definition at line 122 of file G4ICRU73QOModel.cc.

References MaxSecondaryEnergy().

Referenced by ComputeCrossSectionPerAtom(), and CrossSectionPerVolume().

00127 {
00128   G4double cross     = 0.0;
00129   G4double tmax      = MaxSecondaryEnergy(p, kineticEnergy);
00130   G4double maxEnergy = std::min(tmax,maxKinEnergy);
00131   if(cutEnergy < maxEnergy) {
00132 
00133     G4double energy  = kineticEnergy + mass;
00134     G4double energy2 = energy*energy;
00135     G4double beta2   = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
00136     cross = 1.0/cutEnergy - 1.0/maxEnergy - beta2*log(maxEnergy/cutEnergy)/tmax;
00137 
00138     cross *= CLHEP::twopi_mc2_rcl2*chargeSquare/beta2;
00139   }
00140  
00141   return cross;
00142 }

G4double G4ICRU73QOModel::ComputeDEDXPerVolume ( const G4Material ,
const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double   
) [virtual]

Reimplemented from G4VEmModel.

Reimplemented in G4ICRU73NoDeltaModel.

Definition at line 175 of file G4ICRU73QOModel.cc.

References G4InuclParticleNames::gam, G4Material::GetElectronDensity(), and MaxSecondaryEnergy().

Referenced by G4ICRU73NoDeltaModel::ComputeDEDXPerVolume().

00179 {
00180   SetParticle(p);
00181   G4double tmax  = MaxSecondaryEnergy(p, kineticEnergy);
00182   G4double tkin  = kineticEnergy/massRate;
00183   G4double dedx  = 0.0;
00184   if(tkin > lowestKinEnergy) { dedx = DEDX(material, tkin); }
00185   else { dedx = DEDX(material, lowestKinEnergy)*sqrt(tkin/lowestKinEnergy); }
00186 
00187   if (cutEnergy < tmax) {
00188 
00189     G4double tau   = kineticEnergy/mass;
00190     G4double gam   = tau + 1.0;
00191     G4double bg2   = tau * (tau+2.0);
00192     G4double beta2 = bg2/(gam*gam);
00193     G4double x     = cutEnergy/tmax;
00194 
00195     dedx += chargeSquare*( log(x) + (1.0 - x)*beta2 ) * twopi_mc2_rcl2
00196           * material->GetElectronDensity()/beta2;
00197   }
00198   if(dedx < 0.0) { dedx = 0.0; }
00199   return dedx;
00200 }

void G4ICRU73QOModel::CorrectionsAlongStep ( const G4MaterialCutsCouple ,
const G4DynamicParticle ,
G4double eloss,
G4double niel,
G4double  length 
) [virtual]

Reimplemented from G4VEmModel.

Definition at line 354 of file G4ICRU73QOModel.cc.

00359 {}

G4double G4ICRU73QOModel::CrossSectionPerVolume ( const G4Material ,
const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
) [virtual]

Reimplemented from G4VEmModel.

Reimplemented in G4ICRU73NoDeltaModel.

Definition at line 160 of file G4ICRU73QOModel.cc.

References ComputeCrossSectionPerElectron(), and G4Material::GetElectronDensity().

00166 {
00167   G4double eDensity = material->GetElectronDensity();
00168   G4double cross = eDensity*ComputeCrossSectionPerElectron
00169                                          (p,kineticEnergy,cutEnergy,maxEnergy);
00170   return cross;
00171 }

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

Implements G4VEmModel.

Definition at line 102 of file G4ICRU73QOModel.cc.

References G4Material::GetMaterialTable(), G4VEmModel::GetParticleChangeForLoss(), G4ParticleDefinition::GetParticleName(), and G4VEmModel::SetDeexcitationFlag().

00104 {
00105   if(p != particle) SetParticle(p);
00106 
00107   // always false before the run
00108   SetDeexcitationFlag(false);
00109 
00110   if(!isInitialised) {
00111     isInitialised = true;
00112 
00113     G4String pname = particle->GetParticleName();
00114     fParticleChange = GetParticleChangeForLoss();
00115     const G4MaterialTable* mtab = G4Material::GetMaterialTable(); 
00116     denEffData = (*mtab)[0]->GetIonisation()->GetDensityEffectData();
00117   }
00118 }

G4double G4ICRU73QOModel::MaxSecondaryEnergy ( const G4ParticleDefinition ,
G4double  kinEnergy 
) [protected, virtual]

Reimplemented from G4VEmModel.

Definition at line 428 of file G4ICRU73QOModel.cc.

Referenced by ComputeCrossSectionPerElectron(), and ComputeDEDXPerVolume().

00430 {
00431   if(pd != particle) { SetParticle(pd); }
00432   G4double tau  = kinEnergy/mass;
00433   G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
00434                   (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
00435   return tmax;
00436 }

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

Implements G4VEmModel.

Definition at line 363 of file G4ICRU73QOModel.cc.

References G4cout, G4endl, G4UniformRand, G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMomentumDirection(), G4VEmModel::MaxSecondaryKinEnergy(), G4ParticleChangeForLoss::SetProposedKineticEnergy(), and G4ParticleChangeForLoss::SetProposedMomentumDirection().

00368 {
00369   G4double tmax = MaxSecondaryKinEnergy(dp);
00370   G4double xmax = std::min(tmax, maxEnergy);
00371   if(xmin >= xmax) { return; }
00372 
00373   G4double kineticEnergy = dp->GetKineticEnergy();
00374   G4double energy  = kineticEnergy + mass;
00375   G4double energy2 = energy*energy;
00376   G4double beta2   = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
00377   G4double grej    = 1.0;
00378   G4double deltaKinEnergy, f;
00379 
00380   G4ThreeVector direction = dp->GetMomentumDirection();
00381 
00382   // sampling follows ...
00383   do {
00384     G4double x = G4UniformRand();
00385     deltaKinEnergy = xmin*xmax/(xmin*(1.0 - x) + xmax*x);
00386 
00387     f = 1.0 - beta2*deltaKinEnergy/tmax;
00388 
00389     if(f > grej) {
00390         G4cout << "G4ICRU73QOModel::SampleSecondary Warning! "
00391                << "Majorant " << grej << " < "
00392                << f << " for e= " << deltaKinEnergy
00393                << G4endl;
00394     }
00395 
00396   } while( grej*G4UniformRand() >= f );
00397 
00398   G4double deltaMomentum =
00399            sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
00400   G4double totMomentum = energy*sqrt(beta2);
00401   G4double cost = deltaKinEnergy * (energy + electron_mass_c2) /
00402                                    (deltaMomentum * totMomentum);
00403   if(cost > 1.0) { cost = 1.0; }
00404   G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
00405 
00406   G4double phi = twopi * G4UniformRand() ;
00407 
00408   G4ThreeVector deltaDirection(sint*cos(phi),sint*sin(phi), cost) ;
00409   deltaDirection.rotateUz(direction);
00410 
00411   // Change kinematics of primary particle
00412   kineticEnergy       -= deltaKinEnergy;
00413   G4ThreeVector finalP = direction*totMomentum - deltaDirection*deltaMomentum;
00414   finalP               = finalP.unit();
00415   
00416   fParticleChange->SetProposedKineticEnergy(kineticEnergy);
00417   fParticleChange->SetProposedMomentumDirection(finalP);
00418 
00419   // create G4DynamicParticle object for delta ray
00420   G4DynamicParticle* delta = new G4DynamicParticle(theElectron,deltaDirection,
00421                                                    deltaKinEnergy);
00422 
00423   vdp->push_back(delta);
00424 }


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