Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/standard/src/G4BetheBlochModel.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BetheBlochModel.cc,v 1.36 2009/12/03 17:26:40 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4BetheBlochModel.cc,v 1.37 2010/05/27 10:25:59 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    145145                                              G4double kineticEnergy)
    146146{
    147   // this method is called only for ions
     147  // this method is called only for ions, so no check if it is an ion
    148148  return corr->GetParticleCharge(p,mat,kineticEnergy);
     149}
     150
     151//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     152
     153void G4BetheBlochModel::SetupParameters()
     154{
     155  mass = particle->GetPDGMass();
     156  spin = particle->GetPDGSpin();
     157  G4double q = particle->GetPDGCharge()/eplus;
     158  chargeSquare = q*q;
     159  ratio = electron_mass_c2/mass;
     160  G4double magmom =
     161    particle->GetPDGMagneticMoment()*mass/(0.5*eplus*hbar_Planck*c_squared);
     162  magMoment2 = magmom*magmom - 1.0;
     163  formfact = 0.0;
     164  if(particle->GetLeptonNumber() == 0) {
     165    G4double x = 0.8426*GeV;
     166    if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;}
     167    else if(mass > GeV) {
     168      x /= nist->GetZ13(mass/proton_mass_c2);
     169      //        tlimit = 51.2*GeV*A13[iz]*A13[iz];
     170    }
     171    formfact = 2.0*electron_mass_c2/(x*x);
     172    tlimit   = 2.0/formfact;
     173  }
    149174}
    150175
     
    170195
    171196    // +term for spin=1/2 particle
    172     if( 0.5 == spin ) cross += 0.5*(maxEnergy - cutEnergy)/energy2;
     197    if( 0.5 == spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; }
    173198
    174199    // High order correction different for hadrons and ions
     
    225250{
    226251  G4double tmax      = MaxSecondaryEnergy(p, kineticEnergy);
    227   G4double cutEnergy = min(cut,tmax);
     252  G4double cutEnergy = std::min(cut,tmax);
    228253
    229254  G4double tau   = kineticEnergy/mass;
     
    234259  G4double eexc  = material->GetIonisation()->GetMeanExcitationEnergy();
    235260  G4double eexc2 = eexc*eexc;
    236   //G4double cden  = material->GetIonisation()->GetCdensity();
    237   //G4double mden  = material->GetIonisation()->GetMdensity();
    238   //G4double aden  = material->GetIonisation()->GetAdensity();
    239   //G4double x0den = material->GetIonisation()->GetX0density();
    240   //G4double x1den = material->GetIonisation()->GetX1density();
    241261
    242262  G4double eDensity = material->GetElectronDensity();
     
    252272  // density correction
    253273  G4double x = log(bg2)/twoln10;
    254   //if ( x >= x0den ) {
    255   //  dedx -= twoln10*x - cden ;
    256   //  if ( x < x1den ) dedx -= aden*pow((x1den-x),mden) ;
    257   //}
    258274  dedx -= material->GetIonisation()->DensityCorrection(x);
    259275
     
    277293
    278294//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    279 /*
    280 void G4BetheBlochModel::CorrectionsAlongStep(const G4MaterialCutsCouple*,
    281                                              const G4DynamicParticle*,
    282                                              G4double&,
    283                                              G4double&,
    284                                              G4double)
    285 {}
    286 */
    287295
    288296void G4BetheBlochModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
Note: See TracChangeset for help on using the changeset viewer.