File indexing completed on 2025-08-05 08:17:44
0001
0002
0003 #ifndef G4DETECTORS_PHG4CONESUBSYSTEM_H
0004 #define G4DETECTORS_PHG4CONESUBSYSTEM_H
0005
0006 #include "PHG4DetectorSubsystem.h"
0007
0008 #include <array> // for array
0009 #include <string> // for string
0010
0011 class PHCompositeNode;
0012 class PHG4ConeDetector;
0013 class PHG4Detector;
0014 class PHG4DisplayAction;
0015 class PHG4SteppingAction;
0016
0017 class PHG4ConeSubsystem : public PHG4DetectorSubsystem
0018 {
0019 public:
0020
0021 PHG4ConeSubsystem(const std::string& name = "CONE", const int layer = 0);
0022
0023
0024 ~PHG4ConeSubsystem(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 PHG4Detector* GetDetector(void) const override;
0043 PHG4SteppingAction* GetSteppingAction(void) const override { return m_SteppingAction; };
0044
0045 PHG4DisplayAction* GetDisplayAction() const override { return m_DisplayAction; }
0046 void set_color(const double red, const double green, const double blue, const double alpha = 1.)
0047 {
0048 m_ColorArray[0] = red;
0049 m_ColorArray[1] = green;
0050 m_ColorArray[2] = blue;
0051 m_ColorArray[3] = alpha;
0052 }
0053
0054
0055 void SetR1(const double min, const double max);
0056
0057
0058 void SetR2(const double min, const double max);
0059
0060
0061 void SetZlength(const double a);
0062
0063
0064 void SetPhi(const double a, const double b);
0065
0066
0067 void Set_eta_range(double etaMin, double etaMax);
0068
0069 void SetPlaceZ(const double dbl);
0070 void SetPlace(const double place_x, const double place_y, const double place_z);
0071
0072 void SetZRot(const double dbl);
0073 void SetMaterial(const std::string& mat);
0074
0075
0076
0077
0078 bool CanBeMotherSubsystem() const override { return true; }
0079
0080 private:
0081 void SetDefaultParameters() override;
0082
0083
0084
0085 PHG4ConeDetector* m_Detector = nullptr;
0086
0087
0088
0089 PHG4SteppingAction* m_SteppingAction = nullptr;
0090
0091
0092
0093 PHG4DisplayAction* m_DisplayAction = nullptr;
0094
0095
0096 std::array<double, 4> m_ColorArray{};
0097 };
0098
0099 #endif