LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
CustomPhysicsTable.hh
Go to the documentation of this file.
1 //
6 //
7 // The custom physics table keeps track of all compiled physics modules and feeds their
8 // names and constructors to the ConfigurablePhysicsList.
9 //
10 // A CustomPhysicsTable is instantiated in the constructor of each CustomPhysicsFactory<T>
11 // with a pointer to the instantiating factory as an argument. This pointer is passed to
12 // a singleton, static CustomPhysicsTable called TheCustomPhysicsTable. It is this table
13 // which the ConfigurablePhysicsList interacts with.
14 //
15 // At runtime the CustomPhysicsTable contains an array of CustomPhysicsFactories, one
16 // for each available physics module, and can provide the list of their names and
17 // the constructor for each to the physics list.
18 //
19 // This means new physics modules can be enabled via the LArG4.xml file with no change to
20 // the physics list code
21 //
22 // See CustomPhysicsFactory.hh and CustomPhysicsFactory.cxx for more details.
23 
24 
25 
26 #ifndef CUSTOMPHYSICSTABLE_hh
27 #define CUSTOMPHYSICSTABLE_hh 1
28 
29 #ifndef CUSTOMPHYSICSFACTORY_hh
30 namespace larg4 { class CustomPhysicsFactoryBase; }
31 #endif
32 
33 #include "Geant4/G4VPhysicsConstructor.hh"
34 
35 
36 namespace larg4 {
38  {
39 
40  public:
43  std::vector<std::string> GetAvailablePhysicsList();
44  bool IsPhysicsAvailable(std::string);
45  G4VPhysicsConstructor * GetPhysicsConstructor(std::string);
46  std::map<std::string,CustomPhysicsFactoryBase* > GetFullTable()
47  { return theTable;}
49 
50 
51  protected:
52  std::map<std::string,CustomPhysicsFactoryBase* > theTable;
54  };
55 
56 }
57 
59 
60 #endif
61 
62 
63 
64 
65 // Sept 2009 - Ben Jones, MIT
Geant4 interface.
G4VPhysicsConstructor * GetPhysicsConstructor(std::string)
std::map< std::string, CustomPhysicsFactoryBase * > GetFullTable()
bool IsPhysicsAvailable(std::string)
std::map< std::string, CustomPhysicsFactoryBase * > theTable
std::vector< std::string > GetAvailablePhysicsList()
void AddPhysics(CustomPhysicsFactoryBase *)