CMS 3D CMS Logo

HOTPDigiTwinMux.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1Trigger_HOTPDigiTwinMux_h
2 #define DataFormats_L1Trigger_HOTPDigiTwinMux_h
3 
4 #include <ostream>
6 #include <cstdint>
7 
16 public:
17  typedef HcalDetId key_type;
18 
21 
39 
40  HOTPDigiTwinMux(int ieta, int iphi, int bx, int mip, int validbit, int wheel, int sector, int index, int link);
41 
42  const HcalDetId id() const { return HcalDetId(HcalOuter, ieta(), iphi(), 4); }
43 
45  uint64_t raw() const { return theTP_HO; }
46 
48  int raw_ieta() const { return theTP_HO & 0x1F; }
49 
51  int ieta_sign() const { return ((theTP_HO & 0x10) ? (-1) : (+1)); }
52 
54  int ieta_abs() const { return (theTP_HO & 0x000F); }
55 
57  int ieta() const { return (ieta_abs() * ieta_sign()); }
58 
60  int iphi() const { return (theTP_HO >> 5) & 0x007F; }
61 
63  int bx_abs() const { return (theTP_HO >> 12) & 0x1; }
64 
66  // int bx_sign() const {return ( ( (theTP_HO>>13)&0x2000) ?(-1):(+1)); }
67  int bx_sign() const { return (((theTP_HO >> 13) & 0x1) ? (-1) : (+1)); }
68 
69  //get bx
70  int bx() const { return (bx_abs() * bx_sign()); }
71 
73  int mip() const { return (theTP_HO >> 14) & 0x1; }
74 
76  int validbit() const { return (theTP_HO >> 15) & 0x1; } //MIP consistency check with HO FEDs
77 
79  int raw_wheel() const { return (theTP_HO >> 16) & 0x7; }
80 
82  int wheel_sign() const { return (((theTP_HO >> 18) & 0x1) ? (-1) : (+1)); }
83 
85  int wheel_abs() const { return (theTP_HO >> 16) & 0x03; }
86 
88  int wheel() const { return (wheel_abs() * wheel_sign()); }
89 
91  int sector() const { return (theTP_HO >> 19) & 0xF; }
92 
94  int index() const { return (theTP_HO >> 23) & 0x1F; } //channel index in Twinmux protocal
95 
97  int link() const { return (theTP_HO >> 28) & 0x3; } //two link for all HO wheels
98 
99  static const int HO_SECTOR_MAX = 12;
100 
101 private:
103 };
104 
105 std::ostream& operator<<(std::ostream&, const HOTPDigiTwinMux&);
106 
107 #endif
uint64_t raw() const
get raw packed HO
int link() const
get the link value
HOTPDigiTwinMux()
For the sorted collection.
int ieta() const
get the signed ieta value
int wheel_abs() const
get the absolute value of wheel
int bx_sign() const
get the bx sign
int wheel_sign() const
get the sign of wheel (int: +/- 1)
int ieta_sign() const
get the sign of ieta (int: +/- 1)
int index() const
get the index
HcalDetId key_type
int sector() const
get the sector value
const HcalDetId id() const
int wheel() const
get the signed wheel value
int mip() const
get the mip value
std::ostream & operator<<(std::ostream &, const HOTPDigiTwinMux &)
unsigned long long uint64_t
Definition: Time.h:13
int raw_ieta() const
get the raw ieta value
HOTPDigiTwinMux(uint64_t data)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int validbit() const
get the valid bit
static const int HO_SECTOR_MAX
int raw_wheel() const
get the raw wheel value
int iphi() const
get the raw iphi value
int bx_abs() const
get the bx()
int ieta_abs() const
get the absolute value of ieta
int bx() const