[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 | // |
---|
[1337] | 27 | // $Id: ExN03PhysicsList.cc,v 1.2 2010/03/31 21:43:48 tkoi Exp $ |
---|
| 28 | // GEANT4 tag $Name: geant4-09-04-beta-01 $ |
---|
[807] | 29 | // |
---|
| 30 | // |
---|
| 31 | |
---|
| 32 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 33 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 34 | |
---|
| 35 | #include "ExN03PhysicsList.hh" |
---|
| 36 | |
---|
| 37 | #include "G4ProcessManager.hh" |
---|
| 38 | |
---|
[1337] | 39 | #include "G4BosonConstructor.hh" |
---|
| 40 | #include "G4LeptonConstructor.hh" |
---|
| 41 | #include "G4MesonConstructor.hh" |
---|
| 42 | #include "G4BosonConstructor.hh" |
---|
| 43 | #include "G4BaryonConstructor.hh" |
---|
| 44 | #include "G4IonConstructor.hh" |
---|
| 45 | |
---|
[807] | 46 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 47 | |
---|
| 48 | ExN03PhysicsList::ExN03PhysicsList(): G4VUserPhysicsList() |
---|
| 49 | { |
---|
[1337] | 50 | defaultCutValue = 1.0*mm; |
---|
| 51 | SetVerboseLevel(1); |
---|
[807] | 52 | } |
---|
| 53 | |
---|
| 54 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 55 | |
---|
| 56 | ExN03PhysicsList::~ExN03PhysicsList() |
---|
| 57 | {} |
---|
| 58 | |
---|
| 59 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 60 | |
---|
| 61 | void ExN03PhysicsList::ConstructParticle() |
---|
| 62 | { |
---|
| 63 | // In this method, static member functions should be called |
---|
| 64 | // for all particles which you want to use. |
---|
| 65 | // This ensures that objects of these particle types will be |
---|
| 66 | // created in the program. |
---|
| 67 | |
---|
[1337] | 68 | G4BosonConstructor pBosonConstructor; |
---|
| 69 | pBosonConstructor.ConstructParticle(); |
---|
[807] | 70 | |
---|
[1337] | 71 | G4LeptonConstructor pLeptonConstructor; |
---|
| 72 | pLeptonConstructor.ConstructParticle(); |
---|
[807] | 73 | |
---|
[1337] | 74 | G4MesonConstructor pMesonConstructor; |
---|
| 75 | pMesonConstructor.ConstructParticle(); |
---|
[807] | 76 | |
---|
[1337] | 77 | G4BaryonConstructor pBaryonConstructor; |
---|
| 78 | pBaryonConstructor.ConstructParticle(); |
---|
[807] | 79 | |
---|
[1337] | 80 | G4IonConstructor pIonConstructor; |
---|
| 81 | pIonConstructor.ConstructParticle(); |
---|
[807] | 82 | } |
---|
| 83 | |
---|
| 84 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 85 | |
---|
| 86 | void ExN03PhysicsList::ConstructProcess() |
---|
| 87 | { |
---|
| 88 | AddTransportation(); |
---|
| 89 | ConstructEM(); |
---|
[1337] | 90 | ConstructDecay(); |
---|
[807] | 91 | } |
---|
| 92 | |
---|
| 93 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 94 | |
---|
| 95 | #include "G4ComptonScattering.hh" |
---|
| 96 | #include "G4GammaConversion.hh" |
---|
| 97 | #include "G4PhotoElectricEffect.hh" |
---|
| 98 | |
---|
[1337] | 99 | #include "G4eMultipleScattering.hh" |
---|
[807] | 100 | #include "G4eIonisation.hh" |
---|
| 101 | #include "G4eBremsstrahlung.hh" |
---|
| 102 | #include "G4eplusAnnihilation.hh" |
---|
| 103 | |
---|
[1337] | 104 | #include "G4MuMultipleScattering.hh" |
---|
[807] | 105 | #include "G4MuIonisation.hh" |
---|
| 106 | #include "G4MuBremsstrahlung.hh" |
---|
| 107 | #include "G4MuPairProduction.hh" |
---|
| 108 | |
---|
[1337] | 109 | #include "G4hMultipleScattering.hh" |
---|
[807] | 110 | #include "G4hIonisation.hh" |
---|
[1337] | 111 | #include "G4hBremsstrahlung.hh" |
---|
| 112 | #include "G4hPairProduction.hh" |
---|
[807] | 113 | |
---|
[1337] | 114 | #include "G4ionIonisation.hh" |
---|
| 115 | |
---|
[807] | 116 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 117 | |
---|
| 118 | void ExN03PhysicsList::ConstructEM() |
---|
| 119 | { |
---|
| 120 | theParticleIterator->reset(); |
---|
| 121 | while( (*theParticleIterator)() ){ |
---|
| 122 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 123 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 124 | G4String particleName = particle->GetParticleName(); |
---|
| 125 | |
---|
| 126 | if (particleName == "gamma") { |
---|
| 127 | // gamma |
---|
| 128 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); |
---|
| 129 | pmanager->AddDiscreteProcess(new G4ComptonScattering); |
---|
| 130 | pmanager->AddDiscreteProcess(new G4GammaConversion); |
---|
| 131 | |
---|
| 132 | } else if (particleName == "e-") { |
---|
| 133 | //electron |
---|
[1337] | 134 | pmanager->AddProcess(new G4eMultipleScattering,-1, 1, 1); |
---|
| 135 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 136 | pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); |
---|
[807] | 137 | |
---|
| 138 | } else if (particleName == "e+") { |
---|
| 139 | //positron |
---|
[1337] | 140 | pmanager->AddProcess(new G4eMultipleScattering,-1, 1, 1); |
---|
| 141 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 142 | pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); |
---|
| 143 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); |
---|
| 144 | |
---|
[807] | 145 | } else if( particleName == "mu+" || |
---|
| 146 | particleName == "mu-" ) { |
---|
| 147 | //muon |
---|
[1337] | 148 | pmanager->AddProcess(new G4MuMultipleScattering,-1, 1, 1); |
---|
| 149 | pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); |
---|
| 150 | pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); |
---|
| 151 | pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); |
---|
| 152 | |
---|
| 153 | } else if( particleName == "proton" || |
---|
| 154 | particleName == "pi-" || |
---|
| 155 | particleName == "pi+" ) { |
---|
| 156 | //proton |
---|
| 157 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 158 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 159 | pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3); |
---|
| 160 | pmanager->AddProcess(new G4hPairProduction, -1, 4, 4); |
---|
[807] | 161 | |
---|
[1337] | 162 | } else if( particleName == "alpha" || |
---|
| 163 | particleName == "He3" ) { |
---|
| 164 | //alpha |
---|
| 165 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 166 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
| 167 | |
---|
| 168 | } else if( particleName == "GenericIon" ) { |
---|
| 169 | //Ions |
---|
| 170 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 171 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
| 172 | |
---|
| 173 | } else if ((!particle->IsShortLived()) && |
---|
[807] | 174 | (particle->GetPDGCharge() != 0.0) && |
---|
| 175 | (particle->GetParticleName() != "chargedgeantino")) { |
---|
| 176 | //all others charged particles except geantino |
---|
[1337] | 177 | pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1); |
---|
| 178 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 179 | } |
---|
[807] | 180 | } |
---|
| 181 | } |
---|
| 182 | |
---|
| 183 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 184 | |
---|
| 185 | #include "G4Decay.hh" |
---|
| 186 | |
---|
[1337] | 187 | void ExN03PhysicsList::ConstructDecay() |
---|
[807] | 188 | { |
---|
| 189 | // Add Decay Process |
---|
[1337] | 190 | G4Decay* theDecayProcess = new G4Decay(); |
---|
[807] | 191 | theParticleIterator->reset(); |
---|
| 192 | while( (*theParticleIterator)() ){ |
---|
| 193 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 194 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 195 | if (theDecayProcess->IsApplicable(*particle)) { |
---|
| 196 | pmanager ->AddProcess(theDecayProcess); |
---|
| 197 | // set ordering for PostStepDoIt and AtRestDoIt |
---|
| 198 | pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep); |
---|
| 199 | pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest); |
---|
| 200 | } |
---|
| 201 | } |
---|
| 202 | } |
---|
| 203 | |
---|
| 204 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 205 | |
---|
| 206 | void ExN03PhysicsList::SetCuts() |
---|
| 207 | { |
---|
| 208 | if (verboseLevel >0){ |
---|
| 209 | G4cout << "ExN03PhysicsList::SetCuts:"; |
---|
| 210 | G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl; |
---|
| 211 | } |
---|
| 212 | |
---|
| 213 | // set cut values for gamma at first and for e- second and next for e+, |
---|
| 214 | // because some processes for e+/e- need cut values for gamma |
---|
| 215 | // |
---|
| 216 | SetCutValue(defaultCutValue, "gamma"); |
---|
| 217 | SetCutValue(defaultCutValue, "e-"); |
---|
| 218 | SetCutValue(defaultCutValue, "e+"); |
---|
[1337] | 219 | SetCutValue(defaultCutValue, "proton"); |
---|
[807] | 220 | |
---|
| 221 | if (verboseLevel>0) DumpCutValuesTable(); |
---|
| 222 | } |
---|
| 223 | |
---|
| 224 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 225 | |
---|