File indexing completed on 2025-10-16 08:21:10
0001
0002
0003 #ifndef QA_TRACKING_MVTXMATHINGEFFICIENCYWITHSHAPES_H_
0004 #define QA_TRACKING_MVTXMATHINGEFFICIENCYWITHSHAPES_H_
0005
0006 #include <fun4all/SubsysReco.h>
0007
0008 #include <trackbase/TrkrDefs.h>
0009
0010 #include <array>
0011 #include <cstdint>
0012 #include <limits>
0013 #include <set>
0014 #include <string>
0015 #include <vector>
0016
0017 class ActsGeometry;
0018 class TrkrHitSetContainer;
0019 class TrkrClusterContainer;
0020 class PHG4TpcCylinderGeomContainer;
0021 class TrkrClusterHitAssoc;
0022 class TH1;
0023 class TrackSeed;
0024 class TTree;
0025 class PHCompositeNode;
0026
0027 class MvtxMatchingEfficiencyWithShapes : public SubsysReco
0028 {
0029 public:
0030 MvtxMatchingEfficiencyWithShapes(const std::string &name = "MvtxMatchingEfficiencyWithShapes", const std::string &outputfilename = "out.root");
0031
0032 ~MvtxMatchingEfficiencyWithShapes() override = default;
0033
0034 int InitRun(PHCompositeNode *topNode) override;
0035 int process_event(PHCompositeNode *topNode) override;
0036 int EndRun(const int runnumber) override;
0037
0038 float calc_dedx(TrackSeed *tpcseed);
0039 static std::set<TrkrDefs::cluskey> findDuplicates(std::vector<TrkrDefs::cluskey> vec);
0040
0041 private:
0042 std::string m_outputFileName;
0043
0044 float pt{std::numeric_limits<float>::quiet_NaN()};
0045 float eta{std::numeric_limits<float>::quiet_NaN()};
0046 float phi{std::numeric_limits<float>::quiet_NaN()};
0047 float frac_p_z{std::numeric_limits<float>::quiet_NaN()};
0048 float dEdx{std::numeric_limits<float>::quiet_NaN()};
0049 int layers{std::numeric_limits<int>::min()};
0050 int states{std::numeric_limits<int>::min()};
0051 int nTPC{std::numeric_limits<int>::min()};
0052
0053 int ievent {0};
0054 TH1 *h_status {nullptr};
0055 TH1 *h_INTT_time_delta {nullptr};
0056
0057 TrkrClusterContainer *_cluster_map {nullptr};
0058 PHG4TpcCylinderGeomContainer *_geom_container{nullptr};
0059 ActsGeometry *m_tGeometry {nullptr};
0060
0061
0062 TrkrHitSetContainer *m_hitsetcontainer {nullptr};
0063
0064 TrkrClusterHitAssoc *m_cluster_hit_map {nullptr};
0065
0066 static constexpr int nLayers {3};
0067 static constexpr int nClustersPerLayer {2};
0068 std::array<std::array<int, nClustersPerLayer>, nLayers> nhits_arr{};
0069 std::array<std::array<int, nClustersPerLayer>, nLayers> x_arr{};
0070 std::array<std::array<int, nClustersPerLayer>, nLayers> y_arr{};
0071 std::array<std::array<uint64_t, nClustersPerLayer>, nLayers> key_arr{};
0072
0073 TTree *tree {nullptr};
0074 };
0075
0076 #endif