Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
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 // $Id: eRositaPhysicsList.cc 107396 2017-11-10 08:28:08Z gcosmo $
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 "G4PhotoElectricEffect.hh"
39 #include "G4ComptonScattering.hh"
40 #include "G4GammaConversion.hh"
41 #include "G4RayleighScattering.hh"
42 
43 #include "G4eIonisation.hh"
44 #include "G4eBremsstrahlung.hh"
45 
46 #include "G4eMultipleScattering.hh"
47 #include "G4hMultipleScattering.hh"
48 
49 #include "G4eIonisation.hh"
50 #include "G4eBremsstrahlung.hh"
51 #include "G4eplusAnnihilation.hh"
52 #include "G4hIonisation.hh"
53 #include "G4ionIonisation.hh"
54 
55 #include "G4hImpactIonisation.hh"
56 
57 #include "G4ProductionCutsTable.hh"
58 
59 
61 {
62  defaultCutValue = 0.001*mm;
63  SetVerboseLevel(1);
64 
65  std::cout << "==============================================================================="
66  << std::endl
67  << "Geant4 eRosita example - based on a simplified version of eROSITA simulation"
68  << std::endl
69  << "Further details can be found in:"
70  << std::endl
71  << "M.G. Pia et al., 'PIXE Simulation With Geant4', "
72  << "IEEE Trans. Nucl. Sci., vol. 56, no. 6, pp. 3614-3649, 2009"
73  << std::endl
74  << "N. Meidinger et al., 'Development of the focal plane PNCCD camera system for the X-ray space telescope eROSITA', "
75  << std::endl
76  <<"NIM A 624, 321-329, 2010"
77  << std::endl
78  << "==============================================================================="
79  << std::endl;
80 
81  std::cout<< std::endl;
82 
83  std::cout << "==============================================================================="
84  << std::endl
85  << " The use of G4LowEnergyIonisation, G4LowEnergyBremsstrahlung, "
86  << std::endl
87  << "G4LowEnergyPhotoElectric, G4LowEnergyCompton, G4LowEnergyGammaConversion"
88  << std::endl
89  << "in this example is intentional. These classes will be replaced by other classes"
90  << std::endl
91  << "appropriate to the problem domain in a forthcoming Geant4 version"
92  << std::endl
93  << "==============================================================================="
94  << std::endl;
95 }
96 
97 
99 {}
100 
101 
103 {
104  ConstructBosons();
106  ConstructMesons();
108 }
109 
110 
112 {
113  // pseudo-particles
114  //G4Geantino::GeantinoDefinition();
115  //G4ChargedGeantino::ChargedGeantinoDefinition();
116 
117  // gamma
119 }
120 
121 
123 {
124  // leptons
125  // e+/-
128  // mu+/-
129  //G4MuonPlus::MuonPlusDefinition();
130  //G4MuonMinus::MuonMinusDefinition();
131  // nu_e
132  //G4NeutrinoE::NeutrinoEDefinition();
133  //G4AntiNeutrinoE::AntiNeutrinoEDefinition();
134  // nu_mu
135  //G4NeutrinoMu::NeutrinoMuDefinition();
136  //G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
137 }
138 
139 
141 {
142  // mesons
143  // light mesons
144  //G4PionPlus::PionPlusDefinition();
145  //G4PionMinus::PionMinusDefinition();
146  //G4PionZero::PionZeroDefinition();
147  //G4Eta::EtaDefinition();
148  //G4EtaPrime::EtaPrimeDefinition();
149  //G4KaonPlus::KaonPlusDefinition();
150  //G4KaonMinus::KaonMinusDefinition();
151  //G4KaonZero::KaonZeroDefinition();
152  //G4AntiKaonZero::AntiKaonZeroDefinition();
153  //G4KaonZeroLong::KaonZeroLongDefinition();
154  //G4KaonZeroShort::KaonZeroShortDefinition();
155 }
156 
157 
159 {
160  // barions
163 
164  //G4Neutron::NeutronDefinition();
165  //G4AntiNeutron::AntiNeutronDefinition();
166 }
167 
168 
170 {
172  ConstructEM();
174  //AddStepMax();
175 }
176 
177 
178 
180 {
182  theParticleIterator->reset();
183  while( (*theParticleIterator)() ){
184  G4ParticleDefinition* particle = theParticleIterator->value();
185  G4ProcessManager* processManager = particle->GetProcessManager();
186  G4String particleName = particle->GetParticleName();
187 
188  if (particleName == "gamma") {
189 
190  // photon
191 
192  G4PhotoElectricEffect* photoelectric = new G4PhotoElectricEffect;
193  //photoelectric->ActivateAuger(true);
194  //photoelectric->SetCutForLowEnSecPhotons(0.250 * keV);
195  //photoelectric->SetCutForLowEnSecElectrons(0.250 * keV);
197  G4GammaConversion* gammaConversion = new G4GammaConversion;
199 
200  processManager -> AddDiscreteProcess(photoelectric);
201  processManager -> AddDiscreteProcess(compton);
202  processManager -> AddDiscreteProcess(gammaConversion);
203  processManager -> AddDiscreteProcess(rayleigh);
204 
205  } else if (particleName == "e-") {
206 
207  // electron
208 
209  G4eMultipleScattering* eMultipleScattering = new G4eMultipleScattering();
210  G4eIonisation* eIonisation = new G4eIonisation();
211  G4eBremsstrahlung* eBremsstrahlung = new G4eBremsstrahlung();
212 
213  processManager -> AddProcess(eMultipleScattering, -1, 1, 1);
214  processManager -> AddProcess(eIonisation, -1, 2, 2);
215  processManager -> AddProcess(eBremsstrahlung, -1, -1, 3);
216 
217  } else if (particleName == "e+") {
218  // positron
219  processManager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
220  processManager->AddProcess(new G4eIonisation, -1, 2, 2);
221  processManager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
222  processManager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
223 
224  //} else if( particleName == "mu+" ||
225  // particleName == "mu-" ) {
226  //muon
227  //processManager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);
228  //processManager->AddProcess(new G4MuIonisation, -1, 2, 2);
229  //processManager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
230  //processManager->AddProcess(new G4MuPairProduction, -1, 4, 4);
231 
232  } else if( particleName == "proton" ||
233  particleName == "pi-" ||
234  particleName == "pi+" ) {
235  //proton
236  /*
237  G4hImpactIonisation* hIonisation = new G4hImpactIonisation();
238  hIonisation->SetPixeCrossSectionK("ecpssr");
239  hIonisation->SetPixeCrossSectionL("ecpssr");
240  hIonisation->SetPixeCrossSectionM("ecpssr");
241  hIonisation->SetPixeProjectileMinEnergy(1.* keV);
242  hIonisation->SetPixeProjectileMaxEnergy(200. * MeV);
243  hIonisation->SetCutForSecondaryPhotons(250. * eV);
244  hIonisation->SetCutForAugerElectrons(250. * eV);
245  */
246  G4hIonisation* hIonisation = new G4hIonisation();
247 
248  G4hMultipleScattering* hMultipleScattering = new G4hMultipleScattering();
249 
250  processManager -> AddProcess(hMultipleScattering, -1, 1, 1);
251  processManager -> AddProcess(hIonisation, -1, 2, 2);
252 
253  } else if( particleName == "alpha" ||
254  particleName == "He3" ||
255  particleName == "pi-" ||
256  particleName == "pi+" ||
257  particleName == "GenericIon" ) {
258 
259  // pions, alpha, ions (should never occur in the current example)
260  processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
261  processManager->AddProcess(new G4ionIonisation, -1, 2, 2);
262 
263  } else if ((!particle->IsShortLived()) &&
264  (particle->GetPDGCharge() != 0.0) &&
265  (particle->GetParticleName() != "chargedgeantino")) {
266  //all others charged particles except geantino
267  processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
268  processManager->AddProcess(new G4hIonisation, -1, 2, 2);
269  }
270  }
271 }
272 
273 #include "G4Decay.hh"
274 
276 {
277  // Add Decay Process
278  G4Decay* theDecayProcess = new G4Decay();
280  theParticleIterator->reset();
281  while( (*theParticleIterator)() ){
282  G4ParticleDefinition* particle = theParticleIterator->value();
283  G4ProcessManager* processManager = particle->GetProcessManager();
284  if (theDecayProcess->IsApplicable(*particle)) {
285  processManager ->AddProcess(theDecayProcess);
286  // set ordering for PostStepDoIt and AtRestDoIt
287  processManager ->SetProcessOrdering(theDecayProcess, idxPostStep);
288  processManager ->SetProcessOrdering(theDecayProcess, idxAtRest);
289  }
290  }
291 }
292 
293 
294 /*
295 #include "G4StepLimiter.hh"
296 #include "G4UserSpecialCuts.hh"
297 
298 void eRositaPhysicsList::AddStepMax()
299 {
300  // Step limitation seen as a process
301  G4StepLimiter* stepLimiter = new G4StepLimiter();
303 
304  theParticleIterator->reset();
305  while ((*theParticleIterator)()){
306  G4ParticleDefinition* particle = theParticleIterator->value();
307  G4ProcessManager* processManager = particle->GetProcessManager();
308 
309  if (particle->GetPDGCharge() != 0.0)
310  {
311  processManager ->AddDiscreteProcess(stepLimiter);
313  }
314  }
315 }
316 */
317 
319 {
320  //G4VUserPhysicsList::SetCutsWithDefault method sets
321  //the default cut value for all particle types
322  //
324 
325  // Set the secondary production cut lower than 990. eV
326  // Very important for processes at low energies
327 
328  G4double lowLimit = 250. * eV;
329  G4double highLimit = 100. * GeV;
331 
333 }
334 
335 
#define theParticleIterator
static constexpr double mm
Definition: G4SIunits.hh:115
const G4String & GetParticleName() const
G4double GetPDGCharge() const
virtual G4bool IsApplicable(const G4ParticleDefinition &) override
Definition: G4Decay.cc:89
void SetEnergyRange(G4double lowedge, G4double highedge)
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
double G4double
Definition: G4Types.hh:76
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
static constexpr double eV
Definition: G4SIunits.hh:215
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
static G4ProductionCutsTable * GetProductionCutsTable()
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81
G4ProcessManager * GetProcessManager() const
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
void SetVerboseLevel(G4int value)
void DumpCutValuesTable(G4int flag=1)
static G4AntiProton * AntiProtonDefinition()
Definition: G4AntiProton.cc:88
static constexpr double GeV
Definition: G4SIunits.hh:217