source: trunk/environments/g4py/site-modules/physics_lists/ExN03pl/ExN03PhysicsList.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: 8.2 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: ExN03PhysicsList.cc,v 1.5 2010/06/04 05:45:57 kmura Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30//
31
32//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35#include "ExN03PhysicsList.hh"
36
37#include "G4ProcessManager.hh"
38#include "G4ParticleTypes.hh"
39
40//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
42ExN03PhysicsList::ExN03PhysicsList():  G4VUserPhysicsList()
43{
44 defaultCutValue = 1.0*mm;
45 SetVerboseLevel(1);
46}
47
48//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49
50ExN03PhysicsList::~ExN03PhysicsList()
51{}
52
53//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54
55void ExN03PhysicsList::ConstructParticle()
56{
57  // In this method, static member functions should be called
58  // for all particles which you want to use.
59  // This ensures that objects of these particle types will be
60  // created in the program.
61
62  ConstructBosons();
63  ConstructLeptons();
64  ConstructMesons();
65  ConstructBaryons();
66}
67
68//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69
70void ExN03PhysicsList::ConstructBosons()
71{
72  // pseudo-particles
73  G4Geantino::GeantinoDefinition();
74  G4ChargedGeantino::ChargedGeantinoDefinition();
75
76  // gamma
77  G4Gamma::GammaDefinition();
78
79  // optical photon
80  G4OpticalPhoton::OpticalPhotonDefinition();
81}
82
83//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
85void ExN03PhysicsList::ConstructLeptons()
86{
87  // leptons
88  G4Electron::ElectronDefinition();
89  G4Positron::PositronDefinition();
90  G4MuonPlus::MuonPlusDefinition();
91  G4MuonMinus::MuonMinusDefinition();
92
93  G4NeutrinoE::NeutrinoEDefinition();
94  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
95  G4NeutrinoMu::NeutrinoMuDefinition();
96  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
97}
98
99//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100
101void ExN03PhysicsList::ConstructMesons()
102{
103 //  mesons
104  G4PionPlus::PionPlusDefinition();
105  G4PionMinus::PionMinusDefinition();
106  G4PionZero::PionZeroDefinition();
107  G4Eta::EtaDefinition();
108  G4EtaPrime::EtaPrimeDefinition();
109  G4KaonPlus::KaonPlusDefinition();
110  G4KaonMinus::KaonMinusDefinition();
111  G4KaonZero::KaonZeroDefinition();
112  G4AntiKaonZero::AntiKaonZeroDefinition();
113  G4KaonZeroLong::KaonZeroLongDefinition();
114  G4KaonZeroShort::KaonZeroShortDefinition();
115}
116
117//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118
119void ExN03PhysicsList::ConstructBaryons()
120{
121//  barions
122  G4Proton::ProtonDefinition();
123  G4AntiProton::AntiProtonDefinition();
124  G4Neutron::NeutronDefinition();
125  G4AntiNeutron::AntiNeutronDefinition();
126}
127
128
129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
130
131void ExN03PhysicsList::ConstructProcess()
132{
133  AddTransportation();
134  ConstructEM();
135  ConstructGeneral();
136}
137
138//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139
140#include "G4ComptonScattering.hh"
141#include "G4GammaConversion.hh"
142#include "G4PhotoElectricEffect.hh"
143
144#include "G4eMultipleScattering.hh"
145#include "G4MuMultipleScattering.hh"
146#include "G4hMultipleScattering.hh"
147
148#include "G4eIonisation.hh"
149#include "G4eBremsstrahlung.hh"
150#include "G4eplusAnnihilation.hh"
151
152#include "G4MuIonisation.hh"
153#include "G4MuBremsstrahlung.hh"
154#include "G4MuPairProduction.hh"
155
156#include "G4hIonisation.hh"
157
158//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
159
160void ExN03PhysicsList::ConstructEM()
161{
162  theParticleIterator->reset();
163  while( (*theParticleIterator)() ){
164    G4ParticleDefinition* particle = theParticleIterator->value();
165    G4ProcessManager* pmanager = particle->GetProcessManager();
166    G4String particleName = particle->GetParticleName();
167   
168    if (particleName == "gamma") {
169      // gamma         
170      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
171      pmanager->AddDiscreteProcess(new G4ComptonScattering);
172      pmanager->AddDiscreteProcess(new G4GammaConversion);
173     
174    } else if (particleName == "e-") {
175      //electron
176      pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
177      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
178      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);     
179
180    } else if (particleName == "e+") {
181      //positron
182      pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
183      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
184      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
185      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);
186
187    } else if( particleName == "mu+" || 
188               particleName == "mu-"    ) {
189      //muon 
190      pmanager->AddProcess(new G4MuMultipleScattering,-1, 1,1);
191      pmanager->AddProcess(new G4MuIonisation,      -1, 2,2);
192      pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3,3);
193      pmanager->AddProcess(new G4MuPairProduction,  -1, 4,4);       
194     
195    } else if ((!particle->IsShortLived()) &&
196               (particle->GetPDGCharge() != 0.0) && 
197               (particle->GetParticleName() != "chargedgeantino")) {
198      //all others charged particles except geantino
199      pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1);
200      pmanager->AddProcess(new G4hIonisation,       -1, 2,2); 
201    }
202  }
203}
204
205//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
206
207#include "G4Decay.hh"
208
209void ExN03PhysicsList::ConstructGeneral()
210{
211  // Add Decay Process
212   G4Decay* theDecayProcess = new G4Decay();
213  theParticleIterator->reset();
214  while( (*theParticleIterator)() ){
215    G4ParticleDefinition* particle = theParticleIterator->value();
216    G4ProcessManager* pmanager = particle->GetProcessManager();
217    if (theDecayProcess->IsApplicable(*particle)) { 
218      pmanager ->AddProcess(theDecayProcess);
219      // set ordering for PostStepDoIt and AtRestDoIt
220      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
221      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
222    }
223  }
224}
225
226//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
227
228void ExN03PhysicsList::SetCuts()
229{
230  if (verboseLevel >0){
231    G4cout << "ExN03PhysicsList::SetCuts:";
232    G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
233  }
234
235  // set cut values for gamma at first and for e- second and next for e+,
236  // because some processes for e+/e- need cut values for gamma
237  //
238  SetCutValue(defaultCutValue, "gamma");
239  SetCutValue(defaultCutValue, "e-");
240  SetCutValue(defaultCutValue, "e+");
241
242  if (verboseLevel>0) DumpCutValuesTable();
243}
244
245//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
246
Note: See TracBrowser for help on using the repository browser.