ATLAS Offline Software
Loading...
Searching...
No Matches
MatrixReadOutStructure.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TrigT1RPChardware_MatrixReadOutStructure_H
6#define TrigT1RPChardware_MatrixReadOutStructure_H
7
11
12// class RPCReadOut;
14public:
18 void setInit();
19 //
22 ubit16 makeBody(ubit16 *inputData);
23 ubit16 makeFooter(ubit16 inputData);
25 //
26 //**************************************************//
27 // general user methods to decode ReadOut stream //
28 //**************************************************//
29 ubit16 decodeFragment(ubit16 inputWord, char &field);
30 ubit16 cmid() { return m_cmid; };
31 ubit16 fel1id() { return m_fel1id; };
32 ubit16 febcid() { return m_febcid; };
33 ubit16 bcid() { return m_bcid; };
34 ubit16 time() { return m_time; };
35 ubit16 ijk() { return m_ijk; };
36 ubit16 channel() { return m_channel; }; // 0-32
38 ubit16 overlap() { return m_overlap; };
39 ubit16 status() { return m_status; };
40 ubit16 crc() { return m_crc; };
41 //
42 bool isLowPt();
43 bool isHigPt();
44 bool isEtaProj();
45 bool isPhiProj();
46 bool is0LocAdd();
47 bool is1LocAdd();
48 //
51
52 bool isHeader();
53 bool isSubHeader();
54 bool isBody();
55 bool isFooter();
56
57 // create a 16 bits word of the CMA frame structure , starting from the fields:
58 // ubit16 set16Bits(const ubit16 num, const ubit16 *pos, const ubit16 *val);
59 // get the fields of the 16 bits word of the CMA frame structure:
60 // ubit16 get16Bits(const ubit16 num, const ubit16 pos, const ubit16 val);
61
62 // some optional methods:
63 // get the real channel strip:
64 ubit16 global_channel(); // 0-64
66 bool isTrigger();
67
68private:
69 //************************//
70 // Matrix ReadOut decoded data
71 //
72 // ubit16 m_word;
73 // char m_field;
86
87 // some static parameter describing the structure
88 static const ubit16 s_headerNum = 3;
89 static const ubit16 s_headerPos[s_headerNum];
90 static const ubit16 s_headerLen[s_headerNum];
91 static const ubit16 s_headerVal;
92 static const ubit16 s_subHeaderNum = 2;
95 static const ubit16 s_subHeaderVal;
96 static const ubit16 s_CMABodyNum = 5;
97 static const ubit16 s_CMABodyPos[s_CMABodyNum];
98 static const ubit16 s_CMABodyLen[s_CMABodyNum];
99 static const ubit16 s_CMABodyVal;
100 static const ubit16 s_footerNum = 3;
101 static const ubit16 s_footerPos[s_footerNum];
102 static const ubit16 s_footerLen[s_footerNum];
103 static const ubit16 s_footerVal;
104
105 //**********************************************************//
106 // Header: bit 00-08 FEL1ID
107 // Header: bit 09-11 CMcode
108 // Header: bit 12-12 0 - reserved
109 // Header: bit 13-13 0 - reserved
110 // Header: bit 14-14 1 - reserved
111 // Header: bit 15-15 1 - reserved
112 // Header: bit 00-08 FEL1ID
113 //
114 // Subheader: bit 00-11 FEBCID
115 // Subheader: bit 12-12 0 - reserved
116 // Subheader: bit 13-13 0 - reserved
117 // Subheader: bit 14-14 0 - reserved
118 // Subheader: bit 15-15 1 - reserved
119 //
120 // Body: bit 00-04 strip address
121 // Body: bit 05-07 IJK
122 // Body: bit 08-10 strip time
123 // Body: bit 11-13 BCID
124 // Body: bit 14-15 0
125 //
126 // IJK coding:
127 // IJK = 0 ==> pivot plane layer 0 channels 00-31 (all channels)
128 // IJK = 1 ==> pivot plane layer 1 channels 00-31 (all channels)
129 // IJK = 2 ==> coincidence plane layer 0 channels 00-31 (first 32 channels)
130 // IJK = 3 ==> coincidence plane layer 0 channels 32-63 (secon 32 channels)
131 // IJK = 4 ==> coincidence plane layer 1 channels 00-31 (first 32 channels)
132 // IJK = 5 ==> coincidence plane layer 1 channels 32-63 (secon 32 channels)
133 // IJK = 6 ==> trigger pattern channels 00-31
134 // IJK = 7 ==> highest threshold triggered + overlap flags
135 //
136 // 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
137 // -----------------------------------------------------------------
138 // | 1 | 1 | 0 | 0 | CMcode | F E L 1 I D | HEADER
139 // -----------------------------------------------------------------
140 // | 1 | 0 | 0 | 0 | F E B C I D | SUBHEADER
141 // -----------------------------------------------------------------
142 // | 0 | 0 | BCID | TIME | IJK | STRIP | BODY-Hit
143 // -----------------------------------------------------------------
144 // | 0 | 0 | BCID | TIME | IJK | STRIP | BODY-Hit
145 // -----------------------------------------------------------------
146 // | 0 | 0 | BCID | TIME | IJK | STRIP | BODY-Hit
147 // .................................................................
148 // -----------------------------------------------------------------
149 // | 0 | 0 | BCID | TIME | IJK | STRIP | BODY-Hit
150 // -----------------------------------------------------------------
151 // | 0 | 1 | 0 | 0 | STATUS | CRC | FOOTER
152 // -----------------------------------------------------------------
153 //
154 // CMcode: bit 00 localAddress (0 or 1)
155 // CMcode: bit 01 etaPhi: 0=eta; 1=phi
156 // CMcode: bit 02 lowHig: 0=low; 1=high
157 //
158};
159#endif
unsigned short int ubit16
static const ubit16 s_footerVal
static const ubit16 s_headerLen[s_headerNum]
static const ubit16 s_headerPos[s_headerNum]
static const ubit16 s_footerNum
static const ubit16 s_CMABodyLen[s_CMABodyNum]
static const ubit16 s_subHeaderVal
static const ubit16 s_headerVal
ubit16 decodeFragment(ubit16 inputWord, char &field)
static const ubit16 s_footerLen[s_footerNum]
static const ubit16 s_CMABodyNum
ubit16 makeBody(ubit16 *inputData)
static const ubit16 s_subHeaderLen[s_subHeaderNum]
static const ubit16 s_subHeaderPos[s_subHeaderNum]
ubit16 makeHeader(ubit16 *inputData)
static const ubit16 s_CMABodyVal
ubit16 makeFooter(ubit16 inputData)
static const ubit16 s_headerNum
~MatrixReadOutStructure()=default
static const ubit16 s_subHeaderNum
static const ubit16 s_footerPos[s_footerNum]
static const ubit16 s_CMABodyPos[s_CMABodyNum]
RPCReadOut()=default
char field() const
Definition RPCReadOut.h:19