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 // Med. Phys. 37 (2010) 4692-4708
30 // Phys. Med. 31 (2015) 861-874
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"
48 #include "G4DecayPhysics.hh"
50 
51 #include "G4UnitsTable.hh"
52 #include "G4SystemOfUnits.hh"
53 #include "G4UserSpecialCuts.hh"
54 
55 // particles
56 
57 #include "G4BosonConstructor.hh"
58 #include "G4LeptonConstructor.hh"
59 #include "G4MesonConstructor.hh"
60 #include "G4BosonConstructor.hh"
61 #include "G4BaryonConstructor.hh"
62 #include "G4IonConstructor.hh"
65 
66 // decay
67 
68 #include "G4RadioactiveDecay.hh"
69 #include "G4SystemOfUnits.hh"
70 #include "G4NuclideTable.hh"
71 #include "G4LossTableManager.hh"
72 #include "G4UAtomicDeexcitation.hh"
73 #include "G4NuclearLevelData.hh"
74 #include "G4DeexPrecoParameters.hh"
75 #include "G4NuclideTable.hh"
76 #include "G4GenericIon.hh"
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81  fEmPhysicsList(0), fMessenger(0)
82 {
83  fMessenger = new PhysicsListMessenger(this);
84 
85  SetVerboseLevel(1);
86 
87  // EM physics
89 
90  // ***Decay physics from rad01 example***
91  //
92 
93  //add new units for radioActive decays
94  //
95  const G4double minute = 60*second;
96  const G4double hour = 60*minute;
97  const G4double day = 24*hour;
98  const G4double year = 365*day;
99  new G4UnitDefinition("minute", "min", "Time", minute);
100  new G4UnitDefinition("hour", "h", "Time", hour);
101  new G4UnitDefinition("day", "d", "Time", day);
102  new G4UnitDefinition("year", "y", "Time", year);
103 
104  // mandatory for G4NuclideTable
105  //
108 
109  //read new PhotonEvaporation data set
110  //
111  G4DeexPrecoParameters* deex =
113 
114  deex->SetCorrelatedGamma(false);
115 
116  deex->SetStoreAllLevels(true);
117 
118  deex->SetMaxLifeTime
119  (G4NuclideTable::GetInstance()->GetThresholdOfHalfLife()/std::log(2.));
120 
121 }
122 
123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124 
126 {
127  delete fMessenger;
128  delete fEmPhysicsList;
129 
130 }
131 
132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133 
135 {
136  G4BosonConstructor pBosonConstructor;
137  pBosonConstructor.ConstructParticle();
138 
139  G4LeptonConstructor pLeptonConstructor;
140  pLeptonConstructor.ConstructParticle();
141 
142  G4MesonConstructor pMesonConstructor;
143  pMesonConstructor.ConstructParticle();
144 
145  G4BaryonConstructor pBaryonConstructor;
146  pBaryonConstructor.ConstructParticle();
147 
148  G4IonConstructor pIonConstructor;
149  pIonConstructor.ConstructParticle();
150 
151  G4ShortLivedConstructor pShortLivedConstructor;
152  pShortLivedConstructor.ConstructParticle();
153 
154 
155  G4DNAGenericIonsManager* genericIonsManager;
156  genericIonsManager=G4DNAGenericIonsManager::Instance();
157  genericIonsManager->GetIon("alpha++");
158  genericIonsManager->GetIon("alpha+");
159  genericIonsManager->GetIon("helium");
160  genericIonsManager->GetIon("hydrogen");
161 }
162 
163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
164 
165 #include "G4ProcessManager.hh"
166 #include "G4EmProcessOptions.hh"
167 
169 {
170  // transportation
171  //
173 
174  // electromagnetic physics list
175  //
177 
178  // tracking cut
179  //
180  AddTrackingCut();
181 
182  // decay
183  //
184 
185  G4RadioactiveDecay* radioactiveDecay = new G4RadioactiveDecay();
186 
187  G4bool ARMflag = true;
188  radioactiveDecay->SetARM(ARMflag); //Atomic Rearangement
189 
190  // need to initialize atomic deexcitation
191  //
193  G4VAtomDeexcitation* deex = man->AtomDeexcitation();
194  if (!deex) {
196  deex = new G4UAtomicDeexcitation();
198  man->SetAtomDeexcitation(deex);
199  }
200 
201  // register radioactiveDecay
202  //
204  ph->RegisterProcess(radioactiveDecay, G4GenericIon::GenericIon());
205 
206  //printout
207  //
208  G4cout << "\n Set atomic relaxation mode " << ARMflag << G4endl;
209 }
210 
211 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
212 
214 {
215  if (verboseLevel>-1) {
216  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
217  }
218 
219  if (name == fEmName) return;
220 
221  if (name == "dna") {
222  fEmName = name;
223  delete fEmPhysicsList;
225 
226  } else if (name == "dna_opt1") {
227  fEmName = name;
228  delete fEmPhysicsList;
230  }
231  else if (name == "dna_opt2") {
232  fEmName = name;
233  delete fEmPhysicsList;
235  }
236  else if (name == "dna_opt3") {
237  fEmName = name;
238  delete fEmPhysicsList;
240  }
241  else if (name == "dna_opt4") {
242  fEmName = name;
243  delete fEmPhysicsList;
245  }
246  else if (name == "dna_opt5") {
247  fEmName = name;
248  delete fEmPhysicsList;
250  }
251  else if (name == "dna_opt6") {
252  fEmName = name;
253  delete fEmPhysicsList;
255  }
256  else if (name == "dna_opt7") {
257  fEmName = name;
258  delete fEmPhysicsList;
260  }
261  else if(name == "std_opt3") {
262  fEmName = name;
263  delete fEmPhysicsList;
265  }
266  else {
267  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
268  << " is not defined"
269  << G4endl;
270  }
271 }
272 
273 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
274 
276 {
278 
280  particleIterator->reset();
281  while( (*particleIterator)() )
282  {
284  G4String particleName = particle->GetParticleName();
285 
286  if (particleName == "e-")
287  ph->RegisterProcess(new G4UserSpecialCuts(), particle);
288  }
289 }
290 
291 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
292 
294 {
295 
296 // SetCutsWithDefault();
297 
298 // or
299 
300  defaultCutValue = 1. * nm;
301  SetCutValue(defaultCutValue, "gamma");
304 
305  G4double lowLimit = 10. * eV;
306  G4double highLimit = 100. * GeV;
307 
309  highLimit);
310 
311  // print cuts
313 
314 }
315