| [807] | 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: ExN02PhysicsList.cc,v 1.22 2006/06/29 17:48:11 gunter Exp $
|
|---|
| 28 | // GEANT4 tag $Name: $
|
|---|
| 29 | //
|
|---|
| 30 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 31 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 32 |
|
|---|
| 33 | #include "globals.hh"
|
|---|
| 34 | #include "ExN02PhysicsList.hh"
|
|---|
| 35 |
|
|---|
| 36 | #include "G4ProcessManager.hh"
|
|---|
| 37 | #include "G4ParticleTypes.hh"
|
|---|
| 38 |
|
|---|
| 39 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 40 |
|
|---|
| 41 | ExN02PhysicsList::ExN02PhysicsList(): G4VUserPhysicsList()
|
|---|
| 42 | {
|
|---|
| 43 | defaultCutValue = 1.0*cm;
|
|---|
| 44 | SetVerboseLevel(1);
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 48 |
|
|---|
| 49 | ExN02PhysicsList::~ExN02PhysicsList()
|
|---|
| 50 | {}
|
|---|
| 51 |
|
|---|
| 52 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 53 |
|
|---|
| 54 | void ExN02PhysicsList::ConstructParticle()
|
|---|
| 55 | {
|
|---|
| 56 | // In this method, static member functions should be called
|
|---|
| 57 | // for all particles which you want to use.
|
|---|
| 58 | // This ensures that objects of these particle types will be
|
|---|
| 59 | // created in the program.
|
|---|
| 60 |
|
|---|
| 61 | ConstructBosons();
|
|---|
| 62 | ConstructLeptons();
|
|---|
| 63 | ConstructMesons();
|
|---|
| 64 | ConstructBaryons();
|
|---|
| 65 | }
|
|---|
| 66 |
|
|---|
| 67 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 68 |
|
|---|
| 69 | void ExN02PhysicsList::ConstructBosons()
|
|---|
| 70 | {
|
|---|
| 71 | // pseudo-particles
|
|---|
| 72 | G4Geantino::GeantinoDefinition();
|
|---|
| 73 | G4ChargedGeantino::ChargedGeantinoDefinition();
|
|---|
| 74 |
|
|---|
| 75 | // gamma
|
|---|
| 76 | G4Gamma::GammaDefinition();
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 80 |
|
|---|
| 81 | void ExN02PhysicsList::ConstructLeptons()
|
|---|
| 82 | {
|
|---|
| 83 | // leptons
|
|---|
| 84 | // e+/-
|
|---|
| 85 | G4Electron::ElectronDefinition();
|
|---|
| 86 | G4Positron::PositronDefinition();
|
|---|
| 87 | // mu+/-
|
|---|
| 88 | G4MuonPlus::MuonPlusDefinition();
|
|---|
| 89 | G4MuonMinus::MuonMinusDefinition();
|
|---|
| 90 | // nu_e
|
|---|
| 91 | G4NeutrinoE::NeutrinoEDefinition();
|
|---|
| 92 | G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
|---|
| 93 | // nu_mu
|
|---|
| 94 | G4NeutrinoMu::NeutrinoMuDefinition();
|
|---|
| 95 | G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
|---|
| 96 | }
|
|---|
| 97 |
|
|---|
| 98 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 99 |
|
|---|
| 100 | void ExN02PhysicsList::ConstructMesons()
|
|---|
| 101 | {
|
|---|
| 102 | // mesons
|
|---|
| 103 | // light mesons
|
|---|
| 104 | G4PionPlus::PionPlusDefinition();
|
|---|
| 105 | G4PionMinus::PionMinusDefinition();
|
|---|
| 106 | G4PionZero::PionZeroDefinition();
|
|---|
| 107 | G4Eta::EtaDefinition();
|
|---|
| 108 | G4EtaPrime::EtaPrimeDefinition();
|
|---|
| 109 | G4KaonPlus::KaonPlusDefinition();
|
|---|
| 110 | G4KaonMinus::KaonMinusDefinition();
|
|---|
| 111 | G4KaonZero::KaonZeroDefinition();
|
|---|
| 112 | G4AntiKaonZero::AntiKaonZeroDefinition();
|
|---|
| 113 | G4KaonZeroLong::KaonZeroLongDefinition();
|
|---|
| 114 | G4KaonZeroShort::KaonZeroShortDefinition();
|
|---|
| 115 | }
|
|---|
| 116 |
|
|---|
| 117 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 118 |
|
|---|
| 119 | void ExN02PhysicsList::ConstructBaryons()
|
|---|
| 120 | {
|
|---|
| 121 | // barions
|
|---|
| 122 | G4Proton::ProtonDefinition();
|
|---|
| 123 | G4AntiProton::AntiProtonDefinition();
|
|---|
| 124 |
|
|---|
| 125 | G4Neutron::NeutronDefinition();
|
|---|
| 126 | G4AntiNeutron::AntiNeutronDefinition();
|
|---|
| 127 | }
|
|---|
| 128 |
|
|---|
| 129 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 130 |
|
|---|
| 131 | void ExN02PhysicsList::ConstructProcess()
|
|---|
| 132 | {
|
|---|
| 133 | AddTransportation();
|
|---|
| 134 | ConstructEM();
|
|---|
| 135 | ConstructGeneral();
|
|---|
| 136 | }
|
|---|
| 137 |
|
|---|
| 138 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 139 |
|
|---|
| 140 | #include "G4ComptonScattering.hh"
|
|---|
| 141 | #include "G4GammaConversion.hh"
|
|---|
| 142 | #include "G4PhotoElectricEffect.hh"
|
|---|
| 143 |
|
|---|
| 144 | #include "G4MultipleScattering.hh"
|
|---|
| 145 |
|
|---|
| 146 | #include "G4eIonisation.hh"
|
|---|
| 147 | #include "G4eBremsstrahlung.hh"
|
|---|
| 148 | #include "G4eplusAnnihilation.hh"
|
|---|
| 149 |
|
|---|
| 150 | #include "G4MuIonisation.hh"
|
|---|
| 151 | #include "G4MuBremsstrahlung.hh"
|
|---|
| 152 | #include "G4MuPairProduction.hh"
|
|---|
| 153 |
|
|---|
| 154 | #include "G4hIonisation.hh"
|
|---|
| 155 |
|
|---|
| 156 | #include "G4StepLimiter.hh"
|
|---|
| 157 | #include "G4UserSpecialCuts.hh"
|
|---|
| 158 |
|
|---|
| 159 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 160 |
|
|---|
| 161 | void ExN02PhysicsList::ConstructEM()
|
|---|
| 162 | {
|
|---|
| 163 | theParticleIterator->reset();
|
|---|
| 164 | while( (*theParticleIterator)() ){
|
|---|
| 165 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 166 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 167 | G4String particleName = particle->GetParticleName();
|
|---|
| 168 |
|
|---|
| 169 | if (particleName == "gamma") {
|
|---|
| 170 | // gamma
|
|---|
| 171 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
|
|---|
| 172 | pmanager->AddDiscreteProcess(new G4ComptonScattering);
|
|---|
| 173 | pmanager->AddDiscreteProcess(new G4GammaConversion);
|
|---|
| 174 |
|
|---|
| 175 | } else if (particleName == "e-") {
|
|---|
| 176 | //electron
|
|---|
| 177 | pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
|
|---|
| 178 | pmanager->AddProcess(new G4eIonisation, -1, 2,2);
|
|---|
| 179 | pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
|
|---|
| 180 |
|
|---|
| 181 | } else if (particleName == "e+") {
|
|---|
| 182 | //positron
|
|---|
| 183 | pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
|
|---|
| 184 | pmanager->AddProcess(new G4eIonisation, -1, 2,2);
|
|---|
| 185 | pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
|
|---|
| 186 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
|
|---|
| 187 |
|
|---|
| 188 | } else if( particleName == "mu+" ||
|
|---|
| 189 | particleName == "mu-" ) {
|
|---|
| 190 | //muon
|
|---|
| 191 | pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
|
|---|
| 192 | pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
|
|---|
| 193 | pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
|
|---|
| 194 | pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
|
|---|
| 195 |
|
|---|
| 196 | } else if ((!particle->IsShortLived()) &&
|
|---|
| 197 | (particle->GetPDGCharge() != 0.0) &&
|
|---|
| 198 | (particle->GetParticleName() != "chargedgeantino")) {
|
|---|
| 199 | //all others charged particles except geantino
|
|---|
| 200 | pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
|
|---|
| 201 | pmanager->AddProcess(new G4hIonisation, -1, 2,2);
|
|---|
| 202 | //step limit
|
|---|
| 203 | pmanager->AddProcess(new G4StepLimiter, -1,-1,3);
|
|---|
| 204 | ///pmanager->AddProcess(new G4UserSpecialCuts, -1,-1,4);
|
|---|
| 205 | }
|
|---|
| 206 | }
|
|---|
| 207 | }
|
|---|
| 208 |
|
|---|
| 209 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 210 |
|
|---|
| 211 | #include "G4Decay.hh"
|
|---|
| 212 | void ExN02PhysicsList::ConstructGeneral()
|
|---|
| 213 | {
|
|---|
| 214 | // Add Decay Process
|
|---|
| 215 | G4Decay* theDecayProcess = new G4Decay();
|
|---|
| 216 | theParticleIterator->reset();
|
|---|
| 217 | while( (*theParticleIterator)() ){
|
|---|
| 218 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 219 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 220 | if (theDecayProcess->IsApplicable(*particle)) {
|
|---|
| 221 | pmanager ->AddProcess(theDecayProcess);
|
|---|
| 222 | // set ordering for PostStepDoIt and AtRestDoIt
|
|---|
| 223 | pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
|
|---|
| 224 | pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
|
|---|
| 225 | }
|
|---|
| 226 | }
|
|---|
| 227 | }
|
|---|
| 228 |
|
|---|
| 229 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 230 |
|
|---|
| 231 | void ExN02PhysicsList::SetCuts()
|
|---|
| 232 | {
|
|---|
| 233 | //G4VUserPhysicsList::SetCutsWithDefault method sets
|
|---|
| 234 | //the default cut value for all particle types
|
|---|
| 235 | //
|
|---|
| 236 | SetCutsWithDefault();
|
|---|
| 237 |
|
|---|
| 238 | if (verboseLevel>0) DumpCutValuesTable();
|
|---|
| 239 | }
|
|---|
| 240 |
|
|---|
| 241 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 242 |
|
|---|