All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CustomPhysicsLArSoft.h
Go to the documentation of this file.
1 #ifndef larsim_LegacyLArG4_CustomPhysicsLArSoft_h
2 #define larsim_LegacyLArG4_CustomPhysicsLArSoft_h
3 
4 // This file is used to specify template specializations for the
5 // CustomPhysicsFactory class template, specifically for
6 // LArSoft-defined physics lists.
7 
10 namespace detinfo {
11  class DetectorPropertiesData;
12 }
13 
14 namespace larg4 {
15  template <>
17  public:
18  G4VPhysicsConstructor*
19  Build() const override
20  {
21  return new OpticalPhysics{fDetProp};
22  }
25  {
26  // register self in physics table - note, factory is actually registered
27  // in static TheCustomPhysicsTable, not the instance created below
28  // which just acts to pass information along
29  new CustomPhysicsTable(this);
30  }
31 
32  private:
34  };
35 }
36 
37 #endif
CustomPhysicsFactory(detinfo::DetectorPropertiesData const &detProp)
detinfo::DetectorPropertiesData const & fDetProp
auto const detProp
G4VPhysicsConstructor * Build() const override