Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:13:32

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 "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0007 
0008 #include <vector>
0009 #include <set>
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 edm::ParameterSet& iConfig, const tt::Setup* setup, const DataFormats* dataFormats, int region);
0018     ~HoughTransform() {}
0019 
0020     // read in and organize input product
0021     void consume(const tt::StreamsStub& streams);
0022     // fill output products
0023     void produce(tt::StreamsStub& accepted, tt::StreamsStub& lost);
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,
0031                 std::deque<StubGP*>& inputSector,
0032                 std::vector<StubHT*>& acceptedSector,
0033                 std::vector<StubHT*>& lostSector);
0034     // identify tracks
0035     void readOut(const std::vector<StubHT*>& acceptedSector,
0036                  const std::vector<StubHT*>& lostSector,
0037                  std::deque<StubHT*>& acceptedAll,
0038                  std::deque<StubHT*>& lostAll) const;
0039     // identify lost tracks
0040     void analyze();
0041     // store tracks
0042     void put() const;
0043 
0044     // true if truncation is enbaled
0045     bool enableTruncation_;
0046     // provides run-time constants
0047     const tt::Setup* setup_;
0048     // provides dataformats
0049     const DataFormats* dataFormats_;
0050     // data format of inv2R
0051     DataFormat inv2R_;
0052     // data format of phiT
0053     DataFormat phiT_;
0054     // processing region (0 - 8)
0055     int region_;
0056     // container of input stubs
0057     std::vector<StubGP> stubsGP_;
0058     // container of output stubs
0059     std::vector<StubHT> stubsHT_;
0060     // h/w liked organized pointer to input stubs
0061     std::vector<std::vector<std::deque<StubGP*>>> input_;
0062   };
0063 
0064 }  // namespace trackerTFP
0065 
0066 #endif