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 // J. Comput. Phys. 274 (2014) 841-882
31 // Phys. Med. Biol. 63(10) (2018) 105014-12pp
32 // The Geant4-DNA web site is available at http://geant4-dna.org
33 //
34 //
37 
38 #include "PhysicsList.hh"
39 
40 #include "G4SystemOfUnits.hh"
41 #include "G4EmDNAChemistry.hh"
43 #include "G4EmDNAPhysics.hh"
53 #include "CommandLineParser.hh"
54 #include "G4EmParameters.hh"
55 
56 using namespace G4DNAPARSER;
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59 
62  fEmDNAPhysicsList(nullptr),fEmDNAChemistryList(nullptr),
63  fEmDNAChemistryList1(nullptr),fPhysDNAName("")
64 {
66  // fixe lower limit for cut
68  SetEnergyRange(100*eV, 1*GeV);
69  SetDefaultCutValue(currentDefaultCut);
70  SetVerboseLevel(1);
71 
72  RegisterConstructor("G4EmDNAPhysics_option8");
73  if(CommandLineParser::GetParser()->GetCommandIfActive("-chemOFF")==0)
74  {
75  RegisterConstructor("G4EmDNAChemistry_option1");
76  }
79 
80 }
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 
85 {
86  delete fEmDNAPhysicsList;
87  delete fEmDNAChemistryList;
88  delete fEmDNAChemistryList1;
89 }
90 
91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92 
94 {
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103 {
108 }
109 
110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111 
113 {
114  if(name == fPhysDNAName) { return; }
115  if(verboseLevel > 0) {
116  G4cout << "===== Register constructor ==== " << name << G4endl;
117  }
118  if(name == "G4EmDNAPhysics") {
119  delete fEmDNAPhysicsList;
121  fPhysDNAName = name;
122  } else if(name == "G4EmDNAPhysics_option1") {
123  delete fEmDNAPhysicsList;
125  fPhysDNAName = name;
126  } else if(name == "G4EmDNAPhysics_option2") {
127  delete fEmDNAPhysicsList;
129  fPhysDNAName = name;
130  } else if(name == "G4EmDNAPhysics_option3") {
131  delete fEmDNAPhysicsList;
133  fPhysDNAName = name;
134  } else if(name == "G4EmDNAPhysics_option4") {
135  delete fEmDNAPhysicsList;
137  fPhysDNAName = name;
138  } else if(name == "G4EmDNAPhysics_option5") {
139  delete fEmDNAPhysicsList;
141  fPhysDNAName = name;
142  } else if(name == "G4EmDNAPhysics_option6") {
143  delete fEmDNAPhysicsList;
145  fPhysDNAName = name;
146  } else if(name == "G4EmDNAPhysics_option7") {
147  delete fEmDNAPhysicsList;
149  fPhysDNAName = name;
150  } else if(name == "G4EmDNAPhysics_option8") {
151  delete fEmDNAPhysicsList;
153  fPhysDNAName = name;
154  } else if(name == "G4EmDNAChemistry") {
155  if(fEmDNAChemistryList || fEmDNAChemistryList1) { return; }
158  } else if(name == "G4EmDNAChemistry_option1") {
159  if(fEmDNAChemistryList || fEmDNAChemistryList1) { return; }
162  } else {
163  G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
164  << " fails - name is not defined"
165  << G4endl;
166  }
167 }
168 
169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......