File indexing completed on 2025-08-05 08:17:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef G4DETECTORS_PHG4FULLPROJTILTEDSPACALDETECTOR_H
0013 #define G4DETECTORS_PHG4FULLPROJTILTEDSPACALDETECTOR_H
0014
0015 #include "PHG4CylinderGeom_Spacalv3.h"
0016 #include "PHG4SpacalDetector.h"
0017
0018 #include <Geant4/G4Transform3D.hh>
0019
0020 #include <cassert>
0021 #include <string> // for string
0022 #include <utility> // for pair
0023
0024 class G4LogicalVolume;
0025 class PHCompositeNode;
0026 class PHG4CylinderGeom;
0027 class PHG4Subsystem;
0028 class PHParameters;
0029
0030
0031 class PHG4FullProjTiltedSpacalDetector : public PHG4SpacalDetector
0032 {
0033 public:
0034 typedef PHG4CylinderGeom_Spacalv3 SpacalGeom_t;
0035
0036 PHG4FullProjTiltedSpacalDetector(PHG4Subsystem* subsys, PHCompositeNode* Node, const std::string& dnam,
0037 PHParameters* parameters, const int layer = 0);
0038
0039
0040 ~PHG4FullProjTiltedSpacalDetector(void) override {}
0041
0042 void
0043 ConstructMe(G4LogicalVolume* world) override;
0044
0045 std::pair<G4LogicalVolume*, G4Transform3D>
0046 Construct_AzimuthalSeg() override;
0047
0048
0049 virtual G4LogicalVolume*
0050 Construct_Tower(const SpacalGeom_t::geom_tower& tower);
0051
0052 virtual G4LogicalVolume*
0053 Construct_LightGuide(const SpacalGeom_t::geom_tower& tower, const int index_x, const int index_y);
0054
0055
0056 virtual int
0057 Construct_Fibers(const SpacalGeom_t::geom_tower& tower, G4LogicalVolume* LV_tower);
0058
0059
0060 virtual int
0061 Construct_Fibers_SameLengthFiberPerTower(const SpacalGeom_t::geom_tower& tower, G4LogicalVolume* LV_tower);
0062
0063 void
0064 Print(const std::string& what = "ALL") const override;
0065
0066 PHG4CylinderGeom* clone_geom() const override
0067 {
0068 return new SpacalGeom_t(*get_geom_v3());
0069 }
0070
0071 private:
0072 PHParameters* m_Params = nullptr;
0073
0074
0075 SpacalGeom_t*
0076 get_geom_v3()
0077 {
0078 SpacalGeom_t* v3_geom = dynamic_cast<SpacalGeom_t*>(_geom);
0079 assert(v3_geom);
0080 return v3_geom;
0081 }
0082
0083 const SpacalGeom_t*
0084 get_geom_v3() const
0085 {
0086 SpacalGeom_t* v3_geom = dynamic_cast<SpacalGeom_t*>(_geom);
0087 assert(v3_geom);
0088 return v3_geom;
0089 }
0090 };
0091
0092 #endif