File indexing completed on 2026-07-16 08:13:22
0001 #ifndef MBDTRACKVERTEX_H
0002 #define MBDTRACKVERTEX_H
0003
0004 #include <fun4all/SubsysReco.h>
0005
0006 #include <TFile.h>
0007 #include <TH1.h>
0008 #include <THnSparse.h>
0009 #include <TTree.h>
0010
0011 #include <cstdint>
0012 #include <string>
0013
0014 class PHCompositeNode;
0015
0016 class MbdTrackVertex : public SubsysReco
0017 {
0018 public:
0019
0020 MbdTrackVertex(const std::string &name = "MbdTrackVertex");
0021
0022 ~MbdTrackVertex() override;
0023
0024
0025
0026
0027
0028
0029 int Init(PHCompositeNode *topNode) override;
0030
0031
0032
0033
0034 int process_event(PHCompositeNode *topNode) override;
0035
0036
0037 int End(PHCompositeNode *topNode) override;
0038
0039 void setOutputName(const std::string& name) { outFileName = name; };
0040 void SetTreeFlag(bool flag) { _treeflag = flag; }
0041 void SetTriggerMask(uint64_t mask) { _gl1_trigmask = mask; }
0042
0043 private:
0044
0045 TFile* outFile {nullptr};
0046 TTree* outTree {nullptr};
0047 TH1F* h_mbdtrkz {nullptr};
0048 TH1F* h_bz {nullptr};
0049 TH1F* h_trkz {nullptr};
0050 THnSparseF* h2_mbdtrkz {nullptr};
0051 std::string outFileName = "mbdtrk_vertex.root";
0052
0053 Float_t _mbdVertex {std::numeric_limits<float>::quiet_NaN()};
0054 Float_t _trackerVertex {std::numeric_limits<float>::quiet_NaN()};
0055 UInt_t _nTracks {std::numeric_limits<unsigned int>::quiet_NaN()};
0056 UInt_t _nMBDVertex {std::numeric_limits<unsigned int>::quiet_NaN()};
0057 UInt_t _nTRKVertex {std::numeric_limits<unsigned int>::quiet_NaN()};
0058
0059 bool _hasMBD {false};
0060 bool _hasTRK {false};
0061
0062 bool _treeflag {true};
0063 uint64_t _gl1_trigmask {0};
0064 int _counter{0};
0065 int _evt{0};
0066 };
0067
0068 #endif