EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4CrystalCalorimeterDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4CrystalCalorimeterDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4CRYSTALCALORIMETERDETECTOR_H
4 #define G4DETECTORS_PHG4CRYSTALCALORIMETERDETECTOR_H
5 
7 
8 #include <g4main/PHG4Detector.h>
9 
10 #include <map>
11 #include <set>
12 #include <string>
13 
14 class G4LogicalVolume;
15 class G4Material;
16 class G4VPhysicalVolume;
17 class PHCompositeNode;
19 class PHG4Subsystem;
20 class PHParameters;
21 
29 {
30  public:
32  PHG4CrystalCalorimeterDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *parameters, const std::string &dnam);
33 
36 
38  virtual void ConstructMe(G4LogicalVolume *world);
39 
41  virtual int IsInCrystalCalorimeter(G4VPhysicalVolume *) const;
42 
43  // ----- accessing member variables: ------------
44 
45  void SuperDetector(const std::string &name) { m_SuperDetector = name; }
46  const std::string SuperDetector() const { return m_SuperDetector; }
47 
48  int get_DetectorId() const { return m_DetectorId; }
49  void DetectorId(const int i) { m_DetectorId = i; }
50 
51  // ----- additional accessors used by derived classes: ------------
52 
54 
55  protected: // for variables also used in PHG4ProjCrystalCalorimeterDetector
57  G4Material *GetCarbonFiber();
59 
60  private: // private stuff
61  G4LogicalVolume *ConstructTower();
62  int PlaceTower(G4LogicalVolume *envelope, G4LogicalVolume *tower);
64 
66  {
67  G4double x;
68  G4double y;
69  G4double z;
70  int idx_j;
71  int idx_k;
72  };
73 
74  int m_DetectorId = 0;
75 
76  std::string m_SuperDetector;
77 
78  PHParameters *m_Params = nullptr;
79 
81 
82  std::string _towerlogicnameprefix;
83 
84  std::map<std::string, G4double> _map_global_parameter;
85  std::map<std::string, towerposition> _map_tower;
86  std::set<G4VPhysicalVolume *> m_ActiveVolumeSet;
87  std::set<G4VPhysicalVolume *> m_PassiveVolumeSet;
88  // since getting parameters is a map search we do not want to
89  // do this in every step, the parameters used are cached
90  // in the following variables
93 };
94 
95 #endif