CMS 3D CMS Logo

TTDTC.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TrackTrigger_TTDTC_h
2 #define DataFormats_L1TrackTrigger_TTDTC_h
3 
6 
7 #include <bitset>
8 #include <utility>
9 #include <vector>
10 
17 class TTDTC {
18 public:
19  TTDTC() {}
20  TTDTC(int numRegions, int numOverlappingRegions, int numDTCsPerRegion);
21  ~TTDTC() {}
22 
23  // all regions [default 0..8]
24  const std::vector<int>& tfpRegions() const { return regions_; }
25  // all TFP channel [default 0..47]
26  const std::vector<int>& tfpChannels() const { return channels_; }
27  // write one specific stream of TTStubRefs using DTC identifier (region[0-8], board[0-23], channel[0-1])
28  // dtcRegions aka detector regions are defined by tk layout
29  void setStream(int dtcRegion, int dtcBoard, int dtcChannel, const tt::StreamStub& stream);
30  // read one specific stream of TTStubRefs using TFP identifier (region[0-8], channel[0-47])
31  // tfpRegions aka processing regions are rotated by -0.5 region width w.r.t detector regions
32  const tt::StreamStub& stream(int tfpRegion, int tfpChannel) const;
33  // total number of frames
34  int size() const;
35  // total number of stubs
36  int nStubs() const;
37  // total number of gaps
38  int nGaps() const;
39 
40 private:
41  // converts DTC identifier (region[0-8], board[0-23], channel[0-1]) into allStreams_ index [0-431]
42  int index(int dtcRegion, int dtcBoard, int dtcChannel) const;
43  // converts TFP identifier (region[0-8], channel[0-47]) into allStreams_ index [0-431]
44  int index(int tfpRegion, int tfpChannel) const;
45  // number of phi slices the outer tracker readout is organized in [default 9]
47  // number of regions a reconstructable particle may cross [default 2]
49  // number of DTC boards used to readout a detector region [default 24]
51  // number of DTC boards connected to one TFP [default 48]
53  // all regions [default 0..8]
54  std::vector<int> regions_;
55  // all TFP channel [default 0..47]
56  std::vector<int> channels_;
57  // collection of all optical links between DTC and TFP [default 432 links]
59 };
60 
61 #endif
void setStream(int dtcRegion, int dtcBoard, int dtcChannel, const tt::StreamStub &stream)
Definition: TTDTC.cc:24
int nGaps() const
Definition: TTDTC.cc:82
std::vector< int > regions_
Definition: TTDTC.h:54
~TTDTC()
Definition: TTDTC.h:21
std::vector< StreamStub > StreamsStub
Definition: TTTypes.h:66
std::vector< FrameStub > StreamStub
Definition: TTTypes.h:63
std::vector< int > channels_
Definition: TTDTC.h:56
int numOverlappingRegions_
Definition: TTDTC.h:48
const std::vector< int > & tfpChannels() const
Definition: TTDTC.h:26
int numDTCsPerRegion_
Definition: TTDTC.h:50
int numRegions_
Definition: TTDTC.h:46
const std::vector< int > & tfpRegions() const
Definition: TTDTC.h:24
tt::StreamsStub streams_
Definition: TTDTC.h:58
Class to store hardware like structured TTStub Collection used by Track Trigger emulators.
Definition: TTDTC.h:17
int index(int dtcRegion, int dtcBoard, int dtcChannel) const
Definition: TTDTC.cc:91
TTDTC()
Definition: TTDTC.h:19
int size() const
Definition: TTDTC.cc:67
const tt::StreamStub & stream(int tfpRegion, int tfpChannel) const
Definition: TTDTC.cc:48
int numDTCsPerTFP_
Definition: TTDTC.h:52
int nStubs() const
Definition: TTDTC.cc:73