ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GammaRayTelPhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GammaRayTelPhysicsList.cc
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 // Authors: Susanna Guatelli, susanna@uow.edu.au,
27 // Authors: Jeremy Davis, jad028@uowmail.edu.au
28 //
29 // Code based on the hadrontherapy && radioprotection advanced example
30 
33 #include "G4PhysListFactory.hh"
34 #include "G4VPhysicsConstructor.hh"
35 
36 // Physic lists (contained inside the Geant4 distribution)
38 #include "G4EmLivermorePhysics.hh"
39 #include "G4EmPenelopePhysics.hh"
40 #include "G4EmLivermorePolarizedPhysics.hh" // TBC
41 
42 #include "G4DecayPhysics.hh"
47 #include "G4Decay.hh"
48 #include "G4StepLimiter.hh"
49 #include "G4LossTableManager.hh"
50 #include "G4UnitsTable.hh"
51 #include "G4SystemOfUnits.hh"
52 #include "G4ProcessManager.hh"
53 
54 #include "G4IonFluctuations.hh"
56 #include "G4EmProcessOptions.hh"
59 
62 {
68 
69  helIsRegisted = false;
70  bicIsRegisted = false;
71  biciIsRegisted = false;
74 
76 
77  SetVerboseLevel(1);
78 
79  // EM physics
81  emName = G4String("emstandard_opt3");
82 
83  // Decay physics and all particles
85 }
86 
89 {
90  delete pMessenger;
91  delete emPhysicsList;
92  delete decPhysicsList;
93  for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
94 }
95 
98 {
99  G4PhysListFactory factory;
100  G4VModularPhysicsList* phys =factory.GetReferencePhysList(name);
101  G4int i=0;
102  const G4VPhysicsConstructor* elem= phys->GetPhysics(i);
103  G4VPhysicsConstructor* tmp = const_cast<G4VPhysicsConstructor*> (elem);
104  while (elem !=0)
105  {
106  RegisterPhysics(tmp);
107  elem= phys->GetPhysics(++i) ;
108  tmp = const_cast<G4VPhysicsConstructor*> (elem);
109  }
110 }
111 
114 {
116 }
117 
120 {
121  // transportation
122  //
124 
125  // electromagnetic physics list
126  //
129 
130  // decay physics list
131  //
133 
134  // hadronic physics lists
135  for(size_t i=0; i<hadronPhys.size(); i++) {
136  hadronPhys[i]->ConstructProcess();
137  }
138 
139  // step limitation (as a full process)
140  //
141  // AddStepMax();
142 }
143 
146 {
147 
148  if (verboseLevel>1) {
149  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
150  }
151  if (name == emName) return;
152 
154  // ELECTROMAGNETIC MODELS
156 
157  if (name == "standard_opt3") {
158  emName = name;
159  delete emPhysicsList;
161  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option3" << G4endl;
162 
163  } else if (name == "LowE_Livermore") {
164  emName = name;
165  delete emPhysicsList;
167  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
168  } else if (name == "LowE_Penelope") {
169  emName = name;
170  delete emPhysicsList;
172  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
173  } else if (name == "LowE_Polarized") {
174  emName = name;
175  delete emPhysicsList;
177  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
178 
180  // HADRONIC MODELS
182  } else if (name == "elastic" && !helIsRegisted) {
183  G4cout << "THE FOLLOWING HADRONIC ELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronElasticPhysics()" << G4endl;
184  hadronPhys.push_back( new G4HadronElasticPhysics());
185  helIsRegisted = true;
186 
187  } else if (name == "DElastic" && !helIsRegisted) {
188  hadronPhys.push_back( new G4HadronDElasticPhysics());
189  helIsRegisted = true;
190 
191  } else if (name == "HPElastic" && !helIsRegisted) {
192  hadronPhys.push_back( new G4HadronElasticPhysicsHP());
193  helIsRegisted = true;
194 
195  } else if (name == "binary" && !bicIsRegisted) {
196  hadronPhys.push_back(new G4HadronPhysicsQGSP_BIC_HP());
197  bicIsRegisted = true;
198  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: HadronPhysicsQGSP_BIC_HP()" << G4endl;
199 
200  } else if (name == "binary_ion" && !biciIsRegisted) {
201  hadronPhys.push_back(new G4IonBinaryCascadePhysics());
202  biciIsRegisted = true;
203  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4IonBinaryCascadePhysics()" << G4endl;
204  } else if (name == "radioactive_decay" && !radioactiveDecayIsRegisted ) {
205  hadronPhys.push_back(new G4RadioactiveDecayPhysics());
207  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4RadioactiveDecayPhysics()" << G4endl;
208  } else {
209 
210  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
211  << " is not defined"
212  << G4endl;
213  }
214 }
215 
218 {
219 
220  if (verboseLevel >0){
221  G4cout << "PhysicsList::SetCuts:";
222  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
223  }
224 
225  G4double lowLimit = 250. * eV;
226  G4double highLimit = 100. * GeV;
228 
229  // set cut values for gamma at first and for e- second and next for e+,
230  // because some processes for e+/e- need cut values for gamma
231  SetCutValue(cutForGamma, "gamma");
234 
236 }
237 
239 {
240  cutForGamma = cut;
242 }
243 
245 {
246  cutForElectron = cut;
248 }
249 
251 {
252  cutForPositron = cut;
254 }
255