ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PhysicsList.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 // This example is provided by the Geant4-DNA collaboration
27 // Any report or published results obtained using the Geant4-DNA software
28 // shall cite the following Geant4-DNA collaboration publication:
29 // Med. Phys. 37 (2010) 4692-4708
30 // and papers
31 // M. Batmunkh et al. J Radiat Res Appl Sci 8 (2015) 498-507
32 // O. Belov et al. Physica Medica 32 (2016) 1510-1520
33 // The Geant4-DNA web site is available at http://geant4-dna.org
34 //
35 // -------------------------------------------------------------------
36 // November 2016
37 // -------------------------------------------------------------------
38 //
39 //
42 
43 #include "PhysicsList.hh"
44 #include "G4SystemOfUnits.hh"
45 #include "CommandLineParser.hh"
46 #include "G4EmParameters.hh"
47 // for discrete physics constructors!
48 #include "G4EmDNAPhysics.hh"
57 #include "G4EmDNAChemistry.hh"
59 // for condensed physics constructors!
60 #include "G4EmLivermorePhysics.hh"
61 #include "G4EmPenelopePhysics.hh"
62 #include "G4EmStandardPhysics.hh"
65 // for hadronic physics constructors!
68 #include "G4StoppingPhysics.hh"
69 #include "G4IonPhysics.hh"
70 #include "G4EmExtraPhysics.hh"
71 #include "G4NeutronTrackingCut.hh"
72 #include "G4DecayPhysics.hh"
74 
76 
77 using namespace G4DNAPARSER ;
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80 
83  fEmPhysicsList(nullptr),
84  fDNAActivator(nullptr),
85  fEmDNAChemistryList(nullptr),
86  fEmDNAChemistryList1(nullptr),
87  fEmName(""), fHadronic(false)
88 {
90  SetDefaultCutValue(currentDefaultCut);
91  SetVerboseLevel(1);
92  // fixe lower limit for cut
94  SetEnergyRange(100*eV, 1*GeV);
95 
96  // Options of combination Geant4-DNA processes (Physics/Chemistry)
97  // with Standard and Hadronic Physics:
98 
99  // a) DNAphysics and Livermore physics inside and outside neuron
100  G4cout<< "Livermore + DNAphysics is activated!"<<G4endl;
101  RegisterConstructor("emlivermore");
102 
103  // 'G4EmParameters' works together with 'G4EmDNAPhysicsActivator'
104  // VI: in this example Livermore is a default in any way
105  // DNA option4 is the default configuration as well
107  /*
108  G4EmParameters::Instance()->AddDNA("Soma","Opt4");
109  G4EmParameters::Instance()->AddDNA("Dendrites","Opt4");
110  G4EmParameters::Instance()->AddDNA("Axon","Opt4");
111  */
112  // b) Livermore + DNAPhysics + DNAChemistry
113  if(CommandLineParser::GetParser()->GetCommandIfActive("-dnachemON"))
114  {
115  G4cout<< "DNAChemistry is activated!"<<G4endl;
117  }
118 
119  // d) "QGSP_BIC_EMY" package from hadrontherapy advanced example
120  if(CommandLineParser::GetParser()->GetCommandIfActive("-dnahad"))
121  {
122  G4cout << "QGSP_BIC is activated!"<<G4endl;
123  RegisterConstructor("QGSP_BIC");
124  fHadronic = true;
125  }
126 }
127 
128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
129 
131 {}
132 
133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
134 
136 {
142 }
143 
144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
145 
147 {
153 }
154 
155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
156 
158 {
159  if(name == fEmName) { return; }
160  if (name == "emstandard_opt0"){
161  fEmName = name;
162  delete fEmPhysicsList;
164 
165  } else if (name == "emstandard_opt3"){
166  fEmName = name;
167  delete fEmPhysicsList;
169 
170  } else if (name == "emstandard_opt4"){
171  fEmName = name;
172  delete fEmPhysicsList;
174 
175  } else if (name == "empenelope"){
176  fEmName = name;
177  delete fEmPhysicsList;
179 
180  } else if (name == "emlivermore"){
181  fEmName = name;
182  delete fEmPhysicsList;
184 
185  } else if(name == "G4EmDNAPhysics") {
186  delete fEmPhysicsList;
188  fEmName = name;
189 
190  } else if(name == "G4EmDNAPhysics_option1") {
191  delete fEmPhysicsList;
193  fEmName = name;
194 
195  } else if(name == "G4EmDNAPhysics_option2") {
196  delete fEmPhysicsList;
198  fEmName = name;
199 
200  } else if(name == "G4EmDNAPhysics_option3") {
201  delete fEmPhysicsList;
203  fEmName = name;
204 
205  } else if(name == "G4EmDNAPhysics_option4") {
206  delete fEmPhysicsList;
208  fEmName = name;
209 
210  } else if(name == "G4EmDNAPhysics_option5") {
211  delete fEmPhysicsList;
213  fEmName = name;
214 
215  } else if(name == "G4EmDNAPhysics_option6") {
216  delete fEmPhysicsList;
218  fEmName = name;
219 
220  } else if(name == "G4EmDNAPhysics_option7") {
221  delete fEmPhysicsList;
223  fEmName = name;
224 
225  } else if(name == "G4EmDNAPhysics_option8") {
226  delete fEmPhysicsList;
228  fEmName = name;
229 
230  } else if(name == "QGSP_BIC") {
231  if(fHadronic) { return; }
232  // Hadron Elastic Physics
233  RegisterConstructor("G4HadronElasticPhysics");
234  // Hadron Inelastic Physics
235  RegisterConstructor("G4HadronPhysicsQGSP_BIC");
236  // Stopping
237  RegisterConstructor("G4StoppingPhysics");
238  // Ion Physics
239  RegisterConstructor("G4IonBinaryCascadePhysics");
240  // Gamma-Lepto nuclear
241  RegisterConstructor("G4EmExtraPhysics");
242  // Limiters
243  RegisterConstructor("G4NeutronTrackingCut");
244  // Decay
245  RegisterConstructor("G4DecayPhysics");
246  // Radioactive decay
247  RegisterConstructor("G4RadioactiveDecayPhysics");
248 
249  } else if(name == "G4EmDNAChemistry") {
250  if(fEmDNAChemistryList || fEmDNAChemistryList1) { return; }
252 
253  } else if(name == "G4EmDNAChemistry_option1") {
254  if(fEmDNAChemistryList || fEmDNAChemistryList1) { return; }
256 
257  } else {
258  G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
259  << " fails - name is not defined"
260  << G4endl;
261  }
262 }
263 
264 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......