Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExN07PhysicsList.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 "ExN07PhysicsList.hh"
31 
32 #include "G4ParticleDefinition.hh"
33 #include "G4ProcessManager.hh"
34 #include "G4ProcessVector.hh"
35 #include "G4ParticleTypes.hh"
36 #include "G4ParticleTable.hh"
37 #include "G4ios.hh"
38 #include "G4SystemOfUnits.hh"
39 
41 {
42  defaultCutValue = 1.0*mm;
43  SetVerboseLevel(1);
44 }
45 
47 {}
48 
50 {
51  // In this method, static member functions should be called
52  // for all particles which you want to use.
53  // This ensures that objects of these particle types will be
54  // created in the program.
55 
60 }
61 
63 {
64  // pseudo-particles
67 
68  // gamma
70 }
71 
73 {
74  // leptons
79 
84 }
85 
87 {
88  // mesons
100 }
101 
103 {
104 // barions
109 }
110 
112 {
115  ConstructEM();
116 }
117 
118 #include "G4ComptonScattering.hh"
119 #include "G4GammaConversion.hh"
120 #include "G4PhotoElectricEffect.hh"
121 
122 #include "G4eMultipleScattering.hh"
123 #include "G4MuMultipleScattering.hh"
124 #include "G4hMultipleScattering.hh"
125 
126 #include "G4eIonisation.hh"
127 #include "G4eBremsstrahlung.hh"
128 #include "G4eplusAnnihilation.hh"
129 
130 #include "G4MuIonisation.hh"
131 #include "G4MuBremsstrahlung.hh"
132 #include "G4MuPairProduction.hh"
133 
134 #include "G4hIonisation.hh"
135 
137 {
138  G4bool displacementFlg = true; // for multiple scattering
140  while( (*theParticleIterator)() ){
142  G4ProcessManager* pmanager = particle->GetProcessManager();
143  G4String particleName = particle->GetParticleName();
144 
145  if (particleName == "gamma") {
146  // gamma
147  pmanager->AddDiscreteProcess(new G4GammaConversion());
148  pmanager->AddDiscreteProcess(new G4ComptonScattering());
149  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
150 
151  } else if (particleName == "e-") {
152  //electron
153  G4eMultipleScattering* theeminusMultipleScattering = new G4eMultipleScattering();
154  theeminusMultipleScattering->SetLateralDisplasmentFlag(displacementFlg);
155  G4VProcess* theeminusIonisation = new G4eIonisation();
156  G4VProcess* theeminusBremsstrahlung = new G4eBremsstrahlung();
157  //
158  // add processes
159  pmanager->AddProcess(theeminusMultipleScattering);
160  pmanager->AddProcess(theeminusIonisation);
161  pmanager->AddProcess(theeminusBremsstrahlung);
162  //
163  // set ordering for AlongStepDoIt
164  pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
165  pmanager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2);
166  pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxAlongStep,3);
167  //
168  // set ordering for PostStepDoIt
169  pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
170  pmanager->SetProcessOrdering(theeminusIonisation, idxPostStep,2);
171  pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3);
172 
173  } else if (particleName == "e+") {
174  //positron
175  G4eMultipleScattering* theeplusMultipleScattering = new G4eMultipleScattering();
176  theeplusMultipleScattering->SetLateralDisplasmentFlag(displacementFlg);
177  G4VProcess* theeplusIonisation = new G4eIonisation();
178  G4VProcess* theeplusBremsstrahlung = new G4eBremsstrahlung();
179  G4VProcess* theeplusAnnihilation = new G4eplusAnnihilation();
180  //
181  // add processes
182  pmanager->AddProcess(theeplusMultipleScattering);
183  pmanager->AddProcess(theeplusIonisation);
184  pmanager->AddProcess(theeplusBremsstrahlung);
185  pmanager->AddProcess(theeplusAnnihilation);
186  //
187  // set ordering for AtRestDoIt
188  pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
189  //
190  // set ordering for AlongStepDoIt
191  pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
192  pmanager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2);
193  pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxAlongStep,3);
194  //
195  // set ordering for PostStepDoIt
196  pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
197  pmanager->SetProcessOrdering(theeplusIonisation, idxPostStep,2);
198  pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3);
199  pmanager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4);
200 
201  } else if( particleName == "mu+" ||
202  particleName == "mu-" ) {
203  //muon
204  G4MuMultipleScattering* aMultipleScattering = new G4MuMultipleScattering();
205  aMultipleScattering->SetLateralDisplasmentFlag(displacementFlg);
206  G4VProcess* aBremsstrahlung = new G4MuBremsstrahlung();
207  G4VProcess* aPairProduction = new G4MuPairProduction();
208  G4VProcess* anIonisation = new G4MuIonisation();
209  //
210  // add processes
211  pmanager->AddProcess(anIonisation);
212  pmanager->AddProcess(aMultipleScattering);
213  pmanager->AddProcess(aBremsstrahlung);
214  pmanager->AddProcess(aPairProduction);
215  //
216  // set ordering for AlongStepDoIt
217  pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
218  pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
219  pmanager->SetProcessOrdering(aBremsstrahlung, idxAlongStep,3);
220  pmanager->SetProcessOrdering(aPairProduction, idxAlongStep,4);
221 
222  //
223  // set ordering for PostStepDoIt
224  pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
225  pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
226  pmanager->SetProcessOrdering(aBremsstrahlung, idxPostStep,3);
227  pmanager->SetProcessOrdering(aPairProduction, idxPostStep,4);
228 
229  } else if ((!particle->IsShortLived()) &&
230  (particle->GetPDGCharge() != 0.0) &&
231  (particle->GetParticleName() != "chargedgeantino")) {
232  // all others charged particles except geantino
233  G4hMultipleScattering* aMultipleScattering = new G4hMultipleScattering();
234  aMultipleScattering->SetLateralDisplasmentFlag(displacementFlg);
235  G4VProcess* anIonisation = new G4hIonisation();
236  //
237  // add processes
238  pmanager->AddProcess(anIonisation);
239  pmanager->AddProcess(aMultipleScattering);
240  //
241  // set ordering for AlongStepDoIt
242  pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
243  pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
244  //
245  // set ordering for PostStepDoIt
246  pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
247  pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
248  }
249  }
250 }
251 
252 #include "G4Decay.hh"
254 
256 {
257  // Add Decay Process and Parallel world Scoring Process
258  G4Decay* theDecayProcess = new G4Decay();
259  G4ParallelWorldScoringProcess* theParallelWorldScoringProcess
260  = new G4ParallelWorldScoringProcess("ParaWorldScoringProc");
261  theParallelWorldScoringProcess->SetParallelWorld("ParallelScoringWorld");
262 
264  while( (*theParticleIterator)() ){
266  G4ProcessManager* pmanager = particle->GetProcessManager();
267  if (theDecayProcess->IsApplicable(*particle)) {
268  pmanager ->AddProcess(theDecayProcess);
269  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
270  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
271  }
272  pmanager->AddProcess(theParallelWorldScoringProcess);
273  pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess, idxAtRest);
274  pmanager->SetProcessOrdering(theParallelWorldScoringProcess, idxAlongStep, 1);
275  pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess, idxPostStep);
276  }
277 }
278 
279 #include "G4Region.hh"
280 #include "G4RegionStore.hh"
281 #include "G4ProductionCuts.hh"
282 
284 {
285  if (verboseLevel >0){
286  G4cout << "ExN07PhysicsList::SetCuts: default cut length : "
287  << G4BestUnit(defaultCutValue,"Length") << G4endl;
288  }
289 
290  // These values are used as the default production thresholds
291  // for the world volume.
293 
294 
295  // Production thresholds for detector regions
296  G4String regName[] = {"Calor-A","Calor-B","Calor-C"};
297  G4double fuc = 1.;
298  for(G4int i=0;i<3;i++)
299  {
300  G4Region* reg = G4RegionStore::GetInstance()->GetRegion(regName[i]);
303  reg->SetProductionCuts(cuts);
304  fuc *= 10.;
305  }
306 }
307 
308