LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
LArVoxelReadoutGeometry.h
Go to the documentation of this file.
1 
23 #ifndef LArG4_LArVoxelReadoutGeometry_h
24 #define LArG4_LArVoxelReadoutGeometry_h
25 
26 #include "Geant4/G4String.hh"
27 #include "Geant4/G4Transform3D.hh"
28 #include "Geant4/G4UserLimits.hh"
29 #include "Geant4/G4VUserParallelWorld.hh"
32 
33 // Forward declarations
34 class G4PhysicalVolume;
35 
36 namespace larg4 {
37 
38  class LArVoxelReadoutGeometry : public G4VUserParallelWorld {
39  public:
41  struct Setup_t {
42 
48 
49  }; // struct Setup_t
50 
52  LArVoxelReadoutGeometry(const G4String& name, Setup_t const& setupData);
53 
56  class Sentry;
57 
61  void Construct() override;
62 
63  private:
64  G4VPhysicalVolume* FindNestedVolume(G4VPhysicalVolume* mother,
65  G4Transform3D& motherTransform,
66  G4Transform3D& daughterTransform,
67  std::string const& daughterName,
68  unsigned int expectedNum);
69 
70  std::unique_ptr<G4UserLimits> fStepLimit;
71 
79  };
80 
81  // This is dirty, dirty. Sigh. Due to the limited interface of G4 and the prevalent
82  // use of services in LArSoft, there isn't a much better alternative.
84  public:
86  detinfo::DetectorClocksData const& clockData,
87  detinfo::DetectorPropertiesData const& detProp) noexcept
88  : readout_{readout}
89  {
90  readout_->flarVoxelReadout->SetClockData(&clockData);
91  readout_->flarVoxelReadout->SetPropertiesData(&detProp);
92  }
93  ~Sentry() noexcept
94  {
95  readout_->flarVoxelReadout->SetClockData(nullptr);
96  readout_->flarVoxelReadout->SetPropertiesData(nullptr);
97  }
98 
99  private:
101  };
102 
103 } // namespace larg4
104 
105 #endif // LArG4_LArVoxelReadoutGeometry_h
Collection of all it takes to set up this object.
Collection of what it takes to set a LArVoxelReadout up.
larg4::LArVoxelReadout::Setup_t fReadoutSetupData
G4VPhysicalVolume * FindNestedVolume(G4VPhysicalVolume *mother, G4Transform3D &motherTransform, G4Transform3D &daughterTransform, std::string const &daughterName, unsigned int expectedNum)
Geant4 interface.
larg4::LArVoxelReadout::Setup_t readoutSetup
larg4::LArVoxelReadout * flarVoxelReadout
Data for LArVoxelReadout setup.
geo::WireReadoutGeom const * fWireReadoutGeom
std::unique_ptr< G4UserLimits > fStepLimit
Interface for a class providing readout channel mapping to geometry.
sim::LArG4Parameters const * fLgp
geo::GeometryCore const * geometry
Set up data for LArVoxelReadout.
Sentry(LArVoxelReadoutGeometry *const readout, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp) noexcept
Description of the physical geometry of one entire detector.
Definition: GeometryCore.h:91
A Geant4 sensitive detector that accumulates voxel information.
LArVoxelReadoutGeometry(const G4String &name, Setup_t const &setupData)
Constructor: sets up all its LArVoxelReadout instances.
Contains all timing reference information for the detector.
Transports energy depositions from GEANT4 to TPC channels.
art framework interface to geometry description
geo::WireReadoutGeom const * wireReadoutGeom