Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eRositaPhysicsList.cc
Go to the documentation of this file.
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 // $Id$
28 //
29 
30 #include "globals.hh"
31 
32 #include "eRositaPhysicsList.hh"
33 
34 #include "G4SystemOfUnits.hh"
35 #include "G4ProcessManager.hh"
36 #include "G4ParticleTypes.hh"
37 
38 #include "G4LowEnergyCompton.hh"
41 #include "G4LowEnergyRayleigh.hh"
42 #include "G4LowEnergyIonisation.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 {
180  theParticleIterator->reset();
181  while( (*theParticleIterator)() ){
182  G4ParticleDefinition* particle = theParticleIterator->value();
183  G4ProcessManager* processManager = particle->GetProcessManager();
184  G4String particleName = particle->GetParticleName();
185 
186  if (particleName == "gamma") {
187 
188  // photon
189 
191  photoelectric->ActivateAuger(true);
192  photoelectric->SetCutForLowEnSecPhotons(0.250 * keV);
193  photoelectric->SetCutForLowEnSecElectrons(0.250 * keV);
194  G4LowEnergyCompton* compton = new G4LowEnergyCompton;
197 
198  processManager -> AddDiscreteProcess(photoelectric);
199  processManager -> AddDiscreteProcess(compton);
200  processManager -> AddDiscreteProcess(gammaConversion);
201  processManager -> AddDiscreteProcess(rayleigh);
202 
203  } else if (particleName == "e-") {
204 
205  // electron
206 
207  G4eMultipleScattering* eMultipleScattering = new G4eMultipleScattering();
208  G4LowEnergyIonisation* eIonisation = new G4LowEnergyIonisation();
209  G4LowEnergyBremsstrahlung* eBremsstrahlung = new G4LowEnergyBremsstrahlung();
210 
211  processManager -> AddProcess(eMultipleScattering, -1, 1, 1);
212  processManager -> AddProcess(eIonisation, -1, 2, 2);
213  processManager -> AddProcess(eBremsstrahlung, -1, -1, 3);
214 
215  } else if (particleName == "e+") {
216  // positron
217  processManager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
218  processManager->AddProcess(new G4eIonisation, -1, 2, 2);
219  processManager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
220  processManager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
221 
222  //} else if( particleName == "mu+" ||
223  // particleName == "mu-" ) {
224  //muon
225  //processManager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);
226  //processManager->AddProcess(new G4MuIonisation, -1, 2, 2);
227  //processManager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
228  //processManager->AddProcess(new G4MuPairProduction, -1, 4, 4);
229 
230  } else if( particleName == "proton" ||
231  particleName == "pi-" ||
232  particleName == "pi+" ) {
233  //proton
234 
235  G4hImpactIonisation* hIonisation = new G4hImpactIonisation();
236  hIonisation->SetPixeCrossSectionK("ecpssr");
237  hIonisation->SetPixeCrossSectionL("ecpssr");
238  hIonisation->SetPixeCrossSectionM("ecpssr");
239  hIonisation->SetPixeProjectileMinEnergy(1.* keV);
240  hIonisation->SetPixeProjectileMaxEnergy(200. * MeV);
241  hIonisation->SetCutForSecondaryPhotons(250. * eV);
242  hIonisation->SetCutForAugerElectrons(250. * eV);
243 
244  G4hMultipleScattering* hMultipleScattering = new G4hMultipleScattering();
245 
246  processManager -> AddProcess(hMultipleScattering, -1, 1, 1);
247  processManager -> AddProcess(hIonisation, -1, 2, 2);
248 
249  } else if( particleName == "alpha" ||
250  particleName == "He3" ||
251  particleName == "pi-" ||
252  particleName == "pi+" ||
253  particleName == "GenericIon" ) {
254 
255  // pions, alpha, ions (should never occur in the current example)
256  processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
257  processManager->AddProcess(new G4ionIonisation, -1, 2, 2);
258 
259  } else if ((!particle->IsShortLived()) &&
260  (particle->GetPDGCharge() != 0.0) &&
261  (particle->GetParticleName() != "chargedgeantino")) {
262  //all others charged particles except geantino
263  processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
264  processManager->AddProcess(new G4hIonisation, -1, 2, 2);
265  }
266  }
267 }
268 
269 #include "G4Decay.hh"
270 
272 {
273  // Add Decay Process
274  G4Decay* theDecayProcess = new G4Decay();
275  theParticleIterator->reset();
276  while( (*theParticleIterator)() ){
277  G4ParticleDefinition* particle = theParticleIterator->value();
278  G4ProcessManager* processManager = particle->GetProcessManager();
279  if (theDecayProcess->IsApplicable(*particle)) {
280  processManager ->AddProcess(theDecayProcess);
281  // set ordering for PostStepDoIt and AtRestDoIt
282  processManager ->SetProcessOrdering(theDecayProcess, idxPostStep);
283  processManager ->SetProcessOrdering(theDecayProcess, idxAtRest);
284  }
285  }
286 }
287 
288 
289 /*
290 #include "G4StepLimiter.hh"
291 #include "G4UserSpecialCuts.hh"
292 
293 void eRositaPhysicsList::AddStepMax()
294 {
295  // Step limitation seen as a process
296  G4StepLimiter* stepLimiter = new G4StepLimiter();
298 
299  theParticleIterator->reset();
300  while ((*theParticleIterator)()){
301  G4ParticleDefinition* particle = theParticleIterator->value();
302  G4ProcessManager* processManager = particle->GetProcessManager();
303 
304  if (particle->GetPDGCharge() != 0.0)
305  {
306  processManager ->AddDiscreteProcess(stepLimiter);
308  }
309  }
310 }
311 */
312 
314 {
315  //G4VUserPhysicsList::SetCutsWithDefault method sets
316  //the default cut value for all particle types
317  //
319 
320  // Set the secondary production cut lower than 990. eV
321  // Very important for processes at low energies
322 
323  G4double lowLimit = 250. * eV;
324  G4double highLimit = 100. * GeV;
326 
328 }
329 
330 
void SetPixeProjectileMaxEnergy(G4double energy)
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
static constexpr double mm
Definition: G4SIunits.hh:115
void SetPixeCrossSectionL(const G4String &name)
void SetEnergyRange(G4double lowedge, G4double highedge)
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4Decay.cc:89
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
void SetPixeCrossSectionK(const G4String &name)
static G4AntiProton * AntiProtonDefinition()
Definition: G4AntiProton.cc:88
const G4String & GetParticleName() const
void SetCutForSecondaryPhotons(G4double cut)
void DumpCutValuesTable(G4int flag=1)
void SetPixeCrossSectionM(const G4String &name)
void SetCutForAugerElectrons(G4double cut)
void SetVerboseLevel(G4int value)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
#define theParticleIterator
void SetPixeProjectileMinEnergy(G4double energy)
static constexpr double eV
Definition: G4SIunits.hh:215
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
static G4ProductionCutsTable * GetProductionCutsTable()
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const
static constexpr double keV
Definition: G4SIunits.hh:216
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81