Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_TrackFindingTMTT_TrkRZfilter_h
0002 #define L1Trigger_TrackFindingTMTT_TrkRZfilter_h
0003 
0004 #include "L1Trigger/TrackFindingTMTT/interface/L1track2D.h"
0005 #include "L1Trigger/TrackFindingTMTT/interface/L1track3D.h"
0006 #include "L1Trigger/TrackFindingTMTT/interface/HTrphi.h"
0007 
0008 #include <vector>
0009 #include <list>
0010 
0011 //=== This class runs filters in track candidates previously found by the r-phi Hough transform,
0012 //=== which check that each track's stubs are consistent with a straight line in the r-z plane.
0013 //===
0014 //=== The filtering removes inconsistent stubs from the track candidates, & also kills some track candidates
0015 //=== altogether if the filter leaves them with too few stubs.
0016 //===
0017 //=== The r-z filters also add an estimate of the r-z helix parameters to the selected track candidates,
0018 //=== The filtered tracks are returned at L1track3D type, since they contain this information.
0019 //===
0020 //=== It does NOT contain filters such as the bend filter, which are so simple that the firmware can run them
0021 //=== INSIDE the r-phi HT. Simple filters of this kind are in class HTcell.
0022 //===
0023 //=== After creating the L1track3D tracks, TrkRZfilter can optionally run duplicate removal on them,
0024 //=== before they are output.
0025 
0026 namespace tmtt {
0027 
0028   class Settings;
0029   class Stub;
0030 
0031   class TrkRZfilter {
0032   public:
0033     // Initialize configuration parameters, and note sector number, eta range covered by sector and phi coordinate of its centre.
0034     TrkRZfilter(const Settings* settings,
0035                 unsigned int iPhiSec,
0036                 unsigned int iEtaReg,
0037                 float etaMinSector,
0038                 float etaMaxSector,
0039                 float phiCentreSector);
0040 
0041     // Filters track candidates (found by the r-phi Hough transform), removing inconsistent stubs from the tracks,
0042     // also killing some of the tracks altogether if they are left with too few stubs.
0043     // Also adds an estimate of r-z helix parameters to the selected track objects, returning the tracks as L1track3D type.
0044     //
0045     std::list<L1track3D> filterTracks(const std::list<L1track2D>& tracks);
0046 
0047     //=== Extra information about each track input to filter. (Only use after you have first called filterTracks).
0048 
0049     // Number of seed combinations considered by the Seed Filter for each input track.
0050     const std::vector<unsigned int>& numSeedCombsPerTrk() const { return numSeedCombsPerTrk_; }
0051     const std::vector<unsigned int>& numGoodSeedCombsPerTrk() const {
0052       return numGoodSeedCombsPerTrk_;
0053     }  // Only counts seeds compatible with beam-spot.
0054 
0055   private:
0056     //--- Filters returning filtered stubs based on input ones.
0057 
0058     // Use Seed Filter to produce a filtered collection of stubs on this track candidate that are consistent with a straight line
0059     // in r-z using tracklet algo.
0060     std::vector<Stub*> seedFilter(const std::vector<Stub*>& stubs, float trkQoverPt, bool print);
0061 
0062     //--- Estimate r-z helix parameters from centre of eta-sector if no better estimate provided by r-z filter.
0063     void estRZhelix();
0064 
0065   private:
0066     //=== Configuration parameters
0067 
0068     const Settings* settings_;
0069 
0070     unsigned int iPhiSec_;  // Sector number.
0071     unsigned int iEtaReg_;
0072     float etaMinSector_;  // rapidity range of this sector.
0073     float etaMaxSector_;
0074     float phiCentreSector_;  // phi coordinate of its centre.
0075 
0076     // Track (z0, tan_lambda) estimate from r-z filter or centre of eta sector, and boolean to indicate if this data is filled.
0077     float rzHelix_z0_;
0078     float rzHelix_tanL_;
0079     bool rzHelix_set_;
0080 
0081     // Useful info for r-z filters.
0082     float chosenRofZ_;     // Radius used to defined zTrkMinSector and zTrkMaxSector.
0083     float zTrkMinSector_;  // corresponding range of this sector specified as z coordinate of track at given radius.
0084     float zTrkMaxSector_;
0085     float beamWindowZ_;  // Assumed length of beam spot in z.
0086 
0087     // Name of r-z track filter algorithm to run.
0088     std::string rzFilterName_;
0089 
0090     // Filter stubs in cell using Seed Filter? (a tracklet-like algorithm in r-z plane).
0091     bool useSeedFilter_;
0092 
0093     // Options for Seed filter.
0094     bool keepAllSeed_;
0095     float seedResCut_;
0096 
0097     // Number of seed combinations considered by the Seed Filter, for each input track.
0098     std::vector<unsigned int> numSeedCombsPerTrk_;
0099     std::vector<unsigned int> numGoodSeedCombsPerTrk_;
0100     unsigned int maxSeedCombinations_;
0101     unsigned int maxGoodSeedCombinations_;
0102     unsigned int maxSeedsPerStub_;
0103     bool zTrkSectorCheck_;
0104 
0105     // For debugging
0106     unsigned int minNumMatchLayers_;
0107   };
0108 
0109 }  // namespace tmtt
0110 
0111 #endif