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 <boost/cstdint.hpp>
5 #include <ostream>
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
108 
109 
110 
int ieta() const
get the signed ieta value
int ieta_sign() const
get the sign of ieta (int: +/- 1)
HOTPDigiTwinMux()
For the sorted collection.
int raw_ieta() const
get the raw ieta value
int link() const
get the link value
HcalDetId key_type
int mip() const
get the mip value
int index() const
get the index
int bx_abs() const
get the bx()
int iphi() const
get the raw iphi value
int wheel() const
get the signed wheel value
int bx_sign() const
get the bx sign
int sector() const
get the sector value
int wheel_sign() const
get the sign of wheel (int: +/- 1)
std::ostream & operator<<(std::ostream &, const HOTPDigiTwinMux &)
int wheel_abs() const
get the absolute value of wheel
unsigned long long uint64_t
Definition: Time.h:15
HOTPDigiTwinMux(uint64_t data)
uint64_t raw() const
get raw packed HO
int bx() const
int validbit() const
get the valid bit
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
static const int HO_SECTOR_MAX
int raw_wheel() const
get the raw wheel value
int ieta_abs() const
get the absolute value of ieta
const HcalDetId id() const