Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_TrackerDTC_DTC_h
0002 #define L1Trigger_TrackerDTC_DTC_h
0003 
0004 #include "DataFormats/L1TrackTrigger/interface/TTDTC.h"
0005 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0006 #include "L1Trigger/TrackerDTC/interface/LayerEncoding.h"
0007 #include "L1Trigger/TrackerDTC/interface/Stub.h"
0008 
0009 #include <vector>
0010 #include <deque>
0011 
0012 namespace trackerDTC {
0013 
0014   /*! \class  trackerDTC::DTC
0015    *  \brief  Class to represent an outer tracker DTC board
0016    *  \author Thomas Schuh
0017    *  \date   2020, Jan
0018    */
0019   class DTC {
0020   private:
0021     typedef std::deque<Stub*> Stubs;
0022     typedef std::vector<Stubs> Stubss;
0023     typedef std::vector<Stubss> Stubsss;
0024 
0025   public:
0026     DTC(const edm::ParameterSet& iConfig,
0027         const tt::Setup* setup,
0028         const LayerEncoding* layerEncoding,
0029         int dtcId,
0030         const std::vector<std::vector<TTStubRef>>& stubsDTC);
0031     ~DTC() {}
0032     // board level routing in two steps and products filling
0033     void produce(TTDTC& accepted, TTDTC& lost);
0034 
0035   private:
0036     // router step 1: merges stubs of all modules connected to one routing block into one stream
0037     void merge(Stubss& inputs, Stubs& output, Stubs& lost);
0038     // router step 2: merges stubs of all routing blocks and splits stubs into one stream per overlapping region
0039     void split(Stubss& inputs, Stubss& outputs);
0040     // conversion from Stubss to TTDTC
0041     void produce(const Stubss& stubss, TTDTC& product);
0042     // pop_front function which additionally returns copy of deleted front
0043     Stub* pop_front(Stubs& stubs);
0044     // helper class to store configurations
0045     const tt::Setup* setup_;
0046     // enables emulation of truncation
0047     bool enableTruncation_;
0048     // outer tracker detector region [0-8]
0049     int region_;
0050     // outer tracker dtc id in region [0-23]
0051     int board_;
0052     // container of modules connected to this DTC
0053     std::vector<tt::SensorModule*> modules_;
0054     // container of stubs on this DTC
0055     std::vector<Stub> stubs_;
0056     // input stubs organised in routing blocks [0..1] and channel [0..35]
0057     Stubsss input_;
0058     // lost stubs organised in dtc output channel [0..1]
0059     Stubss lost_;
0060   };
0061 
0062 }  // namespace trackerDTC
0063 
0064 #endif