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 //
33 //
36 
37 #include "PhysicsList.hh"
38 #include "PhysicsListMessenger.hh"
39 
40 #include "G4EmDNAPhysics.hh"
48 
49 #include "G4UserSpecialCuts.hh"
50 
51 // particles
52 
53 #include "G4BosonConstructor.hh"
54 #include "G4LeptonConstructor.hh"
55 #include "G4MesonConstructor.hh"
56 #include "G4BosonConstructor.hh"
57 #include "G4BaryonConstructor.hh"
58 #include "G4IonConstructor.hh"
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65  fEmPhysicsList(0), fMessenger(0)
66 {
67  fMessenger = new PhysicsListMessenger(this);
68 
69  SetVerboseLevel(1);
70 
71  // EM physics
73 
74 }
75 
76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77 
79 {
80  delete fMessenger;
81  delete fEmPhysicsList;
82 }
83 
84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85 
87 {
88  G4BosonConstructor pBosonConstructor;
89  pBosonConstructor.ConstructParticle();
90 
91  G4LeptonConstructor pLeptonConstructor;
92  pLeptonConstructor.ConstructParticle();
93 
94  G4MesonConstructor pMesonConstructor;
95  pMesonConstructor.ConstructParticle();
96 
97  G4BaryonConstructor pBaryonConstructor;
98  pBaryonConstructor.ConstructParticle();
99 
100  G4IonConstructor pIonConstructor;
101  pIonConstructor.ConstructParticle();
102 
103  G4ShortLivedConstructor pShortLivedConstructor;
104  pShortLivedConstructor.ConstructParticle();
105 
106  G4DNAGenericIonsManager* genericIonsManager;
107  genericIonsManager=G4DNAGenericIonsManager::Instance();
108  genericIonsManager->GetIon("alpha++");
109  genericIonsManager->GetIon("alpha+");
110  genericIonsManager->GetIon("helium");
111  genericIonsManager->GetIon("hydrogen");
112 }
113 
114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115 
116 #include "G4ProcessManager.hh"
117 #include "G4EmProcessOptions.hh"
118 
120 {
121  // transportation
122  //
124 
125  // electromagnetic physics list
126  //
128 
129  // tracking cut
130  //
131  AddTrackingCut();
132 
133 }
134 
135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136 
138 {
139  if (verboseLevel>-1) {
140  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
141  }
142 
143  if (name == fEmName) return;
144 
145  if (name == "dna") {
146  fEmName = name;
147  delete fEmPhysicsList;
149 
150  } else if (name == "dna_opt1") {
151  fEmName = name;
152  delete fEmPhysicsList;
154 
155  } else if (name == "dna_opt2") {
156  fEmName = name;
157  delete fEmPhysicsList;
159 
160  } else if (name == "dna_opt3") {
161  fEmName = name;
162  delete fEmPhysicsList;
164 
165  } else if (name == "dna_opt4") {
166  fEmName = name;
167  delete fEmPhysicsList;
169 
170  } else if (name == "dna_opt5") {
171  fEmName = name;
172  delete fEmPhysicsList;
174 
175  } else if (name == "dna_opt6") {
176  fEmName = name;
177  delete fEmPhysicsList;
179 
180  } else if (name == "dna_opt7") {
181  fEmName = name;
182  delete fEmPhysicsList;
184 
185  } else {
186 
187  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
188  << " is not defined"
189  << G4endl;
190  }
191 }
192 
193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
194 
196 {
198 
200  particleIterator->reset();
201  while ((*particleIterator)())
202  {
204  G4String particleName = particle->GetParticleName();
205 
206  if (particleName == "e-")
207  ph->RegisterProcess(new G4UserSpecialCuts(), particle);
208  }
209 }
210 
211 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......