File indexing completed on 2025-08-06 08:19:27
0001
0002
0003 #ifndef G4MVTX_PHG4MVTXSUBSYSTEM_H
0004 #define G4MVTX_PHG4MVTXSUBSYSTEM_H
0005
0006 #include <g4detectors/PHG4DetectorGroupSubsystem.h>
0007
0008 #include <cmath> // for asin
0009 #include <string> // for string
0010
0011 class PHCompositeNode;
0012 class PHG4Detector;
0013 class PHG4DisplayAction;
0014 class PHG4MvtxDetector;
0015 class PHG4SteppingAction;
0016
0017 class PHG4MvtxSubsystem : public PHG4DetectorGroupSubsystem
0018 {
0019 public:
0020
0021 PHG4MvtxSubsystem(const std::string& name = "PHG4MvtxSubsystem", const int _n_layers = 3);
0022
0023
0024 ~PHG4MvtxSubsystem() override;
0025
0026
0027
0028
0029
0030
0031
0032
0033 int InitRunSubsystem(PHCompositeNode*) override;
0034
0035
0036
0037
0038
0039
0040 int process_event(PHCompositeNode*) override;
0041
0042
0043 PHG4Detector* GetDetector(void) const override;
0044 PHG4SteppingAction* GetSteppingAction(void) const override { return m_SteppingAction; }
0045
0046 PHG4DisplayAction* GetDisplayAction() const override { return m_DisplayAction; }
0047
0048 void Apply_Misalignment(bool b) { m_ApplyMisalignment = b; }
0049 void MisalignmentFile(const std::string& filename) { m_misalignmentFile = filename; }
0050
0051 private:
0052 void SetDefaultParameters() override;
0053 static double radii2Turbo(double rMin, double rMid, double rMax, double sensW)
0054 {
0055
0056 return std::asin((rMax * rMax - rMin * rMin) / (2 * rMid * sensW));
0057 }
0058
0059
0060 PHG4MvtxDetector* m_Detector{nullptr};
0061
0062
0063
0064 PHG4SteppingAction* m_SteppingAction{nullptr};
0065
0066
0067
0068 PHG4DisplayAction* m_DisplayAction{nullptr};
0069
0070
0071 unsigned int n_layers{0};
0072
0073 std::string detector_type;
0074 std::string m_HitNodeName;
0075 std::string m_SupportNodeName;
0076 std::string m_misalignmentFile = "";
0077 bool m_ApplyMisalignment{false};
0078 };
0079
0080 #endif