ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EICG4B0ECALDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EICG4B0ECALDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef EICG4B0ECALDETECTOR_H
4 #define EICG4B0ECALDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <map>
9 #include <set>
10 #include <string> // for string
11 
12 class G4LogicalVolume;
13 class G4VPhysicalVolume;
14 class PHCompositeNode;
15 class PHG4Subsystem;
16 class PHParameters;
17 //class EICG4B0SteppingAction;
18 
20 {
21  public:
23  EICG4B0ECALDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *parameters, const std::string &dnam, const int layer = 0);
24 
26  virtual ~EICG4B0ECALDetector() override {}
27 
29  virtual void ConstructMe(G4LogicalVolume *world) override;
30 
31  void Print(const std::string &what = "ALL") const override;
32 
34 
35  int IsInDetector(G4VPhysicalVolume *) const;
37 
38  int GetDetId(G4VPhysicalVolume *) const;
39  //void SetSteppingAction(EICG4B0SteppingAction *stpact) { m_SteppingAction = stpact; }
40  void SuperDetector(const std::string &name) { m_SuperDetector = name; }
41  const std::string SuperDetector() const { return m_SuperDetector; }
42  int get_Layer() const { return m_Layer; }
44  void SetTowerMappingFile(const std::string &filename)
45  {
47  }
48 
49  private:
51  int PlaceTower(G4LogicalVolume *envelope, G4LogicalVolume *tower);
53 
55  {
59  int idx_j;
60  int idx_k;
61  };
62 
63  // std::map<std::string, G4double> m_GlobalParameterMap;
64  std::map<std::string, towerposition> m_TowerPositionMap;
65 
66  // EICG4B0SteppingAction *m_SteppingAction;
68  // active volumes
69  std::set<G4VPhysicalVolume *> m_PhysicalVolumesSet;
70  // std::set<G4LogicalVolume *> m_LogicalVolumesSet;
71  std::map<G4VPhysicalVolume *, int> m_PhysicalVolumesDet;
72  std::set<G4LogicalVolume *> m_LogicalVolSet;
73  // std::map<G4LogicalVolume *, int> m_LogicalVolumesDet;
74  int m_Layer;
75  std::string m_SuperDetector;
76  std::string _mapping_tower_file;
78 
79  protected:
81  {
82  m_LogicalVolSet.insert(logvol);
83  }
84 };
85 
86 #endif // EICG4B0ECALDETECTOR_H