Analysis Software
Documentation for sPHENIX simulation 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 
37  PHParameters* parameters, const int layer = 0);
38 
39  // empty dtor, step limits are deleted in base class
41 
42  void
43  ConstructMe(G4LogicalVolume* world) override;
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  PHParameters* m_Params = nullptr;
73  // SpacalGeom_t* _geom;
77  {
78  SpacalGeom_t* v3_geom = dynamic_cast<SpacalGeom_t*>(_geom);
79  assert(v3_geom);
80  return v3_geom;
81  }
82 
83  const SpacalGeom_t*
84  get_geom_v3() const
85  {
86  SpacalGeom_t* v3_geom = dynamic_cast<SpacalGeom_t*>(_geom);
87  assert(v3_geom);
88  return v3_geom;
89  }
90 };
91 
92 #endif