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 
27 #include "PhysicsList.hh"
28 #include "G4SystemOfUnits.hh"
29 #include "G4EmDNAPhysics.hh"
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 
44  , fDNAPhysicsList(nullptr)
45  , fChemistryList_option2(nullptr)
46 {
48  SetVerboseLevel(1);
49  RegisterConstructor("G4EmDNAPhysics");
50  RegisterConstructor("G4EmDNAChemistry_option2");
51  //This example works only with G4EmDNAChemistry_option2
53  SetEnergyRange(100*eV, 1*GeV);
54 }
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57 
59 {}
60 
61 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 {
64  if(fDNAPhysicsList != nullptr)
65  {
66  fDNAPhysicsList->ConstructParticle();
67  }
68 
69  if(fChemistryList_option2 != nullptr)
70  {
71  fChemistryList_option2->ConstructParticle();
72  }
73 }
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76 
78 {
80 
81  if(fDNAPhysicsList != nullptr)
82  {
83  fDNAPhysicsList->ConstructProcess();
84  }
85  if(fChemistryList_option2 != nullptr)
86  {
87  fChemistryList_option2->ConstructProcess();
88  }
89 }
90 
91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92 
94 {
95  if(name == fPhysDNAName)
96  {
97  return;
98  }
99 
100  if(verboseLevel > 0)
101  {
102  G4cout << "===== Register constructor ==== " << name << G4endl;
103  }
104 
105  if(name == "G4EmDNAPhysics")
106  {
108  fPhysDNAName = name;
109  }
110  else if(name == "G4EmDNAPhysics_option1")
111  {
113  fPhysDNAName = name;
114  }
115  else if(name == "G4EmDNAPhysics_option2")
116  {
118  fPhysDNAName = name;
119  }
120  else if(name == "G4EmDNAPhysics_option3")
121  {
123  fPhysDNAName = name;
124  }
125  else if(name == "G4EmDNAPhysics_option4")
126  {
128  fPhysDNAName = name;
129  }
130  else if(name == "G4EmDNAPhysics_option5")
131  {
133  fPhysDNAName = name;
134  }
135  else if(name == "G4EmDNAPhysics_option6")
136  {
138  fPhysDNAName = name;
139  }
140  else if(name == "G4EmDNAPhysics_option7")
141  {
143  fPhysDNAName = name;
144  }
145  else if(name == "G4EmDNAPhysics_option8")
146  {
148  fPhysDNAName = name;
149  }
150  else if(name == "G4EmDNAChemistry_option2")
151  {
153  fChemistryList_option2->SetVerboseLevel(verboseLevel);
154  }
155  else
156  {
157  G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
158  << " fails - name is not defined"
159  << G4endl;
160  }
161 }
162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......