Geant4_10
GammaRayTelPhysicsList.cc
Go to the documentation of this file.
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 66508 2012-12-19 10:16:45Z gcosmo $
28 //
29 //
30 #include <iomanip>
31 
33 
34 #include "globals.hh"
35 #include "G4SystemOfUnits.hh"
36 #include "G4ParticleDefinition.hh"
37 #include "G4ParticleWithCuts.hh"
38 #include "G4ProcessManager.hh"
39 #include "G4ProcessVector.hh"
40 #include "G4ParticleTypes.hh"
41 #include "G4ParticleTable.hh"
42 
43 #include "G4Material.hh"
44 #include "G4MaterialTable.hh"
45 #include "G4ios.hh"
46 
47 #include "GammaRayTelParticles.hh"
53 #include "GammaRayTelIonPhysics.hh"
54 
55 #include "G4PhysListFactory.hh"
56 #include "G4VPhysicsConstructor.hh"
57 #include "G4EmProcessOptions.hh"
58 
59 
61 
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 
86 
87  G4cout << "GENERAL DONE" << G4endl;
88 
89 
90  // Muon Physics
91 
93 
94 
95  G4cout << "MUON DONE" << G4endl;
96 
97  // Hadron Physics
99 
100  G4cout << "HADRONS DONE" << G4endl;
101 
102  // Ion Physics
104 
105 
106  G4cout << "IONS DONE" << G4endl;
107 
108 }
109 
111 {
112  delete pMessenger;
113  // delete emPhysicsList;
114 }
115 
116 #include "G4Region.hh"
117 #include "G4RegionStore.hh"
118 #include "G4ProductionCuts.hh"
119 
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 
133 
134 
135 }
136 
138 {
139 
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]);
161  cuts->SetProductionCut(cutValue[i]);
162  reg->SetProductionCuts(cuts);
163  }
164 
165 }
166 
167 
169 
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 }
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
void RegisterPhysics(G4VPhysicsConstructor *)
const XML_Char * name
Definition: expat.h:151
void SetProductionCut(G4double cut, G4int index=-1)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
int G4int
Definition: G4Types.hh:78
void AddPhysicsList(const G4String &name)
static G4RegionStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
void SetVerboseLevel(G4int value)
#define G4endl
Definition: G4ios.hh:61
void SetProductionCuts(G4ProductionCuts *cut)
double G4double
Definition: G4Types.hh:76