CMS 3D CMS Logo

TEPatternsGroup.cc
Go to the documentation of this file.
2 
10 TEPatternsGroup::TEPatternsGroup(const RPCPattern::RPCPatVec::const_iterator& pattern) {
13  m_QualityTabNumber = pattern->getQualityTabNumber(); //it is uded in m_PAC algorithm, so we want to have fast acces.
14 }
15 
16 bool TEPatternsGroup::check(const RPCPattern::RPCPatVec::const_iterator& pattern) {
17  if (m_PatternsItVec[0]->getRefGroup() == pattern->getRefGroup() &&
18  m_PatternsItVec[0]->getCode() == pattern->getCode() && m_PatternsItVec[0]->getSign() == pattern->getSign() &&
19  m_PatternsItVec[0]->getQualityTabNumber() == pattern->getQualityTabNumber())
20  return true;
21  return false;
22 }
23 
24 bool TEPatternsGroup::operator<(const TEPatternsGroup& ePatternsGroup) const {
25  if (this->m_PatternsItVec[0]->getCode() < ePatternsGroup.m_PatternsItVec[0]->getCode())
26  return true;
27  else if (this->m_PatternsItVec[0]->getCode() > ePatternsGroup.m_PatternsItVec[0]->getCode())
28  return false;
29  else { //==
30  if (this->m_PatternsItVec[0]->getQualityTabNumber() > ePatternsGroup.m_PatternsItVec[0]->getQualityTabNumber())
31  return true;
32  else if (this->m_PatternsItVec[0]->getQualityTabNumber() < ePatternsGroup.m_PatternsItVec[0]->getQualityTabNumber())
33  return false;
34  else { //==
35  if (this->m_PatternsItVec[0]->getSign() < ePatternsGroup.m_PatternsItVec[0]->getSign())
36  return true;
37  else if (this->m_PatternsItVec[0]->getSign() > ePatternsGroup.m_PatternsItVec[0]->getSign())
38  return false;
39  else { //==
40  if (this->m_PatternsItVec[0]->getRefGroup() < ePatternsGroup.m_PatternsItVec[0]->getRefGroup())
41  return true;
42  else //if(this->m_RefGroup < ePatternsGroup.m_RefGroup)
43  return false;
44  }
45  }
46  }
47 }
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_Qua...
void addPattern(const RPCPattern::RPCPatVec::const_iterator &pattern)
std::vector< RPCPattern::RPCPatVec::const_iterator > m_PatternsItVec
< Vector of itereator on m_PatternsVec in Pac.
TEPatternsGroup(const RPCPattern::RPCPatVec::const_iterator &pattern)
bool operator<(const TEPatternsGroup &ePatternsGroup) const
used for sorting TEPatternsGroups
static const TPatternType PAT_TYPE_E
Definition: RPCPattern.h:56
Group of paterns for "improved"("energetic") algorithm. In current implementation all patterns in giv...
RPCPattern::TPatternType m_PatternsGroupType