Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
electromagnetic/TestEm5/src/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 /// \file electromagnetic/TestEm5/src/PhysListEmStandardGS.cc
27 /// \brief Implementation of the PhysListEmStandardGS class
28 //
29 // $Id: PhysListEmStandardGS.cc 68585 2013-04-01 23:35:07Z adotti $
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "PhysListEmStandardGS.hh"
35 #include "G4ParticleDefinition.hh"
36 #include "G4ProcessManager.hh"
37 
38 #include "G4ComptonScattering.hh"
39 #include "G4GammaConversion.hh"
40 #include "G4PhotoElectricEffect.hh"
41 
42 #include "G4eMultipleScattering.hh"
44 #include "G4eIonisation.hh"
45 #include "G4eBremsstrahlung.hh"
46 #include "G4eplusAnnihilation.hh"
47 
49 #include "G4MuIonisation.hh"
50 #include "G4MuBremsstrahlung.hh"
51 #include "G4MuPairProduction.hh"
52 
53 #include "G4hMultipleScattering.hh"
54 #include "G4hIonisation.hh"
55 #include "G4hBremsstrahlung.hh"
56 #include "G4hPairProduction.hh"
57 
58 #include "G4ionIonisation.hh"
60 #include "G4NuclearStopping.hh"
61 
62 #include "G4EmProcessOptions.hh"
63 #include "G4MscStepLimitType.hh"
64 
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 
85  aParticleIterator->reset();
86  while( (*aParticleIterator)() ){
87  G4ParticleDefinition* particle = aParticleIterator->value();
88  G4ProcessManager* pmanager = particle->GetProcessManager();
89  G4String particleName = particle->GetParticleName();
90 
91  if (particleName == "gamma") {
92  // gamma
96 
97  } else if (particleName == "e-") {
98  //electron
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
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......
188 
void SetSkin(G4double val)
void SetSplineFlag(G4bool val)
void SetMinEnergy(G4double val)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void SetMscGeomFactor(G4double val)
const XML_Char * name
void SetStepFunction(G4double v1, G4double v2)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
void SetDEDXBinning(G4int val)
void SetLambdaBinning(G4int val)
#define aParticleIterator
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetLinearLossLimit(G4double val)
void SetMaxEnergy(G4double val)
void AddEmModel(G4int order, G4VEmModel *, const G4Region *region=0)
void SetEmModel(G4VEmModel *, G4int index=1)
PhysListEmStandardGS(const G4String &name="standardGS")
void SetMscStepLimitation(G4MscStepLimitType val)
G4double GetPDGCharge() const
void SetMscRangeFactor(G4double val)
void SetSubCutoff(G4bool val, const G4Region *r=0)