source: trunk/examples/extended/electromagnetic/TestEm14/src/PhysListEmLivermore.cc @ 1337

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

tag geant4.9.4 beta 1 + modifs locales

File size: 6.5 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//
27// $Id: PhysListEmLivermore.cc,v 1.5 2010/04/02 13:22:02 maire Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
33#include "PhysListEmLivermore.hh"
34#include "G4ParticleDefinition.hh"
35#include "G4ProcessManager.hh"
36
37// gamma
38
39#include "G4PhotoElectricEffect.hh"
40#include "G4LivermorePhotoElectricModel.hh"
41
42#include "G4ComptonScattering.hh"
43#include "G4LivermoreComptonModel.hh"
44
45#include "G4GammaConversion.hh"
46#include "G4LivermoreGammaConversionModel.hh"
47
48#include "G4RayleighScattering.hh"
49#include "G4LivermoreRayleighModel.hh"
50
51// e-
52
53#include "G4eIonisation.hh"
54#include "G4LivermoreIonisationModel.hh"
55#include "G4UniversalFluctuation.hh"
56
57#include "G4eBremsstrahlung.hh"
58#include "G4LivermoreBremsstrahlungModel.hh"
59
60// e+
61
62#include "G4eplusAnnihilation.hh"
63
64// mu
65
66#include "G4MuIonisation.hh"
67#include "G4MuBremsstrahlung.hh"
68#include "G4MuPairProduction.hh"
69
70// hadrons, ions
71
72#include "G4hIonisation.hh"
73#include "G4ionIonisation.hh"
74
75
76//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77
78PhysListEmLivermore::PhysListEmLivermore(const G4String& name)
79  :  G4VPhysicsConstructor(name)
80{ }
81
82//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83
84PhysListEmLivermore::~PhysListEmLivermore()
85{ }
86
87//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88
89void PhysListEmLivermore::ConstructProcess()
90{
91  // Add standard EM Processes
92
93  theParticleIterator->reset();
94  while( (*theParticleIterator)() ){
95    G4ParticleDefinition* particle = theParticleIterator->value();
96    G4ProcessManager* pmanager = particle->GetProcessManager();
97    G4String particleName = particle->GetParticleName();
98
99    //Applicability range for Livermore models
100    //for higher energies, the Standard models are used   
101    G4double highEnergyLimit = 1*GeV;
102         
103    if (particleName == "gamma") {
104      // gamma         
105
106      G4PhotoElectricEffect* phot = new G4PhotoElectricEffect();
107      G4LivermorePhotoElectricModel* 
108      photModel = new G4LivermorePhotoElectricModel();
109      photModel->SetHighEnergyLimit(highEnergyLimit);
110      phot->AddEmModel(0, photModel);
111      pmanager->AddDiscreteProcess(phot);
112
113      G4ComptonScattering* compt = new G4ComptonScattering();
114      G4LivermoreComptonModel* 
115      comptModel = new G4LivermoreComptonModel();
116      comptModel->SetHighEnergyLimit(highEnergyLimit);
117      compt->AddEmModel(0, comptModel);
118      pmanager->AddDiscreteProcess(compt);
119
120      G4GammaConversion* conv = new G4GammaConversion();
121      G4LivermoreGammaConversionModel* 
122      convModel = new G4LivermoreGammaConversionModel();
123      convModel->SetHighEnergyLimit(highEnergyLimit);
124      conv->AddEmModel(0, convModel);
125      pmanager->AddDiscreteProcess(conv);
126
127      G4RayleighScattering* rayl = new G4RayleighScattering();
128      G4LivermoreRayleighModel* 
129      raylModel = new G4LivermoreRayleighModel();
130      raylModel->SetHighEnergyLimit(highEnergyLimit);
131      rayl->AddEmModel(0, raylModel);
132      pmanager->AddDiscreteProcess(rayl);
133     
134    } else if (particleName == "e-") {
135      //electron
136
137      G4eIonisation* eIoni = new G4eIonisation();
138      G4LivermoreIonisationModel* 
139      eIoniModel = new G4LivermoreIonisationModel();
140      eIoniModel->SetHighEnergyLimit(highEnergyLimit); 
141      eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation() );
142      pmanager->AddProcess(eIoni,                   -1,-1, 1);
143     
144      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
145      G4LivermoreBremsstrahlungModel* 
146      eBremModel = new G4LivermoreBremsstrahlungModel();
147      eBremModel->SetHighEnergyLimit(highEnergyLimit);
148      eBrem->AddEmModel(0, eBremModel);
149      pmanager->AddProcess(eBrem,                   -1,-1, 2);
150           
151    } else if (particleName == "e+") {
152      //positron
153      pmanager->AddProcess(new G4eIonisation,       -1,-1, 1);
154      pmanager->AddProcess(new G4eBremsstrahlung,   -1,-1, 2);
155      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1, 3);
156     
157    } else if( particleName == "mu+" || 
158               particleName == "mu-"    ) {
159      //muon 
160      pmanager->AddProcess(new G4MuIonisation,      -1,-1, 1);
161      pmanager->AddProcess(new G4MuBremsstrahlung,  -1,-1, 2);
162      pmanager->AddProcess(new G4MuPairProduction,  -1,-1, 3);       
163     
164    } else if( particleName == "alpha" || particleName == "GenericIon" ) { 
165      pmanager->AddProcess(new G4ionIonisation,     -1,-1, 1);
166
167    } else if ((!particle->IsShortLived()) &&
168               (particle->GetPDGCharge() != 0.0) && 
169               (particle->GetParticleName() != "chargedgeantino")) {
170      //all others charged particles except geantino
171      pmanager->AddProcess(new G4hIonisation,       -1,-1, 1);
172    }
173  }
174}
175
176//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
177
Note: See TracBrowser for help on using the repository browser.