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");
73  if(CommandLineParser::GetParser()->GetCommandIfActive("-chemOFF")==0)
74  {
75  RegisterConstructor("G4EmDNAChemistry");
76  }
77 
78 }
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83 {
84  delete fEmDNAPhysicsList;
85  delete fEmDNAChemistryList;
86  delete fEmDNAChemistryList1;
87 }
88 
89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90 
92 {
96 }
97 
98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99 
101 {
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109 
111 {
112  if(name == fPhysDNAName) { return; }
113  if(verboseLevel > 0) {
114  G4cout << "===== Register constructor ==== " << name << G4endl;
115  }
116  if(name == "G4EmDNAPhysics") {
117  delete fEmDNAPhysicsList;
119  fPhysDNAName = name;
120  } else if(name == "G4EmDNAPhysics_option1") {
121  delete fEmDNAPhysicsList;
123  fPhysDNAName = name;
124  } else if(name == "G4EmDNAPhysics_option2") {
125  delete fEmDNAPhysicsList;
127  fPhysDNAName = name;
128  } else if(name == "G4EmDNAPhysics_option3") {
129  delete fEmDNAPhysicsList;
131  fPhysDNAName = name;
132  } else if(name == "G4EmDNAPhysics_option4") {
133  delete fEmDNAPhysicsList;
135  fPhysDNAName = name;
136  } else if(name == "G4EmDNAPhysics_option5") {
137  delete fEmDNAPhysicsList;
139  fPhysDNAName = name;
140  } else if(name == "G4EmDNAPhysics_option6") {
141  delete fEmDNAPhysicsList;
143  fPhysDNAName = name;
144  } else if(name == "G4EmDNAPhysics_option7") {
145  delete fEmDNAPhysicsList;
147  fPhysDNAName = name;
148  } else if(name == "G4EmDNAPhysics_option8") {
149  delete fEmDNAPhysicsList;
151  fPhysDNAName = name;
152  } else if(name == "G4EmDNAChemistry") {
153  if(fEmDNAChemistryList || fEmDNAChemistryList1) { return; }
156  } else if(name == "G4EmDNAChemistry_option1") {
157  if(fEmDNAChemistryList || fEmDNAChemistryList1) { return; }
160  } else {
161  G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
162  << " fails - name is not defined"
163  << G4endl;
164  }
165 }
166 
167 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......