ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4FullProjTiltedSpacalDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4FullProjTiltedSpacalDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 
12 #ifndef G4DETECTORS_PHG4FULLPROJTILTEDSPACALDETECTOR_H
13 #define G4DETECTORS_PHG4FULLPROJTILTEDSPACALDETECTOR_H
14 
16 #include "PHG4SpacalDetector.h"
17 
18 #include <Geant4/G4Transform3D.hh>
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 
32 {
33  public:
35 
36  PHG4FullProjTiltedSpacalDetector(PHG4Subsystem* subsys, PHCompositeNode* Node, const std::string& dnam,
37  PHParameters* parameters, const int layer = 0);
38 
39  // empty dtor, step limits are deleted in base class
41 
42  void
44 
45  std::pair<G4LogicalVolume*, G4Transform3D>
46  Construct_AzimuthalSeg() override;
47 
49  virtual G4LogicalVolume*
50  Construct_Tower(const SpacalGeom_t::geom_tower& tower);
52  virtual G4LogicalVolume*
53  Construct_LightGuide(const SpacalGeom_t::geom_tower& tower, const int index_x, const int index_y);
54 
56  virtual int
57  Construct_Fibers(const SpacalGeom_t::geom_tower& tower, G4LogicalVolume* LV_tower);
58 
60  virtual int
61  Construct_Fibers_SameLengthFiberPerTower(const SpacalGeom_t::geom_tower& tower, G4LogicalVolume* LV_tower);
62 
63  void
64  Print(const std::string& what = "ALL") const override;
65 
66  PHG4CylinderGeom* clone_geom() const override
67  {
68  return new SpacalGeom_t(*get_geom_v3());
69  }
70 
71  private:
72  // SpacalGeom_t* _geom;
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