CMS 3D CMS Logo

RPCTBMuon Class Reference

Used in Ghoust Busters and sorters. More...

#include <L1Trigger/RPCTrigger/interface/RPCTBMuon.h>

Inheritance diagram for RPCTBMuon:

RPCMuon

List of all members.

Public Types

enum  MuonBitsType {
  mbtPACOut, mbtTBSortOut, mbtTCSortOut, mbtHSBOut,
  mbtFSBOut, mbtUnset
}

Public Member Functions

void fromBits (MuonBitsType muonBitsType, unsigned int value)
bool gBDataKilledFirst () const
bool gBDataKilledLast () const
int getCode () const
 Combined quality and ptCode, 8 bits [7...6 m_Quality, 5...1 m_PtCode, 0 sign], used in GhoustBusters.
int getContinSegmAddr () const
int getEtaAddr () const
int getGBData () const
std::string getGBDataBitStr () const
int getPhiAddr () const
int getSectorAddr () const
int getSegmentAddr () const
bool isLive () const
 
Returns:
true = was no-zero muon and was not killed false = is killed or is zero

void kill ()
std::string printDebugInfo (int debugFormat) const
 Gives debuging info in human readable format (1) or technicall format (2).
std::string printExtDebugInfo (int, int, int) const
 RPCTBMuon (const RPCPacMuon &pacMuon)
 RPCTBMuon (int ptCode, int quality, int sign, MuonBitsType muonBitsType)
 RPCTBMuon (int ptCode, int quality, int sign, int patternNum, unsigned short firedPlanes)
 RPCTBMuon ()
 Empty muon.
void setAddress (int tbNumber, int tbTower, int phiAddr)
void setAddress (int etaAddr, int phiAddr)
void setCode (int code)
 Sets combined code: 8 bits [7...5 m_Quality, 4...0 m_PtCode].
void setCodeAndEtaAddr (int code, int etaAddr)
void setCodeAndPhiAddr (int code, int phiAddr)
void setEtaAddr (int etaAddr)
void setGBData (unsigned int gbData)
void setGBDataKilledFirst ()
void setGBDataKilledLast ()
void setPhiAddr (int phiAddr)
void setSectorAddr (int sectorAddr)
unsigned int toBits () const
unsigned int toBits (MuonBitsType muonBitsType) const
std::string toString (int format) const
bool wasKilled () const
 
Returns:
true = was non-empty muon and was killed false = was not killed or is zero


Private Attributes

unsigned int m_EtaAddress
unsigned int m_GBData
 2 bits, 0 00 - this muon did not kill nothing on the sector edge 1 01 - this muon killed muon from segment 0 (the "right" sector edge), or is in segment 0 2 10 - this muon killed muon from segment 11 (the "left" sector edge), or is in segment 11 3 11 - this muon killed muon from segment 0 and 11
bool m_Killed
 true means that muon was killed during GB
MuonBitsType m_muonBitsType
unsigned int m_PhiAddress

Friends

class FSBOut
class HSBOut
class PACOut
class TBOut
class TCOut

Classes

class  FSBOut
class  HSBOut
class  PACOut
class  TBOut
class  TCOut
struct  TMuonMore
 Used in sorting. More...


Detailed Description

Used in Ghoust Busters and sorters.

Has additionall filds: m_Killed, m_GBData, m_EtaAddress, m_PhiAddress need in these algorithms.

Author:
Karol Bunkowski (Warsaw)

Definition at line 19 of file RPCTBMuon.h.


Member Enumeration Documentation

enum RPCTBMuon::MuonBitsType

Enumerator:
mbtPACOut 
mbtTBSortOut 
mbtTCSortOut 
mbtHSBOut 
mbtFSBOut 
mbtUnset 

Definition at line 21 of file RPCTBMuon.h.

00021                     {
00022     mbtPACOut,
00023     mbtTBSortOut,
00024     mbtTCSortOut,
00025     mbtHSBOut,
00026     mbtFSBOut, 
00027     mbtUnset    
00028   };


Constructor & Destructor Documentation

RPCTBMuon::RPCTBMuon (  ) 

Empty muon.

Definition at line 14 of file RPCTBMuon.cc.

References m_EtaAddress, m_GBData, m_Killed, and m_PhiAddress.

00014                     : RPCMuon() {
00015     m_Killed = false;
00016 
00017     m_GBData = 0;
00018 
00019     m_EtaAddress = 0;
00020     m_PhiAddress = 0;
00021 }

