ACTARSim
ACTAR TPC Simulation Reference Guide
PhysListEmStandardWVI.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 // $Id: PhysListEmStandardWVI.cc,v 1.1 2010-11-19 15:59:01 vnivanch Exp $
27 // GEANT4 tag $Name: geant4-09-04-patch-02 $
28 //
29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 
32 #include "PhysListEmStandardWVI.hh"
33 #include "G4ParticleDefinition.hh"
34 #include "G4ParticleTable.hh"
35 #include "G4ProcessManager.hh"
36 
37 #include "G4ComptonScattering.hh"
38 #include "G4GammaConversion.hh"
39 #include "G4PhotoElectricEffect.hh"
40 
41 #include "G4eMultipleScattering.hh"
42 #include "G4WentzelVIModel.hh"
43 #include "G4CoulombScattering.hh"
44 #include "G4IonCoulombScatteringModel.hh"
45 #include "G4eIonisation.hh"
46 #include "G4eBremsstrahlung.hh"
47 #include "G4eplusAnnihilation.hh"
48 
49 #include "G4MuMultipleScattering.hh"
50 #include "G4MuIonisation.hh"
51 #include "G4MuBremsstrahlung.hh"
52 #include "G4MuPairProduction.hh"
53 
54 #include "G4hMultipleScattering.hh"
55 #include "G4hIonisation.hh"
56 #include "G4hBremsstrahlung.hh"
57 #include "G4hPairProduction.hh"
58 
59 #include "G4ionIonisation.hh"
60 #include "G4IonParametrisedLossModel.hh"
61 #include "G4NuclearStopping.hh"
62 
63 #include "G4EmProcessOptions.hh"
64 #include "G4MscStepLimitType.hh"
65 
66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67 
69  : G4VPhysicsConstructor(name)
70 {}
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 
75 {}
76 
77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
78 
80 {
81  // Add standard EM Processes
82  //
83  G4ParticleTable::G4PTblDicIterator* theParticleIterator = G4ParticleTable::GetParticleTable()->GetIterator();
84  theParticleIterator->reset();
85  while( (*theParticleIterator)() ){
86  G4ParticleDefinition* particle = theParticleIterator->value();
87  G4ProcessManager* pmanager = particle->GetProcessManager();
88  G4String particleName = particle->GetParticleName();
89 
90  if (particleName == "gamma") {
91  // gamma
92  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
93  pmanager->AddDiscreteProcess(new G4ComptonScattering);
94  pmanager->AddDiscreteProcess(new G4GammaConversion);
95 
96  } else if (particleName == "e-") {
97  //electron
98  G4eMultipleScattering* msc = new G4eMultipleScattering();
99  msc->AddEmModel(0, new G4WentzelVIModel());
100  pmanager->AddProcess(msc, -1, 1, 1);
101  pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
102  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
103  pmanager->AddProcess(new G4CoulombScattering, -1,-1, 4);
104 
105  } else if (particleName == "e+") {
106  //positron
107  G4eMultipleScattering* msc = new G4eMultipleScattering();
108  msc->AddEmModel(0, new G4WentzelVIModel());
109  pmanager->AddProcess(msc, -1, 1, 1);
110  pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
111  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
112  pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
113  pmanager->AddProcess(new G4CoulombScattering, -1,-1, 5);
114 
115  } else if (particleName == "mu+" ||
116  particleName == "mu-" ) {
117  //muon
118  G4MuMultipleScattering* msc = new G4MuMultipleScattering();
119  msc->AddEmModel(0, new G4WentzelVIModel());
120  pmanager->AddProcess(msc, -1, 1, 1);
121  pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
122  pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
123  pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);
124  pmanager->AddProcess(new G4CoulombScattering, -1,-1, 5);
125 
126  } else if( particleName == "proton" ||
127  particleName == "pi-" ||
128  particleName == "pi+" ) {
129  //proton
130  G4hMultipleScattering* msc = new G4hMultipleScattering();
131  msc->AddEmModel(0, new G4WentzelVIModel());
132  pmanager->AddProcess(msc, -1, 1, 1);
133  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
134  pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
135  pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
136  pmanager->AddProcess(new G4CoulombScattering, -1,-1, 5);
137 
138  } else if( particleName == "alpha" ||
139  particleName == "He3" ) {
140  //alpha
141  //G4hMultipleScattering* msc = new G4hMultipleScattering();
142  G4CoulombScattering* msc = new G4CoulombScattering();
143  msc->SetBuildTableFlag(false);
144  msc->AddEmModel(0, new G4IonCoulombScatteringModel());
145  pmanager->AddDiscreteProcess(msc);
146  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
147  pmanager->AddProcess(new G4CoulombScattering, -1,-1, 3);
148  pmanager->AddProcess(new G4NuclearStopping, -1, 3,-1);
149 
150  } else if( particleName == "GenericIon" ) {
151  //Ions
152  //G4hMultipleScattering* msc = new G4hMultipleScattering();
153  G4CoulombScattering* msc = new G4CoulombScattering();
154  msc->SetBuildTableFlag(false);
155  msc->AddEmModel(0, new G4IonCoulombScatteringModel());
156  pmanager->AddDiscreteProcess(msc);
157  G4ionIonisation* ionIoni = new G4ionIonisation();
158  ionIoni->SetEmModel(new G4IonParametrisedLossModel());
159  pmanager->AddProcess(ionIoni, -1, 2, 2);
160  pmanager->AddProcess(new G4CoulombScattering, -1,-1, 3);
161  pmanager->AddProcess(new G4NuclearStopping, -1, 3,-1);
162 
163  } else if ((!particle->IsShortLived()) &&
164  (particle->GetPDGCharge() != 0.0) &&
165  (particle->GetParticleName() != "chargedgeantino")) {
166  //all others charged particles except geantino
167  G4hMultipleScattering* msc = new G4hMultipleScattering();
168  msc->AddEmModel(0, new G4WentzelVIModel());
169  pmanager->AddProcess(msc, -1, 1, 1);
170  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
171  pmanager->AddProcess(new G4CoulombScattering, -1,-1, 3);
172  }
173  }
174 
175  // Em options
176  //
177  // Main options and setting parameters are shown here.
178  // Several of them have default values.
179  //
180  G4EmProcessOptions emOptions;
181 
182  //multiple coulomb scattering
183  //
184  emOptions.SetPolarAngleLimit(0.2);
185 }
186 
187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandardWVI(const G4String &name="standardWVI")