CMS 3D CMS Logo

HOTPDigiTwinMux.cc
Go to the documentation of this file.
2 #include <cstdio>
3 #include <iostream>
4 
5 using namespace std;
6 
8  int ieta, int iphi, int bx, int mip, int validbit, int wheel, int sector, int index, int link) {
9  if ((ieta > 15) || (ieta < -15))
10  printf("HOTwinMuxDigi: ieta out of range");
11  if ((mip < 0) || (mip > 1))
12  printf("HOTwinMuxDigi: mip value out of range");
13 
14  theTP_HO = (std::abs(ieta) & 0xF) | ((ieta < 0) ? (0x10) : (0x00)) | ((iphi & 0x7F) << 5) |
15  ((std::abs(bx) & 0x1) << 12) | ((bx < 0) ? (0x2000) : (0x00)) | ((mip & 0x1) << 14) |
16  ((validbit & 0x1) << 15) | ((std::abs(wheel) & 0x3) << 16) | ((wheel < 0) ? (0x40000) : (0x00)) |
17  ((sector & 0xF) << 19) | ((index & 0x1F) << 23) | ((link & 0x3) << 28);
18 }
19 
20 std::ostream& operator<<(std::ostream& s, const HOTPDigiTwinMux& HOtp) {
21  s << "HO TP digi in TwinMUX " << HOtp.ieta() << ", " << HOtp.iphi() << ", " << HOtp.mip();
22  s << "(wh, sec, index, link)" << HOtp.wheel() << ", " << HOtp.sector() << ", " << HOtp.index() << ", " << HOtp.link();
23  s << "validbit is : " << HOtp.validbit();
24  return s;
25 }
HOTPDigiTwinMux::iphi
int iphi() const
get the raw iphi value
Definition: HOTPDigiTwinMux.h:60
HOTPDigiTwinMux::index
int index() const
get the index
Definition: HOTPDigiTwinMux.h:94
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
HOTPDigiTwinMux::HOTPDigiTwinMux
HOTPDigiTwinMux()
For the sorted collection.
Definition: HOTPDigiTwinMux.h:19
std::operator<<
std::ostream & operator<<(std::ostream &out, const std::tuple< Types... > &value)
Definition: Utilities.h:32
HOTPDigiTwinMux::ieta
int ieta() const
get the signed ieta value
Definition: HOTPDigiTwinMux.h:57
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HOTPDigiTwinMux::mip
int mip() const
get the mip value
Definition: HOTPDigiTwinMux.h:73
HOTPDigiTwinMux::wheel
int wheel() const
get the signed wheel value
Definition: HOTPDigiTwinMux.h:88
HOTPDigiTwinMux::validbit
int validbit() const
get the valid bit
Definition: HOTPDigiTwinMux.h:76
HOTPDigiTwinMux::link
int link() const
get the link value
Definition: HOTPDigiTwinMux.h:97
HOTPDigiTwinMux.h
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HOTPDigiTwinMux::sector
int sector() const
get the sector value
Definition: HOTPDigiTwinMux.h:91
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
std
Definition: JetResolutionObject.h:76
HOTPDigiTwinMux
Definition: HOTPDigiTwinMux.h:15
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22