ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4InnerHcalDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4InnerHcalDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4INNERHCALDETECTOR_H
4 #define G4DETECTORS_PHG4INNERHCALDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <CGAL/Cartesian.h> // for Cartesian_base_ref_count::...
9 #include <CGAL/Exact_circular_kernel_2.h>
10 #include <CGAL/Point_2.h> // for Point_2
11 
12 #include <map>
13 #include <set>
14 #include <string> // for string
15 #include <utility> // for pair
16 #include <vector>
17 
18 class G4AssemblyVolume;
19 class G4LogicalVolume;
20 class G4VPhysicalVolume;
21 class G4VSolid;
22 class PHCompositeNode;
24 class PHParameters;
25 class PHG4Subsystem;
26 
28 {
29  public:
30  typedef CGAL::Exact_circular_kernel_2 Circular_k;
31  typedef CGAL::Point_2<Circular_k> Point_2;
32 
34  PHG4InnerHcalDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *parameters, const std::string &dnam);
35 
37  ~PHG4InnerHcalDetector() override;
38 
40  void ConstructMe(G4LogicalVolume *world) override;
41 
42  void Print(const std::string &what = "ALL") const override;
43 
45 
46  int IsInInnerHcal(G4VPhysicalVolume *) const;
48 
49  void SuperDetector(const std::string &name) { m_SuperDetector = name; }
50  const std::string SuperDetector() const { return m_SuperDetector; }
51  int get_Layer() const { return m_Layer; }
54  void ShiftSecantToTangent(Point_2 &lowleft, Point_2 &upleft, Point_2 &upright, Point_2 &lowright);
55 
58  int CheckTiltAngle() const;
59  int ConsistencyCheck() const;
60  void SetTiltViaNcross();
61  std::pair<int, int> GetLayerTowerId(G4VPhysicalVolume *volume) const;
62 
63  protected:
64  int ConstructInnerHcal(G4LogicalVolume *sandwich);
65  double x_at_y(Point_2 &p0, Point_2 &p1, double yin);
69  double m_InnerRadius;
70  double m_OuterRadius;
71  double m_SizeZ;
72  double m_ScintiTileX;
75  double m_ScintiTileZ;
80  double m_TiltAngle;
83  double m_EnvelopeZ;
85  double m_VolumeSteel;
87 
91 
92  int m_Active;
94 
95  int m_Layer;
96  std::string m_SuperDetector;
97  std::set<G4VPhysicalVolume *> m_SteelAbsorberPhysVolSet;
98  std::map<G4VPhysicalVolume *, std::pair<int, int>> m_ScintiTilePhysVolMap;
99  std::vector<G4VSolid *> m_ScintiTilesVec;
101 };
102 
103 #endif // G4DETECTORS_PHG4INNERHCALDETECTOR_H