Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:47

0001 #ifndef L1Trigger_TrackFindingTMTT_DupFitTrkKiller_h
0002 #define L1Trigger_TrackFindingTMTT_DupFitTrkKiller_h
0003 
0004 #include "L1Trigger/TrackFindingTMTT/interface/L1fittedTrack.h"
0005 
0006 #include <list>
0007 #include <iostream>
0008 
0009 /**
0010 *  Kill duplicate fitted tracks.
0011 *  
0012 *  Currently this is intended to run only on tracks found within a single (eta,phi) sector.
0013 */
0014 
0015 namespace tmtt {
0016 
0017   class Settings;
0018 
0019   class DupFitTrkKiller {
0020   public:
0021     enum class DupAlgoName { None = 0, Algo1 = 1, Algo2 = 2 };
0022 
0023     /**
0024   *  Make available cfg parameters & specify which algorithm is to be used for duplicate track removal.
0025   */
0026     DupFitTrkKiller(const Settings* settings);
0027 
0028     /**
0029   *  Eliminate duplicate tracks from the input collection, and so return a reduced list of tracks.
0030   */
0031     std::list<const L1fittedTrack*> filter(const std::list<L1fittedTrack>& vecTracks) const;
0032 
0033   private:
0034     /**
0035    * Duplicate removal algorithm that eliminates duplicates 
0036    * by requiring that the fitted (q/Pt, phi0) of the track correspond to the same HT cell in which the track
0037    * was originally found by the HT.
0038    */
0039     std::list<const L1fittedTrack*> filterAlg1(const std::list<L1fittedTrack>& tracks) const;
0040 
0041     /**
0042     * Duplicate removal algorithm that  eliminates duplicates  
0043     * by requiring that no two tracks should have fitted (q/Pt, phi0) that correspond to the same HT
0044     * cell. If they do, then only the first to arrive is kept.
0045   */
0046     std::list<const L1fittedTrack*> filterAlg2(const std::list<L1fittedTrack>& tracks) const;
0047 
0048     // Debug printout of which tracks are duplicates.
0049     void printDuplicateTracks(const std::list<const L1fittedTrack*>& tracks) const;
0050 
0051   private:
0052     const Settings* settings_;  // Configuration parameters.
0053     DupAlgoName dupTrkAlg_;     // Specifies choice of algorithm for duplicate track removal.
0054   };
0055 
0056 }  // namespace tmtt
0057 
0058 #endif