Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4IHCalDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4IHCalDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4IHCAL_PHG4IHCALDETECTOR_H
4 #define G4IHCAL_PHG4IHCALDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <cmath>
9 #include <map>
10 #include <set>
11 #include <string> // for string
12 #include <tuple>
13 #include <utility> // for pair
14 
15 class G4AssemblyVolume;
16 class G4LogicalVolume;
17 class G4VPhysicalVolume;
18 class PHCompositeNode;
20 class PHParameters;
21 class PHG4Subsystem;
22 class PHG4GDMLConfig;
24 
26 {
27  public:
30 
32  ~PHG4IHCalDetector() override;
33 
35  void ConstructMe(G4LogicalVolume *world) override;
36 
37  void Print(const std::string &what = "ALL") const override;
38 
40 
41  int IsInIHCal(G4VPhysicalVolume *) const;
43 
45  const std::string SuperDetector() const { return m_SuperDetector; }
46  int get_Layer() const { return m_Layer; }
47  G4AssemblyVolume *ConstructHcalScintillatorAssembly(G4LogicalVolume *hcalenvelope);
48  void ConstructHcalSingleScintillators(G4LogicalVolume *hcalenvelope);
49  int ConsistencyCheck() const;
50  std::tuple<int, int, int> GetLayerTowerId(G4VPhysicalVolume *volume) const;
51  int GetSectorId(G4VPhysicalVolume *volume) const;
52 
53  private:
54  void AddGeometryNode();
55  int map_towerid(const int tower_id);
56  int map_layerid(const int layer_id);
57  int ConstructIHCal(G4LogicalVolume *sandwich);
58  std::tuple<int, int, int> ExtractLayerTowerId(const unsigned int isector, G4VPhysicalVolume *volume);
60  PHParameters *m_Params = nullptr;
61  G4AssemblyVolume *m_ScintiMotherAssembly = nullptr;
62  double m_InnerRadius = NAN;
63  double m_OuterRadius = NAN;
64  double m_SizeZ = NAN;
65  double m_VolumeEnvelope = NAN;
66  double m_VolumeSteel = 0.;
68 
69  int m_NumScintiPlates = -9999;
70 
71  int m_Active = 0;
73 
74  int m_Layer = 0;
75 
77  std::set<G4LogicalVolume *> m_SteelAbsorberLogVolSet;
78  std::set<G4LogicalVolume *> m_ScintiTileLogVolSet;
79  std::map<G4VPhysicalVolume *, std::tuple<int, int, int>> m_ScintiTilePhysVolMap;
80  std::map<G4VPhysicalVolume *, int> m_AbsorberPhysVolMap;
81 
84 
88 };
89 
90 #endif // G4IHCAL_PHG4IHCALDETECTOR_H