Geant4_10
ExN02PhysicsList.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 //
28 //
29 //
30 // $Id: ExN02PhysicsList.cc 78055 2013-12-03 08:27:48Z gcosmo $
31 //
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 
35 #include "ExN02PhysicsList.hh"
36 
37 #include "G4ProcessManager.hh"
38 #include "G4ParticleTypes.hh"
39 #include "G4SystemOfUnits.hh"
40 
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 
44 {
45  defaultCutValue = 1.0*cm;
46  SetVerboseLevel(1);
47 }
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
52 {}
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55 
57 {
58  // In this method, static member functions should be called
59  // for all particles which you want to use.
60  // This ensures that objects of these particle types will be
61  // created in the program.
62 
67 }
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
72 {
73  // pseudo-particles
76 
77  // gamma
79 }
80 
81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
82 
84 {
85  // leptons
86  // e+/-
89  // mu+/-
92  // nu_e
95  // nu_mu
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103 {
104  // mesons
105  // light mesons
117 }
118 
119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
120 
122 {
123  // barions
126 
129 }
130 
131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132 
134 {
136  ConstructEM();
138  AddStepMax();
139 }
140 
141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
142 
143 #include "G4ComptonScattering.hh"
144 #include "G4GammaConversion.hh"
145 #include "G4PhotoElectricEffect.hh"
146 
147 #include "G4eMultipleScattering.hh"
148 #include "G4eIonisation.hh"
149 #include "G4eBremsstrahlung.hh"
150 #include "G4eplusAnnihilation.hh"
151 
152 #include "G4MuMultipleScattering.hh"
153 #include "G4MuIonisation.hh"
154 #include "G4MuBremsstrahlung.hh"
155 #include "G4MuPairProduction.hh"
156 
157 #include "G4hMultipleScattering.hh"
158 #include "G4hIonisation.hh"
159 #include "G4hBremsstrahlung.hh"
160 #include "G4hPairProduction.hh"
161 
162 #include "G4ionIonisation.hh"
163 
164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
165 
167 {
168  theParticleIterator->reset();
169  while( (*theParticleIterator)() ){
170  G4ParticleDefinition* particle = theParticleIterator->value();
171  G4ProcessManager* pmanager = particle->GetProcessManager();
172  G4String particleName = particle->GetParticleName();
173 
174  if (particleName == "gamma") {
175  // gamma
178  pmanager->AddDiscreteProcess(new G4GammaConversion);
179 
180  } else if (particleName == "e-") {
181  //electron
182  pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
183  pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
184  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
185 
186  } else if (particleName == "e+") {
187  //positron
188  pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
189  pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
190  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
191  pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
192 
193  } else if( particleName == "mu+" ||
194  particleName == "mu-" ) {
195  //muon
196  pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);
197  pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
198  pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
199  pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);
200 
201  } else if( particleName == "proton" ||
202  particleName == "pi-" ||
203  particleName == "pi+" ) {
204  //proton
205  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
206  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
207  pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
208  pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
209 
210  } else if( particleName == "alpha" ||
211  particleName == "He3" ) {
212  //alpha
213  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
214  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
215 
216  } else if( particleName == "GenericIon" ) {
217  //Ions
218  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
219  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
220 
221  } else if ((!particle->IsShortLived()) &&
222  (particle->GetPDGCharge() != 0.0) &&
223  (particle->GetParticleName() != "chargedgeantino")) {
224  //all others charged particles except geantino
225  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
226  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
227  }
228  }
229 }
230 
231 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
232 
233 #include "G4Decay.hh"
234 
236 {
237  // Add Decay Process
238  G4Decay* theDecayProcess = new G4Decay();
239  theParticleIterator->reset();
240  while( (*theParticleIterator)() ){
241  G4ParticleDefinition* particle = theParticleIterator->value();
242  G4ProcessManager* pmanager = particle->GetProcessManager();
243  if (theDecayProcess->IsApplicable(*particle)) {
244  pmanager ->AddProcess(theDecayProcess);
245  // set ordering for PostStepDoIt and AtRestDoIt
246  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
247  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
248  }
249  }
250 }
251 
252 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
253 
254 #include "G4StepLimiter.hh"
255 #include "G4UserSpecialCuts.hh"
256 
258 {
259  // Step limitation seen as a process
260  G4StepLimiter* stepLimiter = new G4StepLimiter();
262 
263  theParticleIterator->reset();
264  while ((*theParticleIterator)()){
265  G4ParticleDefinition* particle = theParticleIterator->value();
266  G4ProcessManager* pmanager = particle->GetProcessManager();
267 
268  if (particle->GetPDGCharge() != 0.0)
269  {
270  pmanager ->AddDiscreteProcess(stepLimiter);
272  }
273  }
274 }
275 
276 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
277 
279 {
280  //G4VUserPhysicsList::SetCutsWithDefault method sets
281  //the default cut value for all particle types
282  //
284 
286 }
287 
288 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
289 
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:82
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
static G4KaonPlus * KaonPlusDefinition()
Definition: G4KaonPlus.cc:108
static G4MuonPlus * MuonPlusDefinition()
Definition: G4MuonPlus.cc:94
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4Decay.cc:89
static G4KaonMinus * KaonMinusDefinition()
Definition: G4KaonMinus.cc:108
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZero * KaonZeroDefinition()
Definition: G4KaonZero.cc:99
static G4AntiKaonZero * AntiKaonZeroDefinition()
static G4KaonZeroShort * KaonZeroShortDefinition()
static G4AntiProton * AntiProtonDefinition()
Definition: G4AntiProton.cc:88
G4ProcessManager * GetProcessManager() const
static G4AntiNeutron * AntiNeutronDefinition()
static G4PionZero * PionZeroDefinition()
Definition: G4PionZero.cc:99
const G4String & GetParticleName() const
void DumpCutValuesTable(G4int flag=1)
static G4PionMinus * PionMinusDefinition()
Definition: G4PionMinus.cc:93
static G4KaonZeroLong * KaonZeroLongDefinition()
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()
static G4PionPlus * PionPlusDefinition()
Definition: G4PionPlus.cc:93
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
static G4EtaPrime * EtaPrimeDefinition()
Definition: G4EtaPrime.cc:100
static G4MuonMinus * MuonMinusDefinition()
Definition: G4MuonMinus.cc:95
static G4ChargedGeantino * ChargedGeantinoDefinition()
static G4AntiNeutrinoE * AntiNeutrinoEDefinition()
G4double GetPDGCharge() const
static G4NeutrinoMu * NeutrinoMuDefinition()
Definition: G4NeutrinoMu.cc:80
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
#define theParticleIterator
static G4Eta * EtaDefinition()
Definition: G4Eta.cc:104
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81