Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-06-03 00:12:14

0001 #ifndef L1Trigger_TrackerTFP_DuplicateRemoval_h
0002 #define L1Trigger_TrackerTFP_DuplicateRemoval_h
0003 
0004 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0005 #include "L1Trigger/TrackerTFP/interface/DataFormats.h"
0006 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0007 
0008 #include <vector>
0009 
0010 namespace trackerTFP {
0011 
0012   // Class to do duplicate removal in a region.
0013   class DuplicateRemoval {
0014   public:
0015     DuplicateRemoval(const tt::Setup* setup,
0016                      const DataFormats* dataFormats,
0017                      std::vector<TrackDR>& tracks,
0018                      std::vector<StubDR>& stubs);
0019     ~DuplicateRemoval() = default;
0020     // fill output products
0021     void produce(const std::vector<std::vector<TrackKF*>>& tracksIn,
0022                  const std::vector<std::vector<StubKF*>>& stubsIn,
0023                  std::vector<std::vector<TrackDR*>>& tracksOut,
0024                  std::vector<std::vector<StubDR*>>& stubsOut);
0025 
0026   private:
0027     struct Track {
0028       Track(TrackKF* track, const std::vector<StubKF*>& stubs, bool match, int inv2R, int phiT, int zT)
0029           : track_(track), stubs_(stubs), match_(match), inv2R_(inv2R), phiT_(phiT), zT_(zT) {}
0030       //
0031       TrackKF* track_;
0032       //
0033       std::vector<StubKF*> stubs_;
0034       //
0035       bool match_;
0036       //
0037       int inv2R_;
0038       //
0039       int phiT_;
0040       //
0041       int zT_;
0042     };
0043     // provides run-time constants
0044     const tt::Setup* setup_;
0045     // provides dataformats
0046     const DataFormats* dataFormats_;
0047     // container of output tracks
0048     std::vector<TrackDR>& tracks_;
0049     // container of output stubs
0050     std::vector<StubDR>& stubs_;
0051     // number of channel
0052     int numChannel_;
0053     // number of kf layers
0054     int numLayers_;
0055     // number of bins in inv2R
0056     int numInv2R_;
0057     // number of bins in phiT
0058     int numPhiT_;
0059     // number of bins in zT
0060     int numZT_;
0061   };
0062 
0063 }  // namespace trackerTFP
0064 
0065 #endif