[834] | 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 | // |
---|
| 26 | // |
---|
| 27 | // $Id: MyPhysicsList.cc,v 1.8 2006/06/29 21:34:28 gunter Exp $ |
---|
[954] | 28 | // GEANT4 tag $Name: $ |
---|
[834] | 29 | // |
---|
| 30 | // |
---|
| 31 | // ------------------------------------------------------------ |
---|
| 32 | // GEANT 4 class header file |
---|
| 33 | // |
---|
| 34 | // This is a version for maximum particle set |
---|
| 35 | // History |
---|
| 36 | // first version 10 Jan. 1998 by H.Kurashige |
---|
| 37 | // add decay at rest 26 Feb. 1998 by H.Kurashige |
---|
| 38 | // ------------------------------------------------------------ |
---|
| 39 | |
---|
| 40 | #include "globals.hh" |
---|
| 41 | #include "MyPhysicsList.hh" |
---|
| 42 | #include "G4ParticleDefinition.hh" |
---|
| 43 | #include "G4ParticleWithCuts.hh" |
---|
| 44 | #include "G4ProcessManager.hh" |
---|
| 45 | #include "G4ProcessVector.hh" |
---|
| 46 | #include "G4ParticleTypes.hh" |
---|
| 47 | #include "G4ParticleTable.hh" |
---|
| 48 | #include "G4Material.hh" |
---|
| 49 | #include "G4MaterialTable.hh" |
---|
| 50 | #include "G4ios.hh" |
---|
| 51 | #include <iomanip> |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | MyPhysicsList::MyPhysicsList(): G4VUserPhysicsList() |
---|
| 55 | { |
---|
| 56 | SetVerboseLevel(1); |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | MyPhysicsList::~MyPhysicsList() |
---|
| 60 | { |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | void MyPhysicsList::ConstructParticle() |
---|
| 64 | { |
---|
| 65 | // In this method, static member functions should be called |
---|
| 66 | // for all particles which you want to use. |
---|
| 67 | // This ensures that objects of these particle types will be |
---|
| 68 | // created in the program. |
---|
| 69 | |
---|
| 70 | ConstructBosons(); |
---|
| 71 | ConstructLeptons(); |
---|
| 72 | ConstructMesons(); |
---|
| 73 | ConstructBarions(); |
---|
| 74 | |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | void MyPhysicsList::ConstructBosons() |
---|
| 78 | { |
---|
| 79 | // pseudo-particles |
---|
| 80 | G4Geantino::GeantinoDefinition(); |
---|
| 81 | G4ChargedGeantino::ChargedGeantinoDefinition(); |
---|
| 82 | |
---|
| 83 | // gamma |
---|
| 84 | G4Gamma::GammaDefinition(); |
---|
| 85 | |
---|
| 86 | // optical photon |
---|
| 87 | G4OpticalPhoton::OpticalPhotonDefinition(); |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | void MyPhysicsList::ConstructLeptons() |
---|
| 91 | { |
---|
| 92 | // leptons |
---|
| 93 | G4MuonPlus::MuonPlusDefinition(); |
---|
| 94 | G4MuonMinus::MuonMinusDefinition(); |
---|
| 95 | G4TauMinus::TauMinusDefinition(); |
---|
| 96 | G4TauPlus::TauPlusDefinition(); |
---|
| 97 | G4Electron::ElectronDefinition(); |
---|
| 98 | G4Positron::PositronDefinition(); |
---|
| 99 | G4NeutrinoTau::NeutrinoTauDefinition(); |
---|
| 100 | G4AntiNeutrinoTau::AntiNeutrinoTauDefinition(); |
---|
| 101 | G4NeutrinoMu::NeutrinoMuDefinition(); |
---|
| 102 | G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); |
---|
| 103 | G4NeutrinoE::NeutrinoEDefinition(); |
---|
| 104 | G4AntiNeutrinoE::AntiNeutrinoEDefinition(); |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | void MyPhysicsList::ConstructMesons() |
---|
| 108 | { |
---|
| 109 | // mesons |
---|
| 110 | G4PionPlus::PionPlusDefinition(); |
---|
| 111 | G4PionMinus::PionMinusDefinition(); |
---|
| 112 | G4PionZero::PionZeroDefinition(); |
---|
| 113 | G4Eta::EtaDefinition(); |
---|
| 114 | G4KaonPlus::KaonPlusDefinition(); |
---|
| 115 | G4KaonMinus::KaonMinusDefinition(); |
---|
| 116 | G4KaonZero::KaonZeroDefinition(); |
---|
| 117 | G4AntiKaonZero::AntiKaonZeroDefinition(); |
---|
| 118 | G4KaonZeroLong::KaonZeroLongDefinition(); |
---|
| 119 | G4KaonZeroShort::KaonZeroShortDefinition(); |
---|
| 120 | |
---|
| 121 | G4DMesonPlus::DMesonPlusDefinition(); |
---|
| 122 | G4DMesonMinus::DMesonMinusDefinition(); |
---|
| 123 | G4DMesonZero::DMesonZeroDefinition(); |
---|
| 124 | G4AntiDMesonZero::AntiDMesonZeroDefinition(); |
---|
| 125 | G4DsMesonPlus::DsMesonPlusDefinition(); |
---|
| 126 | G4DsMesonMinus::DsMesonMinusDefinition(); |
---|
| 127 | G4JPsi::JPsiDefinition(); |
---|
| 128 | |
---|
| 129 | G4BMesonPlus::BMesonPlusDefinition(); |
---|
| 130 | G4BMesonMinus::BMesonMinusDefinition(); |
---|
| 131 | G4BMesonZero::BMesonZeroDefinition(); |
---|
| 132 | G4AntiBMesonZero::AntiBMesonZeroDefinition(); |
---|
| 133 | G4BsMesonZero::BsMesonZeroDefinition(); |
---|
| 134 | G4AntiBsMesonZero::AntiBsMesonZeroDefinition(); |
---|
| 135 | } |
---|
| 136 | |
---|
| 137 | void MyPhysicsList::ConstructBarions() |
---|
| 138 | { |
---|
| 139 | // barions |
---|
| 140 | G4Proton::ProtonDefinition(); |
---|
| 141 | G4AntiProton::AntiProtonDefinition(); |
---|
| 142 | G4Neutron::NeutronDefinition(); |
---|
| 143 | G4AntiNeutron::AntiNeutronDefinition(); |
---|
| 144 | G4Lambda::LambdaDefinition(); |
---|
| 145 | G4AntiLambda::AntiLambdaDefinition(); |
---|
| 146 | G4SigmaZero::SigmaZeroDefinition(); |
---|
| 147 | G4AntiSigmaZero::AntiSigmaZeroDefinition(); |
---|
| 148 | G4SigmaPlus::SigmaPlusDefinition(); |
---|
| 149 | G4AntiSigmaPlus::AntiSigmaPlusDefinition(); |
---|
| 150 | G4SigmaMinus::SigmaMinusDefinition(); |
---|
| 151 | G4AntiSigmaMinus::AntiSigmaMinusDefinition(); |
---|
| 152 | G4XiZero::XiZeroDefinition(); |
---|
| 153 | G4AntiXiZero::AntiXiZeroDefinition(); |
---|
| 154 | G4XiMinus::XiMinusDefinition(); |
---|
| 155 | G4AntiXiMinus::AntiXiMinusDefinition(); |
---|
| 156 | G4OmegaMinus::OmegaMinusDefinition(); |
---|
| 157 | G4AntiOmegaMinus::AntiOmegaMinusDefinition(); |
---|
| 158 | |
---|
| 159 | G4LambdacPlus::LambdacPlusDefinition(); |
---|
| 160 | G4SigmacPlusPlus::SigmacPlusPlusDefinition(); |
---|
| 161 | G4SigmacPlus::SigmacPlusDefinition(); |
---|
| 162 | G4SigmacZero::SigmacZeroDefinition(); |
---|
| 163 | G4XicPlus::XicPlusDefinition(); |
---|
| 164 | G4XicZero::XicZeroDefinition(); |
---|
| 165 | G4OmegacZero::OmegacZeroDefinition(); |
---|
| 166 | G4AntiLambdacPlus::AntiLambdacPlusDefinition(); |
---|
| 167 | G4AntiSigmacPlusPlus::AntiSigmacPlusPlusDefinition(); |
---|
| 168 | G4AntiSigmacPlus::AntiSigmacPlusDefinition(); |
---|
| 169 | G4AntiSigmacZero::AntiSigmacZeroDefinition(); |
---|
| 170 | G4AntiXicPlus::AntiXicPlusDefinition(); |
---|
| 171 | G4AntiXicZero::AntiXicZeroDefinition(); |
---|
| 172 | G4AntiOmegacZero::AntiOmegacZeroDefinition(); |
---|
| 173 | } |
---|
| 174 | |
---|
| 175 | void MyPhysicsList::ConstructIons() |
---|
| 176 | { |
---|
| 177 | // nuclei |
---|
| 178 | G4Alpha::AlphaDefinition(); |
---|
| 179 | G4Deuteron::DeuteronDefinition(); |
---|
| 180 | G4Triton::TritonDefinition(); |
---|
| 181 | } |
---|
| 182 | |
---|
| 183 | void MyPhysicsList::ConstructProcess() |
---|
| 184 | { |
---|
| 185 | AddTransportation(); |
---|
| 186 | ConstructEM(); |
---|
| 187 | ConstructLeptHad(); |
---|
| 188 | ConstructHad(); |
---|
| 189 | ConstructGeneral(); |
---|
| 190 | } |
---|
| 191 | |
---|
| 192 | #include "G4ComptonScattering.hh" |
---|
| 193 | #include "G4GammaConversion.hh" |
---|
| 194 | #include "G4PhotoElectricEffect.hh" |
---|
| 195 | |
---|
| 196 | #include "G4MultipleScattering.hh" |
---|
| 197 | |
---|
| 198 | #include "G4eIonisation.hh" |
---|
| 199 | #include "G4eBremsstrahlung.hh" |
---|
| 200 | #include "G4eplusAnnihilation.hh" |
---|
| 201 | |
---|
| 202 | #include "G4MuIonisation.hh" |
---|
| 203 | #include "G4MuBremsstrahlung.hh" |
---|
| 204 | #include "G4MuPairProduction.hh" |
---|
| 205 | |
---|
| 206 | #include "G4hIonisation.hh" |
---|
| 207 | void MyPhysicsList::ConstructEM() |
---|
| 208 | { |
---|
| 209 | theParticleIterator->reset(); |
---|
| 210 | while( (*theParticleIterator)() ){ |
---|
| 211 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 212 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 213 | G4String particleName = particle->GetParticleName(); |
---|
| 214 | |
---|
| 215 | if (particleName == "gamma") { |
---|
| 216 | // gamma |
---|
| 217 | // Construct processes for gamma |
---|
| 218 | pmanager->AddDiscreteProcess(new G4GammaConversion()); |
---|
| 219 | pmanager->AddDiscreteProcess(new G4ComptonScattering()); |
---|
| 220 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect()); |
---|
| 221 | |
---|
| 222 | } else if (particleName == "e-") { |
---|
| 223 | //electron |
---|
| 224 | // Construct processes for electron |
---|
| 225 | G4MultipleScattering *ms = new G4MultipleScattering(); |
---|
| 226 | pmanager->AddProcess(ms,-1,1,1); |
---|
| 227 | pmanager->AddProcess(new G4eIonisation(),-1,2,2); |
---|
| 228 | pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3); |
---|
| 229 | |
---|
| 230 | } else if (particleName == "e+") { |
---|
| 231 | //positron |
---|
| 232 | // Construct processes for positron |
---|
| 233 | G4MultipleScattering *ms = new G4MultipleScattering(); |
---|
| 234 | pmanager->AddProcess(ms,-1,1,1); |
---|
| 235 | pmanager->AddProcess(new G4eIonisation(),-1,2,2); |
---|
| 236 | pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3); |
---|
| 237 | pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4); |
---|
| 238 | |
---|
| 239 | } else if( particleName == "mu+" || |
---|
| 240 | particleName == "mu-" ) { |
---|
| 241 | //muon |
---|
| 242 | // Construct processes for muon+ |
---|
| 243 | G4MultipleScattering *ms = new G4MultipleScattering(); |
---|
| 244 | pmanager->AddProcess(ms,-1,1,1); |
---|
| 245 | pmanager->AddProcess(new G4MuIonisation(),-1,2,2); |
---|
| 246 | pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3); |
---|
| 247 | pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4); |
---|
| 248 | |
---|
| 249 | } else { |
---|
| 250 | if ((particle->GetPDGCharge() != 0.0) && |
---|
| 251 | (particle->GetParticleName() != "chargedgeantino")) { |
---|
| 252 | // all others charged particles except geantino |
---|
| 253 | G4MultipleScattering *ms = new G4MultipleScattering(); |
---|
| 254 | pmanager->AddProcess(ms,-1,1,1); |
---|
| 255 | pmanager->AddProcess(new G4hIonisation(),-1,2,2); |
---|
| 256 | } |
---|
| 257 | } |
---|
| 258 | } |
---|
| 259 | } |
---|
| 260 | |
---|
| 261 | void MyPhysicsList::ConstructHad() |
---|
| 262 | {;} |
---|
| 263 | |
---|
| 264 | void MyPhysicsList::ConstructLeptHad() |
---|
| 265 | {;} |
---|
| 266 | |
---|
| 267 | #include "G4Decay.hh" |
---|
| 268 | void MyPhysicsList::ConstructGeneral() |
---|
| 269 | { |
---|
| 270 | G4Decay* theDecayProcess = new G4Decay(); |
---|
| 271 | theParticleIterator->reset(); |
---|
| 272 | while( (*theParticleIterator)() ){ |
---|
| 273 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 274 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 275 | if (theDecayProcess->IsApplicable(*particle)) { |
---|
| 276 | pmanager->AddProcess(theDecayProcess, INT_MAX, -1, INT_MAX); |
---|
| 277 | } |
---|
| 278 | } |
---|
| 279 | } |
---|
| 280 | |
---|
| 281 | void MyPhysicsList::SetCuts() |
---|
| 282 | { |
---|
| 283 | if (verboseLevel >0){ |
---|
| 284 | G4cout << "MyPhysicsList::SetCuts:"; |
---|
| 285 | } |
---|
| 286 | |
---|
| 287 | SetCutsWithDefault(); |
---|
| 288 | |
---|
| 289 | if (verboseLevel>1) { |
---|
| 290 | DumpCutValuesTable(); |
---|
| 291 | } |
---|
| 292 | } |
---|
| 293 | |
---|
| 294 | |
---|