ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4HcalDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4HcalDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4HCALDETECTOR_H
4 #define G4DETECTORS_PHG4HCALDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <Geant4/G4Region.hh>
9 #include <Geant4/G4SystemOfUnits.hh>
10 #include <Geant4/G4Types.hh>
11 
12 #include <map>
13 #include <string> // for string
14 
15 class G4Material;
16 class G4LogicalVolume;
18 class G4VPhysicalVolume;
19 class PHCompositeNode;
20 class PHG4Subsystem;
21 
23 {
24  public:
26  PHG4HcalDetector(PHG4Subsystem* subsys, PHCompositeNode* Node, const std::string& dnam, const int layer = 0);
27 
29  ~PHG4HcalDetector(void) override
30  {
31  }
32 
34  void ConstructMe(G4LogicalVolume* world) override;
35 
36  void SetRadius(const G4double dbl) { radius = dbl * cm; }
37  void SetLength(const G4double dbl) { length = dbl * cm; }
38  void SetPosition(const G4double x, const G4double y, const G4double z)
39  {
40  xpos = x * cm;
41  ypos = y * cm;
42  zpos = z * cm;
43  }
44 
45  void SetTilt(const double tilt) { _sciTilt = tilt; }
46  void SetScintWidth(const double wid) { _sciWidth = wid * cm; }
47  void SetNumScint(const int num) { _sciNum = num; }
48  void SetScintPhi0(const G4double phi0) { _sciPhi0 = phi0; } // in units of sampling cells
49 
50  void SetThickness(const G4double dbl) { TrackerThickness = dbl * cm; }
51  void SetMaterial(const std::string& mat) { material = mat; }
52  void SetActive(const int i = 1) { active = i; }
53  void SetAbsorberActive(const int i = 1) { absorberactive = i; }
54  void SetDetectorType(const std::string& typ) { detector_type = typ; }
56  void SuperDetector(const std::string& name) { superdetector = name; }
57  const std::string SuperDetector() const { return superdetector; }
58  int get_Layer() const { return layer; }
60  {
61  if (_region)
63  else
64  return 0;
65  }
66 
67  void Print(const std::string& what = "ALL") const override;
68 
69  static int INACTIVE;
70 
71  private:
72  double GetLength(const double phi) const;
75 
78  std::map<const G4VPhysicalVolume*, int> box_vol;
79 
86  G4double _sciPhi0; // in units of sampling cells
88  std::string material;
89  int active;
91  int layer;
92  std::string detector_type;
93  std::string superdetector;
94 };
95 
96 #endif