LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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* Build() const override { return new OpticalPhysics{fDetProp}; }
20  : CustomPhysicsFactoryBase{"Optical"}, fDetProp{detProp}
21  {
22  // register self in physics table - note, factory is actually registered
23  // in static TheCustomPhysicsTable, not the instance created below
24  // which just acts to pass information along
25  new CustomPhysicsTable(this);
26  }
27 
28  private:
30  };
31 }
32 
33 #endif
CustomPhysicsFactory(detinfo::DetectorPropertiesData const &detProp)
Geant4 interface.
G4VPhysicsConstructor * Build() const override
General LArSoft Utilities.
detinfo::DetectorPropertiesData const & fDetProp