CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/L1Trigger/RPCTrigger/src/RPCPacMuon.cc

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *                                                                              *
00003 *  Karol Bunkowski                                                             *
00004 *  Warsaw University 2002                                                      *
00005 *                                                                              *
00006 *******************************************************************************/
00007 #include "L1Trigger/RPCTrigger/interface/RPCPacMuon.h"
00008 
00010 RPCPacMuon::RPCPacMuon(): RPCMuon() {}
00011 
00013 RPCPacMuon::RPCPacMuon(const RPCPattern& pattern, int quality, unsigned short firedPlanes):
00014     RPCMuon(pattern.getCode(), quality, pattern.getSign(), pattern.getNumber(), firedPlanes) 
00015     { }
00016 
00017 void RPCPacMuon::setAll(const RPCPattern& pattern, int quality, unsigned short firedPlanes) {
00018   m_PatternNum = pattern.getNumber();
00019   m_PtCode = pattern.getCode();
00020   m_Sign = pattern.getSign();
00021   m_Quality = quality;
00022   m_FiredPlanes = firedPlanes;
00023 }
00024 
00025 void RPCPacMuon::setPatternNum(int patternNum) {
00026   m_PatternNum = patternNum;
00027 }
00028 
00029 bool RPCPacMuon::operator <(const RPCPacMuon& pacMuon) const {
00030   if( this->m_Quality < pacMuon.m_Quality)
00031     return true;
00032   else if( this->m_Quality > pacMuon.m_Quality)
00033     return false;
00034   else { //==
00035     if( this->m_PtCode < pacMuon.m_PtCode)
00036       return true;
00037     else if( this->m_PtCode > pacMuon.m_PtCode)
00038       return false;
00039     else { //==
00040       //if( this->m_Sign < pacMuon.m_Sign)
00041       if( this->m_Sign > pacMuon.m_Sign)
00042         return true;
00043       else
00044         return false;
00045     }
00046   }
00047 }
00048 
00049 bool RPCPacMuon::operator >(const RPCPacMuon& pacMuon) const {
00050   if( this->m_Quality > pacMuon.m_Quality)
00051     return true;
00052   else if( this->m_Quality < pacMuon.m_Quality)
00053     return false;
00054   else { //==
00055     if( this->m_PtCode > pacMuon.m_PtCode)
00056       return true;
00057     else if( this->m_PtCode < pacMuon.m_PtCode)
00058       return false;
00059     else { //==
00060       if( this->m_Sign < pacMuon.m_Sign)
00061         return true;
00062       else
00063         return false;
00064     }
00065   }
00066 }
00067 bool RPCPacMuon::operator ==(const RPCPacMuon& pacMuon) const {
00068   if( this->m_Quality == pacMuon.m_Quality &&
00069       this->m_PtCode == pacMuon.m_PtCode &&
00070       this->m_Sign == pacMuon.m_Sign)
00071     return true;
00072   else
00073     return false;
00074 }