CMS 3D CMS Logo

L1GctJetSorter Class Reference

#include <L1Trigger/GlobalCaloTrigger/interface/L1GctJetSorter.h>

List of all members.

Public Types

typedef std::vector< L1GctJetCandJetVector

Public Member Functions

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

Private Attributes

JetVector m_inputJets


Detailed Description

Definition at line 8 of file L1GctJetSorter.h.


Member Typedef Documentation

typedef std::vector<L1GctJetCand> L1GctJetSorter::JetVector

Definition at line 12 of file L1GctJetSorter.h.


Constructor & Destructor Documentation

L1GctJetSorter::L1GctJetSorter (  ) 

Definition at line 5 of file L1GctJetSorter.cc.

L1GctJetSorter::L1GctJetSorter ( L1GctJetSorter::JetVector inputJets  ) 

Definition at line 7 of file L1GctJetSorter.cc.

00007                                                                  :
00008   m_inputJets(inputJets) {}

L1GctJetSorter::~L1GctJetSorter (  ) 

Definition at line 10 of file L1GctJetSorter.cc.

00010 {}


Member Function Documentation

L1GctJetSorter::JetVector L1GctJetSorter::getInputJets (  )  const

Definition at line 38 of file L1GctJetSorter.cc.

References m_inputJets.

00038 { return m_inputJets; }

L1GctJetSorter::JetVector L1GctJetSorter::getSortedJets (  )  const

Definition at line 14 of file L1GctJetSorter.cc.

References j2, m_inputJets, and HLT_VtxMuL3::result.

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

00014                                                             {
00015   unsigned nJets = m_inputJets.size();
00016   std::vector<unsigned> position(nJets, 0);
00017   // Replicate the firmware jet sorting algorithm.
00018   // If two jets in the input array have equal rank,
00019   // the one that occurs first in the array has higher priority.
00020   for (unsigned j1=0; j1<nJets; j1++) {
00021     for (unsigned j2=j1+1; j2<nJets; j2++) {
00022       if (m_inputJets.at(j1).rank() < m_inputJets.at(j2).rank()) {
00023         position.at(j1) = position.at(j1) + 1;
00024       } else {
00025         position.at(j2) = position.at(j2) + 1;
00026       }
00027     }
00028   }
00029 
00030   JetVector result(m_inputJets.size());
00031   for (unsigned j1=0; j1<nJets; j1++) {
00032     result.at(position.at(j1)) = m_inputJets.at(j1);
00033   }
00034 
00035   return result;
00036 }

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

Definition at line 12 of file L1GctJetSorter.cc.

References m_inputJets.

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

00012 { m_inputJets = inputJets; }


Member Data Documentation

JetVector L1GctJetSorter::m_inputJets [private]

Definition at line 25 of file L1GctJetSorter.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:38 2009 for CMSSW by  doxygen 1.5.4