CMS 3D CMS Logo

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