ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4FullProjSpacalDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4FullProjSpacalDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 
12 #ifndef G4DETECTORS_PHG4FULLPROJSPACALDETECTOR_H
13 #define G4DETECTORS_PHG4FULLPROJSPACALDETECTOR_H
14 
16 #include "PHG4SpacalDetector.h"
17 
18 #include <Geant4/G4Transform3D.hh> // for G4Transform3D
19 
20 #include <cassert>
21 #include <string> // for string
22 #include <utility> // for pair
23 
24 class G4LogicalVolume;
25 class PHCompositeNode;
26 class PHG4CylinderGeom;
27 class PHG4Subsystem;
28 class PHParameters;
29 
34 {
35  public:
37 
39  PHCompositeNode* Node, const std::string& dnam,
40  PHParameters* parameters, const int layer = 0);
41 
42  // empty dtor, step limits are deleted in base class
43  ~PHG4FullProjSpacalDetector(void) override {}
44  void
46 
47  std::pair<G4LogicalVolume*, G4Transform3D>
48  Construct_AzimuthalSeg() override;
49 
51  virtual G4LogicalVolume*
52  Construct_Tower(const SpacalGeom_t::geom_tower& tower);
53 
55  virtual int
56  Construct_Fibers(const SpacalGeom_t::geom_tower& tower, G4LogicalVolume* LV_tower);
57 
59  virtual int
60  Construct_Fibers_SameLengthFiberPerTower(const SpacalGeom_t::geom_tower& tower, G4LogicalVolume* LV_tower);
61 
62  void
63  Print(const std::string& what = "ALL") const override;
64 
65  PHG4CylinderGeom* clone_geom() const override
66  {
67  return new SpacalGeom_t(*get_geom_v3());
68  }
69 
70  private:
71  // SpacalGeom_t* _geom;
72 
76  {
77  SpacalGeom_t* v3_geom = dynamic_cast<SpacalGeom_t*>(_geom);
78  assert(v3_geom);
79  return v3_geom;
80  }
81 
82  const SpacalGeom_t*
83  get_geom_v3() const
84  {
85  SpacalGeom_t* v3_geom = dynamic_cast<SpacalGeom_t*>(_geom);
86  assert(v3_geom);
87  return v3_geom;
88  }
89 };
90 
91 #endif