File indexing completed on 2025-08-03 08:18:17
0001
0002
0003 #ifndef G4DETECTORS_PHG4CYLINDERSUBSYSTEM_H
0004 #define G4DETECTORS_PHG4CYLINDERSUBSYSTEM_H
0005
0006 #include "PHG4DetectorSubsystem.h"
0007
0008 #include <array> // for array
0009 #include <string> // for string
0010
0011 class PHCompositeNode;
0012 class PHG4CylinderDetector;
0013 class PHG4Detector;
0014 class PHG4DisplayAction;
0015 class PHG4SteppingAction;
0016
0017 class PHG4CylinderSubsystem : public PHG4DetectorSubsystem
0018 {
0019 public:
0020
0021 PHG4CylinderSubsystem(const std::string& name = "CYLINDER", const int layer = 0);
0022
0023
0024 ~PHG4CylinderSubsystem(void) override;
0025
0026
0027
0028
0029
0030
0031
0032 int InitRunSubsystem(PHCompositeNode*) override;
0033
0034
0035
0036
0037
0038
0039 int process_event(PHCompositeNode*) override;
0040
0041
0042 void Print(const std::string& what = "ALL") const override;
0043
0044
0045 PHG4Detector* GetDetector(void) const override;
0046 PHG4SteppingAction* GetSteppingAction(void) const override { return m_SteppingAction; }
0047
0048 PHG4DisplayAction* GetDisplayAction() const override { return m_DisplayAction; }
0049 void set_color(const double red, const double green, const double blue, const double alpha = 1.)
0050 {
0051 m_ColorArray[0] = red;
0052 m_ColorArray[1] = green;
0053 m_ColorArray[2] = blue;
0054 m_ColorArray[3] = alpha;
0055 }
0056
0057
0058
0059 bool CanBeMotherSubsystem() const override { return true; }
0060
0061
0062
0063
0064 void SaveAllHits(bool i = true) { m_SaveAllHitsFlag = i; }
0065
0066 private:
0067 void SetDefaultParameters() override;
0068
0069
0070
0071 PHG4CylinderDetector* m_Detector{nullptr};
0072
0073
0074
0075 PHG4SteppingAction* m_SteppingAction{nullptr};
0076
0077
0078
0079 PHG4DisplayAction* m_DisplayAction{nullptr};
0080
0081 bool m_SaveAllHitsFlag = false;
0082
0083 std::array<double, 4> m_ColorArray{};
0084 };
0085
0086 #endif