G4BraggIonModel Class Reference

#include <G4BraggIonModel.hh>

Inheritance diagram for G4BraggIonModel:

G4VEmModel G4BraggNoDeltaModel

Public Member Functions

 G4BraggIonModel (const G4ParticleDefinition *p=0, const G4String &nam="BraggIon")
virtual ~G4BraggIonModel ()
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 cutEnergy)
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
virtual G4double GetParticleCharge (const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy)
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 68 of file G4BraggIonModel.hh.


Constructor & Destructor Documentation

G4BraggIonModel::G4BraggIonModel ( const G4ParticleDefinition p = 0,
const G4String nam = "BraggIon" 
)

Definition at line 74 of file G4BraggIonModel.cc.

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

00076   : G4VEmModel(nam),
00077     corr(0),
00078     particle(0),
00079     fParticleChange(0),
00080     currentMaterial(0),
00081     iMolecula(-1),
00082     iASTAR(-1),
00083     isIon(false),
00084     isInitialised(false)
00085 {
00086   SetHighEnergyLimit(2.0*MeV);
00087 
00088   HeMass           = 3.727417*GeV;
00089   rateMassHe2p     = HeMass/proton_mass_c2;
00090   lowestKinEnergy  = 1.0*keV/rateMassHe2p;
00091   massFactor       = 1000.*amu_c2/HeMass;
00092   theZieglerFactor = eV*cm2*1.0e-15;
00093   theElectron      = G4Electron::Electron();
00094   corrFactor       = 1.0;
00095   if(p) { SetParticle(p); }
00096   else  { SetParticle(theElectron); }
00097 }

G4BraggIonModel::~G4BraggIonModel (  )  [virtual]

Definition at line 101 of file G4BraggIonModel.cc.

00102 {}


Member Function Documentation

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

Reimplemented from G4VEmModel.

Definition at line 183 of file G4BraggIonModel.cc.

References ComputeCrossSectionPerElectron().

00189 {
00190   G4double cross = Z*ComputeCrossSectionPerElectron
00191                                          (p,kineticEnergy,cutEnergy,maxEnergy);
00192   return cross;
00193 }

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

Definition at line 157 of file G4BraggIonModel.cc.

References MaxSecondaryEnergy().

Referenced by ComputeCrossSectionPerAtom(), and CrossSectionPerVolume().

00162 {
00163   G4double cross     = 0.0;
00164   G4double tmax      = MaxSecondaryEnergy(p, kineticEnergy);
00165   G4double maxEnergy = std::min(tmax,maxKinEnergy);
00166   if(cutEnergy < tmax) {
00167 
00168     G4double energy  = kineticEnergy + mass;
00169     G4double energy2 = energy*energy;
00170     G4double beta2   = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
00171     cross = 1.0/cutEnergy - 1.0/maxEnergy - beta2*log(maxEnergy/cutEnergy)/tmax;
00172 
00173     cross *= twopi_mc2_rcl2*chargeSquare/beta2;
00174   }
00175  //   G4cout << "BR: e= " << kineticEnergy << " tmin= " << cutEnergy 
00176  //          << " tmax= " << tmax << " cross= " << cross << G4endl;
00177  
00178   return cross;
00179 }

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

Reimplemented from G4VEmModel.

Reimplemented in G4BraggNoDeltaModel.

Definition at line 212 of file G4BraggIonModel.cc.

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

Referenced by G4BraggNoDeltaModel::ComputeDEDXPerVolume().

