24 int patternNum,
unsigned short firedPlanes):
25 RPCMuon(ptCode, quality, sign, patternNum, firedPlanes)
38 RPCMuon(ptCode, quality, sign, 0, 0) {
57 std::ostringstream sDebugInfo;
60 sDebugInfo <<
"TBMuon: code: " <<
getPtCode()
81 return sDebugInfo.str();
91 unsigned int signLocal = 0;
92 if (
m_Sign==0) signLocal=1;
197 #endif //_STAND_ALONE 246 unsigned int shift = 0;
247 muon.
m_Sign = (value & (m_signBitsMask<<shift)) >>
shift; shift += m_signBitsCnt;
248 muon.
m_PtCode = (value & (m_ptBitsMask<<shift)) >>
shift; shift += m_ptBitsCnt;
249 muon.
m_Quality = (value & (m_qualBitsMask<<shift)) >>
shift; shift += m_qualBitsCnt;
253 unsigned int value = 0;
254 unsigned int shift = 0;
255 value = (muon.
m_Sign<<
shift); shift += m_signBitsCnt;
256 value = value | (muon.
m_PtCode<<
shift); shift += m_ptBitsCnt;
264 unsigned int shift = 0;
265 muon.
m_Sign = (value & (m_signBitsMask<<shift)) >>
shift; shift += m_signBitsCnt;
266 muon.
m_PtCode = (value & (m_ptBitsMask<<shift)) >>
shift; shift += m_ptBitsCnt;
267 muon.
m_Quality = (value & (m_qualBitsMask<<shift)) >>
shift; shift += m_qualBitsCnt;
268 muon.
m_PhiAddress = (value & (m_phiBitsMask<<shift)) >>
shift; shift += m_phiBitsCnt;
269 muon.
m_EtaAddress = (value & (m_etaBitsMask<<shift)) >>
shift; shift += m_etaBitsCnt;
270 muon.
m_GBData = (value & (m_gbDataBitsMask<<shift))>>
shift; shift += m_gbDataBitsCnt;
274 unsigned int value = 0;
275 unsigned int shift = 0;
276 value = (muon.
m_Sign<<
shift); shift += m_signBitsCnt;
277 value = value | (muon.
m_PtCode<<
shift); shift += m_ptBitsCnt;
281 value = value | (muon.
m_GBData<<
shift); shift += m_gbDataBitsCnt;
287 unsigned int shift = 0;
288 muon.
m_Sign = (value & (m_signBitsMask<<shift)) >>
shift; shift += m_signBitsCnt;
289 muon.
m_PtCode = (value & (m_ptBitsMask<<shift)) >>
shift; shift += m_ptBitsCnt;
290 muon.
m_Quality = (value & (m_qualBitsMask<<shift)) >>
shift; shift += m_qualBitsCnt;
291 muon.
m_PhiAddress = (value & (m_phiBitsMask<<shift)) >>
shift; shift += m_phiBitsCnt;
292 muon.
m_EtaAddress = (value & (m_etaBitsMask<<shift)) >>
shift; shift += m_etaBitsCnt;
293 muon.
m_GBData = (value & (m_gbDataBitsMask<<shift))>>
shift; shift += m_gbDataBitsCnt;
297 unsigned int value = 0;
298 unsigned int shift = 0;
299 value = (muon.
m_Sign<<
shift); shift += m_signBitsCnt;
300 value = value | (muon.
m_PtCode<<
shift); shift += m_ptBitsCnt;
304 value = value | (muon.
m_GBData<<
shift); shift += m_gbDataBitsCnt;
310 unsigned int value = 0;
312 unsigned int shift = 0;
313 value = value | (muon.
m_Sign<<
shift); shift += m_signBitsCnt;
315 value = value | (muon.
m_PtCode<<
shift); shift += m_ptBitsCnt;
324 unsigned int shift = 0;
325 muon.
m_Sign = (value & (m_signBitsMask<<shift)) >>
shift; shift += m_signBitsCnt;
326 muon.
m_PtCode = (value & (m_ptBitsMask<<shift)) >>
shift; shift += m_ptBitsCnt;
327 muon.
m_Quality = (value & (m_qualBitsMask<<shift)) >>
shift; shift += m_qualBitsCnt;
328 muon.
m_PhiAddress = (value & (m_phiBitsMask<<shift)) >>
shift; shift += m_phiBitsCnt;
329 muon.
m_EtaAddress = (value & (m_etaBitsMask<<shift)) >>
shift; shift += m_etaBitsCnt;
333 unsigned int value = 0;
335 unsigned int shift = 0;
337 unsigned int ptCode = (~(muon.
m_PtCode)) & m_ptBitsMask;
340 value = value | muon.
m_PhiAddress; shift += m_phiBitsCnt;
341 value = value | (ptCode<<
shift); shift += m_ptBitsCnt;
342 value = value | (quality<<
shift); shift += m_qualBitsCnt;
346 value = value | (muon.
m_Sign<<
shift); shift += m_signBitsCnt;
352 unsigned int shift = 0;
353 muon.
m_PhiAddress = value & m_phiBitsMask; shift += m_phiBitsCnt;
354 muon.
m_PtCode = (value & (m_ptBitsMask<<shift)) >>
shift; shift += m_ptBitsCnt;
355 muon.
m_Quality = (value & (m_qualBitsMask<<shift)) >>
shift; shift += m_qualBitsCnt;
358 muon.
m_EtaAddress = (value & (m_etaBitsMask<<shift)) >>
shift; shift += m_etaBitsCnt + 1;
359 muon.
m_Sign = (value & (m_signBitsMask<<shift)) >>
shift; shift += m_signBitsCnt;
372 else if( format == 1) {
376 else if( format == 2) {
bool gBDataKilledLast() const
static void fromBits(RPCTBMuon &muon, unsigned int value)
std::string getGBDataBitStr() const
std::string toString(int format) const
int getSegmentAddr() const
unsigned int m_PhiAddress
unsigned int toBits() const
int getCode() const
Combined quality and ptCode, 8 bits [7...6 m_Quality, 5...1 m_PtCode, 0 sign], used in GhoustBusters...
unsigned int m_PtCode
5 bits, 0-31.
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
void setCodeAndEtaAddr(int code, int etaAddr)
static unsigned int toBits(const RPCTBMuon &muon)
static void fromBits(RPCTBMuon &muon, unsigned int value)
void setGBData(unsigned int gbData)
static void fromBits(RPCTBMuon &muon, unsigned int value)
static unsigned int toBits(const RPCTBMuon &muon)
int getSectorAddr() const
int getLogSegment() const
void setGBDataKilledFirst()
void setAddress(int etaAddr, int phiAddr)
static unsigned int toBits(const RPCTBMuon &muon)
void setEtaAddr(int etaAddr)
void setCodeAndPhiAddr(int code, int phiAddr)
int getContinSegmAddr() const
static void fromBits(RPCTBMuon &muon, unsigned int value)
std::string printDebugInfo(int debugFormat) const
Gives debuging info in human readable format (1) or technicall format (2)
void setCode(int code)
Sets combined code: 8 bits [7...5 m_Quality, 4...0 m_PtCode].
bool m_Killed
true means that muon was killed during GB
void fromBits(MuonBitsType muonBitsType, unsigned int value)
MuonBitsType m_muonBitsType
bool gBDataKilledFirst() const
unsigned int m_EtaAddress
static unsigned int const shift
static unsigned int toBits(const RPCTBMuon &muon)
unsigned int m_Quality
3 bits, 0-7.
void setSectorAddr(int sectorAddr)
void setPhiAddr(int phiAddr)
static void fromBits(RPCTBMuon &muon, unsigned int value)
void setGBDataKilledLast()
static unsigned int toBits(const RPCTBMuon &muon)