| 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: AXPETPhysicsList.cc,v 1.2 2010/11/16 13:38:09 tnikitin Exp $
|
|---|
| 27 | // ------------------------------------------------------------
|
|---|
| 28 | // Geant4 class implementation file
|
|---|
| 29 | //
|
|---|
| 30 | // 03/09/2008, by T.Nikitina
|
|---|
| 31 | // ------------------------------------------------------------
|
|---|
| 32 |
|
|---|
| 33 | #include "globals.hh"
|
|---|
| 34 | #include "AXPETPhysicsList.hh"
|
|---|
| 35 |
|
|---|
| 36 | #include "G4ParticleDefinition.hh"
|
|---|
| 37 | #include "G4ParticleTypes.hh"
|
|---|
| 38 | #include "G4ParticleTable.hh"
|
|---|
| 39 |
|
|---|
| 40 | #include "G4Material.hh"
|
|---|
| 41 | #include "G4MaterialTable.hh"
|
|---|
| 42 |
|
|---|
| 43 | #include "G4ProcessManager.hh"
|
|---|
| 44 | #include "G4ProcessVector.hh"
|
|---|
| 45 |
|
|---|
| 46 | #include "G4Cerenkov.hh"
|
|---|
| 47 | #include "G4Scintillation.hh"
|
|---|
| 48 | #include "G4OpAbsorption.hh"
|
|---|
| 49 | #include "G4OpRayleigh.hh"
|
|---|
| 50 | #include "G4OpBoundaryProcess.hh"
|
|---|
| 51 | #include "G4OpWLS.hh"
|
|---|
| 52 |
|
|---|
| 53 | AXPETPhysicsList::AXPETPhysicsList() : G4VUserPhysicsList()
|
|---|
| 54 | {
|
|---|
| 55 | theCerenkovProcess = 0;
|
|---|
| 56 | theScintillationProcess = 0;
|
|---|
| 57 | theAbsorptionProcess = 0;
|
|---|
| 58 | theRayleighScatteringProcess = 0;
|
|---|
| 59 | theBoundaryProcess = 0;
|
|---|
| 60 | theOpWLSProcess = 0;
|
|---|
| 61 |
|
|---|
| 62 | SetVerboseLevel(0);
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| 65 | AXPETPhysicsList::~AXPETPhysicsList()
|
|---|
| 66 | {;}
|
|---|
| 67 |
|
|---|
| 68 | void AXPETPhysicsList::ConstructParticle()
|
|---|
| 69 | {
|
|---|
| 70 | // Construct bosons
|
|---|
| 71 | // gamma
|
|---|
| 72 | G4Gamma::GammaDefinition();
|
|---|
| 73 |
|
|---|
| 74 | // optical photon
|
|---|
| 75 | G4OpticalPhoton::OpticalPhotonDefinition();
|
|---|
| 76 |
|
|---|
| 77 | // Construct Leptons
|
|---|
| 78 | G4Electron::ElectronDefinition();
|
|---|
| 79 | G4Positron::PositronDefinition();
|
|---|
| 80 | G4NeutrinoE::NeutrinoEDefinition();
|
|---|
| 81 | G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
|---|
| 82 | G4MuonPlus::MuonPlusDefinition();
|
|---|
| 83 | G4MuonMinus::MuonMinusDefinition();
|
|---|
| 84 | G4NeutrinoMu::NeutrinoMuDefinition();
|
|---|
| 85 | G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
|---|
| 86 |
|
|---|
| 87 | // Construct mesons
|
|---|
| 88 | G4PionPlus::PionPlusDefinition();
|
|---|
| 89 | G4PionMinus::PionMinusDefinition();
|
|---|
| 90 | G4PionZero::PionZeroDefinition();
|
|---|
| 91 |
|
|---|
| 92 | G4cout << "All particles constructed" << G4endl;
|
|---|
| 93 | }
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 | void AXPETPhysicsList::ConstructProcess()
|
|---|
| 97 | {
|
|---|
| 98 | AddTransportation();
|
|---|
| 99 | ConstructGeneral();
|
|---|
| 100 | ConstructEM();
|
|---|
| 101 | ConstructOp();
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 | #include "G4Decay.hh"
|
|---|
| 106 |
|
|---|
| 107 | void AXPETPhysicsList::ConstructGeneral()
|
|---|
| 108 | {
|
|---|
| 109 | // Add Decay Process
|
|---|
| 110 | G4Decay* theDecayProcess = new G4Decay();
|
|---|
| 111 | theParticleIterator->reset();
|
|---|
| 112 | while( (*theParticleIterator)() ){
|
|---|
| 113 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 114 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 115 | if (theDecayProcess->IsApplicable(*particle)) {
|
|---|
| 116 | pmanager ->AddProcess(theDecayProcess);
|
|---|
| 117 | // set ordering for PostStepDoIt and AtRestDoIt
|
|---|
| 118 | pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
|
|---|
| 119 | pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
|
|---|
| 120 | }
|
|---|
| 121 | }
|
|---|
| 122 | G4cout << "General processes constructed" << G4endl;
|
|---|
| 123 |
|
|---|
| 124 | }
|
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 | #include "G4ComptonScattering.hh"
|
|---|
| 128 | #include "G4GammaConversion.hh"
|
|---|
| 129 | #include "G4PhotoElectricEffect.hh"
|
|---|
| 130 |
|
|---|
| 131 | #include "G4eMultipleScattering.hh"
|
|---|
| 132 | #include "G4MuMultipleScattering.hh"
|
|---|
| 133 | #include "G4hMultipleScattering.hh"
|
|---|
| 134 |
|
|---|
| 135 | #include "G4eIonisation.hh"
|
|---|
| 136 | #include "G4eBremsstrahlung.hh"
|
|---|
| 137 | #include "G4eplusAnnihilation.hh"
|
|---|
| 138 |
|
|---|
| 139 | #include "G4MuIonisation.hh"
|
|---|
| 140 | #include "G4MuBremsstrahlung.hh"
|
|---|
| 141 | #include "G4MuPairProduction.hh"
|
|---|
| 142 |
|
|---|
| 143 | #include "G4hIonisation.hh"
|
|---|
| 144 |
|
|---|
| 145 | void AXPETPhysicsList::ConstructEM()
|
|---|
| 146 | {
|
|---|
| 147 | theParticleIterator->reset();
|
|---|
| 148 | while( (*theParticleIterator)() ){
|
|---|
| 149 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 150 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 151 | G4String particleName = particle->GetParticleName();
|
|---|
| 152 |
|
|---|
| 153 | if (particleName == "gamma") {
|
|---|
| 154 | // gamma
|
|---|
| 155 | // Construct processes for gamma
|
|---|
| 156 | pmanager->AddDiscreteProcess(new G4GammaConversion());
|
|---|
| 157 | pmanager->AddDiscreteProcess(new G4ComptonScattering());
|
|---|
| 158 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
|
|---|
| 159 |
|
|---|
| 160 | } else if (particleName == "e-") {
|
|---|
| 161 | //electron
|
|---|
| 162 | // Construct processes for electron
|
|---|
| 163 | pmanager->AddProcess(new G4eMultipleScattering(),-1, 1, 1);
|
|---|
| 164 | pmanager->AddProcess(new G4eIonisation(), -1, 2, 2);
|
|---|
| 165 | pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3, 3);
|
|---|
| 166 |
|
|---|
| 167 | } else if (particleName == "e+") {
|
|---|
| 168 | //positron
|
|---|
| 169 | // Construct processes for positron
|
|---|
| 170 | pmanager->AddProcess(new G4eMultipleScattering(),-1, 1, 1);
|
|---|
| 171 | pmanager->AddProcess(new G4eIonisation(), -1, 2, 2);
|
|---|
| 172 | pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3, 3);
|
|---|
| 173 | pmanager->AddProcess(new G4eplusAnnihilation(), 0,-1, 4);
|
|---|
| 174 |
|
|---|
| 175 | } else if( particleName == "mu+" ||
|
|---|
| 176 | particleName == "mu-" ) {
|
|---|
| 177 | //muon
|
|---|
| 178 | // Construct processes for muon
|
|---|
| 179 | pmanager->AddProcess(new G4MuMultipleScattering(),-1, 1, 1);
|
|---|
| 180 | pmanager->AddProcess(new G4MuIonisation(), -1, 2, 2);
|
|---|
| 181 | pmanager->AddProcess(new G4MuBremsstrahlung(), -1, 3, 3);
|
|---|
| 182 | pmanager->AddProcess(new G4MuPairProduction(), -1, 4, 4);
|
|---|
| 183 |
|
|---|
| 184 | } else {
|
|---|
| 185 | if ((particle->GetPDGCharge() != 0.0) &&
|
|---|
| 186 | (particle->GetParticleName() != "chargedgeantino")) {
|
|---|
| 187 | // all others charged particles except geantino
|
|---|
| 188 | pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
|
|---|
| 189 | pmanager->AddProcess(new G4hIonisation(), -1,2,2);
|
|---|
| 190 | }
|
|---|
| 191 | }
|
|---|
| 192 | }
|
|---|
| 193 | G4cout << "EM physics constructed" << G4endl;
|
|---|
| 194 |
|
|---|
| 195 | }
|
|---|
| 196 |
|
|---|
| 197 | void AXPETPhysicsList::ConstructOp()
|
|---|
| 198 | {
|
|---|
| 199 | theCerenkovProcess = new G4Cerenkov("Cerenkov");
|
|---|
| 200 | theScintillationProcess = new G4Scintillation("Scintillation");
|
|---|
| 201 | theAbsorptionProcess = new G4OpAbsorption();
|
|---|
| 202 | theRayleighScatteringProcess = new G4OpRayleigh();
|
|---|
| 203 | theBoundaryProcess = new G4OpBoundaryProcess();
|
|---|
| 204 | theOpWLSProcess = new G4OpWLS();
|
|---|
| 205 |
|
|---|
| 206 | theCerenkovProcess->SetTrackSecondariesFirst(true);
|
|---|
| 207 |
|
|---|
| 208 | //this is to force the same scintillitation yield for all particle types
|
|---|
| 209 | theScintillationProcess->SetScintillationYieldFactor(1.);
|
|---|
| 210 | theScintillationProcess->SetTrackSecondariesFirst(true);
|
|---|
| 211 |
|
|---|
| 212 | // G4OpticalSurfaceModel themodel = glisur;
|
|---|
| 213 | G4OpticalSurfaceModel themodel = unified;
|
|---|
| 214 | theBoundaryProcess->SetModel(themodel);
|
|---|
| 215 | // theBoundaryProcess->SetVerboseLevel(1);
|
|---|
| 216 |
|
|---|
| 217 | // Selects the time profile generator
|
|---|
| 218 | theOpWLSProcess->UseTimeProfile("exponential"); // or ("delta");
|
|---|
| 219 |
|
|---|
| 220 | theParticleIterator->reset();
|
|---|
| 221 | while( (*theParticleIterator)() ){
|
|---|
| 222 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 223 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 224 | G4String particleName = particle->GetParticleName();
|
|---|
| 225 | if (theCerenkovProcess->IsApplicable(*particle)) {
|
|---|
| 226 | pmanager->AddProcess(theCerenkovProcess);
|
|---|
| 227 | pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);
|
|---|
| 228 |
|
|---|
| 229 | }
|
|---|
| 230 | if (theScintillationProcess->IsApplicable(*particle)) {
|
|---|
| 231 | pmanager->AddProcess(theScintillationProcess);
|
|---|
| 232 | pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
|
|---|
| 233 | pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
|
|---|
| 234 | }
|
|---|
| 235 | if (particleName == "opticalphoton") {
|
|---|
| 236 | G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
|
|---|
| 237 | pmanager->AddDiscreteProcess(theAbsorptionProcess);
|
|---|
| 238 | pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
|
|---|
| 239 | pmanager->AddDiscreteProcess(theBoundaryProcess);
|
|---|
| 240 | pmanager->AddDiscreteProcess(theOpWLSProcess);
|
|---|
| 241 | }
|
|---|
| 242 | }
|
|---|
| 243 | G4cout << "Optical photon physics constructed" << G4endl;
|
|---|
| 244 |
|
|---|
| 245 | }
|
|---|
| 246 |
|
|---|
| 247 |
|
|---|
| 248 | void AXPETPhysicsList::SetCuts()
|
|---|
| 249 | {
|
|---|
| 250 | // " G4VUserPhysicsList::SetCutsWithDefault" method sets
|
|---|
| 251 | // the default cut value for all particle types
|
|---|
| 252 | //
|
|---|
| 253 | SetCutsWithDefault();
|
|---|
| 254 |
|
|---|
| 255 | if (verboseLevel>0) DumpCutValuesTable();
|
|---|
| 256 | }
|
|---|