Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhysicsListHelper.hh
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// ------------------------------------------------------------
28// GEANT 4 class header file
29// Class Description:
30// This class is a helper class for physics lists to register processes
31// according to the ordering parameter table
32// This class is a singleton
33// -------------------------------------------
34// History
35// first version 29 Apr. 2011 by H.Kurashige
36// ------------------------------------------------------------
37
38#ifndef G4PhysicsListHelper_h
39#define G4PhysicsListHelper_h 1
40#include "G4ios.hh"
41#include "globals.hh"
42#include <vector>
43
45#include "G4ParticleTable.hh"
48
49class G4VProcess;
50
52{
54
55 private:
56 // Hide constructor and destructor
59
60 public: // with description
61 // This method gives the ponter to the physics list helper
63
64 // Register a process to the particle type
65 // according to the ordering parameter table
66 // 'true' is returned if the process is registerd successfully
68
69 // User must invoke this method in his ConstructProcess()
70 // implementation in order to insures particle transportation.
71 void AddTransportation();
72
73 // Set flag for using CoupledTransportation
74 void UseCoupledTransportation(G4bool vl = true);
75
76 // Change the thresholds for killing looping tracks of the
77 // transportation (simple or coupled.)
78 void UseHighLooperThresholds() { theLooperThresholds = 2; }
79 void UseLowLooperThresholds() { theLooperThresholds = 0; }
80
81 /////////////////////////////////////////////////////////////////
82 public:
83 // check consistencies of list of particles
84 void CheckParticleList() const;
85
86 ///////////////////////////////////////////////////////////////////////
87 public:
88 // Dump OrdingParameterTable
89 void DumpOrdingParameterTable(G4int subType = -1) const;
91
92 private:
93 void ReadOrdingParameterTable();
94 void ReadInDefaultOrderingParameter();
95
96 ///////////////////////////////////////////////////////////////////////
97 public: // with description
98 void SetVerboseLevel(G4int value);
99 G4int GetVerboseLevel() const;
100 // set/get controle flag for output message
101 // 0: Silent
102 // 1: Warning message
103 // 2: More
104
105 ////////////////////////////////////////////////////////////////////////
106 private:
107 static G4ThreadLocal G4PhysicsListHelper* pPLHelper;
108
109 // the particle table has the complete List of existing particle types
110 G4ParticleTable* theParticleTable;
111 G4ParticleTable::G4PTblDicIterator* aParticleIterator;
112
113 G4bool useCoupledTransportation;
114 G4int theLooperThresholds = 1; // 0 = Low, 1 = default, 2 = high
115 G4VProcess* theTransportationProcess;
116
117 G4int verboseLevel;
118
119 private:
120 typedef std::vector<G4PhysicsListOrderingParameter> G4OrdParamTable;
121 G4OrdParamTable* theTable;
122 G4int sizeOfTable;
123 G4String ordParamFileName;
124};
125
127{
128 useCoupledTransportation = vl;
129}
130
132{
133 verboseLevel = value;
134}
135
137{
138 return verboseLevel;
139}
140
141#endif
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
void UseCoupledTransportation(G4bool vl=true)
static G4PhysicsListHelper * GetPhysicsListHelper()
void DumpOrdingParameterTable(G4int subType=-1) const
G4PhysicsListOrderingParameter GetOrdingParameter(G4int subType) const
void SetVerboseLevel(G4int value)
#define G4ThreadLocal
Definition: tls.hh:77