EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4ForwardDualReadoutDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4ForwardDualReadoutDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4FORWARDDUALREADOUTDETECTOR_H
4 #define G4DETECTORS_PHG4FORWARDDUALREADOUTDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <Geant4/G4String.hh> // for G4String
9 #include <Geant4/G4Types.hh> // for G4double
10 #include <Geant4/G4Material.hh>
11 
12 #include <map>
13 #include <string>
14 
15 class G4LogicalVolume;
16 class G4VPhysicalVolume;
17 class PHCompositeNode;
20 class PHG4Subsystem;
21 
29 {
30  public:
32  PHG4ForwardDualReadoutDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, const std::string &dnam);
33 
36 
38  virtual void ConstructMe(G4LogicalVolume *world);
39 
41  int IsInForwardDualReadout(G4VPhysicalVolume *) const;
42 
44  void SetTowerMappingFile(const std::string &filename)
45  {
47  }
48 
49  void SetTowerDimensions(G4double dx, G4double dy, G4double dz)
50  {
51  _tower_dx = dx;
52  _tower_dy = dy;
53  _tower_dz = dz;
54  }
55 
56  void SetPlace(G4double place_in_x, G4double place_in_y, G4double place_in_z)
57  {
58  _place_in_x = place_in_x;
59  _place_in_y = place_in_y;
60  _place_in_z = place_in_z;
61  }
62 
63  void SetXRot(G4double rot_in_x) { _rot_in_x = rot_in_x; }
64  void SetYRot(G4double rot_in_y) { _rot_in_y = rot_in_y; }
65  void SetZRot(G4double rot_in_z) { _rot_in_z = rot_in_z; }
66 
69 
70  void SetActive(const int i = 1) { _active = i; }
71  void SetAbsorberActive(const int i = 1) { _absorberactive = i; }
72 
73  int IsActive() const { return _active; }
74 
75  void SuperDetector(const std::string &name) { _superdetector = name; }
77  const std::string SuperDetector() const { return _superdetector; }
78 
79  int get_Layer() const { return _layer; }
80 
81  void BlackHole(const int i = 1) { _blackhole = i; }
82  int IsBlackHole() const { return _blackhole; }
83 
84  private:
85  G4LogicalVolume *ConstructTower(int type);
86  G4LogicalVolume *ConstructTowerFCStyle(int type);
87  // G4LogicalVolume *ConstructTowerType1();
88  // G4LogicalVolume *ConstructTowerType2();
89  // G4LogicalVolume *ConstructTowerType3();
90  G4Material *GetScintillatorMaterial();
91  G4Material *GetQuartzMaterial();
92  G4Material *GetPMMAMaterial();
93  int PlaceTower(G4LogicalVolume *envelope, G4LogicalVolume *tower);
95 
97  {
98  G4double x;
99  G4double y;
100  G4double z;
101  int idx_j;
102  int idx_k;
103  int type;
104  };
105 
108 
109  /* Calorimeter envelope geometry */
110  G4double _place_in_x;
111  G4double _place_in_y;
112  G4double _place_in_z;
116 
117  G4double _rot_in_x;
118  G4double _rot_in_y;
119  G4double _rot_in_z;
120 
121  G4double _rMin1;
122  G4double _rMax1;
123  G4double _rMin2;
124  G4double _rMax2;
125 
126  G4double _dZ;
127  G4double _sPhi;
128  G4double _dPhi;
129 
130  /* DRCALO tower geometry */
132  G4double _tower_readout;
133  G4double _tower_dx;
134  G4double _tower_dy;
135  G4double _tower_dz;
136 
142 
143  G4double _wls_dw;
144  G4double _support_dw;
145 
148 
149  int _active;
151  int _layer;
153 
155  std::string _superdetector;
156  std::string _mapping_tower_file;
157  std::map<std::string, G4double> m_GlobalParameterMap;
158 
159  std::map<std::string, towerposition> _map_tower;
160 };
161 
162 #endif