[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_option1.cc,v 1.15 2009/10/30 18:36:15 vnivanch Exp $ |
---|
[1228] | 27 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
[825] | 28 | // |
---|
| 29 | //--------------------------------------------------------------------------- |
---|
| 30 | // |
---|
| 31 | // ClassName: G4EmStandardPhysics_option1 |
---|
| 32 | // |
---|
| 33 | // Author: V.Ivanchenko 09.11.2005 |
---|
| 34 | // |
---|
| 35 | // Modified: |
---|
| 36 | // 19.12.2005 V.Ivanchenko StepFunction for electrons (1.0, 1.0*mm) |
---|
| 37 | // 21.06.2006 V.Ivanchenko use recent msc with step limitation off |
---|
| 38 | // 23.06.2006 V.Ivanchenko set dRoverRange = 0.8 for e- and e+ |
---|
| 39 | // 13.11.2006 V.Ivanchenko use G4hMultipleScattering |
---|
| 40 | // 23.11.2006 V.Ivanchenko remove mscStepLimit option and improve cout |
---|
| 41 | // 13.02.2007 V.Ivanchenko set skin=0.0 |
---|
| 42 | // 15.05.2007 V.Ivanchenko rename to _option1 |
---|
[850] | 43 | // 21.04.2008 V.Ivanchenko add long-lived D and B mesons |
---|
[825] | 44 | // |
---|
| 45 | //---------------------------------------------------------------------------- |
---|
| 46 | // |
---|
| 47 | |
---|
| 48 | #include "G4EmStandardPhysics_option1.hh" |
---|
| 49 | #include "G4ParticleDefinition.hh" |
---|
| 50 | #include "G4ProcessManager.hh" |
---|
| 51 | #include "G4LossTableManager.hh" |
---|
| 52 | #include "G4EmProcessOptions.hh" |
---|
| 53 | |
---|
| 54 | #include "G4ComptonScattering.hh" |
---|
| 55 | #include "G4GammaConversion.hh" |
---|
| 56 | #include "G4PhotoElectricEffect.hh" |
---|
| 57 | |
---|
[921] | 58 | #include "G4eMultipleScattering.hh" |
---|
[1203] | 59 | #include "G4MuMultipleScattering.hh" |
---|
[825] | 60 | #include "G4hMultipleScattering.hh" |
---|
| 61 | #include "G4MscStepLimitType.hh" |
---|
| 62 | |
---|
| 63 | #include "G4eIonisation.hh" |
---|
| 64 | #include "G4eBremsstrahlung.hh" |
---|
| 65 | #include "G4eplusAnnihilation.hh" |
---|
| 66 | |
---|
| 67 | #include "G4MuIonisation.hh" |
---|
| 68 | #include "G4MuBremsstrahlung.hh" |
---|
| 69 | #include "G4MuPairProduction.hh" |
---|
[921] | 70 | #include "G4hBremsstrahlung.hh" |
---|
| 71 | #include "G4hPairProduction.hh" |
---|
[825] | 72 | |
---|
| 73 | #include "G4hIonisation.hh" |
---|
| 74 | #include "G4ionIonisation.hh" |
---|
| 75 | |
---|
| 76 | #include "G4Gamma.hh" |
---|
| 77 | #include "G4Electron.hh" |
---|
| 78 | #include "G4Positron.hh" |
---|
| 79 | #include "G4MuonPlus.hh" |
---|
| 80 | #include "G4MuonMinus.hh" |
---|
| 81 | #include "G4PionPlus.hh" |
---|
| 82 | #include "G4PionMinus.hh" |
---|
| 83 | #include "G4KaonPlus.hh" |
---|
| 84 | #include "G4KaonMinus.hh" |
---|
| 85 | #include "G4Proton.hh" |
---|
| 86 | #include "G4AntiProton.hh" |
---|
| 87 | #include "G4Deuteron.hh" |
---|
| 88 | #include "G4Triton.hh" |
---|
| 89 | #include "G4He3.hh" |
---|
| 90 | #include "G4Alpha.hh" |
---|
| 91 | #include "G4GenericIon.hh" |
---|
| 92 | |
---|
| 93 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 94 | |
---|
| 95 | G4EmStandardPhysics_option1::G4EmStandardPhysics_option1( |
---|
| 96 | G4int ver, const G4String& name) |
---|
| 97 | : G4VPhysicsConstructor(name), verbose(ver) |
---|
| 98 | { |
---|
| 99 | G4LossTableManager::Instance(); |
---|
| 100 | } |
---|
| 101 | |
---|
| 102 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 103 | |
---|
| 104 | G4EmStandardPhysics_option1::~G4EmStandardPhysics_option1() |
---|
| 105 | {} |
---|
| 106 | |
---|
| 107 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 108 | |
---|
| 109 | void G4EmStandardPhysics_option1::ConstructParticle() |
---|
| 110 | { |
---|
| 111 | // gamma |
---|
| 112 | G4Gamma::Gamma(); |
---|
| 113 | |
---|
| 114 | // leptons |
---|
| 115 | G4Electron::Electron(); |
---|
| 116 | G4Positron::Positron(); |
---|
| 117 | G4MuonPlus::MuonPlus(); |
---|
| 118 | G4MuonMinus::MuonMinus(); |
---|
| 119 | |
---|
| 120 | // mesons |
---|
| 121 | G4PionPlus::PionPlusDefinition(); |
---|
| 122 | G4PionMinus::PionMinusDefinition(); |
---|
| 123 | G4KaonPlus::KaonPlusDefinition(); |
---|
| 124 | G4KaonMinus::KaonMinusDefinition(); |
---|
| 125 | |
---|
| 126 | // barions |
---|
| 127 | G4Proton::Proton(); |
---|
| 128 | G4AntiProton::AntiProton(); |
---|
| 129 | |
---|
| 130 | // ions |
---|
| 131 | G4Deuteron::Deuteron(); |
---|
| 132 | G4Triton::Triton(); |
---|
| 133 | G4He3::He3(); |
---|
| 134 | G4Alpha::Alpha(); |
---|
| 135 | G4GenericIon::GenericIonDefinition(); |
---|
| 136 | } |
---|
| 137 | |
---|
| 138 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 139 | |
---|
| 140 | void G4EmStandardPhysics_option1::ConstructProcess() |
---|
| 141 | { |
---|
| 142 | // Add standard EM Processes |
---|
| 143 | |
---|
| 144 | theParticleIterator->reset(); |
---|
| 145 | while( (*theParticleIterator)() ){ |
---|
| 146 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 147 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 148 | G4String particleName = particle->GetParticleName(); |
---|
| 149 | if(verbose > 1) |
---|
| 150 | G4cout << "### " << GetPhysicsName() << " instantiates for " |
---|
| 151 | << particleName << G4endl; |
---|
| 152 | |
---|
| 153 | if (particleName == "gamma") { |
---|
| 154 | |
---|
| 155 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); |
---|
| 156 | pmanager->AddDiscreteProcess(new G4ComptonScattering); |
---|
| 157 | pmanager->AddDiscreteProcess(new G4GammaConversion); |
---|
| 158 | |
---|
| 159 | } else if (particleName == "e-") { |
---|
| 160 | |
---|
| 161 | G4eIonisation* eioni = new G4eIonisation(); |
---|
| 162 | eioni->SetStepFunction(0.8, 1.0*mm); |
---|
[921] | 163 | G4eMultipleScattering* msc = new G4eMultipleScattering; |
---|
[825] | 164 | msc->SetStepLimitType(fMinimal); |
---|
| 165 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 166 | pmanager->AddProcess(eioni, -1, 2, 2); |
---|
[921] | 167 | pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); |
---|
[825] | 168 | |
---|
| 169 | } else if (particleName == "e+") { |
---|
| 170 | |
---|
| 171 | G4eIonisation* eioni = new G4eIonisation(); |
---|
| 172 | eioni->SetStepFunction(0.8, 1.0*mm); |
---|
[921] | 173 | G4eMultipleScattering* msc = new G4eMultipleScattering; |
---|
[825] | 174 | msc->SetStepLimitType(fMinimal); |
---|
| 175 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 176 | pmanager->AddProcess(eioni, -1, 2, 2); |
---|
[921] | 177 | pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); |
---|
[825] | 178 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); |
---|
| 179 | |
---|
| 180 | } else if (particleName == "mu+" || |
---|
| 181 | particleName == "mu-" ) { |
---|
| 182 | |
---|
[1203] | 183 | pmanager->AddProcess(new G4MuMultipleScattering,-1, 1, 1); |
---|
[825] | 184 | pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); |
---|
[921] | 185 | pmanager->AddProcess(new G4MuBremsstrahlung, -1,-3, 3); |
---|
| 186 | pmanager->AddProcess(new G4MuPairProduction, -1,-4, 4); |
---|
[825] | 187 | |
---|
| 188 | } else if (particleName == "alpha" || |
---|
[1203] | 189 | particleName == "He3") { |
---|
[825] | 190 | |
---|
| 191 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 192 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
| 193 | |
---|
[1203] | 194 | } else if (particleName == "GenericIon") { |
---|
| 195 | |
---|
| 196 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 197 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
| 198 | |
---|
[921] | 199 | } else if (particleName == "pi+" || |
---|
| 200 | particleName == "pi-" || |
---|
[1203] | 201 | particleName == "kaon+" || |
---|
| 202 | particleName == "kaon-" || |
---|
[921] | 203 | particleName == "proton" ) { |
---|
| 204 | |
---|
| 205 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 206 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 207 | pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3); |
---|
| 208 | pmanager->AddProcess(new G4hPairProduction, -1,-4, 4); |
---|
| 209 | |
---|
[850] | 210 | } else if (particleName == "B+" || |
---|
| 211 | particleName == "B-" || |
---|
| 212 | particleName == "D+" || |
---|
| 213 | particleName == "D-" || |
---|
| 214 | particleName == "Ds+" || |
---|
| 215 | particleName == "Ds-" || |
---|
| 216 | particleName == "anti_lambda_c+" || |
---|
| 217 | particleName == "anti_omega-" || |
---|
[825] | 218 | particleName == "anti_proton" || |
---|
[921] | 219 | particleName == "anti_sigma_c+" || |
---|
| 220 | particleName == "anti_sigma_c++" || |
---|
[825] | 221 | particleName == "anti_sigma+" || |
---|
| 222 | particleName == "anti_sigma-" || |
---|
[850] | 223 | particleName == "anti_xi_c+" || |
---|
[825] | 224 | particleName == "anti_xi-" || |
---|
| 225 | particleName == "deuteron" || |
---|
[921] | 226 | particleName == "lambda_c+" || |
---|
[825] | 227 | particleName == "omega-" || |
---|
[921] | 228 | particleName == "sigma_c+" || |
---|
| 229 | particleName == "sigma_c++" || |
---|
[825] | 230 | particleName == "sigma+" || |
---|
| 231 | particleName == "sigma-" || |
---|
| 232 | particleName == "tau+" || |
---|
| 233 | particleName == "tau-" || |
---|
| 234 | particleName == "triton" || |
---|
[850] | 235 | particleName == "xi_c+" || |
---|
[825] | 236 | particleName == "xi-" ) { |
---|
| 237 | |
---|
| 238 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 239 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 240 | } |
---|
| 241 | } |
---|
| 242 | G4EmProcessOptions opt; |
---|
| 243 | opt.SetVerbose(verbose); |
---|
[1203] | 244 | opt.SetApplyCuts(true); |
---|
[825] | 245 | } |
---|
| 246 | |
---|
| 247 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|