CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

TEPatternsGroup Class Reference

Group of paterns for "improved"("energetic") algorithm. In current implementation all patterns in given group must have the same code and sign. All patterns must have the same m_QualityTabNumber. Patterns of given code and sign can be devided between a few EPatternsGroups, indexed by m_RefGroup. The group m_Code, m_Sign, m_RefGroup is definded by pattern index 0 in m_PatternsVec. More...

#include <TEPatternsGroup.h>

Inheritance diagram for TEPatternsGroup:
TPatternsGroup

List of all members.

Public Member Functions

bool check (const RPCPattern::RPCPatVec::const_iterator &pattern)
 Checks, if patern can belong to this group, i.e. if has the same m_Code, m_Sign, m_RefGroup and m_QualityTabNumber.
bool operator< (const TEPatternsGroup &ePatternsGroup) const
 used for sorting TEPatternsGroups
 TEPatternsGroup (const RPCPattern::RPCPatVec::const_iterator &pattern)

Private Attributes

short m_QualityTabNumber

Friends

class RPCPac

Detailed Description

Group of paterns for "improved"("energetic") algorithm. In current implementation all patterns in given group must have the same code and sign. All patterns must have the same m_QualityTabNumber. Patterns of given code and sign can be devided between a few EPatternsGroups, indexed by m_RefGroup. The group m_Code, m_Sign, m_RefGroup is definded by pattern index 0 in m_PatternsVec.

Author:
Karol Bunkowski (Warsaw),
Tomasz Fruboes (Warsaw) - porting to CMSSW

Definition at line 23 of file TEPatternsGroup.h.


Constructor & Destructor Documentation

TEPatternsGroup::TEPatternsGroup ( const RPCPattern::RPCPatVec::const_iterator &  pattern)

Creates new patterns group. The pattern is added to the group and defined its m_Code, m_Sign, m_RefGroup, m_QualityTabNumber.

Definition at line 10 of file TEPatternsGroup.cc.

References TPatternsGroup::addPattern(), TPatternsGroup::m_PatternsGroupType, m_QualityTabNumber, and RPCPattern::PAT_TYPE_E.

                                                                                 {
  addPattern(pattern);
  m_PatternsGroupType = RPCPattern::PAT_TYPE_E;
  m_QualityTabNumber = pattern->getQualityTabNumber(); //it is uded in m_PAC algorithm, so we want to have fast acces.
}

Member Function Documentation

bool TEPatternsGroup::check ( const RPCPattern::RPCPatVec::const_iterator &  pattern)

Checks, if patern can belong to this group, i.e. if has the same m_Code, m_Sign, m_RefGroup and m_QualityTabNumber.

Definition at line 17 of file TEPatternsGroup.cc.

References TPatternsGroup::m_PatternsItVec.

                                                                            {
  if(m_PatternsItVec[0]->getRefGroup() == pattern->getRefGroup() &&
     m_PatternsItVec[0]->getCode() == pattern->getCode() &&
     m_PatternsItVec[0]->getSign() == pattern->getSign() &&
     m_PatternsItVec[0]->getQualityTabNumber() == pattern->getQualityTabNumber() )
    return true;
  return false;
}
bool TEPatternsGroup::operator< ( const TEPatternsGroup ePatternsGroup) const

used for sorting TEPatternsGroups

Definition at line 27 of file TEPatternsGroup.cc.

References TPatternsGroup::m_PatternsItVec.

                                                                             {
  if( this->m_PatternsItVec[0]->getCode() < ePatternsGroup.m_PatternsItVec[0]->getCode() )
    return true;
  else if( this->m_PatternsItVec[0]->getCode() > ePatternsGroup.m_PatternsItVec[0]->getCode() )
    return false;
  else { //==
    if(this->m_PatternsItVec[0]->getQualityTabNumber() > ePatternsGroup.m_PatternsItVec[0]->getQualityTabNumber())
      return true;
    else if(this->m_PatternsItVec[0]->getQualityTabNumber() < ePatternsGroup.m_PatternsItVec[0]->getQualityTabNumber())
      return false;
    else { //==
      if( this->m_PatternsItVec[0]->getSign() < ePatternsGroup.m_PatternsItVec[0]->getSign() )
        return true;
      else if( this->m_PatternsItVec[0]->getSign() > ePatternsGroup.m_PatternsItVec[0]->getSign() )
        return false;
      else { //==
        if(this->m_PatternsItVec[0]->getRefGroup() < ePatternsGroup.m_PatternsItVec[0]->getRefGroup())
          return true;
        else //if(this->m_RefGroup < ePatternsGroup.m_RefGroup)
          return false;
      }
    }
  }
}

Friends And Related Function Documentation

friend class RPCPac [friend]

Reimplemented from TPatternsGroup.

Definition at line 25 of file TEPatternsGroup.h.


Member Data Documentation

Definition at line 37 of file TEPatternsGroup.h.

Referenced by TEPatternsGroup().