RPCTBMuon::RPCTBMuon ( int  ptCode,
int  quality,
int  sign,
int  patternNum,
unsigned short  firedPlanes 
)

Definition at line 23 of file RPCTBMuon.cc.

References m_EtaAddress, m_GBData, m_Killed, m_muonBitsType, m_PhiAddress, and mbtUnset.

00024                                                                     :
00025     RPCMuon(ptCode, quality, sign, patternNum, firedPlanes) 
00026 {
00027     m_Killed = false;
00028 
00029     m_GBData = 0;
00030 
00031     m_EtaAddress = 0;
00032     m_PhiAddress = 0;
00033     
00034     m_muonBitsType = mbtUnset;
00035 }

RPCTBMuon::RPCTBMuon ( int  ptCode,
int  quality,
int  sign,
MuonBitsType  muonBitsType 
)

Definition at line 37 of file RPCTBMuon.cc.

References m_EtaAddress, m_GBData, m_Killed, m_muonBitsType, and m_PhiAddress.

00037                                                                                 :
00038     RPCMuon(ptCode, quality, sign, 0, 0)  {
00039     m_Killed = false;
00040 
00041     m_GBData = 0;
00042 
00043     m_EtaAddress = 0;
00044     m_PhiAddress = 0;
00045     
00046     m_muonBitsType = muonBitsType;
00047 }

RPCTBMuon::RPCTBMuon ( const RPCPacMuon pacMuon  ) 

Definition at line 180 of file RPCTBMuon.cc.

References m_EtaAddress, m_GBData, m_Killed, and m_PhiAddress.

00180                                              :
00181     RPCMuon(pacMuon) 
00182 {
00183     m_Killed = false;
00184 
00185     m_GBData = 0;
00186 
00187     m_EtaAddress = 0;
00188     m_PhiAddress = 0;
00189 }
#endif //_STAND_ALONE


Member Function Documentation

void RPCTBMuon::fromBits ( RPCTBMuon::MuonBitsType  muonBitsType,
unsigned int  value 
)

Definition at line 216 of file RPCTBMuon.cc.

References RPCTBMuon::TCOut::fromBits(), RPCTBMuon::HSBOut::fromBits(), RPCTBMuon::FSBOut::fromBits(), RPCTBMuon::TBOut::fromBits(), RPCTBMuon::PACOut::fromBits(), mbtFSBOut, mbtHSBOut, mbtPACOut, mbtTBSortOut, and mbtTCSortOut.

00216                                                                                {
00217   if (muonBitsType == mbtPACOut) {
00218     PACOut::fromBits(*this, value);
00219   } 
00220   else if (muonBitsType == mbtTBSortOut) {
00221     TBOut::fromBits(*this, value);
00222   } 
00223   else if (muonBitsType == mbtTCSortOut) {
00224     TCOut::fromBits(*this, value);
00225   } 
00226   else if (muonBitsType == mbtHSBOut) {
00227     HSBOut::fromBits(*this, value);
00228   } 
00229   else if (muonBitsType == mbtFSBOut) {
00230     FSBOut::fromBits(*this, value);
00231   }
00232   else {
00233     RPCException("unknown value of muonBitsType");
00234     //edm::LogError("RPCTrigger")<< "unknown value of where: " + where;
00235   }
00236 }

bool RPCTBMuon::gBDataKilledFirst (  )  const

Definition at line 154 of file RPCTBMuon.cc.

References m_GBData.

00154 { return (m_GBData & 1);}

bool RPCTBMuon::gBDataKilledLast (  )  const

Definition at line 156 of file RPCTBMuon.cc.

References m_GBData.

00156 { return (m_GBData & 2);}

int RPCTBMuon::getCode (  )  const

Combined quality and ptCode, 8 bits [7...6 m_Quality, 5...1 m_PtCode, 0 sign], used in GhoustBusters.

Definition at line 88 of file RPCTBMuon.cc.

References RPCMuon::m_PtCode, RPCMuon::m_Quality, and RPCMuon::m_Sign.

Referenced by RPCTBMuon::TMuonMore::operator()().

00088 {  return (m_Quality<<6 | m_PtCode << 1 | m_Sign ); }

int RPCTBMuon::getContinSegmAddr (  )  const

Definition at line 125 of file RPCTBMuon.cc.

References getSectorAddr(), and getSegmentAddr().

00125 { return getSectorAddr()*12 + getSegmentAddr();}