00216 {
00217   G4double tmax  = MaxSecondaryEnergy(p, kineticEnergy);
00218   G4double tmin  = min(cutEnergy, tmax);
00219   G4double tkin  = kineticEnergy/massRate;
00220   G4double dedx  = 0.0;
00221 
00222   if(tkin < lowestKinEnergy) {
00223     dedx = DEDX(material, lowestKinEnergy)*sqrt(tkin/lowestKinEnergy);
00224   } else {
00225     dedx = DEDX(material, tkin); 
00226   }
00227 
00228   if (cutEnergy < tmax) {
00229 
00230     G4double tau   = kineticEnergy/mass;
00231     G4double gam   = tau + 1.0;
00232     G4double bg2   = tau * (tau+2.0);
00233     G4double beta2 = bg2/(gam*gam);
00234     G4double x     = tmin/tmax;
00235 
00236     dedx += (log(x) + (1.0 - x)*beta2) * twopi_mc2_rcl2
00237           * (material->GetElectronDensity())/beta2;
00238   }
00239 
00240   // now compute the total ionization loss
00241 
00242   if (dedx < 0.0) dedx = 0.0 ;
00243 
00244   dedx *= chargeSquare;
00245 
00246   //G4cout << " tkin(MeV) = " << tkin/MeV << " dedx(MeVxcm^2/g) = " 
00247   //       << dedx*gram/(MeV*cm2*material->GetDensity()) 
00248   //       << " q2 = " << chargeSquare <<  G4endl;
00249 
00250   return dedx;
00251 }

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

Reimplemented from G4VEmModel.

Definition at line 255 of file G4BraggIonModel.cc.

References G4EmCorrections::EffectiveChargeCorrection(), G4EmCorrections::EffectiveChargeSquareRatio(), G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), G4MaterialCutsCouple::GetMaterial(), G4VEmModel::GetModelOfFluctuations(), and G4VEmFluctuationModel::SetParticleAndCharge().

00260 {
00261   // this method is called only for ions
00262   const G4ParticleDefinition* p = dp->GetDefinition();
00263   const G4Material* mat = couple->GetMaterial();
00264   G4double preKinEnergy = dp->GetKineticEnergy();
00265   G4double e = preKinEnergy - eloss*0.5;
00266   if(e < 0.0) { e = preKinEnergy*0.5; }
00267 
00268   G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,e);
00269   GetModelOfFluctuations()->SetParticleAndCharge(p, q2);
00270   G4double qfactor = q2*corr->EffectiveChargeCorrection(p,mat,e)/corrFactor; 
00271   eloss *= qfactor; 
00272 
00273   //G4cout << "G4BraggIonModel::CorrectionsAlongStep e= " <<  e 
00274   //     << " qfactor= " << qfactor << " " << p->GetParticleName() <<G4endl;
00275 }

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

Reimplemented from G4VEmModel.

Reimplemented in G4BraggNoDeltaModel.

Definition at line 197 of file G4BraggIonModel.cc.

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

00203 {
00204   G4double eDensity = material->GetElectronDensity();
00205   G4double cross = eDensity*ComputeCrossSectionPerElectron
00206                                          (p,kineticEnergy,cutEnergy,maxEnergy);
00207   return cross;
00208 }

G4double G4BraggIonModel::GetChargeSquareRatio ( const G4ParticleDefinition ,
const G4Material ,
G4double  kineticEnergy 
) [virtual]

Reimplemented from G4VEmModel.

Definition at line 133 of file G4BraggIonModel.cc.

References G4EmCorrections::EffectiveChargeCorrection(), and G4EmCorrections::EffectiveChargeSquareRatio().

00136 {
00137   //G4cout << "G4BraggIonModel::GetChargeSquareRatio e= " <<  kineticEnergy << G4endl;
00138   // this method is called only for ions
00139   G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy);
00140   corrFactor  = q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy); 
00141   return corrFactor;
00142 }

G4double G4BraggIonModel::GetParticleCharge ( const G4ParticleDefinition p,
const G4Material mat,
G4double  kineticEnergy 
) [virtual]

Reimplemented from G4VEmModel.

Definition at line 146 of file G4BraggIonModel.cc.

References G4EmCorrections::GetParticleCharge().

00149 {
00150   //G4cout << "G4BraggIonModel::GetParticleCharge e= " <<  kineticEnergy << G4endl;
00151   // this method is called only for ions
00152   return corr->GetParticleCharge(p,mat,kineticEnergy);
00153 }

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

