| 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 | // $Id: TstDrawVox01PhysicsList.cc,v 1.6 2006/06/29 18:35:21 gunter Exp $
|
|---|
| 27 | // ------------------------------------------------------------
|
|---|
| 28 | // GEANT 4 class header file
|
|---|
| 29 | //
|
|---|
| 30 | // This is a version for maximum particle set
|
|---|
| 31 | // History
|
|---|
| 32 | // first version 10 Jan. 1998 by H.Kurashige
|
|---|
| 33 | // add decay at rest 26 Feb. 1998 by H.Kurashige
|
|---|
| 34 | // ------------------------------------------------------------
|
|---|
| 35 |
|
|---|
| 36 | #include "globals.hh"
|
|---|
| 37 | #include "TstDrawVox01PhysicsList.hh"
|
|---|
| 38 | #include "G4ParticleDefinition.hh"
|
|---|
| 39 | #include "G4ParticleWithCuts.hh"
|
|---|
| 40 | #include "G4ProcessManager.hh"
|
|---|
| 41 | #include "G4ProcessVector.hh"
|
|---|
| 42 | #include "G4ParticleTypes.hh"
|
|---|
| 43 | #include "G4ParticleTable.hh"
|
|---|
| 44 | #include "G4BosonConstructor.hh"
|
|---|
| 45 | #include "G4LeptonConstructor.hh"
|
|---|
| 46 | #include "G4MesonConstructor.hh"
|
|---|
| 47 | #include "G4BaryonConstructor.hh"
|
|---|
| 48 | #include "G4IonConstructor.hh"
|
|---|
| 49 | #include "G4Material.hh"
|
|---|
| 50 | #include "G4MaterialTable.hh"
|
|---|
| 51 | #include "G4ios.hh"
|
|---|
| 52 | #include <iomanip>
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 | TstDrawVox01PhysicsList::TstDrawVox01PhysicsList(): G4VUserPhysicsList()
|
|---|
| 56 | {
|
|---|
| 57 | SetVerboseLevel(1);
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | TstDrawVox01PhysicsList::~TstDrawVox01PhysicsList()
|
|---|
| 61 | {
|
|---|
| 62 | }
|
|---|
| 63 |
|
|---|
| 64 | void TstDrawVox01PhysicsList::ConstructParticle()
|
|---|
| 65 | {
|
|---|
| 66 | // In this method, static member functions should be called
|
|---|
| 67 | // for all particles which you want to use.
|
|---|
| 68 | // This ensures that objects of these particle types will be
|
|---|
| 69 | // created in the program.
|
|---|
| 70 |
|
|---|
| 71 | ConstructBosons();
|
|---|
| 72 | ConstructLeptons();
|
|---|
| 73 | ConstructMesons();
|
|---|
| 74 | ConstructBaryons();
|
|---|
| 75 |
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | void TstDrawVox01PhysicsList::ConstructBosons()
|
|---|
| 79 | {
|
|---|
| 80 | // pseudo-particles
|
|---|
| 81 | G4Geantino::GeantinoDefinition();
|
|---|
| 82 | G4ChargedGeantino::ChargedGeantinoDefinition();
|
|---|
| 83 |
|
|---|
| 84 | // gamma
|
|---|
| 85 | G4Gamma::GammaDefinition();
|
|---|
| 86 |
|
|---|
| 87 | // optical photon
|
|---|
| 88 | G4OpticalPhoton::OpticalPhotonDefinition();
|
|---|
| 89 | }
|
|---|
| 90 |
|
|---|
| 91 | void TstDrawVox01PhysicsList::ConstructLeptons()
|
|---|
| 92 | {
|
|---|
| 93 | // Construct all leptons
|
|---|
| 94 | G4LeptonConstructor pConstructor;
|
|---|
| 95 | pConstructor.ConstructParticle();
|
|---|
| 96 | }
|
|---|
| 97 |
|
|---|
| 98 | void TstDrawVox01PhysicsList::ConstructMesons()
|
|---|
| 99 | {
|
|---|
| 100 | // Construct all mesons
|
|---|
| 101 | G4MesonConstructor pConstructor;
|
|---|
| 102 | pConstructor.ConstructParticle();
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 | void TstDrawVox01PhysicsList::ConstructBaryons()
|
|---|
| 106 | {
|
|---|
| 107 | // Construct all baryons
|
|---|
| 108 | G4BaryonConstructor pConstructor;
|
|---|
| 109 | pConstructor.ConstructParticle();
|
|---|
| 110 | }
|
|---|
| 111 |
|
|---|
| 112 | void TstDrawVox01PhysicsList::ConstructIons()
|
|---|
| 113 | {
|
|---|
| 114 | // Construct light ions
|
|---|
| 115 | G4IonConstructor pConstructor;
|
|---|
| 116 | pConstructor.ConstructParticle();
|
|---|
| 117 | }
|
|---|
| 118 |
|
|---|
| 119 | void TstDrawVox01PhysicsList::ConstructProcess()
|
|---|
| 120 | {
|
|---|
| 121 | AddTransportation();
|
|---|
| 122 | ConstructEM();
|
|---|
| 123 | ConstructLeptHad();
|
|---|
| 124 | ConstructHad();
|
|---|
| 125 | ConstructGeneral();
|
|---|
| 126 | }
|
|---|
| 127 |
|
|---|
| 128 | #include "G4ComptonScattering.hh"
|
|---|
| 129 | #include "G4GammaConversion.hh"
|
|---|
| 130 | #include "G4PhotoElectricEffect.hh"
|
|---|
| 131 |
|
|---|
| 132 | #include "G4MultipleScattering.hh"
|
|---|
| 133 |
|
|---|
| 134 | #include "G4eIonisation.hh"
|
|---|
| 135 | #include "G4eBremsstrahlung.hh"
|
|---|
| 136 | #include "G4eplusAnnihilation.hh"
|
|---|
| 137 |
|
|---|
| 138 | #include "G4MuIonisation.hh"
|
|---|
| 139 | #include "G4MuBremsstrahlung.hh"
|
|---|
| 140 | #include "G4MuPairProduction.hh"
|
|---|
| 141 |
|
|---|
| 142 | #include "G4hIonisation.hh"
|
|---|
| 143 | void TstDrawVox01PhysicsList::ConstructEM()
|
|---|
| 144 | {
|
|---|
| 145 | theParticleIterator->reset();
|
|---|
| 146 | while( (*theParticleIterator)() ){
|
|---|
| 147 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 148 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 149 | G4String particleName = particle->GetParticleName();
|
|---|
| 150 |
|
|---|
| 151 | if (particleName == "gamma") {
|
|---|
| 152 | // gamma
|
|---|
| 153 | // Construct processes for gamma
|
|---|
| 154 | pmanager->AddDiscreteProcess(new G4GammaConversion());
|
|---|
| 155 | pmanager->AddDiscreteProcess(new G4ComptonScattering());
|
|---|
| 156 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
|
|---|
| 157 |
|
|---|
| 158 | } else if (particleName == "e-") {
|
|---|
| 159 | //electron
|
|---|
| 160 | // Construct processes for electron
|
|---|
| 161 | pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
|
|---|
| 162 | pmanager->AddProcess(new G4eIonisation(),-1,2,2);
|
|---|
| 163 | pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
|
|---|
| 164 |
|
|---|
| 165 | } else if (particleName == "e+") {
|
|---|
| 166 | //positron
|
|---|
| 167 | // Construct processes for positron
|
|---|
| 168 | pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
|
|---|
| 169 |
|
|---|
| 170 | pmanager->AddProcess(new G4eIonisation(),-1,2,2);
|
|---|
| 171 | pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
|
|---|
| 172 | pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);
|
|---|
| 173 |
|
|---|
| 174 | } else if( particleName == "mu+" ||
|
|---|
| 175 | particleName == "mu-" ) {
|
|---|
| 176 | //muon
|
|---|
| 177 | // Construct processes for muon+
|
|---|
| 178 | pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
|
|---|
| 179 | pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
|
|---|
| 180 | pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
|
|---|
| 181 | pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
|
|---|
| 182 |
|
|---|
| 183 | } else {
|
|---|
| 184 | if ((particle->GetPDGCharge() != 0.0) &&
|
|---|
| 185 | (particle->GetParticleName() != "chargedgeantino")) {
|
|---|
| 186 | // all others charged particles except geantino
|
|---|
| 187 | pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
|
|---|
| 188 | pmanager->AddProcess(new G4hIonisation(),-1,2,2);
|
|---|
| 189 | }
|
|---|
| 190 | }
|
|---|
| 191 | }
|
|---|
| 192 | }
|
|---|
| 193 |
|
|---|
| 194 | void TstDrawVox01PhysicsList::ConstructHad()
|
|---|
| 195 | {;}
|
|---|
| 196 |
|
|---|
| 197 | void TstDrawVox01PhysicsList::ConstructLeptHad()
|
|---|
| 198 | {;}
|
|---|
| 199 |
|
|---|
| 200 | #include "G4Decay.hh"
|
|---|
| 201 | void TstDrawVox01PhysicsList::ConstructGeneral()
|
|---|
| 202 | {
|
|---|
| 203 | G4Decay* theDecayProcess = new G4Decay();
|
|---|
| 204 | theParticleIterator->reset();
|
|---|
| 205 | while( (*theParticleIterator)() ){
|
|---|
| 206 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 207 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 208 | if (theDecayProcess->IsApplicable(*particle)) {
|
|---|
| 209 | pmanager->AddProcess(theDecayProcess, INT_MAX, -1, INT_MAX);
|
|---|
| 210 | }
|
|---|
| 211 | }
|
|---|
| 212 | }
|
|---|
| 213 |
|
|---|
| 214 | void TstDrawVox01PhysicsList::SetCuts()
|
|---|
| 215 | {
|
|---|
| 216 | if (verboseLevel >1){
|
|---|
| 217 | G4cout << "TstDrawVox01PhysicsList::SetCuts:";
|
|---|
| 218 | }
|
|---|
| 219 | // " G4VUserPhysicsList::SetCutsWithDefault" method sets
|
|---|
| 220 | // the default cut value for all particle types
|
|---|
| 221 | SetCutsWithDefault();
|
|---|
| 222 | }
|
|---|
| 223 |
|
|---|
| 224 |
|
|---|