source: trunk/examples/extended/electromagnetic/TestEm7/src/PhysListEmStandard.cc

Last change on this file was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 7.7 KB
Line 
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: PhysListEmStandard.cc,v 1.21 2010/05/19 09:37:55 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-01 $
28//
29//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31
32#include "PhysListEmStandard.hh"
33#include "G4ParticleDefinition.hh"
34#include "G4ProcessManager.hh"
35
36#include "G4ComptonScattering.hh"
37#include "G4GammaConversion.hh"
38#include "G4PhotoElectricEffect.hh"
39
40#include "G4eMultipleScattering.hh"
41#include "G4UrbanMscModel93.hh"
42#include "G4eIonisation.hh"
43#include "G4eBremsstrahlung.hh"
44#include "G4eplusAnnihilation.hh"
45
46#include "G4MuMultipleScattering.hh"
47#include "G4MuIonisation.hh"
48#include "G4MuBremsstrahlung.hh"
49#include "G4MuPairProduction.hh"
50
51#include "G4hMultipleScattering.hh"
52#include "G4hIonisation.hh"
53#include "G4hBremsstrahlung.hh"
54#include "G4hPairProduction.hh"
55
56#include "G4ionIonisation.hh"
57#include "G4IonParametrisedLossModel.hh"
58#include "G4NuclearStopping.hh"
59
60#include "G4EmProcessOptions.hh"
61#include "G4MscStepLimitType.hh"
62
63//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
64
65PhysListEmStandard::PhysListEmStandard(const G4String& name)
66   :  G4VPhysicsConstructor(name)
67{}
68
69//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70
71PhysListEmStandard::~PhysListEmStandard()
72{}
73
74//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75
76void PhysListEmStandard::ConstructProcess()
77{
78  // Add standard EM Processes
79  //
80
81  theParticleIterator->reset();
82  while( (*theParticleIterator)() ){
83    G4ParticleDefinition* particle = theParticleIterator->value();
84    G4ProcessManager* pmanager = particle->GetProcessManager();
85    G4String particleName = particle->GetParticleName();
86     
87    if (particleName == "gamma") {
88      // gamma
89      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
90      pmanager->AddDiscreteProcess(new G4ComptonScattering);
91      pmanager->AddDiscreteProcess(new G4GammaConversion);
92     
93    } else if (particleName == "e-") {
94      //electron
95      G4eMultipleScattering* msc = new G4eMultipleScattering();
96      msc->AddEmModel(0, new G4UrbanMscModel93());
97      pmanager->AddProcess(msc,                       -1, 1, 1);
98      G4eIonisation* eIoni = new G4eIonisation();
99      eIoni->SetStepFunction(0.2, 100*um);     
100      pmanager->AddProcess(eIoni,                     -1, 2, 2);     
101      pmanager->AddProcess(new G4eBremsstrahlung,     -1, 3, 3);
102           
103    } else if (particleName == "e+") {
104      //positron
105      G4eMultipleScattering* msc = new G4eMultipleScattering();
106      msc->AddEmModel(0, new G4UrbanMscModel93());
107      pmanager->AddProcess(msc,                       -1, 1, 1);
108      G4eIonisation* eIoni = new G4eIonisation();
109      eIoni->SetStepFunction(0.2, 100*um);     
110      pmanager->AddProcess(eIoni,                     -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      G4MuIonisation* muIoni = new G4MuIonisation();
119      muIoni->SetStepFunction(0.2, 50*um);         
120      pmanager->AddProcess(muIoni,                     -1, 2, 2);     
121      pmanager->AddProcess(new G4MuBremsstrahlung,     -1, 3, 3);
122      pmanager->AddProcess(new G4MuPairProduction,     -1, 4, 4);
123             
124    } else if( particleName == "proton" ||
125               particleName == "pi-" ||
126               particleName == "pi+"    ) {
127      //proton 
128      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
129      G4hIonisation* hIoni = new G4hIonisation();
130      hIoni->SetStepFunction(0.2, 50*um);
131      pmanager->AddProcess(hIoni,                     -1, 2, 2);     
132      pmanager->AddProcess(new G4hBremsstrahlung,     -1, 3, 3);
133      pmanager->AddProcess(new G4hPairProduction,     -1, 4, 4);       
134      pmanager->AddProcess(new G4NuclearStopping,     -1, 5,-1);
135     
136    } else if( particleName == "alpha" || 
137               particleName == "He3"    ) {
138      //alpha
139      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
140      G4ionIonisation* ionIoni = new G4ionIonisation();
141      ionIoni->SetStepFunction(0.1, 20*um);
142      pmanager->AddProcess(ionIoni,                   -1, 2, 2);     
143      pmanager->AddProcess(new G4NuclearStopping,     -1, 3,-1);
144           
145    } else if( particleName == "GenericIon" ) {
146      //Ions
147      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
148      G4ionIonisation* ionIoni = new G4ionIonisation();
149      ionIoni->SetEmModel(new G4IonParametrisedLossModel());
150      ionIoni->SetStepFunction(0.1, 20*um);     
151      pmanager->AddProcess(ionIoni,                   -1, 2, 2);     
152      pmanager->AddProcess(new G4NuclearStopping,     -1, 3,-1);     
153     
154    } else if ((!particle->IsShortLived()) &&
155               (particle->GetPDGCharge() != 0.0) && 
156               (particle->GetParticleName() != "chargedgeantino")) {
157      //all others charged particles except geantino
158      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
159      pmanager->AddProcess(new G4hIonisation,         -1, 2, 2);
160    }
161  }
162
163  // Em options
164  //
165  // Main options and setting parameters are shown here.
166  // Several of them have default values.
167  //
168  G4EmProcessOptions emOptions;
169 
170  //physics tables
171  //
172  emOptions.SetMinEnergy(100*eV);       //default   
173  emOptions.SetMaxEnergy(100*TeV);      //default 
174  emOptions.SetDEDXBinning(12*20);      //default=12*7
175  emOptions.SetLambdaBinning(12*20);    //default=12*7
176  emOptions.SetSplineFlag(true);        //default
177     
178  //multiple coulomb scattering
179  //
180  emOptions.SetMscStepLimitation(fUseDistanceToBoundary);  //default=fUseSafety
181  emOptions.SetMscRangeFactor(0.04);    //default
182  emOptions.SetMscGeomFactor (2.5);     //default       
183  emOptions.SetSkin(3.);                //default
184   
185  //ionization
186  //
187  emOptions.SetSubCutoff(false);        //default
188}
189
190//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191
Note: See TracBrowser for help on using the repository browser.