int RPCTBMuon::getEtaAddr (  )  const

Definition at line 117 of file RPCTBMuon.cc.

References m_EtaAddress.

Referenced by printDebugInfo().

00117 { return m_EtaAddress; }

int RPCTBMuon::getGBData (  )  const

Definition at line 137 of file RPCTBMuon.cc.

References m_GBData.

Referenced by printDebugInfo().

00137 { return m_GBData;}

std::string RPCTBMuon::getGBDataBitStr (  )  const

Definition at line 139 of file RPCTBMuon.cc.

References m_GBData.

00139                                            {
00140     std::string str = "00";
00141     if (m_GBData == 1)
00142       str = "01";
00143     else if (m_GBData == 2)
00144       str = "10";
00145     else if (m_GBData == 3)
00146       str = "11";
00147     return str;  
00148 }

int RPCTBMuon::getPhiAddr (  )  const

Definition at line 119 of file RPCTBMuon.cc.

References m_PhiAddress.

Referenced by printDebugInfo().

00119 { return m_PhiAddress; }

int RPCTBMuon::getSectorAddr (  )  const

Definition at line 123 of file RPCTBMuon.cc.

References m_PhiAddress.

Referenced by getContinSegmAddr(), and printDebugInfo().

00123 { return (m_PhiAddress & 0xF0)>>4; }

int RPCTBMuon::getSegmentAddr (  )  const

Definition at line 121 of file RPCTBMuon.cc.

References m_PhiAddress.

Referenced by getContinSegmAddr(), and printDebugInfo().

00121 { return m_PhiAddress & 15; }

bool RPCTBMuon::isLive (  )  const

Returns:
true = was no-zero muon and was not killed false = is killed or is zero

Definition at line 172 of file RPCTBMuon.cc.

References m_Killed, and RPCMuon::m_PtCode.

00172                              {
00173     if(m_PtCode > 0 && !m_Killed)
00174       return true;
00175     else return false;
00176 }

void RPCTBMuon::kill (  ) 

Definition at line 160 of file RPCTBMuon.cc.

References m_Killed.

00160 { m_Killed = true; }

std::string RPCTBMuon::printDebugInfo ( int  debugFormat  )  const

Gives debuging info in human readable format (1) or technicall format (2).

Note:
Possible debugFormat codes (1,2) are defined in RPCTrigger constructor

Definition at line 55 of file RPCTBMuon.cc.

References getEtaAddr(), getGBData(), RPCMuon::getLogSector(), RPCMuon::getLogSegment(), getPhiAddr(), RPCMuon::getPtCode(), RPCMuon::getQuality(), getSectorAddr(), getSegmentAddr(), RPCMuon::getSign(), RPCMuon::getTower(), mbtFSBOut, and toBits().

00055                                                          {
00056 
00057   std::ostringstream sDebugInfo;
00058   if (debugFormat==1){  // Human readable
00059 
00060     sDebugInfo << "TBMuon: code: " << getPtCode()
00061                << " etaAddr: " << getEtaAddr()
00062                << " phiAddr: " << getPhiAddr()
00063                << " sgAddr: " << getSegmentAddr()
00064                << " scAddr: " << getSectorAddr()
00065                << " gbData: " << getGBData();
00066 
00067   }
00068   else {        //technicall
00069    sDebugInfo << "TBMuon pt "<< getPtCode() 
00070               <<   " ql " <<getQuality() 
00071               <<   " sgn " << getSign()
00072               <<   " tw " << getTower()
00073               <<   " sc " << getLogSector()
00074               <<   " sg " << getLogSegment()
00075               <<   " phi " << getPhiAddr()
00076               <<   " eta " << getEtaAddr()
00077               <<   " gbD " <<  getGBData()
00078               <<   " bits " << toBits(mbtFSBOut);
00079   }
00080 
00081   return sDebugInfo.str();
00082 
00083 }

std::string RPCTBMuon::printExtDebugInfo ( int  ,
int  ,
int   
) const

void RPCTBMuon::setAddress ( int  tbNumber,
int  tbTower,
int  phiAddr 
)

Definition at line 108 of file RPCTBMuon.cc.

References m_EtaAddress, and m_PhiAddress.

00108                                                                  {
00109     m_EtaAddress = (tbNumber<<2) | tbTower;
00110     m_PhiAddress = phiAddr;
00111 }

void RPCTBMuon::setAddress ( int  etaAddr,
int  phiAddr 
)

Definition at line 103 of file RPCTBMuon.cc.

