Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_TrackerTFP_GeometricProcessor_h
0002 #define L1Trigger_TrackerTFP_GeometricProcessor_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0006 #include "L1Trigger/TrackerTFP/interface/DataFormats.h"
0007 #include "L1Trigger/TrackerTFP/interface/LayerEncoding.h"
0008 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0009 
0010 #include <vector>
0011 #include <deque>
0012 
0013 namespace trackerTFP {
0014 
0015   // Class to route Stubs of one region to one stream per sector
0016   class GeometricProcessor {
0017   public:
0018     GeometricProcessor(const tt::Setup* setup_,
0019                        const DataFormats* dataFormats,
0020                        const LayerEncoding* layerEncoding,
0021                        std::vector<StubGP>& stubs);
0022     ~GeometricProcessor() = default;
0023 
0024     // fill output data
0025     void produce(const std::vector<std::vector<StubPP*>>& streamsIn, std::vector<std::deque<StubGP*>>& streamsOut);
0026 
0027   private:
0028     // convert stub
0029     StubGP* produce(const StubPP& stub, int phiT, int zT);
0030     // remove and return first element of deque, returns nullptr if empty
0031     template <class T>
0032     T* pop_front(std::deque<T*>& ts) const;
0033     // provides run-time constants
0034     const tt::Setup* setup_;
0035     // provides dataformats
0036     const DataFormats* dataFormats_;
0037     // provides layer encoding
0038     const LayerEncoding* layerEncoding_;
0039     // storage of output stubs
0040     std::vector<StubGP>& stubs_;
0041     // number of input channel
0042     int numChannelIn_;
0043     // number of output channel
0044     int numChannelOut_;
0045   };
0046 
0047 }  // namespace trackerTFP
0048 
0049 #endif