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