CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Friends
Key Struct Reference

#include <GoldenPattern.h>

Public Member Functions

unsigned int getHwPatternNumber () const
 
 Key (int iEta=99, unsigned int iPt=0, int iCharge=0, unsigned int iNumber=999)
 
 Key (int iEta=99, unsigned int iPt=0, int iCharge=0, unsigned int iNumber=999)
 
 Key (int iEta, unsigned int iPt, int iCharge, unsigned int iNumber, unsigned int group, unsigned int indexInGroup)
 
unsigned int number () const
 
unsigned int number () const
 
bool operator< (const Key &o) const
 
bool operator< (const Key &o) const
 
bool operator== (const Key &o) const
 
bool operator== (const Key &o) const
 
void setGroup (int group)
 
void setIndexInGroup (unsigned int indexInGroup)
 
void setPt (int pt)
 

Public Attributes

int theCharge
 
int theEtaCode
 
unsigned int theGroup = 0
 
unsigned int theIndexInGroup = 1
 
unsigned int theNumber
 
unsigned int thePt
 
unsigned int thePtCode
 

Friends

std::ostream & operator<< (std::ostream &out, const Key &o)
 
std::ostream & operator<< (std::ostream &out, const Key &o)
 

Detailed Description

Definition at line 15 of file GoldenPattern.h.

Constructor & Destructor Documentation

◆ Key() [1/3]

Key::Key ( int  iEta = 99,
unsigned int  iPt = 0,
int  iCharge = 0,
unsigned int  iNumber = 999 
)
inline

Definition at line 16 of file GoldenPattern.h.

17  : theEtaCode(iEta), thePtCode(iPt), theCharge(iCharge), theNumber(iNumber) {}
unsigned int theNumber
Definition: GoldenPattern.h:37
int theCharge
Definition: GoldenPattern.h:36
unsigned int thePtCode
Definition: GoldenPattern.h:35
int theEtaCode
Definition: GoldenPattern.h:34

◆ Key() [2/3]

Key::Key ( int  iEta = 99,
unsigned int  iPt = 0,
int  iCharge = 0,
unsigned int  iNumber = 999 
)
inline

Definition at line 15 of file GoldenPatternBase.h.

16  : theEtaCode(iEta), thePt(iPt), theCharge(iCharge), theNumber(iNumber) {}
unsigned int theNumber
Definition: GoldenPattern.h:37
int theCharge
Definition: GoldenPattern.h:36
unsigned int thePt
int theEtaCode
Definition: GoldenPattern.h:34

◆ Key() [3/3]

Key::Key ( int  iEta,
unsigned int  iPt,
int  iCharge,
unsigned int  iNumber,
unsigned int  group,
unsigned int  indexInGroup 
)
inline

Definition at line 18 of file GoldenPatternBase.h.

19  : theEtaCode(iEta),
20  thePt(iPt),
21  theCharge(iCharge),
22  theNumber(iNumber),
23  theGroup(group),
24  theIndexInGroup(indexInGroup) {}
unsigned int theNumber
Definition: GoldenPattern.h:37
int theCharge
Definition: GoldenPattern.h:36
unsigned int theGroup
unsigned int thePt
unsigned int theIndexInGroup
int theEtaCode
Definition: GoldenPattern.h:34

Member Function Documentation

◆ getHwPatternNumber()

unsigned int Key::getHwPatternNumber ( ) const
inline

Definition at line 55 of file GoldenPatternBase.h.

References theGroup, and theIndexInGroup.

Referenced by AlgoMuon::getHwPatternNumber().

55 { return theGroup * 4 + theIndexInGroup - 1; }
unsigned int theGroup
unsigned int theIndexInGroup

◆ number() [1/2]

unsigned int Key::number ( ) const
inline

Definition at line 32 of file GoldenPattern.h.

References theNumber.

Referenced by OMTFSorter< GoldenPatternType >::sortRefHitResults().

32 { return theNumber; }
unsigned int theNumber
Definition: GoldenPattern.h:37

◆ number() [2/2]

unsigned int Key::number ( ) const
inline

Definition at line 34 of file GoldenPatternBase.h.

References theNumber.

