Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4MicromegasDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4MicromegasDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef PHG4MICROMEGASDETECTOR_H
4 #define PHG4MICROMEGASDETECTOR_H
5 
11 #include <g4main/PHG4Detector.h>
14 
15 #include <map>
16 #include <set>
17 #include <string>
18 
19 class G4LogicalVolume;
20 class G4VPhysicalVolume;
21 class PHCompositeNode;
23 class PHG4Subsystem;
24 class PHParameters;
25 
27 {
28  public:
31 
33  void ConstructMe(G4LogicalVolume*) override;
34 
35  void Print(const std::string& what = "ALL") const override;
36 
39 
41  int get_first_layer() const { return m_FirstLayer; }
42 
44  int IsInDetector(G4VPhysicalVolume*) const;
45 
47  int get_layer(G4VPhysicalVolume*) const;
48 
50  int get_tileid(G4VPhysicalVolume*) const;
51 
54 
56  const std::string SuperDetector() const { return m_SuperDetector; }
57 
60 
61  private:
63 
64  void setup_tiles();
65 
67  void create_materials() const;
68 
70  void construct_micromegas(G4LogicalVolume*);
71 
73 
74  G4LogicalVolume* construct_micromegas_tile(int tileid, MicromegasDefs::SegmentationType);
75 
77  G4LogicalVolume* construct_fee_board(int id);
78 
80 
81  void add_geometry_node();
82 
85 
88 
90  /* there are two layers in the detector */
91  int m_FirstLayer{0};
92 
94  bool m_ActiveFlag{false};
95 
97  bool m_SupportActiveFlag{false};
98 
100 
101  std::map<int, double> m_layer_radius;
102 
104 
105  std::map<int, double> m_layer_thickness;
106 
108 
109  std::map<G4VPhysicalVolume*, int> m_activeVolumes;
110 
112 
113  std::map<G4VPhysicalVolume*, int> m_tiles_map;
114 
116  std::set<G4VPhysicalVolume*> m_passiveVolumes;
117 
120 
123 };
124 
125 #endif // MICROMEGASDETECTOR_H