ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4OuterHcalDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4OuterHcalDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4OUTERHCALDETECTOR_H
4 #define G4DETECTORS_PHG4OUTERHCALDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <Geant4/G4Types.hh> // for G4double
9 
10 #include <CGAL/Exact_circular_kernel_2.h>
11 #include <CGAL/point_generators_2.h>
12 
13 #include <map>
14 #include <set>
15 #include <string> // for string
16 #include <utility> // for pair
17 #include <vector>
18 
19 class G4AssemblyVolume;
20 class G4LogicalVolume;
21 class G4VPhysicalVolume;
22 class G4VSolid;
23 class PHCompositeNode;
26 class PHParameters;
27 class PHG4Subsystem;
28 
30 {
31  public:
32  typedef CGAL::Exact_circular_kernel_2 Circular_k;
33  typedef CGAL::Point_2<Circular_k> Point_2;
35  PHG4OuterHcalDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *params, const std::string &dnam);
36 
38  ~PHG4OuterHcalDetector() override;
39 
41  void ConstructMe(G4LogicalVolume *world) override;
42 
43  void Print(const std::string &what = "ALL") const override;
44 
46 
47  int IsInOuterHcal(G4VPhysicalVolume *) const;
49 
50  void SuperDetector(const std::string &name) { m_SuperDetector = name; }
51  const std::string SuperDetector() const { return m_SuperDetector; }
52  int get_Layer() const { return m_Layer; }
53  void ShiftSecantToTangent(Point_2 &lowleft, Point_2 &upleft, Point_2 &upright, Point_2 &lowright);
54  int ConsistencyCheck() const;
55  void SetTiltViaNcross();
56  int CheckTiltAngle() const;
59  std::pair<int, int> GetLayerTowerId(G4VPhysicalVolume *volume) const;
60 
61  protected:
62  int ConstructOuterHcal(G4LogicalVolume *hcalenvelope);
65  G4double x_at_y(Point_2 &p0, Point_2 &p1, G4double yin);
71  double m_InnerRadius;
72  double m_OuterRadius;
73  double m_SizeZ;
74  double m_ScintiTileX;
77  double m_ScintiTileZ;
79  double m_ScintiGap;
82  double m_TiltAngle;
85  double m_EnvelopeZ;
87  double m_VolumeSteel;
89 
92 
95 
96  int m_Layer;
97  std::string m_SuperDetector;
99  std::vector<G4VSolid *> m_ScintiTilesVec;
100  std::set<G4VPhysicalVolume *> m_SteelAbsorberVec;
101  std::map<G4VPhysicalVolume *, std::pair<int, int>> m_ScintiTilePhysVolMap;
102 };
103 
104 #endif