34 { return theNumber; }
unsigned int theNumber
Definition: GoldenPattern.h:37

◆ operator<() [1/2]

bool Key::operator< ( const Key o) const
inline

Definition at line 19 of file GoldenPattern.h.

References EcalTangentSkim_cfg::o, and theNumber.

19 { return (theNumber < o.theNumber); }
unsigned int theNumber
Definition: GoldenPattern.h:37

◆ operator<() [2/2]

bool Key::operator< ( const Key o) const
inline

Definition at line 26 of file GoldenPatternBase.h.

References EcalTangentSkim_cfg::o, and theNumber.

26 { return (theNumber < o.theNumber); }
unsigned int theNumber
Definition: GoldenPattern.h:37

◆ operator==() [1/2]

bool Key::operator== ( const Key o) const
inline

Definition at line 21 of file GoldenPattern.h.

References EcalTangentSkim_cfg::o, theCharge, theEtaCode, theNumber, and thePtCode.

21  {
22  return theEtaCode == o.theEtaCode && thePtCode == o.thePtCode && theCharge == o.theCharge &&
23  theNumber == o.theNumber;
24  }
unsigned int theNumber
Definition: GoldenPattern.h:37
int theCharge
Definition: GoldenPattern.h:36
unsigned int thePtCode
Definition: GoldenPattern.h:35
int theEtaCode
Definition: GoldenPattern.h:34

◆ operator==() [2/2]

bool Key::operator== ( const Key o) const
inline

Definition at line 28 of file GoldenPatternBase.h.

References EcalTangentSkim_cfg::o, theCharge, theEtaCode, theNumber, and thePt.

28  {
29  return theEtaCode == o.theEtaCode && thePt == o.thePt && theCharge == o.theCharge && theNumber == o.theNumber;
30  }
unsigned int theNumber
Definition: GoldenPattern.h:37
int theCharge
Definition: GoldenPattern.h:36
unsigned int thePt
int theEtaCode
Definition: GoldenPattern.h:34

◆ setGroup()

void Key::setGroup ( int  group)
inline

Definition at line 51 of file GoldenPatternBase.h.

References watchdog::group, and theGroup.

51 { theGroup = group; }
unsigned int theGroup

◆ setIndexInGroup()

void Key::setIndexInGroup ( unsigned int  indexInGroup)
inline

Definition at line 53 of file GoldenPatternBase.h.

References theIndexInGroup.

53 { theIndexInGroup = indexInGroup; }
unsigned int theIndexInGroup

◆ setPt()

void Key::setPt ( int  pt)
inline

Definition at line 49 of file GoldenPatternBase.h.

References DiDispStaMuonMonitor_cfi::pt, and thePt.

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  out,
const Key o 
)
friend

Definition at line 26 of file GoldenPattern.h.

26  {
27  out << "Key_" << o.theNumber << ": (eta=" << o.theEtaCode << ", pt=" << o.thePtCode << ", charge=" << o.theCharge
28  << ")";
29  return out;
30  }

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  out,
const Key o 
)
friend

Definition at line 13 of file GoldenPatternBase.cc.

13  {
14  out << "Key_" << std::setw(2) << o.theNumber << " hwNum " << std::setw(2) << o.getHwPatternNumber() << " group "
15  << std::setw(2) << o.theGroup << ":" << o.theIndexInGroup << " : (eta=" << o.theEtaCode << ", pt=" << std::setw(3)
16  << o.thePt << ", charge=" << setw(2) << o.theCharge << ")";
17  return out;
18 }

Member Data Documentation

◆ theCharge

int Key::theCharge

◆ theEtaCode

int Key::theEtaCode

Definition at line 34 of file GoldenPattern.h.

Referenced by operator==(), and XMLConfigWriter::writeResultsData().

◆ theGroup

unsigned int Key::theGroup = 0

Definition at line 45 of file GoldenPatternBase.h.

Referenced by XMLConfigReader::buildGP(), getHwPatternNumber(), and setGroup().

◆ theIndexInGroup

unsigned int Key::theIndexInGroup = 1

◆ theNumber

unsigned int Key::theNumber

◆ thePt

unsigned int Key::thePt

◆ thePtCode

unsigned int Key::thePtCode