CMS 3D CMS Logo

CSCALCTHeader2006.h
Go to the documentation of this file.
1 #ifndef CSCRawToDigi_CSCALCTHeader2006_h
2 #define CSCRawToDigi_CSCALCTHeader2006_h
3 
4 #include <vector>
5 #include <cstring>
6 #include <strings.h>
8 class CSCDMBHeader;
9 
13 
14  explicit CSCALCTHeader2006(int chamberType);
15 
16  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
17 
18  void init() {
19  bzero(this, sizeInWords() * 2);
20  }
21 
22  short unsigned int sizeInWords() const {
23  return 4;
24  }
25 
26  unsigned short int BXNCount() const { return bxnCount; }
27 
28  unsigned short nLCTChipRead() const;
29 
30  void setEventInformation(const CSCDMBHeader&);
31 
32  void setDAV(int afebBoard) { activeFEBs |= 1 << afebBoard; }
33 
35  unsigned l1Acc : 4;
37  unsigned cscID : 4;
39  unsigned boardID : 3;
41  unsigned flag_0 : 5;
42 
44  unsigned fifoMode : 2;
46  unsigned nTBins : 5;
48  unsigned l1aMatch : 1;
50  unsigned extTrig : 1;
52  unsigned promote1 : 1;
54  unsigned promote2 : 1;
56  unsigned reserved_1 : 3;
58  unsigned flag_1 : 2;
59 
61  unsigned bxnCount : 12;
63  unsigned reserved_2 : 2;
65  unsigned flag_2 : 2;
66 
68  unsigned lctChipRead : 7;
70  unsigned activeFEBs : 7;
72  unsigned flag_3 : 2;
73 };
74 
75 struct CSCALCTs2006 {
77  bzero(this, 8);
78  }
79 
80  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
81 
82  short unsigned int sizeInWords() const {
83  return 4;
84  }
85 
86  std::vector<CSCALCTDigi> ALCTDigis() const;
87 
89  void add(const std::vector<CSCALCTDigi>& digis);
90  void addALCT0(const CSCALCTDigi& digi);
91  void addALCT1(const CSCALCTDigi& digi);
92 
95  unsigned alct0_valid : 1;
96  unsigned alct0_quality : 2;
97  unsigned alct0_accel : 1;
98  unsigned alct0_pattern : 1;
99  unsigned alct0_key_wire : 7;
100  unsigned alct0_bxn_low : 3;
102  unsigned flag_4 : 1;
103 
104  unsigned alct0_bxn_high : 2;
105  unsigned alct0_reserved : 13;
107  unsigned flag_5 : 1;
108 
110  unsigned alct1_valid : 1;
111  unsigned alct1_quality : 2;
112  unsigned alct1_accel : 1;
113  unsigned alct1_pattern : 1;
114  unsigned alct1_key_wire : 7;
115  unsigned alct1_bxn_low : 3;
116  unsigned flag_6 : 1;
117 
118  unsigned alct1_bxn_high : 2;
119  unsigned alct1_reserved : 13;
120  unsigned flag_7 : 1;
121 };
122 
123 #endif
unsigned flag_3
DDU+LCT special word flags.
unsigned bxnCount
full bunch crossing number
unsigned fifoMode
see the FIFO_MODE enum
unsigned promote1
promotion bit for 1st LCT pattern
unsigned reserved_2
reserved, set to 0
short unsigned int sizeInWords() const
short unsigned int sizeInWords() const
void setEventInformation(const CSCDMBHeader &)
unsigned extTrig
trigger source was external
unsigned short int BXNCount() const
void setFromBuffer(unsigned short const *buf)
unsigned flag_1
DDU+LCT special word flags.
ALCT Header consists of several modular units that are defined as structs below.
unsigned nTBins
of 25 ns time bins in the raw dump
unsigned reserved_1
reserved, set to 0
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
unsigned l1Acc
l1 accept counter
unsigned promote2
promotion bit for 2nd LCT pattern
unsigned boardID
ALCT2000 board ID.
unsigned lctChipRead
LCT chips read out in raw hit dump.
unsigned activeFEBs
LCT chips with ADB hits.
unsigned flag_2
DDU+LCT special word flags.
unsigned cscID
chamber ID number
void setDAV(int afebBoard)
for packing
void setFromBuffer(unsigned short const *buf)
unsigned l1aMatch
exteran L1A arrived in L1A window
unsigned flag_0
should be &#39;01100&#39;, so it&#39;ll be a 6xxx in the ASCII dump
unsigned short nLCTChipRead() const
CSCALCTHeader2006()
this struct contains all 2006 ALCT Header words except ALCTs