CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  // bit accurate Stub
20  typedef std::bitset<TTBV::S> BV;
21  // TTStub with bit accurate Stub
22  typedef std::pair<TTStubRef, BV> Frame;
23  // stub collection transported over an optical link between DTC and TFP
24  typedef std::vector<Frame> Stream;
25  // collection of optical links
26  typedef std::vector<Stream> Streams;
27 
28  TTDTC() {}
29  TTDTC(int numRegions, int numOverlappingRegions, int numDTCsPerRegion);
30  ~TTDTC() {}
31 
32  // all regions [default 0..8]
33  const std::vector<int>& tfpRegions() const { return regions_; }
34  // all TFP channel [default 0..47]
35  const std::vector<int>& tfpChannels() const { return channels_; }
36  // write one specific stream of TTStubRefs using DTC identifier (region[0-8], board[0-23], channel[0-1])
37  // dtcRegions aka detector regions are defined by tk layout
38  void setStream(int dtcRegion, int dtcBoard, int dtcChannel, const Stream& stream);
39  // read one specific stream of TTStubRefs using TFP identifier (region[0-8], channel[0-47])
40  // tfpRegions aka processing regions are rotated by -0.5 region width w.r.t detector regions
41  const Stream& stream(int tfpRegion, int tfpChannel) const;
42  // total number of frames
43  int size() const;
44  // total number of stubs
45  int nStubs() const;
46  // total number of gaps
47  int nGaps() const;
48 
49 private:
50  // converts DTC identifier (region[0-8], board[0-23], channel[0-1]) into allStreams_ index [0-431]
51  int index(int dtcRegion, int dtcBoard, int dtcChannel) const;
52  // converts TFP identifier (region[0-8], channel[0-47]) into allStreams_ index [0-431]
53  int index(int tfpRegion, int tfpChannel) const;
54  // number of phi slices the outer tracker readout is organized in [default 9]
56  // number of regions a reconstructable particle may cross [default 2]
58  // number of DTC boards used to readout a detector region [default 24]
60  // number of DTC boards connected to one TFP [default 48]
62  // all regions [default 0..8]
63  std::vector<int> regions_;
64  // all TFP channel [default 0..47]
65  std::vector<int> channels_;
66  // collection of all optical links between DTC and TFP [default 432 links]
68 };
69 
70 #endif
const Stream & stream(int tfpRegion, int tfpChannel) const
Definition: TTDTC.cc:47
int nStubs() const
Definition: TTDTC.cc:72
std::vector< int > regions_
Definition: TTDTC.h:63
~TTDTC()
Definition: TTDTC.h:30
int index(int dtcRegion, int dtcBoard, int dtcChannel) const
Definition: TTDTC.cc:90
std::bitset< TTBV::S > BV
Definition: TTDTC.h:20
std::vector< int > channels_
Definition: TTDTC.h:65
std::vector< Frame > Stream
Definition: TTDTC.h:24
int numOverlappingRegions_
Definition: TTDTC.h:57
int size() const
Definition: TTDTC.cc:66
Streams streams_
Definition: TTDTC.h:67
int numDTCsPerRegion_
Definition: TTDTC.h:59
const std::vector< int > & tfpRegions() const
Definition: TTDTC.h:33
const std::vector< int > & tfpChannels() const
Definition: TTDTC.h:35
int numRegions_
Definition: TTDTC.h:55
std::pair< TTStubRef, BV > Frame
Definition: TTDTC.h:22
int nGaps() const
Definition: TTDTC.cc:81
Class to store hardware like structured TTStub Collection used by Track Trigger emulators.
Definition: TTDTC.h:17
void setStream(int dtcRegion, int dtcBoard, int dtcChannel, const Stream &stream)
Definition: TTDTC.cc:23
std::vector< Stream > Streams
Definition: TTDTC.h:26
TTDTC()
Definition: TTDTC.h:28
int numDTCsPerTFP_
Definition: TTDTC.h:61