Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 "globals.hh"
41 #include "G4ios.hh"
42 #include <vector>
43 
44 #include "G4ParticleTable.hh"
45 #include "G4ParticleDefinition.hh"
47 
48 class G4VProcess;
49 
51 {
52  private:
53  // Hide constructor and destructor
55  virtual ~G4PhysicsListHelper();
56 
57  public: // with description
58  // This method gives the ponter to the physics list helper
60 
61  //Register a process to the particle type
62  // according to the ordering parameter table
63  // 'true' is returned if the process is registerd successfully
65  G4ParticleDefinition* particle);
66 
67  // User must invoke this method in his ConstructProcess()
68  // implementation in order to insures particle transportation.
69  void AddTransportation();
70 
71  // Set flag for using CoupledTransportation
72  void UseCoupledTransportation(G4bool vl=true);
73 
75  public:
76  // check consistencies of list of particles
77  void CheckParticleList() const;
78 
80  public:
81  // Dump OrdingParameterTable
82  void DumpOrdingParameterTable(G4int subType = -1) const;
84 
85  private:
86  void ReadOrdingParameterTable();
87  void ReadInDefaultOrderingParameter();
88 
90  public: // with description
92  G4int GetVerboseLevel() const;
93  // set/get controle flag for output message
94  // 0: Silent
95  // 1: Warning message
96  // 2: More
97 
99  private:
100  static G4PhysicsListHelper* pPLHelper;
101 
102  // the particle table has the complete List of existing particle types
103  G4ParticleTable* theParticleTable;
104  G4ParticleTable::G4PTblDicIterator* theParticleIterator;
105 
106  G4bool useCoupledTransportation;
107  G4VProcess* theTransportationProcess;
108 
109  G4int verboseLevel;
110 
111  private:
112  typedef std::vector<G4PhysicsListOrderingParameter> G4OrdParamTable;
113  G4OrdParamTable* theTable;
114  G4int sizeOfTable;
115  G4String ordParamFileName;
116 };
117 
118 
119 inline
121 {
122  useCoupledTransportation = vl;
123 }
124 
125 inline
127 {
128  verboseLevel = value;
129 }
130 
131 inline
133 {
134  return verboseLevel;
135 }
136 
137 
138 #endif
139