[825] | 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 | // |
---|
[1203] | 26 | // $Id: G4EmStandardPhysics_option2.cc,v 1.20 2009/11/24 12:53:22 vnivanch Exp $ |
---|
[1228] | 27 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
[825] | 28 | // |
---|
| 29 | //--------------------------------------------------------------------------- |
---|
| 30 | // |
---|
| 31 | // ClassName: G4EmStandardPhysics_option2 |
---|
| 32 | // |
---|
| 33 | // Author: V.Ivanchenko 09.11.2005 |
---|
| 34 | // |
---|
| 35 | // Modified: |
---|
| 36 | // 19.12.2005 V.Ivanchenko rename 71 -> 72 |
---|
| 37 | // 15.06.2006 V.Ivanchenko use this class as a constructor of fast EM physics |
---|
| 38 | // 13.11.2006 V.Ivanchenko use G4hMultipleScattering |
---|
| 39 | // 14.11.2006 V.Ivanchenko use sub-cutoff option for all particles |
---|
| 40 | // 13.02.2007 V.Ivanchenko use default msc |
---|
| 41 | // 15.05.2007 V.Ivanchenko rename to _option2 |
---|
[850] | 42 | // 13.03.2008 V.Ivanchenko use G4eMultipleScattering |
---|
| 43 | // 21.04.2008 V.Ivanchenko add long-lived D and B mesons; use spline |
---|
| 44 | // 28.05.2008 V.Ivanchenko linLossLimit=0.01; added hBrem and hPairProd processes |
---|
[825] | 45 | // |
---|
| 46 | //---------------------------------------------------------------------------- |
---|
| 47 | // |
---|
| 48 | |
---|
| 49 | #include "G4EmStandardPhysics_option2.hh" |
---|
[850] | 50 | |
---|
[825] | 51 | #include "G4ParticleDefinition.hh" |
---|
| 52 | #include "G4ProcessManager.hh" |
---|
| 53 | #include "G4LossTableManager.hh" |
---|
| 54 | #include "G4EmProcessOptions.hh" |
---|
| 55 | |
---|
| 56 | #include "G4ComptonScattering.hh" |
---|
| 57 | #include "G4GammaConversion.hh" |
---|
| 58 | #include "G4PhotoElectricEffect.hh" |
---|
| 59 | |
---|
[850] | 60 | #include "G4eMultipleScattering.hh" |
---|
[825] | 61 | #include "G4hMultipleScattering.hh" |
---|
[850] | 62 | #include "G4MuMultipleScattering.hh" |
---|
| 63 | #include "G4CoulombScattering.hh" |
---|
[1203] | 64 | #include "G4UrbanMscModel93.hh" |
---|
| 65 | #include "G4WentzelVIModel.hh" |
---|
| 66 | //#include "G4GoudsmitSaundersonMscModel.hh" |
---|
[825] | 67 | |
---|
| 68 | #include "G4eIonisation.hh" |
---|
| 69 | #include "G4eBremsstrahlung.hh" |
---|
| 70 | #include "G4eplusAnnihilation.hh" |
---|
| 71 | |
---|
| 72 | #include "G4MuIonisation.hh" |
---|
| 73 | #include "G4MuBremsstrahlung.hh" |
---|
| 74 | #include "G4MuPairProduction.hh" |
---|
[850] | 75 | #include "G4hBremsstrahlung.hh" |
---|
| 76 | #include "G4hPairProduction.hh" |
---|
[825] | 77 | |
---|
| 78 | #include "G4hIonisation.hh" |
---|
| 79 | #include "G4ionIonisation.hh" |
---|
[1203] | 80 | //#include "G4IonParametrisedLossModel.hh" |
---|
[825] | 81 | |
---|
| 82 | #include "G4Gamma.hh" |
---|
| 83 | #include "G4Electron.hh" |
---|
| 84 | #include "G4Positron.hh" |
---|
| 85 | #include "G4MuonPlus.hh" |
---|
| 86 | #include "G4MuonMinus.hh" |
---|
| 87 | #include "G4PionPlus.hh" |
---|
| 88 | #include "G4PionMinus.hh" |
---|
| 89 | #include "G4KaonPlus.hh" |
---|
| 90 | #include "G4KaonMinus.hh" |
---|
| 91 | #include "G4Proton.hh" |
---|
| 92 | #include "G4AntiProton.hh" |
---|
| 93 | #include "G4Deuteron.hh" |
---|
| 94 | #include "G4Triton.hh" |
---|
| 95 | #include "G4He3.hh" |
---|
| 96 | #include "G4Alpha.hh" |
---|
| 97 | #include "G4GenericIon.hh" |
---|
| 98 | |
---|
| 99 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 100 | |
---|
| 101 | G4EmStandardPhysics_option2::G4EmStandardPhysics_option2( |
---|
| 102 | G4int ver, const G4String& name) |
---|
| 103 | : G4VPhysicsConstructor(name), verbose(ver) |
---|
| 104 | { |
---|
| 105 | G4LossTableManager::Instance(); |
---|
| 106 | } |
---|
| 107 | |
---|
| 108 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 109 | |
---|
| 110 | G4EmStandardPhysics_option2::~G4EmStandardPhysics_option2() |
---|
| 111 | {} |
---|
| 112 | |
---|
| 113 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 114 | |
---|
| 115 | void G4EmStandardPhysics_option2::ConstructParticle() |
---|
| 116 | { |
---|
| 117 | // gamma |
---|
| 118 | G4Gamma::Gamma(); |
---|
| 119 | |
---|
| 120 | // leptons |
---|
| 121 | G4Electron::Electron(); |
---|
| 122 | G4Positron::Positron(); |
---|
| 123 | G4MuonPlus::MuonPlus(); |
---|
| 124 | G4MuonMinus::MuonMinus(); |
---|
| 125 | |
---|
| 126 | // mesons |
---|
| 127 | G4PionPlus::PionPlusDefinition(); |
---|
| 128 | G4PionMinus::PionMinusDefinition(); |
---|
| 129 | G4KaonPlus::KaonPlusDefinition(); |
---|
| 130 | G4KaonMinus::KaonMinusDefinition(); |
---|
| 131 | |
---|
| 132 | // barions |
---|
| 133 | G4Proton::Proton(); |
---|
| 134 | G4AntiProton::AntiProton(); |
---|
| 135 | |
---|
| 136 | // ions |
---|
| 137 | G4Deuteron::Deuteron(); |
---|
| 138 | G4Triton::Triton(); |
---|
| 139 | G4He3::He3(); |
---|
| 140 | G4Alpha::Alpha(); |
---|
| 141 | G4GenericIon::GenericIonDefinition(); |
---|
| 142 | } |
---|
| 143 | |
---|
| 144 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 145 | |
---|
| 146 | void G4EmStandardPhysics_option2::ConstructProcess() |
---|
| 147 | { |
---|
| 148 | // Add standard EM Processes |
---|
| 149 | |
---|
| 150 | theParticleIterator->reset(); |
---|
| 151 | while( (*theParticleIterator)() ){ |
---|
| 152 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 153 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 154 | G4String particleName = particle->GetParticleName(); |
---|
| 155 | if(verbose > 1) |
---|
| 156 | G4cout << "### " << GetPhysicsName() << " instantiates for " |
---|
| 157 | << particleName << G4endl; |
---|
| 158 | |
---|
| 159 | if (particleName == "gamma") { |
---|
| 160 | |
---|
| 161 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); |
---|
| 162 | pmanager->AddDiscreteProcess(new G4ComptonScattering); |
---|
| 163 | pmanager->AddDiscreteProcess(new G4GammaConversion); |
---|
| 164 | |
---|
| 165 | } else if (particleName == "e-") { |
---|
| 166 | |
---|
[1203] | 167 | G4eMultipleScattering* msc = new G4eMultipleScattering(); |
---|
| 168 | msc->AddEmModel(0, new G4UrbanMscModel93()); |
---|
| 169 | // msc->AddEmModel(0, new G4GoudsmitSaundersonMscModel()); |
---|
| 170 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
[850] | 171 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 172 | pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); |
---|
[825] | 173 | |
---|
| 174 | } else if (particleName == "e+") { |
---|
| 175 | |
---|
[1203] | 176 | G4eMultipleScattering* msc = new G4eMultipleScattering(); |
---|
| 177 | msc->AddEmModel(0, new G4UrbanMscModel93()); |
---|
| 178 | // msc->AddEmModel(0, new G4GoudsmitSaundersonMscModel()); |
---|
| 179 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
[850] | 180 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 181 | pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); |
---|
| 182 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); |
---|
[825] | 183 | |
---|
| 184 | } else if (particleName == "mu+" || |
---|
| 185 | particleName == "mu-" ) { |
---|
| 186 | |
---|
[1203] | 187 | G4MuMultipleScattering* msc = new G4MuMultipleScattering(); |
---|
| 188 | msc->AddEmModel(0, new G4WentzelVIModel()); |
---|
| 189 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 190 | pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); |
---|
| 191 | pmanager->AddProcess(new G4MuBremsstrahlung, -1,-3, 3); |
---|
| 192 | pmanager->AddProcess(new G4MuPairProduction, -1,-4, 4); |
---|
[850] | 193 | pmanager->AddDiscreteProcess(new G4CoulombScattering()); |
---|
[825] | 194 | |
---|
[1203] | 195 | } else if (particleName == "GenericIon") { |
---|
| 196 | |
---|
| 197 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 198 | |
---|
| 199 | G4ionIonisation* ionIoni = new G4ionIonisation(); |
---|
| 200 | //ionIoni->SetEmModel(new G4IonParametrisedLossModel()); |
---|
| 201 | //ionIoni->SetStepFunction(0.1, 20*um); |
---|
| 202 | pmanager->AddProcess(ionIoni, -1, 2, 2); |
---|
| 203 | |
---|
[825] | 204 | } else if (particleName == "alpha" || |
---|
[1203] | 205 | particleName == "He3") { |
---|
[825] | 206 | |
---|
| 207 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 208 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
| 209 | |
---|
[850] | 210 | } else if (particleName == "pi+" || |
---|
| 211 | particleName == "pi-" || |
---|
[1203] | 212 | particleName == "kaon+" || |
---|
| 213 | particleName == "kaon-" || |
---|
[850] | 214 | particleName == "proton" ) { |
---|
| 215 | |
---|
[1203] | 216 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
[850] | 217 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 218 | pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3); |
---|
| 219 | pmanager->AddProcess(new G4hPairProduction, -1,-4, 4); |
---|
| 220 | |
---|
| 221 | } else if (particleName == "B+" || |
---|
| 222 | particleName == "B-" || |
---|
| 223 | particleName == "D+" || |
---|
| 224 | particleName == "D-" || |
---|
| 225 | particleName == "Ds+" || |
---|
| 226 | particleName == "Ds-" || |
---|
| 227 | particleName == "anti_lambda_c+" || |
---|
| 228 | particleName == "anti_omega-" || |
---|
[825] | 229 | particleName == "anti_proton" || |
---|
[921] | 230 | particleName == "anti_sigma_c+" || |
---|
| 231 | particleName == "anti_sigma_c++" || |
---|
[825] | 232 | particleName == "anti_sigma+" || |
---|
| 233 | particleName == "anti_sigma-" || |
---|
[850] | 234 | particleName == "anti_xi_c+" || |
---|
[825] | 235 | particleName == "anti_xi-" || |
---|
| 236 | particleName == "deuteron" || |
---|
[850] | 237 | particleName == "lambda_c+" || |
---|
[825] | 238 | particleName == "omega-" || |
---|
[921] | 239 | particleName == "sigma_c+" || |
---|
| 240 | particleName == "sigma_c++" || |
---|
[825] | 241 | particleName == "sigma+" || |
---|
| 242 | particleName == "sigma-" || |
---|
| 243 | particleName == "tau+" || |
---|
| 244 | particleName == "tau-" || |
---|
| 245 | particleName == "triton" || |
---|
[850] | 246 | particleName == "xi_c+" || |
---|
[825] | 247 | particleName == "xi-" ) { |
---|
| 248 | |
---|
| 249 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 250 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 251 | } |
---|
| 252 | } |
---|
[850] | 253 | |
---|
| 254 | // Em options |
---|
| 255 | // |
---|
[825] | 256 | G4EmProcessOptions opt; |
---|
| 257 | opt.SetVerbose(verbose); |
---|
[850] | 258 | opt.SetApplyCuts(true); |
---|
| 259 | |
---|
| 260 | // Physics tables |
---|
| 261 | // |
---|
[1203] | 262 | //opt.SetMinEnergy(0.1*keV); |
---|
| 263 | // opt.SetMaxEnergy(10*TeV); |
---|
| 264 | //opt.SetDEDXBinning(77); |
---|
| 265 | //opt.SetLambdaBinning(77); |
---|
[921] | 266 | //opt.SetSplineFlag(true); |
---|
[850] | 267 | opt.SetPolarAngleLimit(0.2); |
---|
[1203] | 268 | |
---|
[850] | 269 | // Ionization |
---|
| 270 | // |
---|
| 271 | //opt.SetSubCutoff(true); |
---|
[825] | 272 | } |
---|
| 273 | |
---|
| 274 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|