LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
OpDetReadoutGeometry.h
Go to the documentation of this file.
1 //
6 // OpDetReadoutGeometry
7 //
8 // Ben Jones, MIT, 07/16/10
9 //
10 // OpDet's are defined with a particular geometry, and only some part of the OpDet
11 // is sensitive. When several are placed, only the mother volume, vol_OpDet is
12 // replicated. Each constituent volume, including the sensitive volume, only
13 // exists once in the volume store, as a daughter of the mother volume.
14 //
15 // Hence to know which OpDet a photon steps into when it is inside a sensitive
16 // volume, we must define a readout geometry to identify which volumes are
17 // contained within each OpDet.
18 //
19 // This class is heavily based on LArG4ReadoutGeometry by Bill Seligman,
20 // which is very well commented. See that file for further reference.
21 //
22 
23 #ifndef OpDetReadoutGeometry_h
24 #define OpDetReadoutGeometry_h
25 
26 #include "Geant4/G4String.hh"
27 #include "Geant4/G4Transform3D.hh"
28 #include "Geant4/G4VUserParallelWorld.hh"
29 
30 #include <vector>
31 
32 class G4LogicalVolume;
33 class G4VPhysicalVolume;
34 
35 namespace larg4 {
36 
37  class OpDetReadoutGeometry : public G4VUserParallelWorld {
38  public:
39  OpDetReadoutGeometry(G4String OpDetSensitiveName,
40  const G4String name = "OpDetReadoutGeometry",
41  bool useLitePhotons = false);
42  virtual ~OpDetReadoutGeometry();
43 
44  virtual void Construct();
45 
46  private:
47  void FindVolumes(G4VPhysicalVolume*,
48  G4String,
49  std::vector<G4Transform3D>,
50  std::vector<G4LogicalVolume*>&,
51  std::vector<G4Transform3D>&);
52  std::vector<G4LogicalVolume*> fOpDetVolumes;
53  std::vector<G4Transform3D> fOpDetTransformations;
54  bool const fUseLitePhotons;
56  };
57 
58 }
59 
60 #endif
void FindVolumes(G4VPhysicalVolume *, G4String, std::vector< G4Transform3D >, std::vector< G4LogicalVolume * > &, std::vector< G4Transform3D > &)
Geant4 interface.
std::vector< G4Transform3D > fOpDetTransformations
OpDetReadoutGeometry(G4String OpDetSensitiveName, const G4String name="OpDetReadoutGeometry", bool useLitePhotons=false)
bool const fUseLitePhotons
Pass-through option for sensitive detector.
std::vector< G4LogicalVolume * > fOpDetVolumes