References m_EtaAddress, and m_PhiAddress.

00103                                                    { 
00104      m_EtaAddress = etaAddr;
00105      m_PhiAddress = phiAddr;
00106 }

void RPCTBMuon::setCode ( int  code  ) 

Sets combined code: 8 bits [7...5 m_Quality, 4...0 m_PtCode].

Definition at line 91 of file RPCTBMuon.cc.

References RPCMuon::m_PtCode, and RPCMuon::m_Quality.

Referenced by setCodeAndEtaAddr(), and setCodeAndPhiAddr().

00091                                 {
00092     m_Quality = (code & (3<<5))>>5;
00093     m_PtCode = code & 31;
00094 }

void RPCTBMuon::setCodeAndEtaAddr ( int  code,
int  etaAddr 
)

Definition at line 132 of file RPCTBMuon.cc.

References m_EtaAddress, and setCode().

00132                                                        {
00133     setCode(code);
00134     m_EtaAddress = etaAddr;
00135 }

void RPCTBMuon::setCodeAndPhiAddr ( int  code,
int  phiAddr 
)

Definition at line 127 of file RPCTBMuon.cc.

References m_PhiAddress, and setCode().

00127                                                        {
00128     setCode(code);
00129     m_PhiAddress = phiAddr;
00130 }

void RPCTBMuon::setEtaAddr ( int  etaAddr  ) 

Definition at line 101 of file RPCTBMuon.cc.

References m_EtaAddress.

00101 { m_EtaAddress = etaAddr;}

void RPCTBMuon::setGBData ( unsigned int  gbData  ) 

Definition at line 113 of file RPCTBMuon.cc.

References m_GBData.

00113                                              {
00114         m_GBData = gbData;
00115 }

void RPCTBMuon::setGBDataKilledFirst (  ) 

Definition at line 150 of file RPCTBMuon.cc.

References m_GBData.

00150 { m_GBData = m_GBData | 1;}

void RPCTBMuon::setGBDataKilledLast (  ) 

Definition at line 152 of file RPCTBMuon.cc.

References m_GBData.

00152 { m_GBData = m_GBData | 2; }

void RPCTBMuon::setPhiAddr ( int  phiAddr  ) 

Definition at line 97 of file RPCTBMuon.cc.

References m_PhiAddress.

00097 { m_PhiAddress = phiAddr;}

void RPCTBMuon::setSectorAddr ( int  sectorAddr  ) 

Definition at line 99 of file RPCTBMuon.cc.

References m_PhiAddress.

00099 { m_PhiAddress = m_PhiAddress | sectorAddr<<4;}

unsigned int RPCTBMuon::toBits (  )  const [inline]

Definition at line 106 of file RPCTBMuon.h.

References m_muonBitsType.

Referenced by printDebugInfo().

00106                               {
00107         return toBits(m_muonBitsType);
00108   }

unsigned int RPCTBMuon::toBits ( RPCTBMuon::MuonBitsType  muonBitsType  )  const

Definition at line 193 of file RPCTBMuon.cc.

References mbtFSBOut, mbtHSBOut, mbtPACOut, mbtTBSortOut, mbtTCSortOut, RPCTBMuon::HSBOut::toBits(), RPCTBMuon::TCOut::toBits(), RPCTBMuon::PACOut::toBits(), RPCTBMuon::TBOut::toBits(), and RPCTBMuon::FSBOut::toBits().

00193                                                                        {
00194   if (muonBitsType == mbtPACOut) {
00195     return PACOut::toBits(*this);
00196   }
00197   else if (muonBitsType == mbtTBSortOut) {
00198     return TBOut::toBits(*this);
00199   }
00200   else if (muonBitsType == mbtTCSortOut) {
00201     return TCOut::toBits(*this);
00202   }
00203   else if (muonBitsType == mbtHSBOut) {
00204     return HSBOut::toBits(*this);
00205   }
00206   else if (muonBitsType == mbtFSBOut) {
00207     return FSBOut::toBits(*this);
00208   }
00209   else {
00210     throw RPCException("unknown value of muonBitsType");
00211     //edm::LogError("RPCTrigger")<<"unknown value of where: " + where;
00212   } 
00213   return 0;
00214 }

std::string RPCTBMuon::toString ( int  format  )  const

Definition at line 359 of file RPCTBMuon.cc.

References m_EtaAddress, m_PhiAddress, RPCMuon::m_PtCode, RPCMuon::m_Quality, and RPCMuon::m_Sign.

