CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
L1GctJetSorter Class Reference

#include <L1GctJetSorter.h>

Public Types

typedef std::vector< L1GctJetCandJetVector
 

Public Member Functions

JetVector getInputJets () const
 
JetVector getSortedJets () const
 
 L1GctJetSorter ()
 
 L1GctJetSorter (JetVector &inputJets)
 
void setJets (JetVector &inputJets)
 
 ~L1GctJetSorter ()
 

Private Attributes

JetVector m_inputJets
 

Detailed Description

Definition at line 8 of file L1GctJetSorter.h.

Member Typedef Documentation

◆ JetVector

Definition at line 11 of file L1GctJetSorter.h.

Constructor & Destructor Documentation

◆ L1GctJetSorter() [1/2]

L1GctJetSorter::L1GctJetSorter ( )

Definition at line 5 of file L1GctJetSorter.cc.

5 : m_inputJets() {}

◆ L1GctJetSorter() [2/2]

L1GctJetSorter::L1GctJetSorter ( L1GctJetSorter::JetVector inputJets)

Definition at line 6 of file L1GctJetSorter.cc.

◆ ~L1GctJetSorter()

L1GctJetSorter::~L1GctJetSorter ( )

Definition at line 8 of file L1GctJetSorter.cc.

8 {}

Member Function Documentation

◆ getInputJets()

L1GctJetSorter::JetVector L1GctJetSorter::getInputJets ( ) const

Definition at line 36 of file L1GctJetSorter.cc.

36 { return m_inputJets; }

References m_inputJets.

◆ getSortedJets()

L1GctJetSorter::JetVector L1GctJetSorter::getSortedJets ( ) const

Definition at line 12 of file L1GctJetSorter.cc.

12  {
13  unsigned nJets = m_inputJets.size();
14  std::vector<unsigned> position(nJets, 0);
15  // Replicate the firmware jet sorting algorithm.
16  // If two jets in the input array have equal rank,
17  // the one that occurs first in the array has higher priority.
18  for (unsigned j1 = 0; j1 < nJets; j1++) {
19  for (unsigned j2 = j1 + 1; j2 < nJets; j2++) {
20  if (m_inputJets.at(j1).rank() < m_inputJets.at(j2).rank()) {
21  position.at(j1) = position.at(j1) + 1;
22  } else {
23  position.at(j2) = position.at(j2) + 1;
24  }
25  }
26  }
27 
29  for (unsigned j1 = 0; j1 < nJets; j1++) {
30  result.at(position.at(j1)) = m_inputJets.at(j1);
31  }
32 
33  return result;
34 }

References m_inputJets, position, and mps_fire::result.

Referenced by L1GctJetFinalStage::process(), L1GctWheelJetFpga::process(), and L1GctJetFinderBase::sortJets().

◆ setJets()

void L1GctJetSorter::setJets ( L1GctJetSorter::JetVector inputJets)

Member Data Documentation

◆ m_inputJets

JetVector L1GctJetSorter::m_inputJets
private

Definition at line 24 of file L1GctJetSorter.h.

Referenced by getInputJets(), getSortedJets(), and setJets().

HLT_FULL_cff.inputJets
inputJets
Definition: HLT_FULL_cff.py:98468
L1GctJetSorter::JetVector
std::vector< L1GctJetCand > JetVector
Definition: L1GctJetSorter.h:11
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
mps_fire.result
result
Definition: mps_fire.py:311
L1GctJetSorter::m_inputJets
JetVector m_inputJets
Definition: L1GctJetSorter.h:24