G4mplIonisationModel Class Reference

#include <G4mplIonisationModel.hh>

Inheritance diagram for G4mplIonisationModel:

G4VEmModel G4VEmFluctuationModel

Public Member Functions

 G4mplIonisationModel (G4double mCharge, const G4String &nam="mplIonisation")
virtual ~G4mplIonisationModel ()
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual G4double SampleFluctuations (const G4Material *, const G4DynamicParticle *, G4double &tmax, G4double &length, G4double &meanLoss)
virtual G4double Dispersion (const G4Material *, const G4DynamicParticle *, G4double &tmax, G4double &length)
void SetParticle (const G4ParticleDefinition *p)

Detailed Description

Definition at line 57 of file G4mplIonisationModel.hh.


Constructor & Destructor Documentation

G4mplIonisationModel::G4mplIonisationModel ( G4double  mCharge,
const G4String nam = "mplIonisation" 
)

Definition at line 67 of file G4mplIonisationModel.cc.

References G4INCL::Math::pi.

00068   : G4VEmModel(nam),G4VEmFluctuationModel(nam),
00069   magCharge(mCharge),
00070   twoln10(log(100.0)),
00071   betalow(0.01),
00072   betalim(0.1),
00073   beta2lim(betalim*betalim),
00074   bg2lim(beta2lim*(1.0 + beta2lim))
00075 {
00076   nmpl         = G4int(abs(magCharge) * 2 * fine_structure_const + 0.5);
00077   if(nmpl > 6)      { nmpl = 6; }
00078   else if(nmpl < 1) { nmpl = 1; }
00079   pi_hbarc2_over_mc2 = pi * hbarc * hbarc / electron_mass_c2;
00080   chargeSquare = magCharge * magCharge;
00081   dedxlim = 45.*nmpl*nmpl*GeV*cm2/g;
00082   fParticleChange = 0;
00083   monopole = 0;
00084   mass = 0.0;
00085 }

G4mplIonisationModel::~G4mplIonisationModel (  )  [virtual]

Definition at line 89 of file G4mplIonisationModel.cc.

00090 {}


Member Function Documentation

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

Reimplemented from G4VEmModel.

Definition at line 117 of file G4mplIonisationModel.cc.

References G4InuclParticleNames::gam, G4Material::GetDensity(), and SetParticle().

00121 {
00122   if(!monopole) { SetParticle(p); }
00123   G4double tau   = kineticEnergy / mass;
00124   G4double gam   = tau + 1.0;
00125   G4double bg2   = tau * (tau + 2.0);
00126   G4double beta2 = bg2 / (gam * gam);
00127   G4double beta  = sqrt(beta2);
00128 
00129   // low-energy asymptotic formula
00130   G4double dedx  = dedxlim*beta*material->GetDensity();
00131 
00132   // above asymptotic
00133   if(beta > betalow) {
00134 
00135     // high energy
00136     if(beta >= betalim) {
00137       dedx = ComputeDEDXAhlen(material, bg2);
00138 
00139     } else {
00140 
00141       G4double dedx1 = dedxlim*betalow*material->GetDensity();
00142       G4double dedx2 = ComputeDEDXAhlen(material, bg2lim);
00143 
00144       // extrapolation between two formula 
00145       G4double kapa2 = beta - betalow;
00146       G4double kapa1 = betalim - beta;
00147       dedx = (kapa1*dedx1 + kapa2*dedx2)/(kapa1 + kapa2);
00148     }
00149   }
00150   return dedx;
00151 }

G4double G4mplIonisationModel::Dispersion ( const G4Material ,
const G4DynamicParticle ,
G4double tmax,
G4double length 
) [virtual]

Implements G4VEmFluctuationModel.

Definition at line 233 of file G4mplIonisationModel.cc.

References G4InuclParticleNames::gam, G4Material::GetElectronDensity(), and G4DynamicParticle::GetKineticEnergy().

Referenced by SampleFluctuations().

00237 {
00238   G4double siga = 0.0;
00239   G4double tau   = dp->GetKineticEnergy()/mass;
00240   if(tau > 0.0) { 
00241     G4double electronDensity = material->GetElectronDensity();
00242     G4double gam   = tau + 1.0;
00243     G4double invbeta2 = (gam*gam)/(tau * (tau+2.0));
00244     siga  = (invbeta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
00245       * electronDensity * chargeSquare;
00246   }
00247   return siga;
00248 }

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

Implements G4VEmModel.

Definition at line 108 of file G4mplIonisationModel.cc.

References G4VEmModel::GetParticleChangeForLoss(), and SetParticle().

00110 {
00111   if(!monopole) { SetParticle(p); }
00112   if(!fParticleChange) { fParticleChange = GetParticleChangeForLoss(); }
00113 }

G4double G4mplIonisationModel::SampleFluctuations ( const G4Material ,
const G4DynamicParticle ,
G4double tmax,
G4double length,
G4double meanLoss 
) [virtual]

Implements G4VEmFluctuationModel.

Definition at line 205 of file G4mplIonisationModel.cc.

References Dispersion(), and G4UniformRand.

00211 {
00212   G4double siga = Dispersion(material,dp,tmax,length);
00213   G4double loss = meanLoss;
00214   siga = sqrt(siga);
00215   G4double twomeanLoss = meanLoss + meanLoss;
00216 
00217   if(twomeanLoss < siga) {
00218     G4double x;
00219     do {
00220       loss = twomeanLoss*G4UniformRand();
00221       x = (loss - meanLoss)/siga;
00222     } while (1.0 - 0.5*x*x < G4UniformRand());
00223   } else {
00224     do {
00225       loss = G4RandGauss::shoot(meanLoss,siga);
00226     } while (0.0 > loss || loss > twomeanLoss);
00227   }
00228   return loss;
00229 }

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

Implements G4VEmModel.

Definition at line 196 of file G4mplIonisationModel.cc.

00201 {}

void G4mplIonisationModel::SetParticle ( const G4ParticleDefinition p  ) 

Definition at line 94 of file G4mplIonisationModel.cc.

References G4ParticleDefinition::GetPDGMass(), G4VEmModel::HighEnergyLimit(), G4VEmModel::LowEnergyLimit(), G4VEmModel::SetHighEnergyLimit(), and G4VEmModel::SetLowEnergyLimit().

Referenced by ComputeDEDXPerVolume(), and Initialise().

00095 {
00096   monopole = p;
00097   mass     = monopole->GetPDGMass();
00098   G4double emin = 
00099     std::min(LowEnergyLimit(),0.1*mass*(1/sqrt(1 - betalow*betalow) - 1)); 
00100   G4double emax = 
00101     std::max(HighEnergyLimit(),10*mass*(1/sqrt(1 - beta2lim) - 1)); 
00102   SetLowEnergyLimit(emin);
00103   SetHighEnergyLimit(emax);
00104 }


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