File indexing completed on 2025-08-05 08:15:19
0001
0002
0003
0004
0005
0006
0007 #ifndef TRACKPID_TRACKPIDASSOC_H
0008 #define TRACKPID_TRACKPIDASSOC_H
0009
0010 #include <phool/PHObject.h>
0011
0012 #include <iostream> // for cout, ostream
0013 #include <map>
0014 #include <utility> // for pair
0015
0016
0017
0018
0019
0020
0021 class TrackPidAssoc : public PHObject
0022 {
0023 public:
0024
0025 typedef std::multimap<unsigned int, unsigned int> MMap;
0026 typedef MMap::iterator Iterator;
0027 typedef MMap::const_iterator ConstIterator;
0028 typedef std::pair<Iterator, Iterator> Range;
0029 typedef std::pair<ConstIterator, ConstIterator> ConstRange;
0030
0031 TrackPidAssoc();
0032
0033 virtual ~TrackPidAssoc();
0034
0035 void Reset();
0036
0037 void identify(std::ostream &os = std::cout) const;
0038
0039
0040
0041
0042
0043
0044 void addAssoc(unsigned int pid, unsigned int trid);
0045
0046
0047
0048
0049
0050
0051 ConstRange getTracks(unsigned int pid);
0052
0053 static const unsigned int electron = 1;
0054 static const unsigned int hadron = 2;
0055
0056
0057 private:
0058 MMap m_map;
0059 ClassDef(TrackPidAssoc, 1);
0060 };
0061
0062 #endif