Loading...
Searching...
No Matches
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//
27/// \file Par02PhysicsList.cc
28/// \brief Implementation of the Par02PhysicsList class
29
30#include "Par02PhysicsList.hh"
31#include "globals.hh"
32#include "G4ParticleDefinition.hh"
33#include "G4ProcessManager.hh"
34#include "G4ProcessVector.hh"
35#include "G4ParticleTypes.hh"
36#include "G4ParticleTable.hh"
37#include "G4Material.hh"
38#include "G4MaterialTable.hh"
39#include "G4ios.hh"
40#include "G4SystemOfUnits.hh"
41#include <iomanip>
42#include "G4FastSimulationManagerProcess.hh"
43
44#include "G4Decay.hh"
45#include "G4LeptonConstructor.hh"
46#include "G4MesonConstructor.hh"
47#include "G4BaryonConstructor.hh"
48#include "G4IonConstructor.hh"
49
50#include "G4ComptonScattering.hh"
51#include "G4GammaConversion.hh"
52#include "G4PhotoElectricEffect.hh"
53
54#include "G4eMultipleScattering.hh"
55#include "G4MuMultipleScattering.hh"
56#include "G4hMultipleScattering.hh"
57
58#include "G4eIonisation.hh"
59#include "G4eBremsstrahlung.hh"
60#include "G4eplusAnnihilation.hh"
61
62#include "G4MuIonisation.hh"
63#include "G4MuBremsstrahlung.hh"
64#include "G4MuPairProduction.hh"
65
66#include "G4hIonisation.hh"
67
68//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69
71 SetVerboseLevel( 1 );
72 defaultCutValue = 0.1*m;
73}
74
75//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76
78
79//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80
82 // In this method, static member functions should be called for all particles
83 // which you want to use.
84 // This ensures that objects of these particle types will be created in the program.
90}
91
92//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93
95 G4Geantino::GeantinoDefinition();
96 G4ChargedGeantino::ChargedGeantinoDefinition();
97 G4Gamma::GammaDefinition();
98 G4OpticalPhoton::OpticalPhotonDefinition();
99}
100
101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
104 G4LeptonConstructor pConstructor;
105 pConstructor.ConstructParticle();
106}
107
108//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109
111 G4MesonConstructor pConstructor;
112 pConstructor.ConstructParticle();
113}
114
115//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116
118 G4BaryonConstructor pConstructor;
119 pConstructor.ConstructParticle();
120}
121
122//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
123
125 G4IonConstructor pConstructor;
126 pConstructor.ConstructParticle();
127}
128
129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
130
136
137//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
138
140 //UseCoupledTransportation();
141 G4VUserPhysicsList::AddTransportation();
142}
143
144//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
145
147 auto theDecayProcess = new G4Decay();
148 auto particleIterator=GetParticleIterator();
149 particleIterator->reset();
150 while ( (*particleIterator)() ) {
151 G4ParticleDefinition* particle = particleIterator->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 auto particleIterator=GetParticleIterator();
173 particleIterator->reset();
174 while ( (*particleIterator)() ) {
175 G4ParticleDefinition* particle = particleIterator->value();
176 G4ProcessManager* pmanager = particle->GetProcessManager();
177 //pmanager->AddDiscreteProcess( fastSimProcess ); // No parallel geometry
178 pmanager->AddProcess( fastSimProcess, -1, 0, 0 ); // General
179 }
180}
181
182//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
183
185 if ( verboseLevel > 1 ) {
186 G4cout << "Par02PhysicsList::SetCuts:";
187 }
188 SetCutsWithDefault();
189}
190
191//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
192
Definition of the Par02PhysicsList class.
virtual void ConstructBosons()
Constructs bosons (including geantino)
virtual ~Par02PhysicsList()
virtual void ConstructGeneral()
Adds decay process.
virtual void ConstructIons()
Constructs light ions.
Par02PhysicsList()
A default constructor. Sets the default cut value.
virtual void SetCuts()
Sets cuts with the default value for all particle types.
virtual void ConstructProcess()
Constructs physics processes: particle transportation, decays, parametrisation (for the purpose of fa...
virtual void ConstructLeptons()
Constructs all leptons.
virtual void ConstructBaryons()
Constructs all barions.
void AddParameterisation()
Creates a G4FastSimulationManagerProcess object for all the particle types.
virtual void AddTransportation()
Adds the particle transport.
virtual void ConstructParticle()
Constructs particles: bosons, leptons, mesons, baryons and ions.
virtual void ConstructMesons()
Constructs all mesons.

Applications | User Support | Publications | Collaboration