G4hIonisation.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00028 // -------------------------------------------------------------------
00029 //
00030 // GEANT4 Class file
00031 //
00032 //
00033 // File name:     G4hIonisation
00034 //
00035 // Author:        Laszlo Urban
00036 //
00037 // Creation date: 30.05.1997
00038 //
00039 // Modifications:
00040 //
00041 // corrected by L.Urban on 24/09/97
00042 // several bugs corrected by L.Urban on 13/01/98
00043 // 07-04-98 remove 'tracking cut' of the ionizing particle, mma
00044 // 22-10-98 cleanup L.Urban
00045 // 02-02-99 bugs fixed , L.Urban
00046 // 29-07-99 correction in BuildLossTable for low energy, L.Urban
00047 // 10-02-00 modifications , new e.m. structure, L.Urban
00048 // 10-08-00 V.Ivanchenko change BuildLambdaTable, in order to
00049 //          simulate energy losses of ions; correction to
00050 //          cross section for particles with spin 1 is inserted as well
00051 // 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation
00052 // 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
00053 // 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
00054 // 29-08-01 PostStepDoIt: correction for spin 1/2 (instead of 1) (mma)
00055 // 17-09-01 migration of Materials to pure STL (mma)
00056 // 25-09-01 completion of RetrievePhysicsTable() (mma)
00057 // 29-10-01 all static functions no more inlined
00058 // 08-11-01 Charge renamed zparticle; added to the dedx
00059 // 27-03-02 Bug fix in scaling of lambda table (V.Ivanchenko)
00060 // 09-04-02 Update calculation of tables for GenericIons (V.Ivanchenko)
00061 // 30-04-02 V.Ivanchenko update to new design
00062 // 04-12-02 Add verbose level definition (VI)
00063 // 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko)
00064 // 26-12-02 Secondary production moved to derived classes (V.Ivanchenko)
00065 // 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
00066 // 23-05-03 Define default integral + BohrFluctuations (V.Ivanchenko)
00067 // 03-06-03 Fix initialisation problem for STD ionisation (V.Ivanchenko)
00068 // 04-08-03 Set integral=false to be default (V.Ivanchenko)
00069 // 08-08-03 STD substitute standard  (V.Ivanchenko)
00070 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
00071 // 27-05-04 Set integral to be a default regime (V.Ivanchenko) 
00072 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
00073 // 24-03-05 Optimize internal interfaces (V.Ivantchenko)
00074 // 12-08-05 SetStepLimits(0.2, 0.1*mm) (mma)
00075 // 10-01-06 SetStepLimits -> SetStepFunction (V.Ivanchenko)
00076 // 26-05-06 scale negative particles from pi- and pbar,
00077 //          positive from pi+ and p (VI)
00078 // 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
00079 // 12-09-08 Removed CorrectionsAlongStep (VI)
00080 // 27-05-10 Added G4ICRU73QOModel for anti-protons (VI)
00081 //
00082 // -------------------------------------------------------------------
00083 //
00084 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00085 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00086 
00087 #include "G4hIonisation.hh"
00088 #include "G4PhysicalConstants.hh"
00089 #include "G4SystemOfUnits.hh"
00090 #include "G4Electron.hh"
00091 #include "G4Proton.hh"
00092 #include "G4AntiProton.hh"
00093 #include "G4BraggModel.hh"
00094 #include "G4BetheBlochModel.hh"
00095 #include "G4IonFluctuations.hh"
00096 #include "G4UniversalFluctuation.hh"
00097 #include "G4BohrFluctuations.hh"
00098 #include "G4UnitsTable.hh"
00099 #include "G4PionPlus.hh"
00100 #include "G4PionMinus.hh"
00101 #include "G4KaonPlus.hh"
00102 #include "G4KaonMinus.hh"
00103 #include "G4ICRU73QOModel.hh"
00104 
00105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00106 
00107 using namespace std;
00108 
00109 G4hIonisation::G4hIonisation(const G4String& name)
00110   : G4VEnergyLossProcess(name),
00111     isInitialised(false)
00112 {
00113   SetStepFunction(0.2, 0.1*mm);
00114   SetProcessSubType(fIonisation);
00115   SetSecondaryParticle(G4Electron::Electron());
00116   mass = 0.0;
00117   ratio = 0.0;
00118   eth = 2*MeV;
00119 }
00120 
00121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00122 
00123 G4hIonisation::~G4hIonisation()
00124 {}
00125 
00126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00127 
00128 G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p)
00129 {
00130   return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV &&
00131          !p.IsShortLived());
00132 }
00133 
00134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00135 
00136 G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
00137                                          const G4Material*,
00138                                          G4double cut)
00139 {
00140   G4double x = 0.5*cut/electron_mass_c2;
00141   G4double gam = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));
00142   return mass*(gam - 1.0);
00143 }
00144 
00145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....  
00146 
00147 void G4hIonisation::InitialiseEnergyLossProcess(
00148                     const G4ParticleDefinition* part,
00149                     const G4ParticleDefinition* bpart)
00150 {
00151   if(!isInitialised) {
00152 
00153     const G4ParticleDefinition* theBaseParticle = 0;
00154     G4String pname = part->GetParticleName();
00155     G4double q = part->GetPDGCharge();
00156 
00157     // standard base particles
00158     if(part == bpart || pname == "proton" ||
00159        pname == "anti_proton" || 
00160        pname == "pi+" || pname == "pi-" || 
00161        pname == "kaon+" || pname == "kaon-") 
00162       { 
00163         theBaseParticle = 0;
00164       }
00165     // select base particle 
00166     else if(bpart == 0) {
00167 
00168       if(part->GetPDGSpin() == 0.0) {
00169         if(q > 0.0) { theBaseParticle = G4KaonPlus::KaonPlus(); }
00170         else { theBaseParticle = G4KaonMinus::KaonMinus(); }
00171       } else {
00172         if(q > 0.0) { theBaseParticle = G4Proton::Proton(); } 
00173         else { theBaseParticle = G4AntiProton::AntiProton(); }
00174       }
00175 
00176       // base particle defined by interface
00177     } else { 
00178       theBaseParticle = bpart;
00179     }
00180     SetBaseParticle(theBaseParticle);
00181 
00182     mass  = part->GetPDGMass();
00183     ratio = electron_mass_c2/mass;
00184     eth   = 2.0*MeV*mass/proton_mass_c2;
00185 
00186     if (!EmModel(1)) { 
00187       if(q > 0.0) { SetEmModel(new G4BraggModel(),1); }
00188       else { SetEmModel(new G4ICRU73QOModel(),1); }
00189     }
00190     EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
00191 
00192     // model limit defined for protons
00193     //eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
00194     EmModel(1)->SetHighEnergyLimit(eth);
00195     AddEmModel(1, EmModel(1), new G4IonFluctuations());
00196 
00197     if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); }
00198 
00199     if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
00200     EmModel(2)->SetLowEnergyLimit(eth);
00201     EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
00202     AddEmModel(2, EmModel(2), FluctModel());  
00203 
00204     isInitialised = true;
00205   }
00206 }
00207 
00208 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00209 
00210 void G4hIonisation::PrintInfo()
00211 {}
00212 
00213 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

Generated on Mon May 27 17:48:32 2013 for Geant4 by  doxygen 1.4.7