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/G4hIonisation.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4hIonisation.cc,v 1.82 2009/02/20 12:06:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4hIonisation.cc,v 1.85 2010/06/04 09:22:14 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7979// 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
    8080// 12-09-08 Removed CorrectionsAlongStep (VI)
     81// 27-05-10 Added G4ICRU73QOModel for anti-protons (VI)
    8182//
    8283// -------------------------------------------------------------------
     
    99100#include "G4KaonPlus.hh"
    100101#include "G4KaonMinus.hh"
     102#include "G4ICRU73QOModel.hh"
    101103
    102104//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    106108G4hIonisation::G4hIonisation(const G4String& name)
    107109  : G4VEnergyLossProcess(name),
    108     isInitialised(false),
    109     nuclearStopping(true)
    110 {
    111   //  SetStepFunction(0.2, 1.0*mm);
     110    isInitialised(false)
     111{
     112  //SetStepFunction(0.2, 1.0*mm);
    112113  //SetIntegral(true);
    113114  //SetVerboseLevel(1);
     
    151152    const G4ParticleDefinition* theBaseParticle = 0;
    152153    G4String pname = part->GetParticleName();
     154    G4double q = part->GetPDGCharge();
    153155
    154156    // standard base particles
     
    163165    else if(bpart == 0) {
    164166
    165       if(part->GetPDGSpin() == 0.0)
    166         if(part->GetPDGCharge() > 0.0 ) {
    167           theBaseParticle = G4KaonPlus::KaonPlus();
    168         } else {
    169           theBaseParticle = G4KaonMinus::KaonMinus();
    170         }
    171       else if(part->GetPDGCharge() > 0.0) {
    172         theBaseParticle = G4Proton::Proton();
     167      if(part->GetPDGSpin() == 0.0) {
     168        if(q > 0.0) { theBaseParticle = G4KaonPlus::KaonPlus(); }
     169        else { theBaseParticle = G4KaonMinus::KaonMinus(); }
    173170      } else {
    174         theBaseParticle = G4AntiProton::AntiProton();
     171        if(q > 0.0) { theBaseParticle = G4Proton::Proton(); }
     172        else { theBaseParticle = G4AntiProton::AntiProton(); }
    175173      }
     174
    176175      // base particle defined by interface
    177176    } else {
     
    183182    mass  = part->GetPDGMass();
    184183    ratio = electron_mass_c2/mass;
    185 
    186     if(mass < 900.*MeV) nuclearStopping = false;
    187 
    188     if (!EmModel(1)) SetEmModel(new G4BraggModel(),1);
     184    eth   = 2.0*MeV*mass/proton_mass_c2;
     185
     186    if (!EmModel(1)) {
     187      if(q > 0.0) { SetEmModel(new G4BraggModel(),1); }
     188      else { SetEmModel(new G4ICRU73QOModel(),1); }
     189    }
    189190    EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
    190191
    191192    // model limit defined for protons
    192     eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
     193    //eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
    193194    EmModel(1)->SetHighEnergyLimit(eth);
    194195    AddEmModel(1, EmModel(1), new G4IonFluctuations());
    195196
    196     if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
    197 
    198     if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2); 
     197    if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); }
     198
     199    if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
    199200    EmModel(2)->SetLowEnergyLimit(eth);
    200201    EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
     
    203204    isInitialised = true;
    204205  }
    205   EmModel(1)->ActivateNuclearStopping(nuclearStopping);
    206   EmModel(2)->ActivateNuclearStopping(nuclearStopping);
    207206}
    208207
     
    210209
    211210void G4hIonisation::PrintInfo()
    212 {
    213   if(EmModel(1) && EmModel(2)) {
    214     G4cout << "      NuclearStopping= " << nuclearStopping
    215            << G4endl;
    216   }
    217 }
    218 
    219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     211{}
     212
     213//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     214
     215void G4hIonisation::ActivateNuclearStopping(G4bool)
     216{}
     217
     218//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracChangeset for help on using the changeset viewer.