CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Static Public Member Functions | Static Private Attributes
RPCTBMuon::FSBOut Class Reference

#include <RPCTBMuon.h>

Static Public Member Functions

static void fromBits (RPCTBMuon &muon, unsigned int value)
 
static unsigned int toBits (const RPCTBMuon &muon)
 

Static Private Attributes

static const int m_etaBitsCnt = 6
 
static const unsigned int m_etaBitsMask = 0x3f
 
static const int m_phiBitsCnt = 8
 
static const unsigned int m_phiBitsMask = 0xff
 
static const int m_ptBitsCnt = 5
 
static const unsigned int m_ptBitsMask = 0x1f
 
static const int m_qualBitsCnt = 3
 
static const unsigned int m_qualBitsMask = 0x7
 
static const int m_signBitsCnt = 1
 
static const unsigned int m_signBitsMask = 0x1
 

Detailed Description

Definition at line 198 of file RPCTBMuon.h.

Member Function Documentation

void RPCTBMuon::FSBOut::fromBits ( RPCTBMuon muon,
unsigned int  value 
)
static

Definition at line 367 of file RPCTBMuon.cc.

References RPCTBMuon::m_EtaAddress, RPCTBMuon::m_PhiAddress, RPCMuon::m_PtCode, RPCMuon::m_Quality, RPCMuon::m_Sign, and edm::shift.

Referenced by RPCTBMuon::fromBits().

367  {
368  unsigned int shift = 0;
370  shift += m_phiBitsCnt;
371  muon.m_PtCode = (value & (m_ptBitsMask << shift)) >> shift;
372  shift += m_ptBitsCnt;
373  muon.m_Quality = (value & (m_qualBitsMask << shift)) >> shift;
374  shift += m_qualBitsCnt;
375 
376  //+1 beacouse H/F bits, unused in RPC:
377  muon.m_EtaAddress = (value & (m_etaBitsMask << shift)) >> shift;
378  shift += m_etaBitsCnt + 1;
379  muon.m_Sign = (value & (m_signBitsMask << shift)) >> shift;
380  shift += m_signBitsCnt;
381 
382  muon.m_PtCode = (~(muon.m_PtCode)) & m_ptBitsMask;
383  muon.m_Quality = (~(muon.m_Quality)) & m_qualBitsMask;
384 }
static const int m_signBitsCnt
Definition: RPCTBMuon.h:208
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:202
unsigned int m_PhiAddress
Definition: RPCTBMuon.h:106
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:90
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:96
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:206
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:203
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:200
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:205
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:204
unsigned int m_EtaAddress
Definition: RPCTBMuon.h:104
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:93
static const unsigned int m_phiBitsMask
Definition: RPCTBMuon.h:201
unsigned int RPCTBMuon::FSBOut::toBits ( const RPCTBMuon muon)
static

Definition at line 343 of file RPCTBMuon.cc.

References RPCTBMuon::m_EtaAddress, RPCTBMuon::m_PhiAddress, RPCMuon::m_PtCode, RPCMuon::m_Quality, RPCMuon::m_Sign, quality, edm::shift, and relativeConstraints::value.

Referenced by RPCTBMuon::toBits().

343  {
344  unsigned int value = 0;
345 
346  unsigned int shift = 0;
347  //bita are reversed, to be zero when cable not connected
348  unsigned int ptCode = (~(muon.m_PtCode)) & m_ptBitsMask;
349  unsigned int quality = (~(muon.m_Quality)) & m_qualBitsMask;
350 
351  value = value | muon.m_PhiAddress;
352  shift += m_phiBitsCnt;
353  value = value | (ptCode << shift);
354  shift += m_ptBitsCnt;
355  value = value | (quality << shift);
356  shift += m_qualBitsCnt;
357 
358  //+1 beacouse H/F bits, unused in RPC:
359  value = value | (muon.m_EtaAddress << shift);
360  shift += m_etaBitsCnt + 1;
361  value = value | (muon.m_Sign << shift);
362  shift += m_signBitsCnt;
363 
364  return value;
365 }
static const int m_signBitsCnt
Definition: RPCTBMuon.h:208
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:202
unsigned int m_PhiAddress
Definition: RPCTBMuon.h:106
string quality
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:90
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:96
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:206
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:203
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:200
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:205
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:204
unsigned int m_EtaAddress
Definition: RPCTBMuon.h:104
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:93

Member Data Documentation

const int RPCTBMuon::FSBOut::m_etaBitsCnt = 6
staticprivate

Definition at line 206 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_etaBitsMask = 0x3f
staticprivate

Definition at line 207 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_phiBitsCnt = 8
staticprivate

Definition at line 200 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_phiBitsMask = 0xff
staticprivate

Definition at line 201 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_ptBitsCnt = 5
staticprivate

Definition at line 202 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_ptBitsMask = 0x1f
staticprivate

Definition at line 203 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_qualBitsCnt = 3
staticprivate

Definition at line 204 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_qualBitsMask = 0x7
staticprivate

Definition at line 205 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_signBitsCnt = 1
staticprivate

Definition at line 208 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_signBitsMask = 0x1
staticprivate

Definition at line 209 of file RPCTBMuon.h.