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 }
TPatternsGroup::addPattern
void addPattern(const RPCPattern::RPCPatVec::const_iterator &pattern)
Definition: TPatternsGroup.cc:19
RPCPattern::PAT_TYPE_E
static const TPatternType PAT_TYPE_E
Definition: RPCPattern.h:56
TEPatternsGroup::operator<
bool operator<(const TEPatternsGroup &ePatternsGroup) const
used for sorting TEPatternsGroups
Definition: TEPatternsGroup.cc:24
TEPatternsGroup.h
TPatternsGroup::m_PatternsGroupType
RPCPattern::TPatternType m_PatternsGroupType
Definition: TPatternsGroup.h:41
TEPatternsGroup::m_QualityTabNumber
short m_QualityTabNumber
Definition: TEPatternsGroup.h:37
TEPatternsGroup::TEPatternsGroup
TEPatternsGroup(const RPCPattern::RPCPatVec::const_iterator &pattern)
Definition: TEPatternsGroup.cc:10
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
TPatternsGroup::m_PatternsItVec
std::vector< RPCPattern::RPCPatVec::const_iterator > m_PatternsItVec
< Vector of itereator on m_PatternsVec in Pac.
Definition: TPatternsGroup.h:45
TEPatternsGroup::check
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...
Definition: TEPatternsGroup.cc:16
TEPatternsGroup
Group of paterns for "improved"("energetic") algorithm. In current implementation all patterns in giv...
Definition: TEPatternsGroup.h:23