Analysis Software
Documentation for sPHENIX simulation 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 #pragma GCC diagnostic push
9 #pragma GCC diagnostic ignored "-Wshadow"
10 #pragma GCC diagnostic ignored "-Wpedantic"
11 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
12 #include <CGAL/Cartesian.h> // for Cartesian_base_ref_count::...
13 #include <CGAL/Exact_circular_kernel_2.h>
14 #include <CGAL/Point_2.h> // for Point_2
15 #pragma GCC diagnostic pop
16 
17 #include <map>
18 #include <set>
19 #include <string> // for string
20 #include <utility> // for pair
21 #include <vector>
22 
23 class G4AssemblyVolume;
24 class G4LogicalVolume;
25 class G4VPhysicalVolume;
26 class G4VSolid;
27 class PHCompositeNode;
29 class PHParameters;
30 class PHG4Subsystem;
32 
34 {
35  public:
36  typedef CGAL::Exact_circular_kernel_2 Circular_k;
37  typedef CGAL::Point_2<Circular_k> Point_2;
38 
41 
43  ~PHG4InnerHcalDetector() override;
44 
46  void ConstructMe(G4LogicalVolume *world) override;
47 
48  void Print(const std::string &what = "ALL") const override;
49 
51 
52  int IsInInnerHcal(G4VPhysicalVolume *) const;
54 
56  const std::string SuperDetector() const { return m_SuperDetector; }
57  int get_Layer() const { return m_Layer; }
58  G4VSolid *ConstructSteelPlate(G4LogicalVolume *hcalenvelope);
59  G4VSolid *ConstructScintillatorBox(G4LogicalVolume *hcalenvelope);
60  void ShiftSecantToTangent(Point_2 &lowleft, Point_2 &upleft, Point_2 &upright, Point_2 &lowright);
61 
62  G4AssemblyVolume *ConstructHcalScintillatorAssembly(G4LogicalVolume *hcalenvelope);
63  void ConstructHcalSingleScintillators(G4LogicalVolume *hcalenvelope);
64  int CheckTiltAngle() const;
65  int ConsistencyCheck() const;
66  void SetTiltViaNcross();
67  std::pair<int, int> GetLayerTowerId(G4VPhysicalVolume *volume) const;
68 
69  protected:
70  void AddGeometryNode();
71  int ConstructInnerHcal(G4LogicalVolume *sandwich);
72  double x_at_y(Point_2 &p0, Point_2 &p1, double yin);
74  PHParameters *m_Params = nullptr;
75  G4AssemblyVolume *m_ScintiMotherAssembly = nullptr;
76  double m_InnerRadius = NAN;
77  double m_OuterRadius = NAN;
78  double m_SizeZ = NAN;
79  double m_ScintiTileX = NAN;
80  double m_ScintiTileXLower = NAN;
81  double m_ScintiTileXUpper = NAN;
82  double m_ScintiTileZ = NAN;
83  double m_ScintiTileThickness = NAN;
84  double m_ScintiInnerGap = NAN;
85  double m_ScintiOuterGap = NAN;
86  double m_ScintiOuterRadius = NAN;
87  double m_TiltAngle = NAN;
88  double m_EnvelopeInnerRadius = NAN;
89  double m_EnvelopeOuterRadius = NAN;
90  double m_EnvelopeZ = NAN;
91  double m_VolumeEnvelope = NAN;
92  double m_VolumeSteel = NAN;
93  double m_VolumeScintillator = NAN;
94 
98 
99  int m_Active = 0;
101 
102  int m_Layer = 0;
104  std::set<G4VPhysicalVolume *> m_SteelAbsorberPhysVolSet;
105  std::map<G4VPhysicalVolume *, std::pair<int, int>> m_ScintiTilePhysVolMap;
106  std::vector<G4VSolid *> m_ScintiTilesVec;
110 };
111 
112 #endif // G4DETECTORS_PHG4INNERHCALDETECTOR_H