Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_TrackerTFP_HoughTransform_h
0002 #define L1Trigger_TrackerTFP_HoughTransform_h
0003 
0004 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0005 #include "L1Trigger/TrackerTFP/interface/DataFormats.h"
0006 #include "L1Trigger/TrackerTFP/interface/LayerEncoding.h"
0007 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0008 
0009 #include <vector>
0010 #include <deque>
0011 
0012 namespace trackerTFP {
0013 
0014   // Class to find initial rough candidates in r-phi in a region
0015   class HoughTransform {
0016   public:
0017     HoughTransform(const tt::Setup* setup,
0018                    const DataFormats* dataFormats,
0019                    const LayerEncoding* layerEncoding,
0020                    std::vector<StubHT>& stubs);
0021     ~HoughTransform() = default;
0022     // fill output products
0023     void produce(const std::vector<std::vector<StubGP*>>& streamsIn, std::vector<std::deque<StubHT*>>& streamsOut);
0024 
0025   private:
0026     // remove and return first element of deque, returns nullptr if empty
0027     template <class T>
0028     T* pop_front(std::deque<T*>& ts) const;
0029     // associate stubs with phiT bins in this inv2R column
0030     void fillIn(int inv2R, int sector, const std::vector<StubGP*>& input, std::vector<StubHT*>& output);
0031     // identify tracks
0032     void readOut(const std::vector<StubHT*>& input, std::deque<StubHT*>& output) const;
0033     //
0034     bool noTrack(const TTBV& pattern, int zT) const;
0035     // provides run-time constants
0036     const tt::Setup* setup_;
0037     // provides dataformats
0038     const DataFormats* dataFormats_;
0039     //
0040     const LayerEncoding* layerEncoding_;
0041     // data format of inv2R
0042     const DataFormat* inv2R_;
0043     // data format of phiT
0044     const DataFormat* phiT_;
0045     // data format of zT
0046     const DataFormat* zT_;
0047     // data format of phi
0048     const DataFormat* phi_;
0049     // data format of z
0050     const DataFormat* z_;
0051     // container of stubs
0052     std::vector<StubHT>& stubs_;
0053     // number of input channel
0054     int numChannelIn_;
0055     // number of output channel
0056     int numChannelOut_;
0057     //
0058     int chan_;
0059     //
0060     int mux_;
0061   };
0062 
0063 }  // namespace trackerTFP
0064 
0065 #endif