File indexing completed on 2026-08-31 08:21:42
0001 #ifndef TPC_POLYCLUSTERDISPLAY_H
0002 #define TPC_POLYCLUSTERDISPLAY_H
0003
0004 #include <fun4all/SubsysReco.h>
0005
0006 #include <string>
0007
0008 class PHCompositeNode;
0009 class Tpc_PolyTrackContainer;
0010 class Tpc_PolyTrackVertexContainer;
0011 class TFile;
0012 class Tpc_PolyClusterContainer;
0013
0014 class Tpc_PolyClusterDisplay : public SubsysReco
0015 {
0016 public:
0017 Tpc_PolyClusterDisplay(const std::string& name = "Tpc_PolyClusterDisplay",
0018 const std::string& outfilename = "tpc_polycluster_display.root",
0019 const std::string& clusterNodeName = "TPC_POLYCLUSTERS",
0020 unsigned int maxEventDisplays = 5);
0021 ~Tpc_PolyClusterDisplay() override;
0022
0023 int Init(PHCompositeNode*) override;
0024 int process_event(PHCompositeNode*) override;
0025 int End(PHCompositeNode*) override;
0026
0027 void setClusterNodeName(const std::string& n) { m_clusterNodeName = n; }
0028 void setTpc_PolyTrackNodeName(const std::string& n) { m_finalTrackNodeName = n; }
0029 void setTpc_PolyTrackVertexNodeName(const std::string& n) { m_finalTrackVertexNodeName = n; }
0030 void setMagneticFieldTesla(double b) { m_magneticFieldTesla = b; }
0031 void setZRange(double zmin, double zmax)
0032 {
0033 m_zmin = zmin;
0034 m_zmax = zmax;
0035 }
0036 void setTrackVertexZRange(double zmin, double zmax)
0037 {
0038 m_trackVertexZMin = zmin;
0039 m_trackVertexZMax = zmax;
0040 }
0041 void setXYRange(double xymax) { m_xymax = xymax; }
0042 void setUseStraightLineTracks(bool v) { m_useStraightLineTracks = v; }
0043
0044 private:
0045 bool get_nodes(PHCompositeNode* topNode);
0046
0047 std::string m_outfilename;
0048 std::string m_clusterNodeName;
0049 std::string m_finalTrackNodeName;
0050 std::string m_finalTrackVertexNodeName;
0051 unsigned int m_maxEventDisplays;
0052 unsigned int m_evt;
0053 unsigned int m_eventsSaved;
0054 double m_zmin;
0055 double m_zmax;
0056 double m_trackVertexZMin;
0057 double m_trackVertexZMax;
0058 double m_xymax;
0059 double m_magneticFieldTesla;
0060 bool m_useStraightLineTracks;
0061
0062 TFile* m_outfile;
0063 Tpc_PolyClusterContainer* m_clusters;
0064 Tpc_PolyTrackContainer* m_finalTracks;
0065 Tpc_PolyTrackVertexContainer* m_finalTrackVertices;
0066 };
0067
0068 #endif