ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eRositaPhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file eRositaPhysicsList.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 //
28 
29 #include "globals.hh"
30 
31 #include "eRositaPhysicsList.hh"
32 
33 #include "G4SystemOfUnits.hh"
34 #include "G4ProcessManager.hh"
35 #include "G4ParticleTypes.hh"
36 
37 #include "G4PhotoElectricEffect.hh"
38 #include "G4ComptonScattering.hh"
39 #include "G4GammaConversion.hh"
40 #include "G4RayleighScattering.hh"
41 
42 #include "G4eIonisation.hh"
43 #include "G4eBremsstrahlung.hh"
44 
45 #include "G4eMultipleScattering.hh"
46 #include "G4hMultipleScattering.hh"
47 
48 #include "G4eIonisation.hh"
49 #include "G4eBremsstrahlung.hh"
50 #include "G4eplusAnnihilation.hh"
51 #include "G4hIonisation.hh"
52 #include "G4ionIonisation.hh"
53 
54 #include "G4hImpactIonisation.hh"
55 
56 #include "G4ProductionCutsTable.hh"
57 
58 
60 {
61  defaultCutValue = 0.001*mm;
62  SetVerboseLevel(1);
63 
64  std::cout << "==============================================================================="
65  << std::endl
66  << "Geant4 eRosita example - based on a simplified version of eROSITA simulation"
67  << std::endl
68  << "Further details can be found in:"
69  << std::endl
70  << "M.G. Pia et al., 'PIXE Simulation With Geant4', "
71  << "IEEE Trans. Nucl. Sci., vol. 56, no. 6, pp. 3614-3649, 2009"
72  << std::endl
73  << "N. Meidinger et al., 'Development of the focal plane PNCCD camera system for the X-ray space telescope eROSITA', "
74  << std::endl
75  <<"NIM A 624, 321-329, 2010"
76  << std::endl
77  << "==============================================================================="
78  << std::endl;
79 
80  std::cout<< std::endl;
81 
82  std::cout << "==============================================================================="
83  << std::endl
84  << " The use of G4LowEnergyIonisation, G4LowEnergyBremsstrahlung, "
85  << std::endl
86  << "G4LowEnergyPhotoElectric, G4LowEnergyCompton, G4LowEnergyGammaConversion"
87  << std::endl
88  << "in this example is intentional. These classes will be replaced by other classes"
89  << std::endl
90  << "appropriate to the problem domain in a forthcoming Geant4 version"
91  << std::endl
92  << "==============================================================================="
93  << std::endl;
94 }
95 
96 
98 {}
99 
100 
102 {
103  ConstructBosons();
105  ConstructMesons();
107 }
108 
109 
111 {
112  // pseudo-particles
113  //G4Geantino::GeantinoDefinition();
114  //G4ChargedGeantino::ChargedGeantinoDefinition();
115 
116  // gamma
118 }
119 
120 
122 {
123  // leptons
124  // e+/-
127  // mu+/-
128  //G4MuonPlus::MuonPlusDefinition();
129  //G4MuonMinus::MuonMinusDefinition();
130  // nu_e
131  //G4NeutrinoE::NeutrinoEDefinition();
132  //G4AntiNeutrinoE::AntiNeutrinoEDefinition();
133  // nu_mu
134  //G4NeutrinoMu::NeutrinoMuDefinition();
135  //G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
136 }
137 
138 
140 {
141  // mesons
142  // light mesons
143  //G4PionPlus::PionPlusDefinition();
144  //G4PionMinus::PionMinusDefinition();
145  //G4PionZero::PionZeroDefinition();
146  //G4Eta::EtaDefinition();
147  //G4EtaPrime::EtaPrimeDefinition();
148  //G4KaonPlus::KaonPlusDefinition();
149  //G4KaonMinus::KaonMinusDefinition();
150  //G4KaonZero::KaonZeroDefinition();
151  //G4AntiKaonZero::AntiKaonZeroDefinition();
152  //G4KaonZeroLong::KaonZeroLongDefinition();
153  //G4KaonZeroShort::KaonZeroShortDefinition();
154 }
155 
156 
158 {
159  // barions
162 
163  //G4Neutron::NeutronDefinition();
164  //G4AntiNeutron::AntiNeutronDefinition();
165 }
166 
167 
169 {
171  ConstructEM();
173  //AddStepMax();
174 }
175 
176 
177 
179 {
181  theParticleIterator->reset();
182  while( (*theParticleIterator)() ){
184  G4ProcessManager* processManager = particle->GetProcessManager();
185  G4String particleName = particle->GetParticleName();
186 
187  if (particleName == "gamma") {
188 
189  // photon
190 
191  G4PhotoElectricEffect* photoelectric = new G4PhotoElectricEffect;
192  //photoelectric->ActivateAuger(true);
193  //photoelectric->SetCutForLowEnSecPhotons(0.250 * keV);
194  //photoelectric->SetCutForLowEnSecElectrons(0.250 * keV);
196  G4GammaConversion* gammaConversion = new G4GammaConversion;
198 
199  processManager -> AddDiscreteProcess(photoelectric);
200  processManager -> AddDiscreteProcess(compton);
201  processManager -> AddDiscreteProcess(gammaConversion);
202  processManager -> AddDiscreteProcess(rayleigh);
203 
204  } else if (particleName == "e-") {
205 
206  // electron
207 
208  G4eMultipleScattering* eMultipleScattering = new G4eMultipleScattering();
209  G4eIonisation* eIonisation = new G4eIonisation();
210  G4eBremsstrahlung* eBremsstrahlung = new G4eBremsstrahlung();
211 
212  processManager -> AddProcess(eMultipleScattering, -1, 1, 1);
213  processManager -> AddProcess(eIonisation, -1, 2, 2);
214  processManager -> AddProcess(eBremsstrahlung, -1, -1, 3);
215 
216  } else if (particleName == "e+") {
217  // positron
218  processManager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
219  processManager->AddProcess(new G4eIonisation, -1, 2, 2);
220  processManager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
221  processManager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
222 
223  //} else if( particleName == "mu+" ||
224  // particleName == "mu-" ) {
225  //muon
226  //processManager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);
227  //processManager->AddProcess(new G4MuIonisation, -1, 2, 2);
228  //processManager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
229  //processManager->AddProcess(new G4MuPairProduction, -1, 4, 4);
230 
231  } else if( particleName == "proton" ||
232  particleName == "pi-" ||
233  particleName == "pi+" ) {
234  //proton
235  /*
236  G4hImpactIonisation* hIonisation = new G4hImpactIonisation();
237  hIonisation->SetPixeCrossSectionK("ecpssr");
238  hIonisation->SetPixeCrossSectionL("ecpssr");
239  hIonisation->SetPixeCrossSectionM("ecpssr");
240  hIonisation->SetPixeProjectileMinEnergy(1.* keV);
241  hIonisation->SetPixeProjectileMaxEnergy(200. * MeV);
242  hIonisation->SetCutForSecondaryPhotons(250. * eV);
243  hIonisation->SetCutForAugerElectrons(250. * eV);
244  */
245  G4hIonisation* hIonisation = new G4hIonisation();
246 
247  G4hMultipleScattering* hMultipleScattering = new G4hMultipleScattering();
248 
249  processManager -> AddProcess(hMultipleScattering, -1, 1, 1);
250  processManager -> AddProcess(hIonisation, -1, 2, 2);
251 
252  } else if( particleName == "alpha" ||
253  particleName == "He3" ||
254  particleName == "pi-" ||
255  particleName == "pi+" ||
256  particleName == "GenericIon" ) {
257 
258  // pions, alpha, ions (should never occur in the current example)
259  processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
260  processManager->AddProcess(new G4ionIonisation, -1, 2, 2);
261 
262  } else if ((!particle->IsShortLived()) &&
263  (particle->GetPDGCharge() != 0.0) &&
264  (particle->GetParticleName() != "chargedgeantino")) {
265  //all others charged particles except geantino
266  processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
267  processManager->AddProcess(new G4hIonisation, -1, 2, 2);
268  }
269  }
270 }
271 
272 #include "G4Decay.hh"
273 
275 {
276  // Add Decay Process
277  G4Decay* theDecayProcess = new G4Decay();
279  theParticleIterator->reset();
280  while( (*theParticleIterator)() ){
282  G4ProcessManager* processManager = particle->GetProcessManager();
283  if (theDecayProcess->IsApplicable(*particle)) {
284  processManager ->AddProcess(theDecayProcess);
285  // set ordering for PostStepDoIt and AtRestDoIt
286  processManager ->SetProcessOrdering(theDecayProcess, idxPostStep);
287  processManager ->SetProcessOrdering(theDecayProcess, idxAtRest);
288  }
289  }
290 }
291 
292 
293 /*
294 #include "G4StepLimiter.hh"
295 #include "G4UserSpecialCuts.hh"
296 
297 void eRositaPhysicsList::AddStepMax()
298 {
299  // Step limitation seen as a process
300  G4StepLimiter* stepLimiter = new G4StepLimiter();
302 
303  theParticleIterator->reset();
304  while ((*theParticleIterator)()){
305  G4ParticleDefinition* particle = theParticleIterator->value();
306  G4ProcessManager* processManager = particle->GetProcessManager();
307 
308  if (particle->GetPDGCharge() != 0.0)
309  {
310  processManager ->AddDiscreteProcess(stepLimiter);
312  }
313  }
314 }
315 */
316 
318 {
319  //G4VUserPhysicsList::SetCutsWithDefault method sets
320  //the default cut value for all particle types
321  //
323 
324  // Set the secondary production cut lower than 990. eV
325  // Very important for processes at low energies
326 
327  G4double lowLimit = 250. * eV;
328  G4double highLimit = 100. * GeV;
330 
332 }
333 
334