ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4BlockSubsystem.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4BlockSubsystem.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4BLOCKSUBSYSTEM_H
4 #define G4DETECTORS_PHG4BLOCKSUBSYSTEM_H
5 
7 
8 #include <array> // for array
9 #include <string> // for string
10 
11 class PHCompositeNode;
12 class PHG4Detector;
13 class PHG4BlockDetector;
14 class PHG4DisplayAction;
15 class PHG4SteppingAction;
16 
18 {
19  public:
21  PHG4BlockSubsystem(const std::string& name = "BLOCK", const int layer = 0);
22 
24  ~PHG4BlockSubsystem() override;
25 
27 
32  int InitRunSubsystem(PHCompositeNode*) override;
33 
35 
39  int process_event(PHCompositeNode*) override;
40 
42  PHG4Detector* GetDetector() const override;
43 
45 
46  PHG4DisplayAction* GetDisplayAction() const override { return m_DisplayAction; }
47 
48  void set_color(const double red, const double green, const double blue, const double alpha = 1.)
49  {
50  m_ColorArray[0] = red;
51  m_ColorArray[1] = green;
52  m_ColorArray[2] = blue;
53  m_ColorArray[3] = alpha;
54  }
55 // this method is used to check if it can be used as mothervolume
56 // Subsystems which can be mothervolume need to implement this
57 // and return true
58  bool CanBeMotherSubsystem() const override {return true;}
59 
60  private:
61  void SetDefaultParameters() override;
62 
64 
66 
68 
70 
72 
75  std::array<double, 4> m_ColorArray;
76 };
77 
78 #endif