Geant4  10.02.p01
Par02PhysicsList.cc
Go to the documentation of this file.
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: $
27 //
30 
31 #include "Par02PhysicsList.hh"
32 #include "globals.hh"
33 #include "G4ParticleDefinition.hh"
34 #include "G4ProcessManager.hh"
35 #include "G4ProcessVector.hh"
36 #include "G4ParticleTypes.hh"
37 #include "G4ParticleTable.hh"
38 #include "G4Material.hh"
39 #include "G4MaterialTable.hh"
40 #include "G4ios.hh"
41 #include "G4SystemOfUnits.hh"
42 #include <iomanip>
44 
45 #include "G4Decay.hh"
46 #include "G4LeptonConstructor.hh"
47 #include "G4MesonConstructor.hh"
48 #include "G4BaryonConstructor.hh"
49 #include "G4IonConstructor.hh"
50 
51 #include "G4ComptonScattering.hh"
52 #include "G4GammaConversion.hh"
53 #include "G4PhotoElectricEffect.hh"
54 
55 #include "G4eMultipleScattering.hh"
57 #include "G4hMultipleScattering.hh"
58 
59 #include "G4eIonisation.hh"
60 #include "G4eBremsstrahlung.hh"
61 #include "G4eplusAnnihilation.hh"
62 
63 #include "G4MuIonisation.hh"
64 #include "G4MuBremsstrahlung.hh"
65 #include "G4MuPairProduction.hh"
66 
67 #include "G4hIonisation.hh"
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
72  SetVerboseLevel( 1 );
73  defaultCutValue = 0.1*m;
74 }
75 
76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77 
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83  // In this method, static member functions should be called for all particles
84  // which you want to use.
85  // This ensures that objects of these particle types will be created in the program.
90  ConstructIons();
91 }
92 
93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
94 
100 }
101 
102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
103 
105  G4LeptonConstructor pConstructor;
106  pConstructor.ConstructParticle();
107 }
108 
109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
110 
112  G4MesonConstructor pConstructor;
113  pConstructor.ConstructParticle();
114 }
115 
116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
117 
119  G4BaryonConstructor pConstructor;
120  pConstructor.ConstructParticle();
121 }
122 
123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124 
126  G4IonConstructor pConstructor;
127  pConstructor.ConstructParticle();
128 }
129 
130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
131 
136 }
137 
138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139 
141  //UseCoupledTransportation();
143 }
144 
145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
146 
148  G4Decay* theDecayProcess = new G4Decay();
149  theParticleIterator->reset();
150  while ( (*theParticleIterator)() ) {
151  G4ParticleDefinition* particle = theParticleIterator->value();
152  G4ProcessManager* pmanager = particle->GetProcessManager();
153  if ( theDecayProcess->IsApplicable( *particle ) ) {
154  pmanager->AddProcess( theDecayProcess );
155  // set ordering for PostStepDoIt and AtRestDoIt
156  pmanager->SetProcessOrdering( theDecayProcess, idxPostStep );
157  pmanager->SetProcessOrdering( theDecayProcess, idxAtRest );
158  }
159  }
160 }
161 
162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
163 
165  G4FastSimulationManagerProcess* fastSimProcess =
166  new G4FastSimulationManagerProcess( "G4FSMP" );
167 
168  // Registers the fastSimProcess with all the particles as a discrete and
169  // continuous process (this works in all cases; in the case that parallel
170  // geometries are not used, as in this example, it would be enough to
171  // add it as a discrete process).
172  theParticleIterator->reset();
173  while ( (*theParticleIterator)() ) {
174  G4ParticleDefinition* particle = theParticleIterator->value();
175  G4ProcessManager* pmanager = particle->GetProcessManager();
176  //pmanager->AddDiscreteProcess( fastSimProcess ); // No parallel geometry
177  pmanager->AddProcess( fastSimProcess, -1, 0, 0 ); // General
178  }
179 }
180 
181 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
182 
184  if ( verboseLevel > 1 ) {
185  G4cout << "Par02PhysicsList::SetCuts:";
186  }
188 }
189 
190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191 
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:82
virtual void ConstructBaryons()
Constructs all barions.
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4Decay.cc:89
virtual void ConstructLeptons()
Constructs all leptons.
void AddParameterisation()
Creates a G4FastSimulationManagerProcess object for all the particle types.
Definition of the Par02PhysicsList class.
virtual ~Par02PhysicsList()
static void ConstructParticle()
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
virtual void ConstructGeneral()
Adds decay process.
static void ConstructParticle()
G4GLOB_DLL std::ostream G4cout
virtual void ConstructMesons()
Constructs all mesons.
virtual void AddTransportation()
Adds the particle transport. G4CoupledTransportation is used to allow the calculation of the expected...
void SetVerboseLevel(G4int value)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
virtual void ConstructBosons()
Constructs bosons (including geantino)
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
static void ConstructParticle()
Par02PhysicsList()
A default constructor. Sets the default cut value.
virtual void ConstructParticle()
Constructs particles: bosons, leptons, mesons, baryons and ions.
static G4ChargedGeantino * ChargedGeantinoDefinition()
static const double m
Definition: G4SIunits.hh:128
virtual void ConstructIons()
Constructs light ions.
virtual void SetCuts()
Sets cuts with the default value for all particle types.
static G4OpticalPhoton * OpticalPhotonDefinition()
#define theParticleIterator
virtual void ConstructProcess()
Constructs physics processes: particle transportation, decays, parametrisation (for the purpose of fa...
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81