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 publications:
29 // Phys. Med. 31 (2015) 861-874
30 // Med. Phys. 37 (2010) 4692-4708
31 // The Geant4-DNA web site is available at http://geant4-dna.org
32 //
35 
36 #include "PhysicsList.hh"
37 #include "PhysicsListMessenger.hh"
38 
39 #include "G4EmDNAPhysics.hh"
46 
47 #include "G4EmLivermorePhysics.hh"
48 #include "G4EmPenelopePhysics.hh"
49 
50 #include "G4UserSpecialCuts.hh"
51 #include "G4StepLimiter.hh"
52 
53 // particles
54 
55 #include "G4BosonConstructor.hh"
56 #include "G4LeptonConstructor.hh"
57 #include "G4MesonConstructor.hh"
58 #include "G4BosonConstructor.hh"
59 #include "G4BaryonConstructor.hh"
60 #include "G4IonConstructor.hh"
63 
64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65 
67  fEmPhysicsList(0), fMessenger(0)
68 {
69  fMessenger = new PhysicsListMessenger(this);
70 
71  SetVerboseLevel(1);
72 
73  // EM physics
75 
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81 {
82  delete fMessenger;
83  delete fEmPhysicsList;
84 }
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87 
89 {
90  G4BosonConstructor pBosonConstructor;
91  pBosonConstructor.ConstructParticle();
92 
93  G4LeptonConstructor pLeptonConstructor;
94  pLeptonConstructor.ConstructParticle();
95 
96  G4MesonConstructor pMesonConstructor;
97  pMesonConstructor.ConstructParticle();
98 
99  G4BaryonConstructor pBaryonConstructor;
100  pBaryonConstructor.ConstructParticle();
101 
102  G4IonConstructor pIonConstructor;
103  pIonConstructor.ConstructParticle();
104 
105  G4ShortLivedConstructor pShortLivedConstructor;
106  pShortLivedConstructor.ConstructParticle();
107 
108  G4DNAGenericIonsManager* genericIonsManager;
109  genericIonsManager=G4DNAGenericIonsManager::Instance();
110  genericIonsManager->GetIon("alpha++");
111  genericIonsManager->GetIon("alpha+");
112  genericIonsManager->GetIon("helium");
113  genericIonsManager->GetIon("hydrogen");
114 }
115 
116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
117 
118 #include "G4ProcessManager.hh"
119 #include "G4EmProcessOptions.hh"
120 
122 {
123  // transportation
124  //
126 
127  // electromagnetic physics list
128  //
130 
131  // tracking cut
132  //
133  AddTrackingCut();
134 
135  // maximum step size
136  //
137  AddMaxStepSize();
138 
139 }
140 
141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
142 
144 {
145  if (verboseLevel>-1) {
146  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
147  }
148 
149  if (name == fEmName) return;
150 
151  if (name == "dna") {
152  fEmName = name;
153  delete fEmPhysicsList;
155 
156  } else if (name == "dna_opt1") {
157  fEmName = name;
158  delete fEmPhysicsList;
160 
161  } else if (name == "dna_opt2") {
162  fEmName = name;
163  delete fEmPhysicsList;
165 
166  } else if (name == "dna_opt3") {
167  fEmName = name;
168  delete fEmPhysicsList;
170 
171  } else if (name == "dna_opt4") {
172  fEmName = name;
173  delete fEmPhysicsList;
175 
176  } else if (name == "dna_opt5") {
177  fEmName = name;
178  delete fEmPhysicsList;
180 
181  } else if (name == "dna_opt6") {
182  fEmName = name;
183  delete fEmPhysicsList;
185 
186  } else if (name == "liv") {
187  fEmName = name;
188  delete fEmPhysicsList;
190 
191  } else if (name == "pene") {
192  fEmName = name;
193  delete fEmPhysicsList;
195 
196  } else {
197 
198  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
199  << " is not defined"
200  << G4endl;
201  }
202 }
203 
204 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
205 
207 {
208 
210 
212  particleIterator->reset();
213  while ((*particleIterator)())
214  {
216  G4String particleName = particle->GetParticleName();
217 
218  if (particleName == "e-")
219  {
220  ph->RegisterProcess(new G4UserSpecialCuts(), particle);
221  }
222  }
223 }
224 
225 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
226 
228 {
229 
231 
233  particleIterator->reset();
234  while ((*particleIterator)())
235  {
236  G4ParticleDefinition* particle = particleIterator->value();
237  G4String particleName = particle->GetParticleName();
238 
239  if (particleName == "e-")
240  {
241  ph->RegisterProcess(new G4StepLimiter(), particle);
242  }
243  }
244 }
245 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......