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 //
28 //
29 //
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "PhysicsList.hh"
35 #include "PhysicsListMessenger.hh"
36 
37 #include "G4EmStandardPhysics.hh"
38 #include "PhysListEmPolarized.hh"
39 
40 #include "G4EmParameters.hh"
41 
42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43 
46  fEmPhysicsList(0), fEmName("polarized"), fMessenger(0)
47 {
48  fMessenger = new PhysicsListMessenger(this);
49 
51 
52  SetVerboseLevel(1);
53 
55 
56 }
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59 
61 {
62  delete fMessenger;
63 }
64 
65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
66 
67 #include "G4BosonConstructor.hh"
68 #include "G4LeptonConstructor.hh"
69 #include "G4MesonConstructor.hh"
70 #include "G4BosonConstructor.hh"
71 #include "G4BaryonConstructor.hh"
72 #include "G4IonConstructor.hh"
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76 
78 {
79  G4BosonConstructor pBosonConstructor;
80  pBosonConstructor.ConstructParticle();
81 
82  G4LeptonConstructor pLeptonConstructor;
83  pLeptonConstructor.ConstructParticle();
84 
85  G4MesonConstructor pMesonConstructor;
86  pMesonConstructor.ConstructParticle();
87 
88  G4BaryonConstructor pBaryonConstructor;
89  pBaryonConstructor.ConstructParticle();
90 
91  G4IonConstructor pIonConstructor;
92  pIonConstructor.ConstructParticle();
93 
94  G4ShortLivedConstructor pShortLivedConstructor;
95  pShortLivedConstructor.ConstructParticle();
96 
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100 
101 #include "G4EmProcessOptions.hh"
102 
104 {
105  // Transportation
106  //
108 
109  // Electromagnetic physics list
110  //
112 
113  // step limitation (as a full process)
114  //
115  AddStepMax();
116 }
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 
121 {
122  if (verboseLevel>0) {
123  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
124  }
125 
126  if (name == fEmName) return;
127 
128  if (name == "standard") {
129 
130  fEmName = name;
131  delete fEmPhysicsList;
133 
134  } else if (name == "polarized") {
135 
136  fEmName = name;
137  delete fEmPhysicsList;
139 
140  } else {
141  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
142  << " is not defined"
143  << G4endl;
144  }
145 }
146 
147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
148 
149 #include "G4ProcessManager.hh"
150 #include "StepMax.hh"
151 
153 {
154  // Step limitation seen as a process
155  StepMax* stepMaxProcess = new StepMax();
156 
158  particleIterator->reset();
159  while ((*particleIterator)()){
161  G4ProcessManager* pmanager = particle->GetProcessManager();
162 
163  if (stepMaxProcess->IsApplicable(*particle) && pmanager)
164  pmanager ->AddDiscreteProcess(stepMaxProcess);
165  }
166 }
167 
168 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......