Geant4  10.02.p03
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 {
181  particleIterator->reset();
182  while( (*particleIterator)() ){
183  G4ParticleDefinition* particle = particleIterator->value();
184  G4ProcessManager* processManager = particle->GetProcessManager();
185  G4String particleName = particle->GetParticleName();
186 
187  if (particleName == "gamma") {
188 
189  // photon
190 
192  photoelectric->ActivateAuger(true);
193  photoelectric->SetCutForLowEnSecPhotons(0.250 * keV);
194  photoelectric->SetCutForLowEnSecElectrons(0.250 * keV);
195  G4LowEnergyCompton* compton = new G4LowEnergyCompton;
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  G4LowEnergyIonisation* eIonisation = new G4LowEnergyIonisation();
210  G4LowEnergyBremsstrahlung* eBremsstrahlung = new G4LowEnergyBremsstrahlung();
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  G4hMultipleScattering* hMultipleScattering = new G4hMultipleScattering();
246 
247  processManager -> AddProcess(hMultipleScattering, -1, 1, 1);
248  processManager -> AddProcess(hIonisation, -1, 2, 2);
249 
250  } else if( particleName == "alpha" ||
251  particleName == "He3" ||
252  particleName == "pi-" ||
253  particleName == "pi+" ||
254  particleName == "GenericIon" ) {
255 
256  // pions, alpha, ions (should never occur in the current example)
257  processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
258  processManager->AddProcess(new G4ionIonisation, -1, 2, 2);
259 
260  } else if ((!particle->IsShortLived()) &&
261  (particle->GetPDGCharge() != 0.0) &&
262  (particle->GetParticleName() != "chargedgeantino")) {
263  //all others charged particles except geantino
264  processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
265  processManager->AddProcess(new G4hIonisation, -1, 2, 2);
266  }
267  }
268 }
269 
270 #include "G4Decay.hh"
271 
273 {
274  // Add Decay Process
275  G4Decay* theDecayProcess = new G4Decay();
277  particleIterator->reset();
278  while( (*particleIterator)() ){
279  G4ParticleDefinition* particle = particleIterator->value();
280  G4ProcessManager* processManager = particle->GetProcessManager();
281  if (theDecayProcess->IsApplicable(*particle)) {
282  processManager ->AddProcess(theDecayProcess);
283  // set ordering for PostStepDoIt and AtRestDoIt
284  processManager ->SetProcessOrdering(theDecayProcess, idxPostStep);
285  processManager ->SetProcessOrdering(theDecayProcess, idxAtRest);
286  }
287  }
288 }
289 
290 
291 /*
292 #include "G4StepLimiter.hh"
293 #include "G4UserSpecialCuts.hh"
294 
295 void eRositaPhysicsList::AddStepMax()
296 {
297  // Step limitation seen as a process
298  G4StepLimiter* stepLimiter = new G4StepLimiter();
300 
301  auto particleIterator=GetParticleIterator();
302  particleIterator->reset();
303  while ((*particleIterator)()){
304  G4ParticleDefinition* particle = particleIterator->value();
305  G4ProcessManager* processManager = particle->GetProcessManager();
306 
307  if (particle->GetPDGCharge() != 0.0)
308  {
309  processManager ->AddDiscreteProcess(stepLimiter);
311  }
312  }
313 }
314 */
315 
317 {
318  //G4VUserPhysicsList::SetCutsWithDefault method sets
319  //the default cut value for all particle types
320  //
322 
323  // Set the secondary production cut lower than 990. eV
324  // Very important for processes at low energies
325 
326  G4double lowLimit = 250. * eV;
327  G4double highLimit = 100. * GeV;
329 
331 }
332 
333 
void SetPixeProjectileMaxEnergy(G4double energy)
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
static const double MeV
Definition: G4SIunits.hh:211
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)
G4ProcessManager * GetProcessManager() const
static G4AntiProton * AntiProtonDefinition()
Definition: G4AntiProton.cc:88
void SetCutForSecondaryPhotons(G4double cut)
const G4String & GetParticleName() const
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)
void SetPixeProjectileMinEnergy(G4double energy)
static const double GeV
Definition: G4SIunits.hh:214
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
static G4ProductionCutsTable * GetProductionCutsTable()
static const double eV
Definition: G4SIunits.hh:212
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
static const double keV
Definition: G4SIunits.hh:213
double G4double
Definition: G4Types.hh:76
static const double mm
Definition: G4SIunits.hh:114
G4double GetPDGCharge() const
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81