ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4BarrelEcalDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4BarrelEcalDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4BarrelEcalDETECTOR_H
4 #define G4DETECTORS_PHG4BarrelEcalDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <Geant4/G4SystemOfUnits.hh>
9 #include <Geant4/G4Transform3D.hh>
10 #include <Geant4/G4Trap.hh>
11 #include <Geant4/G4Tubs.hh>
12 #include <Geant4/G4Types.hh> // for G4double
13 
14 #include <map>
15 #include <set>
16 #include <string>
17 
18 class G4LogicalVolume;
19 class G4Material;
20 class G4VPhysicalVolume;
21 class PHCompositeNode;
23 class PHG4Subsystem;
24 class PHParameters;
25 class PHG4GDMLConfig;
26 
34 {
35  public:
37  PHG4BarrelEcalDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *parameters, const std::string &dnam);
38 
41 
43  virtual void ConstructMe(G4LogicalVolume *world);
44 
46  int IsInBarrelEcal(G4VPhysicalVolume *) const;
47 
48  void SuperDetector(const std::string &name) { m_SuperDetector = name; }
49  const std::string SuperDetector() const { return m_SuperDetector; }
50 
51  int get_Layer() const { return m_Layer; }
52 
53  private:
55 
56  G4double Radius = 85. * cm; //Inner radius of BECAL
57  G4double tower_length = 45.5 * cm; // Length of the Tower
58 
59  const int nTowers_layer = 128.; //Number of towers per phi tower
60  const double becal_length = 415 * cm; //support width
61  const double th = 1.;
62  const double overlap = 0.1;
63 
69 
70  int PlaceTower(G4LogicalVolume *envelope);
72 
74  {
87  int idx_j;
88  int idx_k;
89  };
90 
93 
94  G4Trap *GetTowerTrap(std::map<std::string, towerposition>::iterator iterator);
95  G4Trap *GetSiTrap(std::map<std::string, towerposition>::iterator iterator);
96  G4Trap *GetGlassTrap(std::map<std::string, towerposition>::iterator iterator);
97  G4Trap *GetKaptonTrap(std::map<std::string, towerposition>::iterator iterator);
98  G4Trap *GetSIO2Trap(std::map<std::string, towerposition>::iterator iterator);
99  G4Trap *GetCarbonTrap(std::map<std::string, towerposition>::iterator iterator);
100 
101  G4LogicalVolume *GetTowerSci(std::map<std::string, towerposition>::iterator iterator);
102  G4Trap *GetGlassTrapSubtract(std::map<std::string, towerposition>::iterator iterator);
103  G4LogicalVolume *ConstructTower(std::map<std::string, towerposition>::iterator iterator);
104  G4LogicalVolume *ConstructGlass(std::map<std::string, towerposition>::iterator iterator);
105  G4LogicalVolume *ConstructSi(std::map<std::string, towerposition>::iterator iterator);
106  G4LogicalVolume *ConstructKapton(std::map<std::string, towerposition>::iterator iterator);
107  G4LogicalVolume *ConstructSIO2(std::map<std::string, towerposition>::iterator iterator);
108  G4LogicalVolume *ConstructCarbon(std::map<std::string, towerposition>::iterator iterator);
109 
111  PHParameters *m_Params = nullptr;
112 
113  int m_ActiveFlag = 1;
116  int m_Layer = 0;
117 
118  //G4LogicalVolume* singletower;
120  std::string m_SuperDetector;
121 
122  std::map<std::string, G4double> m_GlobalParameterMap;
123  std::map<std::string, towerposition> m_TowerPostionMap;
124 
125  std::set<G4LogicalVolume *> m_AbsorberLogicalVolSet;
126  std::set<G4LogicalVolume *> m_ScintiLogicalVolSet;
127  std::set<G4LogicalVolume *> m_SupportLogicalVolSet;
128 
131 };
132 
133 #endif