source: trunk/environments/MOMO/MomoHome/src/MomoN02PhysicsList.cc @ 1358

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

tag geant4.9.4 beta 1 + modifs locales

File size: 8.0 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// MomoN02PhysicsList.cc
28
29//  generated by Geant4 Physics Editor at   Thu Nov 25 13:06:26 JST 2004
30
31#include "MomoN02PhysicsList.hh"
32
33#include "globals.hh"
34#include "G4ParticleDefinition.hh"
35#include "G4ParticleWithCuts.hh"
36#include "G4ProcessManager.hh"
37#include "G4ProcessVector.hh"
38#include "G4ParticleTypes.hh"
39#include "G4ParticleTable.hh"
40#include "G4ShortLivedConstructor.hh"
41#include "G4Material.hh"
42#include "G4MaterialTable.hh"
43
44#include "G4ios.hh"
45
46MomoN02PhysicsList::MomoN02PhysicsList():  G4VUserPhysicsList()
47{
48// Here used the default cut value you have typed in
49
50  defaultCutValue = 1.0*cm;
51  SetVerboseLevel(1);
52}
53
54MomoN02PhysicsList::~MomoN02PhysicsList()
55{}
56
57void MomoN02PhysicsList::ConstructParticle()
58{
59// Here are constructed all particles you have chosen
60
61  ConstructBosons();
62  ConstructLeptons();
63  ConstructMesons();
64  ConstructBaryons();
65  ConstructAllShortLiveds();
66}
67
68// In this method, static member functions should be called for ALL particles to be used.
69
70void MomoN02PhysicsList::ConstructBosons()
71{
72  G4ChargedGeantino::ChargedGeantinoDefinition();
73  G4Gamma::GammaDefinition();
74  G4Geantino::GeantinoDefinition();
75}
76void MomoN02PhysicsList::ConstructLeptons()
77{
78  G4Electron::ElectronDefinition();
79  G4Positron::PositronDefinition();
80  G4MuonPlus::MuonPlusDefinition();
81  G4MuonMinus::MuonMinusDefinition();
82  G4NeutrinoE::NeutrinoEDefinition();
83  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
84  G4NeutrinoMu::NeutrinoMuDefinition();
85  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
86}
87void MomoN02PhysicsList::ConstructMesons()
88{
89  G4PionPlus::PionPlusDefinition();
90  G4PionMinus::PionMinusDefinition();
91  G4PionZero::PionZeroDefinition();
92  G4Eta::EtaDefinition();
93  G4KaonPlus::KaonPlusDefinition();
94  G4KaonMinus::KaonMinusDefinition();
95  G4KaonZeroLong::KaonZeroLongDefinition();
96  G4KaonZeroShort::KaonZeroShortDefinition();
97  G4KaonZero::KaonZeroDefinition();
98}
99void MomoN02PhysicsList::ConstructBaryons()
100{
101  G4Proton::ProtonDefinition();
102  G4AntiProton::AntiProtonDefinition();
103  G4Neutron::NeutronDefinition();
104  G4AntiNeutron::AntiNeutronDefinition();
105}
106void MomoN02PhysicsList::ConstructAllShortLiveds()
107{
108// Here are contructed all short liveds
109
110}
111void MomoN02PhysicsList::ConstructProcess()
112{
113// Transportation, electromagnetic and general processes
114
115  AddTransportation();
116  ConstructEM();
117  ConstructGeneral();
118}
119// Here are respective header files for chosen processes
120
121#include "G4GammaConversion.hh"
122#include "G4ComptonScattering.hh"
123#include "G4PhotoElectricEffect.hh"
124#include "G4MultipleScattering.hh"
125#include "G4eIonisation.hh"
126#include "G4eBremsstrahlung.hh"
127#include "G4eplusAnnihilation.hh"
128#include "G4MuBremsstrahlung.hh"
129#include "G4MuPairProduction.hh"
130#include "G4MuIonisation.hh"
131
132// The next two processes are always included.
133
134#include "G4hIonisation.hh"
135#include "G4MultipleScattering.hh"
136void MomoN02PhysicsList::ConstructEM()
137{
138  theParticleIterator->reset();
139  while( (*theParticleIterator)() ){
140    G4ParticleDefinition* particle = theParticleIterator->value();
141    G4ProcessManager* pmanager = particle->GetProcessManager();
142    G4String particleName = particle->GetParticleName();
143
144// The next processes are always added.
145
146    if ((!particle->IsShortLived()) &&
147         (particle->GetPDGCharge() != 0.0 )&&
148           (particle->GetParticleName() != "e-") &&
149           (particle->GetParticleName() != "e+") &&
150           (particle->GetParticleName() != "mu-") &&
151           (particle->GetParticleName() != "mu+") &&
152           (particle->GetParticleName() != "chargedgeantino")){
153      pmanager->AddProcess(new G4MultipleScattering(), -1, 1, 1);
154      pmanager->AddProcess(new G4hIonisation(), -1, 2, 2);
155    }
156// Each if clause corresponds to a row in the PhysicsTable
157
158    if (particleName == "gamma") {
159      pmanager->AddProcess(new G4GammaConversion(),ordInActive,ordInActive,ordDefault);
160    }
161    if (particleName == "gamma") {
162      pmanager->AddProcess(new G4ComptonScattering(),ordInActive,ordInActive,ordDefault);
163    }
164    if (particleName == "gamma") {
165      pmanager->AddProcess(new G4PhotoElectricEffect(),ordInActive,ordInActive,ordDefault);
166    }
167    if (particleName == "e-") {
168      pmanager->AddProcess(new G4MultipleScattering(),ordInActive,1,1);
169    }
170    if (particleName == "e-") {
171      pmanager->AddProcess(new G4eIonisation(),ordInActive,2,2);
172    }
173    if (particleName == "e-") {
174      pmanager->AddProcess(new G4eBremsstrahlung(),ordInActive,ordInActive,3);
175    }
176    if (particleName == "e+") {
177      pmanager->AddProcess(new G4eIonisation(),ordInActive,2,2);
178    }
179    if (particleName == "e+") {
180      pmanager->AddProcess(new G4eBremsstrahlung(),ordInActive,ordInActive,3);
181    }
182    if (particleName == "e+") {
183      pmanager->AddProcess(new G4eplusAnnihilation(),ordDefault,ordInActive,4);
184    }
185    if (particleName == "e+") {
186      pmanager->AddProcess(new G4MultipleScattering(),ordInActive,1,1);
187    }
188    if (particleName == "mu+") {
189      pmanager->AddProcess(new G4MultipleScattering(),ordInActive,1,1);
190    }
191    if (particleName == "mu+") {
192      pmanager->AddProcess(new G4MuBremsstrahlung(),ordInActive,ordInActive,3);
193    }
194    if (particleName == "mu+") {
195      pmanager->AddProcess(new G4MuPairProduction(),ordInActive,ordInActive,4);
196    }
197    if (particleName == "mu+") {
198      pmanager->AddProcess(new G4MuIonisation(),ordInActive,2,2);
199    }
200    if (particleName == "mu-") {
201      pmanager->AddProcess(new G4MultipleScattering(),ordInActive,1,1);
202    }
203    if (particleName == "mu-") {
204      pmanager->AddProcess(new G4MuBremsstrahlung(),ordInActive,ordInActive,3);
205    }
206    if (particleName == "mu-") {
207      pmanager->AddProcess(new G4MuIonisation(),ordInActive,2,2);
208    }
209    if (particleName == "mu-") {
210      pmanager->AddProcess(new G4MuPairProduction(),ordInActive,ordInActive,4);
211    }
212  }
213}
214
215#include "G4Decay.hh"
216
217void MomoN02PhysicsList::ConstructGeneral()
218{
219  G4Decay* theDecayProcess = new G4Decay();
220  theParticleIterator->reset();
221  while( (*theParticleIterator)() ){
222    G4ParticleDefinition* particle = theParticleIterator->value();
223    G4ProcessManager* pmanager = particle->GetProcessManager();
224    if (theDecayProcess->IsApplicable(*particle)) {
225      pmanager ->AddProcess(theDecayProcess);
226      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
227      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
228    }
229  }
230}
231
232void MomoN02PhysicsList::SetCuts()
233{
234// defaultCutValue you have typed in is used
235
236  if (verboseLevel >1){
237    G4cout << "MomoN02PhysicsList::SetCuts:";
238  }
239  SetCutsWithDefault();
240}
241
Note: See TracBrowser for help on using the repository browser.