Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef TRACKBASE_TRACKVERTEXCROSSINGASSOCV1_H
0002 #define TRACKBASE_TRACKVERTEXCROSSINGASSOCV1_H
0003 /**
0004 
0005  * @file trackbase/TrackVertexCrossingAssoc_v1.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 "TrackVertexCrossingAssoc.h"
0012 #include "TrkrDefs.h"
0013 
0014 #include <phool/PHObject.h>
0015 
0016 #include <iostream>  // for cout, ostream
0017 #include <map>
0018 #include <set>
0019 #include <utility>  // for pair
0020 
0021 /**
0022  * @brief Class for associating clusters to the bunch crossing that created them
0023  *
0024  * Store the associations between clusters and beam crossings.
0025  */
0026 class TrackVertexCrossingAssoc_v1 : public TrackVertexCrossingAssoc
0027 {
0028  public:
0029   TrackVertexCrossingAssoc_v1() = default;
0030 
0031   void Reset() override;
0032 
0033   void identify(std::ostream &os = std::cout) const override;
0034 
0035   void addTrackAssoc(short int, unsigned int) override;
0036   void addVertexAssoc(short int, unsigned int) override;
0037 
0038   std::set<short int> getCrossings() const override;
0039   ConstRange getTracks(short int crossing) const override;
0040   ConstRange getVertices(short int crossing) const override;
0041 
0042   unsigned int sizeTracks(void) const override;
0043   unsigned int sizeVertices(void) const override;
0044 
0045  private:
0046   Map _track_assoc_map;
0047   Map _vertex_assoc_map;
0048   std::set<short int> _crossing_set;
0049 
0050   ClassDefOverride(TrackVertexCrossingAssoc_v1, 1);
0051 };
0052 
0053 #endif  // TRACKBASE_TRACKVERTEXCROSSINGASSOCV1_H