Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:11

0001 #ifndef TRACKBASE_TRKRCLUSTERHITASSOCV3_H
0002 #define TRACKBASE_TRKRCLUSTERHITASSOCV3_H
0003 /**
0004 
0005  * @file trackbase/TrkrClusterHitAssocv3.h
0006  * @author D. McGlinchey
0007  * @date June 2018
0008  * @brief Version 3 of class for associating clusters to the hits that went into them
0009  */
0010 
0011 #include "TrkrClusterHitAssoc.h"
0012 #include "TrkrDefs.h"
0013 
0014 #include <phool/PHObject.h>
0015 
0016 #include <iostream>  // for cout, ostream
0017 #include <map>
0018 #include <utility>  // for pair
0019 
0020 /**
0021  * @brief Class for associating clusters to the hits that went into them
0022  *
0023  * Store the associations between clusters and the hits that went into them.
0024  */
0025 class TrkrClusterHitAssocv3 : public TrkrClusterHitAssoc
0026 {
0027  public:
0028   TrkrClusterHitAssocv3() = default;
0029 
0030   void Reset() override;
0031 
0032   void identify(std::ostream& os = std::cout) const override;
0033 
0034   //! remove all associations matching a given hitsetkey
0035   void removeAssocs(TrkrDefs::hitsetkey) override;
0036 
0037   //! add cluster to hit association
0038   void addAssoc(TrkrDefs::cluskey, unsigned int) override;
0039 
0040   //! get all associations matching a given hitsetkey
0041   Map* getClusterMap(TrkrDefs::hitsetkey) override;
0042 
0043   //! get all hits matching a given cluster key
0044   ConstRange getHits(TrkrDefs::cluskey) override;
0045 
0046   unsigned int size(void) const override;
0047 
0048  private:
0049   std::map<TrkrDefs::hitsetkey, Map> m_map;
0050 
0051   ClassDefOverride(TrkrClusterHitAssocv3, 1);
0052 };
0053 
0054 #endif  // TRACKBASE_TRKRCLUSTERHITASSOC_H