Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef TRACKBASE_TRKRCLUSTERCROSSINGASSOCV1_H
0002 #define TRACKBASE_TRKRCLUSTERCROSSINGASSOCV1_H
0003 /**
0004 
0005  * @file trackbase/TrkrClusterCrossingAssocv1.h
0006  * @author Tony Frawley
0007  * @date March 2022
0008  * @brief Version 1 of class for associating clusters to the bunch crossing that created them
0009  */
0010 
0011 #include "TrkrClusterCrossingAssoc.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 bunch crossing that created them
0022  *
0023  * Store the associations between clusters and beam crossings.
0024  */
0025 class TrkrClusterCrossingAssocv1 : public TrkrClusterCrossingAssoc
0026 {
0027  public:
0028   TrkrClusterCrossingAssocv1() = default;
0029 
0030   void Reset() override;
0031 
0032   void identify(std::ostream &os = std::cout) const override;
0033 
0034   void addAssoc(TrkrDefs::cluskey, short int) override;
0035 
0036   ConstRange getCrossings(TrkrDefs::cluskey) const override;
0037 
0038   ConstRange getAll() const override;
0039 
0040   unsigned int size(void) const override;
0041 
0042  private:
0043   std::multimap<TrkrDefs::cluskey, short int> m_map;
0044 
0045   ClassDefOverride(TrkrClusterCrossingAssocv1, 1);
0046 };
0047 
0048 #endif  // TRACKBASE_TRKRCLUSTERCROSSINGASSOCV1_H