Implements G4VEmModel.

Definition at line 106 of file G4BraggIonModel.cc.

References G4LossTableManager::EmCorrections(), G4VEmModel::GetParticleChangeForLoss(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetParticleType(), G4LossTableManager::Instance(), and G4VEmModel::SetDeexcitationFlag().

00108 {
00109   if(p != particle) { SetParticle(p); }
00110 
00111   corrFactor = chargeSquare;
00112 
00113   // always false before the run
00114   SetDeexcitationFlag(false);
00115 
00116   if(!isInitialised) {
00117     isInitialised = true;
00118 
00119     G4String pname = particle->GetParticleName();
00120     if(particle->GetParticleType() == "nucleus" &&
00121        pname != "deuteron" && pname != "triton" &&
00122        pname != "alpha+"   && pname != "helium" &&
00123        pname != "hydrogen") { isIon = true; }
00124 
00125     corr = G4LossTableManager::Instance()->EmCorrections();
00126 
00127     fParticleChange = GetParticleChangeForLoss();
00128   }
00129 }

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

Reimplemented from G4VEmModel.

Definition at line 344 of file G4BraggIonModel.cc.

Referenced by ComputeCrossSectionPerElectron(), and ComputeDEDXPerVolume().

00346 {
00347   if(pd != particle) { SetParticle(pd); }
00348   G4double tau  = kinEnergy/mass;
00349   G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
00350                   (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
00351   return tmax;
00352 }

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

Implements G4VEmModel.

Definition at line 279 of file G4BraggIonModel.cc.

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

00284 {
00285   G4double tmax = MaxSecondaryKinEnergy(dp);
00286   G4double xmax = std::min(tmax, maxEnergy);
00287   if(xmin >= xmax) { return; }
00288 
00289   G4double kineticEnergy = dp->GetKineticEnergy();
00290   G4double energy  = kineticEnergy + mass;
00291   G4double energy2 = energy*energy;
00292   G4double beta2   = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
00293   G4double grej    = 1.0;
00294   G4double deltaKinEnergy, f;
00295 
00296   G4ThreeVector direction = dp->GetMomentumDirection();
00297 
00298   // sampling follows ...
00299   do {
00300     G4double q = G4UniformRand();
00301     deltaKinEnergy = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
00302 
00303     f = 1.0 - beta2*deltaKinEnergy/tmax;
00304 
00305     if(f > grej) {
00306         G4cout << "G4BraggIonModel::SampleSecondary Warning! "
00307                << "Majorant " << grej << " < "
00308                << f << " for e= " << deltaKinEnergy
00309                << G4endl;
00310     }
00311 
00312   } while( grej*G4UniformRand() >= f );
00313 
00314   G4double deltaMomentum =
00315            sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
00316   G4double totMomentum = energy*sqrt(beta2);
00317   G4double cost = deltaKinEnergy * (energy + electron_mass_c2) /
00318                                    (deltaMomentum * totMomentum);
00319   if(cost > 1.0) { cost = 1.0; }
00320   G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
00321 
00322   G4double phi = twopi * G4UniformRand() ;
00323 
00324   G4ThreeVector deltaDirection(sint*cos(phi),sint*sin(phi), cost) ;
00325   deltaDirection.rotateUz(direction);
00326 
00327   // create G4DynamicParticle object for delta ray
00328   G4DynamicParticle* delta = new G4DynamicParticle(theElectron,deltaDirection,
00329                                                    deltaKinEnergy);
00330 
00331   vdp->push_back(delta);
00332 
00333   // Change kinematics of primary particle
00334   kineticEnergy       -= deltaKinEnergy;
00335   G4ThreeVector finalP = direction*totMomentum - deltaDirection*deltaMomentum;
00336   finalP               = finalP.unit();
00337 
00338   fParticleChange->SetProposedKineticEnergy(kineticEnergy);
00339   fParticleChange->SetProposedMomentumDirection(finalP);
00340 }


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