Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:30:38

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