EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4EnvelopeDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4EnvelopeDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4ENVELOPEDETECTOR_H
4 #define G4DETECTORS_PHG4ENVELOPEDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <Geant4/G4String.hh> // for G4String
9 #include <Geant4/G4Types.hh>
10 
11 #include <string>
12 
13 class G4LogicalVolume;
14 class G4VPhysicalVolume;
15 class PHCompositeNode;
16 class PHG4Subsystem;
17 
19 {
20  public:
21  //Constructor
22  PHG4EnvelopeDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, const std::string &dnam);
23 
24  //Destructor
25  ~PHG4EnvelopeDetector() override{}
26 
27  //Construct
28  void ConstructMe(G4LogicalVolume *world) override;
29 
30  //Volume accessors
31  bool IsInEnvelope(G4VPhysicalVolume *) const;
32 
33  void SetPlace(G4double place_in_x, G4double place_in_y, G4double place_in_z)
34  {
35  _placeInX = place_in_x;
36  _placeInY = place_in_y;
37  _placeInZ = place_in_z;
38  }
39 
40  void SetInnerRadius(G4double radius) { _innerRadius = radius; }
41  void SetOuterRadius(G4double radius) { _outerRadius = radius; }
42  void SetCylinderLength(G4double length) { _dZ_cyl = length; }
43 
44  void SetActive(const int i = 1) { _active = i; }
45  int IsActive() const { return _active; }
46 
47  void SuperDetector(const std::string &name) { _superdetector = name; }
48  const std::string SuperDetector() const { return _superdetector; }
49 
50  int get_Layer() const { return _layer; }
51 
52  private:
53  G4double _placeInX;
54  G4double _placeInY;
55  G4double _placeInZ;
56  G4double _innerRadius;
57  G4double _outerRadius;
58  G4double _dZ;
59  G4double _dZ_cyl;
60  G4double _sPhi;
61  G4double _dPhi;
62 
63  G4String _materialCrystal;
64 
65  int _active;
66  int _layer;
67 
68  std::string _superdetector;
69 };
70 
71 #endif