CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #include "L1Trigger/RPCTrigger/interface/TEPatternsGroup.h"
00002 
00010 TEPatternsGroup::TEPatternsGroup(const RPCPattern::RPCPatVec::const_iterator& pattern) {
00011   addPattern(pattern);
00012   m_PatternsGroupType = RPCPattern::PAT_TYPE_E;
00013   m_QualityTabNumber = pattern->getQualityTabNumber(); //it is uded in m_PAC algorithm, so we want to have fast acces.
00014 }
00015 
00016 
00017 bool TEPatternsGroup::check(const RPCPattern::RPCPatVec::const_iterator& pattern) {
00018   if(m_PatternsItVec[0]->getRefGroup() == pattern->getRefGroup() &&
00019      m_PatternsItVec[0]->getCode() == pattern->getCode() &&
00020      m_PatternsItVec[0]->getSign() == pattern->getSign() &&
00021      m_PatternsItVec[0]->getQualityTabNumber() == pattern->getQualityTabNumber() )
00022     return true;
00023   return false;
00024 }
00025 
00026 
00027 bool TEPatternsGroup::operator < (const TEPatternsGroup& ePatternsGroup) const {
00028   if( this->m_PatternsItVec[0]->getCode() < ePatternsGroup.m_PatternsItVec[0]->getCode() )
00029     return true;
00030   else if( this->m_PatternsItVec[0]->getCode() > ePatternsGroup.m_PatternsItVec[0]->getCode() )
00031     return false;
00032   else { //==
00033     if(this->m_PatternsItVec[0]->getQualityTabNumber() > ePatternsGroup.m_PatternsItVec[0]->getQualityTabNumber())
00034       return true;
00035     else if(this->m_PatternsItVec[0]->getQualityTabNumber() < ePatternsGroup.m_PatternsItVec[0]->getQualityTabNumber())
00036       return false;
00037     else { //==
00038       if( this->m_PatternsItVec[0]->getSign() < ePatternsGroup.m_PatternsItVec[0]->getSign() )
00039         return true;
00040       else if( this->m_PatternsItVec[0]->getSign() > ePatternsGroup.m_PatternsItVec[0]->getSign() )
00041         return false;
00042       else { //==
00043         if(this->m_PatternsItVec[0]->getRefGroup() < ePatternsGroup.m_PatternsItVec[0]->getRefGroup())
00044           return true;
00045         else //if(this->m_RefGroup < ePatternsGroup.m_RefGroup)
00046           return false;
00047       }
00048     }
00049   }
00050 }