File indexing completed on 2025-08-06 08:19:32
0001 #ifndef TRACKBASE_EMBRECOMATCHCONTAINER_H
0002 #define TRACKBASE_EMBRECOMATCHCONTAINER_H
0003
0004 #include <phool/PHObject.h>
0005
0006 #include <limits>
0007 #include <map>
0008 #include <vector>
0009
0010 class EmbRecoMatch;
0011
0012 class EmbRecoMatchContainer : public PHObject
0013 {
0014 public:
0015 using Vector = std::vector<EmbRecoMatch*>;
0016 using ConstIterator = Vector::const_iterator;
0017 using ConstRange = std::pair<ConstIterator, ConstIterator>;
0018 using Map_nMatches = std::map<unsigned short, unsigned short>;
0019
0020
0021
0022
0023 void Reset() override {}
0024
0025
0026 virtual unsigned short nMatches() const { return std::numeric_limits<unsigned short>::max(); };
0027 virtual unsigned short nTruthUnmatched() const { return std::numeric_limits<unsigned short>::max(); };
0028
0029 virtual std::vector<unsigned short>& ids_TruthUnmatched();
0030 virtual std::vector<unsigned short> ids_TruthMatched() const { return {}; };
0031 virtual std::vector<unsigned short> ids_RecoMatched() const { return {}; };
0032
0033 virtual std::map<unsigned short, unsigned short>& map_nRecoPerTruth();
0034 virtual std::map<unsigned short, unsigned short>& map_nTruthPerReco();
0035
0036 virtual ConstRange getMatchedRange() const;
0037 virtual Vector& getMatches();
0038
0039 virtual void addMatch(EmbRecoMatch*){};
0040 virtual bool hasTruthMatch(unsigned short ) { return false; };
0041 virtual bool hasRecoMatch(unsigned short ) { return false; };
0042 virtual EmbRecoMatch* getMatchTruth(unsigned short , unsigned short = 0) { return nullptr; };
0043 virtual EmbRecoMatch* getMatchReco(unsigned short , unsigned short = 0) { return nullptr; };
0044
0045 virtual void checkfill_idsTruthUnmatched(unsigned short){};
0046
0047 virtual void sort(){};
0048
0049
0050 void identify(std::ostream& os = std::cout) const override
0051 {
0052 os << "EmbREcoMatchContainer base class" << std::endl;
0053 };
0054
0055 protected:
0056 EmbRecoMatchContainer() = default;
0057 ClassDefOverride(EmbRecoMatchContainer, 1)
0058 };
0059
0060 #endif