CMS 3D CMS Logo

OmtfCscDataWord64.h
Go to the documentation of this file.
1 #ifndef DataFormat_L1TMuon_Omtf_CscDataWord64_H
2 #define DataFormat_L1TMuon_Omtf_CscDataWord64_H
3 
4 #include<iostream>
6 
7 namespace omtf {
8 
9 class CscDataWord64 {
10 public:
11  CscDataWord64(const Word64 & data) : rawData(data) {}
12  CscDataWord64() : rawData(Word64(DataWord64::csc)<<60) {}
13 
14  unsigned int type() const { return type_;}
15  unsigned int bxNum() const { return bxNum_; }
16  unsigned int hitNum() const { return hitNum_; }
17  unsigned int wireGroup() const { return keyWG_; }
18  unsigned int quality() const { return quality_; }
19  unsigned int clctPattern() const { return clctPattern_; }
20  unsigned int cscID() const { return cscID_; }
21  unsigned int halfStrip() const { return halfStrip_; }
22  unsigned int linkNum() const { return linkNum_;}
23  unsigned int station() const { return station_; }
24  unsigned int bend() const { return lr_; }
25  unsigned int valid() const { return vp_; }
26 
27  friend class OmtfPacker;
28  friend class CscPacker;
29  friend std::ostream & operator<< (std::ostream &out, const CscDataWord64 &o);
30 
31 private:
32  union {
34  struct { // watch out - bit fields are is implementation-defined
35  uint64_t dummy7_ : 3; //2:0 unused, oryginalnie TBIN Num
36  uint64_t vp_ : 1; //3:3 VP
37  uint64_t station_ : 3; //6:4 Station
38  uint64_t af_ : 1; //7:7 AF
39  uint64_t dummy6_ : 4; //11:8 unused, oryginalnie EPC
40  uint64_t sm_ : 1; //12:12 unused, oryginalnie SM
41  uint64_t se_ : 1; //13:13 SE
42  uint64_t dummy5_ : 1; //14:14 unused, oryginalnie AFEF
43  uint64_t dummy4_ : 2; //16:15 unused, oryginalnie ME BXN [11:0]
44  uint64_t nit_ : 1; //17:17 NIT
45  uint64_t cik_ : 1; //18:18 CIK
46  uint64_t dummy3_ : 1; //19:19 unused, oryginalnie AFFF
47  uint64_t linkNum_ : 6; //25:20 numer linku CSC
48  uint64_t halfStrip_ : 8; //33:26 CLCT key half-strip [7:0]
49  uint64_t cscID_ : 4; //37:34 CSC ID [3:0]
50  uint64_t lr_ : 1; //38:38 L/R
51  uint64_t dummy2_ : 1; //39:39 unused, oryginalnie BXE
52  uint64_t dummy1_ : 1; //40:40 unused, oryginalnie BC0
53  uint64_t clctPattern_ : 4; //44:41 CLCT pattern [3:0] 4b
54  uint64_t quality_ : 4; //48:45 Quality [3:0]
55  uint64_t keyWG_ : 7; //55:49 Key wire group [6:0]
56  uint64_t hitNum_ : 1; //56:56 int in chamber 0 or 1
57  uint64_t bxNum_ : 3; //59:57 SBXN
58  uint64_t type_ : 4; //63:60 CSC identifier 0xC
59  };
60  };
61 };
62 
63 } //namespace Omtf
64 #endif
65 
unsigned int quality() const
unsigned int bxNum() const
CscDataWord64(const Word64 &data)
unsigned int wireGroup() const
unsigned int valid() const
unsigned int clctPattern() const
unsigned int type() const
unsigned int halfStrip() const
Definition: L1Track.h:19
unsigned int hitNum() const
uint64_t Word64
unsigned long long uint64_t
Definition: Time.h:15
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
unsigned int cscID() const
unsigned int linkNum() const
friend std::ostream & operator<<(std::ostream &out, const CscDataWord64 &o)
unsigned int bend() const
unsigned int station() const