source: trunk/source/physics_lists/builders/src/G4EmPenelopePhysics.cc @ 1273

Last change on this file since 1273 was 1228, checked in by garnier, 14 years ago

update geant4.9.3 tag

File size: 12.9 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: G4EmPenelopePhysics.cc,v 1.7 2009/11/24 12:53:22 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-03 $
28
29#include "G4EmPenelopePhysics.hh"
30
31#include "G4ParticleDefinition.hh"
32#include "G4ProcessManager.hh"
33
34// *** Processes and models
35
36// gamma
37
38#include "G4PhotoElectricEffect.hh"
39#include "G4PenelopePhotoElectricModel.hh"
40
41#include "G4ComptonScattering.hh"
42#include "G4PenelopeComptonModel.hh"
43
44#include "G4GammaConversion.hh"
45#include "G4PenelopeGammaConversionModel.hh"
46
47#include "G4RayleighScattering.hh"
48#include "G4PenelopeRayleighModel.hh"
49
50// e- and e+
51
52#include "G4eMultipleScattering.hh"
53#include "G4UniversalFluctuation.hh"
54
55#include "G4eIonisation.hh"
56#include "G4PenelopeIonisationModel.hh"
57
58#include "G4eBremsstrahlung.hh"
59#include "G4PenelopeBremsstrahlungModel.hh"
60
61// e+ only
62
63#include "G4eplusAnnihilation.hh"
64#include "G4PenelopeAnnihilationModel.hh"
65
66// mu
67
68#include "G4MuMultipleScattering.hh"
69#include "G4MuIonisation.hh"
70#include "G4MuBremsstrahlung.hh"
71#include "G4MuPairProduction.hh"
72
73// hadrons
74
75#include "G4hMultipleScattering.hh"
76#include "G4MscStepLimitType.hh"
77
78#include "G4hBremsstrahlung.hh"
79#include "G4hPairProduction.hh"
80
81#include "G4hIonisation.hh"
82#include "G4ionIonisation.hh"
83#include "G4IonParametrisedLossModel.hh"
84#include "G4NuclearStopping.hh"
85
86// msc models
87#include "G4UrbanMscModel93.hh"
88#include "G4WentzelVIModel.hh"
89#include "G4CoulombScattering.hh"
90
91//
92
93#include "G4LossTableManager.hh"
94#include "G4EmProcessOptions.hh"
95
96// particles
97
98#include "G4Gamma.hh"
99#include "G4Electron.hh"
100#include "G4Positron.hh"
101#include "G4MuonPlus.hh"
102#include "G4MuonMinus.hh"
103#include "G4PionPlus.hh"
104#include "G4PionMinus.hh"
105#include "G4KaonPlus.hh"
106#include "G4KaonMinus.hh"
107#include "G4Proton.hh"
108#include "G4AntiProton.hh"
109#include "G4Deuteron.hh"
110#include "G4Triton.hh"
111#include "G4He3.hh"
112#include "G4Alpha.hh"
113#include "G4GenericIon.hh"
114
115//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116
117G4EmPenelopePhysics::G4EmPenelopePhysics(
118    G4int ver, const G4String& name)
119  : G4VPhysicsConstructor(name), verbose(ver)
120{
121  G4LossTableManager::Instance();
122}
123
124//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
125
126G4EmPenelopePhysics::~G4EmPenelopePhysics()
127{}
128
129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
130
131void G4EmPenelopePhysics::ConstructParticle()
132{
133// gamma
134  G4Gamma::Gamma();
135
136// leptons
137  G4Electron::Electron();
138  G4Positron::Positron();
139  G4MuonPlus::MuonPlus();
140  G4MuonMinus::MuonMinus();
141
142// mesons
143  G4PionPlus::PionPlusDefinition();
144  G4PionMinus::PionMinusDefinition();
145  G4KaonPlus::KaonPlusDefinition();
146  G4KaonMinus::KaonMinusDefinition();
147
148// baryons
149  G4Proton::Proton();
150  G4AntiProton::AntiProton();
151
152// ions
153  G4Deuteron::Deuteron();
154  G4Triton::Triton();
155  G4He3::He3();
156  G4Alpha::Alpha();
157  G4GenericIon::GenericIonDefinition();
158}
159
160//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
161
162void G4EmPenelopePhysics::ConstructProcess()
163{
164  // Add Penelope EM Processes
165
166  theParticleIterator->reset();
167
168  while( (*theParticleIterator)() ){
169 
170    G4ParticleDefinition* particle = theParticleIterator->value();
171    G4ProcessManager* pmanager = particle->GetProcessManager();
172    G4String particleName = particle->GetParticleName();
173   
174    if(verbose > 1)
175      G4cout << "### " << GetPhysicsName() << " instantiates for " 
176             << particleName << G4endl;
177
178    //Applicability range for Penelope models
179    //for higher energies, the Standard models are used   
180    G4double PenelopeHighEnergyLimit = 1.0*GeV;
181
182    if (particleName == "gamma") {
183
184      //Photo-electric effect
185      G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
186      G4PenelopePhotoElectricModel* thePEPenelopeModel = new 
187        G4PenelopePhotoElectricModel();
188      thePEPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
189      thePhotoElectricEffect->AddEmModel(0,thePEPenelopeModel);
190      pmanager->AddDiscreteProcess(thePhotoElectricEffect);
191
192      //Compton scattering
193      G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
194      G4PenelopeComptonModel* theComptonPenelopeModel = 
195        new G4PenelopeComptonModel();
196      theComptonPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
197      theComptonScattering->AddEmModel(0,theComptonPenelopeModel);
198      pmanager->AddDiscreteProcess(theComptonScattering);
199
200      //Gamma conversion
201      G4GammaConversion* theGammaConversion = new G4GammaConversion();
202      G4PenelopeGammaConversionModel* theGCPenelopeModel = 
203        new G4PenelopeGammaConversionModel();
204      theGammaConversion->AddEmModel(0,theGCPenelopeModel);
205      pmanager->AddDiscreteProcess(theGammaConversion);
206
207      //Rayleigh scattering
208      G4RayleighScattering* theRayleigh = new G4RayleighScattering();
209      G4PenelopeRayleighModel* theRayleighPenelopeModel = 
210        new G4PenelopeRayleighModel();
211      theRayleighPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
212      theRayleigh->AddEmModel(0,theRayleighPenelopeModel);
213      pmanager->AddDiscreteProcess(theRayleigh);
214
215    } else if (particleName == "e-") {
216
217      G4eMultipleScattering* msc = new G4eMultipleScattering();
218      msc->AddEmModel(0, new G4UrbanMscModel93());
219      msc->SetStepLimitType(fUseDistanceToBoundary);
220      pmanager->AddProcess(msc,                   -1, 1, 1);
221     
222      //Ionisation
223      G4eIonisation* eIoni = new G4eIonisation();
224      G4PenelopeIonisationModel* theIoniPenelope = 
225        new G4PenelopeIonisationModel();
226      theIoniPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
227      eIoni->AddEmModel(0,theIoniPenelope,new G4UniversalFluctuation());
228      eIoni->SetStepFunction(0.2, 100*um); //     
229      pmanager->AddProcess(eIoni,                 -1, 2, 2);
230     
231      //Bremsstrahlung
232      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
233      G4PenelopeBremsstrahlungModel* theBremPenelope = new 
234        G4PenelopeBremsstrahlungModel();
235      theBremPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
236      eBrem->AddEmModel(0,theBremPenelope);
237      pmanager->AddProcess(eBrem, -1,-3, 3);
238
239    } else if (particleName == "e+") {
240   
241      G4eMultipleScattering* msc = new G4eMultipleScattering();
242      msc->AddEmModel(0, new G4UrbanMscModel93());
243      msc->SetStepLimitType(fUseDistanceToBoundary);
244      pmanager->AddProcess(msc,                   -1, 1, 1);
245
246      //Ionisation
247      G4eIonisation* eIoni = new G4eIonisation();
248      G4PenelopeIonisationModel* theIoniPenelope = 
249        new G4PenelopeIonisationModel();
250      theIoniPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
251      eIoni->AddEmModel(0,theIoniPenelope,new G4UniversalFluctuation());
252      eIoni->SetStepFunction(0.2, 100*um); //     
253      pmanager->AddProcess(eIoni,                 -1, 2, 2);
254
255       //Bremsstrahlung
256      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
257      G4PenelopeBremsstrahlungModel* theBremPenelope = new 
258        G4PenelopeBremsstrahlungModel();
259      theBremPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
260      eBrem->AddEmModel(0,theBremPenelope);
261      pmanager->AddProcess(eBrem, -1,-3, 3);
262     
263      //Annihilation
264      G4eplusAnnihilation* eAnni = new G4eplusAnnihilation();
265      G4PenelopeAnnihilationModel* theAnnPenelope = new 
266        G4PenelopeAnnihilationModel();
267      theAnnPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
268      eAnni->AddEmModel(0,theAnnPenelope);
269      pmanager->AddProcess(eAnni,0,-1, 4);
270
271    } else if (particleName == "mu+" ||
272               particleName == "mu-"    ) {
273
274      // Identical to G4EmStandardPhysics_option3
275     
276      G4MuMultipleScattering* msc = new G4MuMultipleScattering();
277      msc->AddEmModel(0, new G4WentzelVIModel());
278      pmanager->AddProcess(msc,                       -1, 1, 1);
279
280      G4MuIonisation* muIoni = new G4MuIonisation();
281      muIoni->SetStepFunction(0.2, 50*um);         
282
283      pmanager->AddProcess(muIoni,                    -1, 2, 2);     
284      pmanager->AddProcess(new G4MuBremsstrahlung,    -1,-3, 3);     
285      pmanager->AddProcess(new G4MuPairProduction,    -1,-4, 4);
286      pmanager->AddDiscreteProcess(new G4CoulombScattering());
287
288    } else if (particleName == "GenericIon") {
289
290      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
291
292      G4ionIonisation* ionIoni = new G4ionIonisation();
293      ionIoni->SetEmModel(new G4IonParametrisedLossModel());
294      ionIoni->SetStepFunction(0.1, 10*um);
295      pmanager->AddProcess(ionIoni,                   -1, 2, 2);
296      pmanager->AddProcess(new G4NuclearStopping(),   -1, 3,-1);
297
298    } else if (particleName == "alpha" ||
299               particleName == "He3" ) {
300
301      // Identical to G4EmStandardPhysics_option3
302     
303      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
304
305      G4ionIonisation* ionIoni = new G4ionIonisation();
306      ionIoni->SetStepFunction(0.1, 20*um);
307      pmanager->AddProcess(ionIoni,                   -1, 2, 2);
308      pmanager->AddProcess(new G4NuclearStopping(),   -1, 3,-1);
309
310    } else if (particleName == "pi+" ||
311               particleName == "pi-" ||
312               particleName == "kaon+" ||
313               particleName == "kaon-" ||
314               particleName == "proton" ) {
315
316      // Identical to G4EmStandardPhysics_option3
317     
318      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
319     
320      G4hIonisation* hIoni = new G4hIonisation();
321      hIoni->SetStepFunction(0.2, 50*um);
322
323      pmanager->AddProcess(hIoni,                     -1, 2, 2);
324      pmanager->AddProcess(new G4hBremsstrahlung,     -1,-3, 3);
325      pmanager->AddProcess(new G4hPairProduction,     -1,-4, 4);
326
327    } else if (particleName == "B+" ||
328               particleName == "B-" ||
329               particleName == "D+" ||
330               particleName == "D-" ||
331               particleName == "Ds+" ||
332               particleName == "Ds-" ||
333               particleName == "anti_lambda_c+" ||
334               particleName == "anti_omega-" ||
335               particleName == "anti_proton" ||
336               particleName == "anti_sigma_c+" ||
337               particleName == "anti_sigma_c++" ||
338               particleName == "anti_sigma+" ||
339               particleName == "anti_sigma-" ||
340               particleName == "anti_xi_c+" ||
341               particleName == "anti_xi-" ||
342               particleName == "deuteron" ||
343               particleName == "lambda_c+" ||
344               particleName == "omega-" ||
345               particleName == "sigma_c+" ||
346               particleName == "sigma_c++" ||
347               particleName == "sigma+" ||
348               particleName == "sigma-" ||
349               particleName == "tau+" ||
350               particleName == "tau-" ||
351               particleName == "triton" ||
352               particleName == "xi_c+" ||
353               particleName == "xi-" ) {
354
355      // Identical to G4EmStandardPhysics_option3
356     
357      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
358      pmanager->AddProcess(new G4hIonisation,         -1, 2, 2);
359
360    }
361  }
362   
363  // Em options
364  //     
365  G4EmProcessOptions opt;
366  opt.SetVerbose(verbose);
367 
368  // Multiple Coulomb scattering
369  //
370  //opt.SetMscStepLimitation(fUseDistanceToBoundary);
371  //opt.SetMscRangeFactor(0.02);
372   
373  // Physics tables
374  //
375
376  opt.SetMinEnergy(100*eV);
377  opt.SetMaxEnergy(10*TeV);
378  opt.SetDEDXBinning(220);
379  opt.SetLambdaBinning(220);
380
381  //opt.SetSplineFlag(true);
382  opt.SetPolarAngleLimit(0.2);
383   
384  // Ionization
385  //
386  //opt.SetSubCutoff(true);   
387}
388
389//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracBrowser for help on using the repository browser.