Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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();
150  particleIterator->reset();
151  while ( (*particleIterator)() ) {
152  G4ParticleDefinition* particle = particleIterator->value();
153  G4ProcessManager* pmanager = particle->GetProcessManager();
154  if ( theDecayProcess->IsApplicable( *particle ) ) {
155  pmanager->AddProcess( theDecayProcess );
156  // set ordering for PostStepDoIt and AtRestDoIt
157  pmanager->SetProcessOrdering( theDecayProcess, idxPostStep );
158  pmanager->SetProcessOrdering( theDecayProcess, idxAtRest );
159  }
160  }
161 }
162 
163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
164 
166  G4FastSimulationManagerProcess* fastSimProcess =
167  new G4FastSimulationManagerProcess( "G4FSMP" );
168 
169  // Registers the fastSimProcess with all the particles as a discrete and
170  // continuous process (this works in all cases; in the case that parallel
171  // geometries are not used, as in this example, it would be enough to
172  // add it as a discrete process).
174  particleIterator->reset();
175  while ( (*particleIterator)() ) {
176  G4ParticleDefinition* particle = particleIterator->value();
177  G4ProcessManager* pmanager = particle->GetProcessManager();
178  //pmanager->AddDiscreteProcess( fastSimProcess ); // No parallel geometry
179  pmanager->AddProcess( fastSimProcess, -1, 0, 0 ); // General
180  }
181 }
182 
183 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
184 
186  if ( verboseLevel > 1 ) {
187  G4cout << "Par02PhysicsList::SetCuts:";
188  }
190 }
191 
192 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
193 
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()
virtual void ConstructGeneral()
Adds decay process.
static void ConstructParticle()
G4GLOB_DLL std::ostream G4cout
static constexpr double m
Definition: G4SIunits.hh:129
virtual void ConstructMesons()
Constructs all mesons.
virtual void AddTransportation()
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.
G4ProcessManager * GetProcessManager() const
virtual void ConstructParticle()
Constructs particles: bosons, leptons, mesons, baryons and ions.
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
static G4ChargedGeantino * ChargedGeantinoDefinition()
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
virtual void ConstructIons()
Constructs light ions.
virtual void SetCuts()
Sets cuts with the default value for all particle types.
static G4OpticalPhoton * OpticalPhotonDefinition()
virtual void ConstructProcess()
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81