| 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: GammaRayTelPhysicsList.cc,v 1.8 2009/11/18 15:59:05 flongo Exp $
|
|---|
| 28 | // GEANT4 tag $Name: geant4-09-03-cand-01 $
|
|---|
| 29 | //
|
|---|
| 30 | //
|
|---|
| 31 |
|
|---|
| 32 | #include "GammaRayTelPhysicsList.hh"
|
|---|
| 33 |
|
|---|
| 34 | #include "globals.hh"
|
|---|
| 35 | #include "G4ParticleDefinition.hh"
|
|---|
| 36 | #include "G4ParticleWithCuts.hh"
|
|---|
| 37 | #include "G4ProcessManager.hh"
|
|---|
| 38 | #include "G4ProcessVector.hh"
|
|---|
| 39 | #include "G4ParticleTypes.hh"
|
|---|
| 40 | #include "G4ParticleTable.hh"
|
|---|
| 41 |
|
|---|
| 42 | #include "G4Material.hh"
|
|---|
| 43 | #include "G4MaterialTable.hh"
|
|---|
| 44 | #include "G4ios.hh"
|
|---|
| 45 | #include <iomanip>
|
|---|
| 46 |
|
|---|
| 47 | #include "GammaRayTelParticles.hh"
|
|---|
| 48 | #include "GammaRayTelGeneralPhysics.hh"
|
|---|
| 49 | #include "GammaRayTelEMstdPhysics.hh"
|
|---|
| 50 | #include "GammaRayTelEMlowePhysics.hh"
|
|---|
| 51 | #include "GammaRayTelMuonPhysics.hh"
|
|---|
| 52 | #include "GammaRayTelHadronPhysics.hh"
|
|---|
| 53 | #include "GammaRayTelIonPhysics.hh"
|
|---|
| 54 |
|
|---|
| 55 | #include "G4PhysListFactory.hh"
|
|---|
| 56 | #include "G4VPhysicsConstructor.hh"
|
|---|
| 57 | #include "G4EmProcessOptions.hh"
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 | #include "GammaRayTelPhysicsListMessenger.hh"
|
|---|
| 61 |
|
|---|
| 62 | GammaRayTelPhysicsList::GammaRayTelPhysicsList(): G4VModularPhysicsList()
|
|---|
| 63 | {
|
|---|
| 64 | // default cut value (1.0mm)
|
|---|
| 65 | defaultCutValue = 1.0*mm;
|
|---|
| 66 | SetVerboseLevel(1);
|
|---|
| 67 |
|
|---|
| 68 | pMessenger = new GammaRayTelPhysicsListMessenger(this);
|
|---|
| 69 |
|
|---|
| 70 | // Particles
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 | RegisterPhysics( new GammaRayTelParticles("particles") );
|
|---|
| 74 |
|
|---|
| 75 | G4cout << "PARTICLES DONE" << G4endl;
|
|---|
| 76 |
|
|---|
| 77 | // EM physics
|
|---|
| 78 |
|
|---|
| 79 | emPhysicsList = new GammaRayTelEMstdPhysics;
|
|---|
| 80 | emName = G4String("Standard EM");
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 | // General Physics
|
|---|
| 84 |
|
|---|
| 85 | RegisterPhysics( new GammaRayTelGeneralPhysics("general") );
|
|---|
| 86 |
|
|---|
| 87 | G4cout << "GENERAL DONE" << G4endl;
|
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 | // Muon Physics
|
|---|
| 91 |
|
|---|
| 92 | RegisterPhysics( new GammaRayTelMuonPhysics("muon"));
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 | G4cout << "MUON DONE" << G4endl;
|
|---|
| 96 |
|
|---|
| 97 | // Hadron Physics
|
|---|
| 98 | RegisterPhysics( new GammaRayTelHadronPhysics("hadron"));
|
|---|
| 99 |
|
|---|
| 100 | G4cout << "HADRONS DONE" << G4endl;
|
|---|
| 101 |
|
|---|
| 102 | // Ion Physics
|
|---|
| 103 | RegisterPhysics( new GammaRayTelIonPhysics("ion"));
|
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 | G4cout << "IONS DONE" << G4endl;
|
|---|
| 107 |
|
|---|
| 108 | }
|
|---|
| 109 |
|
|---|
| 110 | GammaRayTelPhysicsList::~GammaRayTelPhysicsList()
|
|---|
| 111 | {
|
|---|
| 112 | delete pMessenger;
|
|---|
| 113 | delete emPhysicsList;
|
|---|
| 114 | }
|
|---|
| 115 |
|
|---|
| 116 | #include "G4Region.hh"
|
|---|
| 117 | #include "G4RegionStore.hh"
|
|---|
| 118 | #include "G4ProductionCuts.hh"
|
|---|
| 119 |
|
|---|
| 120 | void GammaRayTelPhysicsList::SetCuts()
|
|---|
| 121 | {
|
|---|
| 122 | if (verboseLevel >0){
|
|---|
| 123 | G4cout << "GammaRayTelPhysicsList::SetCuts: default cut length : "
|
|---|
| 124 | << G4BestUnit(defaultCutValue,"Length") << G4endl;
|
|---|
| 125 | }
|
|---|
| 126 |
|
|---|
| 127 | // These values are used as the default production thresholds
|
|---|
| 128 | // for the world volume.
|
|---|
| 129 |
|
|---|
| 130 | G4cout << "CUT STD" << G4endl;
|
|---|
| 131 |
|
|---|
| 132 | SetCutsWithDefault();
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 | }
|
|---|
| 136 |
|
|---|
| 137 | void GammaRayTelPhysicsList::SetRegionCut(G4double cutvalue)
|
|---|
| 138 | {
|
|---|
| 139 |
|
|---|
| 140 | SetCutsWithDefault();
|
|---|
| 141 |
|
|---|
| 142 | if (verboseLevel >0){
|
|---|
| 143 | G4cout << "GammaRayTelPhysicsList::SetCuts: default cut length : "
|
|---|
| 144 | << G4BestUnit(defaultCutValue,"Length") << G4endl;
|
|---|
| 145 | }
|
|---|
| 146 |
|
|---|
| 147 | G4cout << "CUTS NEW" << G4endl;
|
|---|
| 148 |
|
|---|
| 149 | // Production thresholds for detector regions
|
|---|
| 150 |
|
|---|
| 151 | G4String regName[] = {"Calorimeter","Tracker"};
|
|---|
| 152 | // G4double cutValue[] = {1*mm, 0.1*mm};
|
|---|
| 153 | G4double cutValue[] = {cutvalue, cutvalue/10.};
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 | for(G4int i=0;i<2;i++)
|
|---|
| 158 | {
|
|---|
| 159 | G4Region* reg = G4RegionStore::GetInstance()->GetRegion(regName[i]);
|
|---|
| 160 | G4ProductionCuts* cuts = new G4ProductionCuts;
|
|---|
| 161 | cuts->SetProductionCut(cutValue[i]);
|
|---|
| 162 | reg->SetProductionCuts(cuts);
|
|---|
| 163 | }
|
|---|
| 164 |
|
|---|
| 165 | }
|
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 169 |
|
|---|
| 170 | void GammaRayTelPhysicsList::AddPhysicsList(const G4String& name)
|
|---|
| 171 | {
|
|---|
| 172 |
|
|---|
| 173 | if (verboseLevel>1) {
|
|---|
| 174 | G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
|
|---|
| 175 | }
|
|---|
| 176 |
|
|---|
| 177 | if (name == "Standard EM") {
|
|---|
| 178 |
|
|---|
| 179 | emName = name;
|
|---|
| 180 | delete emPhysicsList;
|
|---|
| 181 | emPhysicsList = new GammaRayTelEMstdPhysics();
|
|---|
| 182 | G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: EM Standard" << G4endl;
|
|---|
| 183 |
|
|---|
| 184 | } else if (name == "LowE EM") {
|
|---|
| 185 | emName = name;
|
|---|
| 186 | delete emPhysicsList;
|
|---|
| 187 | emPhysicsList = new GammaRayTelEMlowePhysics();;
|
|---|
| 188 | G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: EM LowE" << G4endl;
|
|---|
| 189 | }
|
|---|
| 190 | else {
|
|---|
| 191 | G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
|
|---|
| 192 | << " is not defined"
|
|---|
| 193 | << G4endl;
|
|---|
| 194 | }
|
|---|
| 195 |
|
|---|
| 196 |
|
|---|
| 197 | G4cout << "REGISTRATION DONE " << G4endl;
|
|---|
| 198 |
|
|---|
| 199 | RegisterPhysics(emPhysicsList);
|
|---|
| 200 |
|
|---|
| 201 | }
|
|---|