[819] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
[1340] | 26 | // $Id: G4hIonisation.cc,v 1.86 2010/10/26 10:42:04 vnivanch Exp $ |
---|
| 27 | // GEANT4 tag $Name: emstand-V09-03-24 $ |
---|
[819] | 28 | // |
---|
| 29 | // ------------------------------------------------------------------- |
---|
| 30 | // |
---|
| 31 | // GEANT4 Class file |
---|
| 32 | // |
---|
| 33 | // |
---|
| 34 | // File name: G4hIonisation |
---|
| 35 | // |
---|
| 36 | // Author: Laszlo Urban |
---|
| 37 | // |
---|
| 38 | // Creation date: 30.05.1997 |
---|
| 39 | // |
---|
| 40 | // Modifications: |
---|
| 41 | // |
---|
| 42 | // corrected by L.Urban on 24/09/97 |
---|
| 43 | // several bugs corrected by L.Urban on 13/01/98 |
---|
| 44 | // 07-04-98 remove 'tracking cut' of the ionizing particle, mma |
---|
| 45 | // 22-10-98 cleanup L.Urban |
---|
| 46 | // 02-02-99 bugs fixed , L.Urban |
---|
| 47 | // 29-07-99 correction in BuildLossTable for low energy, L.Urban |
---|
| 48 | // 10-02-00 modifications , new e.m. structure, L.Urban |
---|
| 49 | // 10-08-00 V.Ivanchenko change BuildLambdaTable, in order to |
---|
| 50 | // simulate energy losses of ions; correction to |
---|
| 51 | // cross section for particles with spin 1 is inserted as well |
---|
| 52 | // 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation |
---|
| 53 | // 10-08-01 new methods Store/Retrieve PhysicsTable (mma) |
---|
| 54 | // 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma) |
---|
| 55 | // 29-08-01 PostStepDoIt: correction for spin 1/2 (instead of 1) (mma) |
---|
| 56 | // 17-09-01 migration of Materials to pure STL (mma) |
---|
| 57 | // 25-09-01 completion of RetrievePhysicsTable() (mma) |
---|
| 58 | // 29-10-01 all static functions no more inlined |
---|
| 59 | // 08-11-01 Charge renamed zparticle; added to the dedx |
---|
| 60 | // 27-03-02 Bug fix in scaling of lambda table (V.Ivanchenko) |
---|
| 61 | // 09-04-02 Update calculation of tables for GenericIons (V.Ivanchenko) |
---|
| 62 | // 30-04-02 V.Ivanchenko update to new design |
---|
| 63 | // 04-12-02 Add verbose level definition (VI) |
---|
| 64 | // 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko) |
---|
| 65 | // 26-12-02 Secondary production moved to derived classes (V.Ivanchenko) |
---|
| 66 | // 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko) |
---|
| 67 | // 23-05-03 Define default integral + BohrFluctuations (V.Ivanchenko) |
---|
| 68 | // 03-06-03 Fix initialisation problem for STD ionisation (V.Ivanchenko) |
---|
| 69 | // 04-08-03 Set integral=false to be default (V.Ivanchenko) |
---|
| 70 | // 08-08-03 STD substitute standard (V.Ivanchenko) |
---|
| 71 | // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko) |
---|
| 72 | // 27-05-04 Set integral to be a default regime (V.Ivanchenko) |
---|
| 73 | // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko) |
---|
| 74 | // 24-03-05 Optimize internal interfaces (V.Ivantchenko) |
---|
| 75 | // 12-08-05 SetStepLimits(0.2, 0.1*mm) (mma) |
---|
| 76 | // 10-01-06 SetStepLimits -> SetStepFunction (V.Ivanchenko) |
---|
| 77 | // 26-05-06 scale negative particles from pi- and pbar, |
---|
| 78 | // positive from pi+ and p (VI) |
---|
| 79 | // 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma) |
---|
[961] | 80 | // 12-09-08 Removed CorrectionsAlongStep (VI) |
---|
[1315] | 81 | // 27-05-10 Added G4ICRU73QOModel for anti-protons (VI) |
---|
[819] | 82 | // |
---|
| 83 | // ------------------------------------------------------------------- |
---|
| 84 | // |
---|
| 85 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 86 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 87 | |
---|
| 88 | #include "G4hIonisation.hh" |
---|
| 89 | #include "G4Electron.hh" |
---|
| 90 | #include "G4Proton.hh" |
---|
| 91 | #include "G4AntiProton.hh" |
---|
| 92 | #include "G4BraggModel.hh" |
---|
| 93 | #include "G4BetheBlochModel.hh" |
---|
[961] | 94 | #include "G4IonFluctuations.hh" |
---|
[819] | 95 | #include "G4UniversalFluctuation.hh" |
---|
| 96 | #include "G4BohrFluctuations.hh" |
---|
| 97 | #include "G4UnitsTable.hh" |
---|
| 98 | #include "G4PionPlus.hh" |
---|
| 99 | #include "G4PionMinus.hh" |
---|
[961] | 100 | #include "G4KaonPlus.hh" |
---|
| 101 | #include "G4KaonMinus.hh" |
---|
[1315] | 102 | #include "G4ICRU73QOModel.hh" |
---|
[819] | 103 | |
---|
| 104 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 105 | |
---|
| 106 | using namespace std; |
---|
| 107 | |
---|
| 108 | G4hIonisation::G4hIonisation(const G4String& name) |
---|
| 109 | : G4VEnergyLossProcess(name), |
---|
[1315] | 110 | isInitialised(false) |
---|
[819] | 111 | { |
---|
[1315] | 112 | //SetStepFunction(0.2, 1.0*mm); |
---|
[961] | 113 | //SetIntegral(true); |
---|
| 114 | //SetVerboseLevel(1); |
---|
| 115 | SetProcessSubType(fIonisation); |
---|
[819] | 116 | mass = 0.0; |
---|
| 117 | ratio = 0.0; |
---|
[1340] | 118 | eth = 2*MeV; |
---|
[819] | 119 | } |
---|
| 120 | |
---|
| 121 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 122 | |
---|
| 123 | G4hIonisation::~G4hIonisation() |
---|
| 124 | {} |
---|
| 125 | |
---|
[1055] | 126 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 127 | |
---|
| 128 | G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p) |
---|
| 129 | { |
---|
| 130 | return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV && |
---|
| 131 | !p.IsShortLived()); |
---|
| 132 | } |
---|
| 133 | |
---|
| 134 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 135 | |
---|
| 136 | G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, |
---|
| 137 | const G4Material*, |
---|
| 138 | G4double cut) |
---|
| 139 | { |
---|
| 140 | G4double x = 0.5*cut/electron_mass_c2; |
---|
| 141 | G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio)); |
---|
| 142 | return mass*(g - 1.0); |
---|
| 143 | } |
---|
| 144 | |
---|
[819] | 145 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 146 | |
---|
| 147 | void G4hIonisation::InitialiseEnergyLossProcess( |
---|
| 148 | const G4ParticleDefinition* part, |
---|
| 149 | const G4ParticleDefinition* bpart) |
---|
| 150 | { |
---|
[961] | 151 | if(!isInitialised) { |
---|
[819] | 152 | |
---|
[961] | 153 | const G4ParticleDefinition* theBaseParticle = 0; |
---|
| 154 | G4String pname = part->GetParticleName(); |
---|
[1315] | 155 | G4double q = part->GetPDGCharge(); |
---|
[819] | 156 | |
---|
[961] | 157 | // standard base particles |
---|
| 158 | if(part == bpart || pname == "proton" || |
---|
| 159 | pname == "anti_proton" || |
---|
| 160 | pname == "pi+" || pname == "pi-" || |
---|
| 161 | pname == "kaon+" || pname == "kaon-") |
---|
| 162 | { |
---|
| 163 | theBaseParticle = 0; |
---|
| 164 | } |
---|
| 165 | // select base particle |
---|
| 166 | else if(bpart == 0) { |
---|
[819] | 167 | |
---|
[1315] | 168 | if(part->GetPDGSpin() == 0.0) { |
---|
| 169 | if(q > 0.0) { theBaseParticle = G4KaonPlus::KaonPlus(); } |
---|
| 170 | else { theBaseParticle = G4KaonMinus::KaonMinus(); } |
---|
[961] | 171 | } else { |
---|
[1315] | 172 | if(q > 0.0) { theBaseParticle = G4Proton::Proton(); } |
---|
| 173 | else { theBaseParticle = G4AntiProton::AntiProton(); } |
---|
[961] | 174 | } |
---|
[1315] | 175 | |
---|
[961] | 176 | // base particle defined by interface |
---|
| 177 | } else { |
---|
| 178 | theBaseParticle = bpart; |
---|
| 179 | } |
---|
| 180 | SetBaseParticle(theBaseParticle); |
---|
| 181 | SetSecondaryParticle(G4Electron::Electron()); |
---|
[819] | 182 | |
---|
[961] | 183 | mass = part->GetPDGMass(); |
---|
| 184 | ratio = electron_mass_c2/mass; |
---|
[1315] | 185 | eth = 2.0*MeV*mass/proton_mass_c2; |
---|
[819] | 186 | |
---|
[1315] | 187 | if (!EmModel(1)) { |
---|
| 188 | if(q > 0.0) { SetEmModel(new G4BraggModel(),1); } |
---|
| 189 | else { SetEmModel(new G4ICRU73QOModel(),1); } |
---|
| 190 | } |
---|
[961] | 191 | EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); |
---|
[819] | 192 | |
---|
[961] | 193 | // model limit defined for protons |
---|
[1315] | 194 | //eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2; |
---|
[961] | 195 | EmModel(1)->SetHighEnergyLimit(eth); |
---|
| 196 | AddEmModel(1, EmModel(1), new G4IonFluctuations()); |
---|
[819] | 197 | |
---|
[1315] | 198 | if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); } |
---|
[819] | 199 | |
---|
[1315] | 200 | if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); } |
---|
[961] | 201 | EmModel(2)->SetLowEnergyLimit(eth); |
---|
| 202 | EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); |
---|
| 203 | AddEmModel(2, EmModel(2), FluctModel()); |
---|
[819] | 204 | |
---|
[961] | 205 | isInitialised = true; |
---|
| 206 | } |
---|
[819] | 207 | } |
---|
| 208 | |
---|
| 209 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 210 | |
---|
| 211 | void G4hIonisation::PrintInfo() |
---|
[1315] | 212 | {} |
---|
[819] | 213 | |
---|
| 214 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
[1315] | 215 | |
---|
| 216 | void G4hIonisation::ActivateNuclearStopping(G4bool) |
---|
| 217 | {} |
---|
| 218 | |
---|
| 219 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|