ACTARSim
ACTAR TPC Simulation Reference Guide
PhysListEmStandardGS.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: PhysListEmStandardGS.cc,v 1.1 2009-11-16 13:54:53 maire Exp $
27 // GEANT4 tag $Name: geant4-09-04-patch-02 $
28 //
29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 
32 #include "PhysListEmStandardGS.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 "G4GoudsmitSaundersonMscModel.hh"
43 #include "G4eIonisation.hh"
44 #include "G4eBremsstrahlung.hh"
45 #include "G4eplusAnnihilation.hh"
46 
47 #include "G4MuMultipleScattering.hh"
48 #include "G4MuIonisation.hh"
49 #include "G4MuBremsstrahlung.hh"
50 #include "G4MuPairProduction.hh"
51 
52 #include "G4hMultipleScattering.hh"
53 #include "G4hIonisation.hh"
54 #include "G4hBremsstrahlung.hh"
55 #include "G4hPairProduction.hh"
56 
57 #include "G4ionIonisation.hh"
58 #include "G4IonParametrisedLossModel.hh"
59 #include "G4NuclearStopping.hh"
60 
61 #include "G4EmProcessOptions.hh"
62 #include "G4MscStepLimitType.hh"
63 
64 #include "G4PhysicalConstants.hh"
65 #include "G4SystemOfUnits.hh"
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68 
70  : G4VPhysicsConstructor(name)
71 {}
72 
73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
74 
76 {}
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81 {
82  // Add standard EM Processes
83  //
84  G4ParticleTable::G4PTblDicIterator* theParticleIterator = G4ParticleTable::GetParticleTable()->GetIterator();
85  theParticleIterator->reset();
86  while( (*theParticleIterator)() ){
87  G4ParticleDefinition* particle = theParticleIterator->value();
88  G4ProcessManager* pmanager = particle->GetProcessManager();
89  G4String particleName = particle->GetParticleName();
90 
91  if (particleName == "gamma") {
92  // gamma
93  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
94  pmanager->AddDiscreteProcess(new G4ComptonScattering);
95  pmanager->AddDiscreteProcess(new G4GammaConversion);
96 
97  } else if (particleName == "e-") {
98  //electron
99  G4eMultipleScattering* msc = new G4eMultipleScattering();
100  msc->AddEmModel(0, new G4GoudsmitSaundersonMscModel());
101  pmanager->AddProcess(msc, -1, 1, 1);
102  pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
103  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
104 
105  } else if (particleName == "e+") {
106  //positron
107  G4eMultipleScattering* msc = new G4eMultipleScattering();
108  msc->AddEmModel(0, new G4GoudsmitSaundersonMscModel());
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 
114  } else if (particleName == "mu+" ||
115  particleName == "mu-" ) {
116  //muon
117  pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);
118  pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
119  pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
120  pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);
121 
122  } else if( particleName == "proton" ||
123  particleName == "pi-" ||
124  particleName == "pi+" ) {
125  //proton
126  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
127  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
128  pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
129  pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
130 
131  } else if( particleName == "alpha" ||
132  particleName == "He3" ) {
133  //alpha
134  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
135  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
136  pmanager->AddProcess(new G4NuclearStopping, -1, 3,-1);
137 
138  } else if( particleName == "GenericIon" ) {
139  //Ions
140  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
141  G4ionIonisation* ionIoni = new G4ionIonisation();
142  ionIoni->SetEmModel(new G4IonParametrisedLossModel());
143  pmanager->AddProcess(ionIoni, -1, 2, 2);
144  pmanager->AddProcess(new G4NuclearStopping, -1, 3,-1);
145 
146  } else if ((!particle->IsShortLived()) &&
147  (particle->GetPDGCharge() != 0.0) &&
148  (particle->GetParticleName() != "chargedgeantino")) {
149  //all others charged particles except geantino
150  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
151  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
152  }
153  }
154 
155  // Em options
156  //
157  // Main options and setting parameters are shown here.
158  // Several of them have default values.
159  //
160  G4EmProcessOptions emOptions;
161 
162  //physics tables
163  //
164  emOptions.SetMinEnergy(100*eV); //default
165  emOptions.SetMaxEnergy(100*TeV); //default
166  emOptions.SetDEDXBinning(12*20); //default=12*7
167  emOptions.SetLambdaBinning(12*20); //default=12*7
168  emOptions.SetSplineFlag(true); //default
169 
170  //multiple coulomb scattering
171  //
172  emOptions.SetMscStepLimitation(fUseDistanceToBoundary); //default=fUseSafety
173  emOptions.SetMscRangeFactor(0.04); //default
174  emOptions.SetMscGeomFactor (2.5); //default
175  emOptions.SetSkin(3.); //default
176 
177  //energy loss
178  //
179  emOptions.SetStepFunction(0.2, 100*um); //default=(0.2, 1*mm)
180  emOptions.SetLinearLossLimit(1.e-2); //default
181 
182  //ionization
183  //
184  emOptions.SetSubCutoff(false); //default
185 }
186 
187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandardGS(const G4String &name="standardGS")