00359                                               {
00360   ostringstream ostr;
00361   if(format == 0) {
00362          ostr<<"qu "<<m_Quality<<", pt "<<setw(2)<<m_PtCode<<", sig "<<m_Sign
00363          <<", phi "<<setw(3)<<m_PhiAddress<<", eta "<<setw(2)<<m_EtaAddress;
00364   }
00365   else if( format == 1) {
00366         ostr<<" "<<m_Quality<<" "<<setw(2)<<m_PtCode<<" "<<m_Sign
00367         <<" "<<setw(3)<<m_PhiAddress<<" "<<setw(2)<<m_EtaAddress;
00368   }    
00369   else if( format == 2) {
00370         ostr<<" "<<m_Quality<<" "<<setw(2)<<m_PtCode<<" "<<m_Sign;
00371   }    
00372   
00373   return ostr.str();
00374 }

bool RPCTBMuon::wasKilled (  )  const

Returns:
true = was non-empty muon and was killed false = was not killed or is zero

Definition at line 164 of file RPCTBMuon.cc.

References m_Killed, and RPCMuon::m_PtCode.

00164                                 {
00165     if(m_PtCode > 0 && m_Killed)
00166       return true;
00167     else return false;
00168 }


Friends And Related Function Documentation

friend class FSBOut [friend]

Definition at line 202 of file RPCTBMuon.h.

friend class HSBOut [friend]

Definition at line 189 of file RPCTBMuon.h.

friend class PACOut [friend]

Definition at line 146 of file RPCTBMuon.h.

friend class TBOut [friend]

Definition at line 161 of file RPCTBMuon.h.

friend class TCOut [friend]

Definition at line 175 of file RPCTBMuon.h.


Member Data Documentation

unsigned int RPCTBMuon::m_EtaAddress [private]

Definition at line 117 of file RPCTBMuon.h.

Referenced by RPCTBMuon::TCOut::fromBits(), RPCTBMuon::HSBOut::fromBits(), RPCTBMuon::FSBOut::fromBits(), RPCTBMuon::TBOut::fromBits(), getEtaAddr(), RPCTBMuon(), setAddress(), setCodeAndEtaAddr(), setEtaAddr(), RPCTBMuon::HSBOut::toBits(), RPCTBMuon::TCOut::toBits(), RPCTBMuon::TBOut::toBits(), RPCTBMuon::FSBOut::toBits(), and toString().

unsigned int RPCTBMuon::m_GBData [private]

2 bits, 0 00 - this muon did not kill nothing on the sector edge 1 01 - this muon killed muon from segment 0 (the "right" sector edge), or is in segment 0 2 10 - this muon killed muon from segment 11 (the "left" sector edge), or is in segment 11 3 11 - this muon killed muon from segment 0 and 11

Definition at line 126 of file RPCTBMuon.h.

Referenced by RPCTBMuon::TCOut::fromBits(), RPCTBMuon::TBOut::fromBits(), gBDataKilledFirst(), gBDataKilledLast(), getGBData(), getGBDataBitStr(), RPCTBMuon(), setGBData(), setGBDataKilledFirst(), setGBDataKilledLast(), RPCTBMuon::TCOut::toBits(), and RPCTBMuon::TBOut::toBits().

bool RPCTBMuon::m_Killed [private]

true means that muon was killed during GB

Definition at line 129 of file RPCTBMuon.h.

Referenced by isLive(), kill(), RPCTBMuon(), and wasKilled().

MuonBitsType RPCTBMuon::m_muonBitsType [private]

Definition at line 115 of file RPCTBMuon.h.

Referenced by RPCTBMuon(), and toBits().

unsigned int RPCTBMuon::m_PhiAddress [private]

Definition at line 119 of file RPCTBMuon.h.

Referenced by RPCTBMuon::TCOut::fromBits(), RPCTBMuon::HSBOut::fromBits(), RPCTBMuon::FSBOut::fromBits(), RPCTBMuon::TBOut::fromBits(), getPhiAddr(), getSectorAddr(), getSegmentAddr(), RPCTBMuon(), setAddress(), setCodeAndPhiAddr(), setPhiAddr(), setSectorAddr(), RPCTBMuon::HSBOut::toBits(), RPCTBMuon::TCOut::toBits(), RPCTBMuon::TBOut::toBits(), RPCTBMuon::FSBOut::toBits(), and toString().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:12 2009 for CMSSW by  doxygen 1.5.4