Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XrayTelPhysicsList.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 // **********************************************************************
28 // * *
29 // * GEANT 4 xray_telescope advanced example *
30 // * *
31 // * MODULE: XrayTelPhysicsList.cc *
32 // * ------- *
33 // * *
34 // * Version: 0.4 *
35 // * Date: 06/11/00 *
36 // * Author: R Nartallo *
37 // * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
38 // * *
39 // **********************************************************************
40 //
41 // CHANGE HISTORY
42 // --------------
43 //
44 // 06.11.2000 R.Nartallo
45 // - First implementation of xray_telescope Physics list
46 // - Based on Chandra and XMM models
47 //
48 //
49 // **********************************************************************
50 
51 #include "XrayTelPhysicsList.hh"
52 
53 #include "globals.hh"
54 #include "G4SystemOfUnits.hh"
55 #include "G4ParticleDefinition.hh"
56 #include "G4ParticleWithCuts.hh"
57 #include "G4ProcessManager.hh"
58 #include "G4ProcessVector.hh"
59 #include "G4ParticleTypes.hh"
60 #include "G4ParticleTable.hh"
62 #include "G4Material.hh"
63 #include "G4MaterialTable.hh"
64 #include "G4ios.hh"
65 // Hadrons
66 #include "G4MesonConstructor.hh"
67 #include "G4BaryonConstructor.hh"
68 #include "G4IonConstructor.hh"
69 
71 {
72  // Default cut values
73  defaultCutValue = 2.0*mm;
74  cutForGamma = 1.0*m;
75  cutForElectron = 1.0*m;
76 
77  SetVerboseLevel(1);
78 }
79 
81 {}
82 
84 {
85  // Here are constructed all particles
90  ConstructIons();
92 }
93 
94 // In this method, static member functions should be called for ALL particles to be used.
95 
97 {
98  // pseudo-particles
101 
102  // gamma
104 
105  // optical photon
107 }
109 {
110  // leptons
113 
118 }
120 {
121  // mesons
122  G4MesonConstructor mConstructor;
123  mConstructor.ConstructParticle();
124 }
126 {
127  // barions
128  G4BaryonConstructor bConstructor;
129  bConstructor.ConstructParticle();
130 }
132 {
133  // ions
134  G4IonConstructor iConstructor;
135  iConstructor.ConstructParticle();
136 }
138 {
139 }
141 {
142  // Transportation, electromagnetic and general processes
144  ConstructEM();
146 }
147 
148 // Here are respective header files for chosen processes
149 
150 #include "G4ComptonScattering.hh"
151 #include "G4GammaConversion.hh"
152 #include "G4PhotoElectricEffect.hh"
153 
154 #include "G4eMultipleScattering.hh"
155 #include "G4hMultipleScattering.hh"
156 
157 #include "G4eIonisation.hh"
158 #include "G4eBremsstrahlung.hh"
159 #include "G4eplusAnnihilation.hh"
160 
161 #include "G4MuIonisation.hh"
162 #include "G4MuBremsstrahlung.hh"
163 #include "G4MuPairProduction.hh"
164 
165 #include "G4hIonisation.hh"
166 #include "G4hBremsstrahlung.hh"
167 #include "G4hPairProduction.hh"
168 
169 #include "G4ionIonisation.hh"
170 
172 {
173  theParticleIterator->reset();
174 
175  while( (*theParticleIterator)() )
176  {
177  G4ParticleDefinition* particle = theParticleIterator->value();
178  G4ProcessManager* pmanager = particle->GetProcessManager();
179  G4String particleName = particle->GetParticleName();
180 
181  if (particleName == "gamma")
182  {
183  //gamma
184  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
185  pmanager->AddDiscreteProcess(new G4ComptonScattering());
186  pmanager->AddDiscreteProcess(new G4GammaConversion());
187  }
188  else if (particleName == "e-")
189  {
190  //electron
191  pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,1);
192  pmanager->AddProcess(new G4eIonisation(), -1, 2,2);
193  pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3,3);
194 
195  } else if (particleName == "e+") {
196 
197  //positron
198  pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,1);
199  pmanager->AddProcess(new G4eIonisation(), -1, 2,2);
200  pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3,3);
201  pmanager->AddProcess(new G4eplusAnnihilation(), 0,-1,4);
202 
203  } else if( particleName == "mu-" ||
204  particleName == "mu+" ) {
205 
206  //muon
207  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
208  pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
209  pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
210  pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);
211 
212  } else if( particleName == "pi-" ||
213  particleName == "pi+" ) {
214 
215  //pions
216  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
217  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
218  pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
219  pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
220 
221  } else if( particleName == "proton" ) {
222 
223  //proton
224  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
225  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
226  pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
227  pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
228 
229  } else if( particleName == "alpha" ||
230  particleName == "He3" ||
231  particleName == "GenericIon" ) {
232 
233  //Ions
234  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
235  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
236 
237  } else if ((!particle->IsShortLived()) &&
238  (particle->GetPDGCharge() != 0.0) &&
239  (particle->GetParticleName() != "chargedgeantino")) {
240 
241  //all others charged particles except geantino
242  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
243  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
244 
245  }
246  }
247 }
248 
249 #include "G4Decay.hh"
250 
252 {
253  G4Decay* theDecayProcess = new G4Decay();
254  theParticleIterator->reset();
255  while( (*theParticleIterator)() ){
256  G4ParticleDefinition* particle = theParticleIterator->value();
257  G4ProcessManager* pmanager = particle->GetProcessManager();
258  if (theDecayProcess->IsApplicable(*particle)) {
259  pmanager ->AddProcess(theDecayProcess);
260  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
261  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
262  }
263  }
264 }
265 
267 {
268  // defaultCutValue you have typed in is used
269 
270  if (verboseLevel >1){
271  G4cout << "XrayTelPhysicsList::SetCuts:" << G4endl;
272  }
273 
274  // set cut values for gamma at first and for e- second
275  SetCutValue(cutForGamma, "gamma");
276  SetCutValue(cutForElectron, "e-");
277  SetCutValue(cutForElectron, "e+");
278 
279  // SetCutValueForOthers(defaultCutValue);
280 
281  if (verboseLevel >1) {
283  }
284 }
285 
287 {
288  ResetCuts();
289  cutForGamma = cut;
290 }
291 
293 {
294  ResetCuts();
295  cutForElectron = cut;
296 }
297 
299 {
300  return cutForGamma;
301 }
302 
304 {
305  return cutForElectron;
306 }
307 
308 
309 
310 
311 
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:82
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
void SetCutValue(G4double aCut, const G4String &pname)
G4double GetCutForGamma() const
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4Decay.cc:89
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static void ConstructParticle()
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
void SetCutForGamma(G4double)
static void ConstructParticle()
void DumpCutValuesTable(G4int flag=1)
G4GLOB_DLL std::ostream G4cout
void SetVerboseLevel(G4int value)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
static G4NeutrinoE * NeutrinoEDefinition()
Definition: G4NeutrinoE.cc:80
static G4AntiNeutrinoMu * AntiNeutrinoMuDefinition()
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
G4double GetCutForElectron() const
static G4ChargedGeantino * ChargedGeantinoDefinition()
void ResetCuts()
obsolete methods
#define G4endl
Definition: G4ios.hh:61
static G4AntiNeutrinoE * AntiNeutrinoEDefinition()
static G4OpticalPhoton * OpticalPhotonDefinition()
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const
static G4NeutrinoMu * NeutrinoMuDefinition()
Definition: G4NeutrinoMu.cc:80
#define theParticleIterator
void SetCutForElectron(G4double)
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81