Class that sorts electron candidates. More...
#include <L1GctElectronSorter.h>
Classes | |
struct | prioritisedEmCand |
Public Member Functions | |
void | fetchInput () override |
get input data from sources More... | |
std::vector< L1CaloEmCand > | getInputCands () |
std::vector< L1GctEmCand > | getOutputCands () |
get output candidates More... | |
L1GctElectronSorter (int nInputs, bool iso) | |
constructor; set type (isolated or non-isolated) More... | |
void | process () override |
process the data, fill output buffers More... | |
void | setInputEmCand (const L1CaloEmCand &cand) |
set input candidate More... | |
~L1GctElectronSorter () override | |
Public Member Functions inherited from L1GctProcessor | |
L1GctProcessor () | |
void | reset () |
complete reset of processor More... | |
void | setBxRange (const int firstBx, const int numberOfBx) |
define the bunch crossing range to process More... | |
void | setNextBx (const int bxnum) |
clear input data buffers and process a new bunch crossing More... | |
void | setTerse () |
bool | setupOk () const |
Method to check the setup for this processor. Returns true by default. More... | |
void | setVerbose () |
control output messages More... | |
virtual | ~L1GctProcessor () |
Static Public Member Functions | |
static bool | rankByGt (const prioritisedEmCand &x, const prioritisedEmCand &y) |
Protected Member Functions | |
void | resetPipelines () override |
void | resetProcessor () override |
Separate reset methods for the processor itself and any data stored in pipelines. More... | |
void | setupObjects () override |
Initialise inputs with null objects for the correct bunch crossing if required. More... | |
Protected Member Functions inherited from L1GctProcessor | |
int | bxAbs () const |
int | bxMax () const |
int | bxMin () const |
Support for multiple beam crossing operation. More... | |
int | bxRel () const |
int | numOfBx () const |
Private Attributes | |
int | m_id |
algo ID (is it FPGA 1 or 2 processing) More... | |
std::vector< L1CaloEmCand > | m_inputCands |
input data More... | |
bool | m_isolation |
type of electron to sort (isolated = 0 or non isolated = 1) More... | |
std::vector< L1GctEmCand > | m_outputCands |
output data More... | |
Friends | |
std::ostream & | operator<< (std::ostream &s, const L1GctElectronSorter &card) |
overload of cout operator More... | |
Additional Inherited Members | |
Protected Attributes inherited from L1GctProcessor | |
bool | m_verbose |
Flag to control output messages. More... | |
Class that sorts electron candidates.
L1GctElectronSorter This class can be constructed to sort iso or non-iso electron candidates. The electrons are sorted in ascending order and the 4 highest in rank will be returned. It represents the 1st stage sorter FPGA's on the electron leaf cards.
Definition at line 27 of file L1GctElectronSorter.h.
L1GctElectronSorter::L1GctElectronSorter | ( | int | nInputs, |
bool | iso | ||
) |
constructor; set type (isolated or non-isolated)
Definition at line 4 of file L1GctElectronSorter.cc.
Referenced by rankByGt().
|
override |
|
overridevirtual |
get input data from sources
Implements L1GctProcessor.
Definition at line 37 of file L1GctElectronSorter.cc.
Referenced by rankByGt().
|
inline |
get input candidates
Definition at line 71 of file L1GctElectronSorter.h.
References m_inputCands.
|
inline |
get output candidates
Definition at line 74 of file L1GctElectronSorter.h.
References m_outputCands, operator<<, resetProcessor(), and alignCSCRings::s.
Referenced by L1GctElectronFinalSort::fetchInput().
|
overridevirtual |
process the data, fill output buffers
Implements L1GctProcessor.
Definition at line 42 of file L1GctElectronSorter.cc.
References EnergyCorrector::c, data, mps_fire::i, m_inputCands, m_outputCands, rankByGt(), and jetUpdater_cfi::sort.
Referenced by rankByGt().
|
inlinestatic |
comparison operator for sort, used here and in the ElectronFinalSort Candidates of equal rank are sorted by priority, with the lower value given precedence
Definition at line 52 of file L1GctElectronSorter.h.
References fetchInput(), L1GctElectronSorter(), L1GctElectronSorter::prioritisedEmCand::priority, process(), L1GctElectronSorter::prioritisedEmCand::rank(), setInputEmCand(), and ~L1GctElectronSorter().
Referenced by L1GctElectronFinalSort::process(), and process().
|
inlineoverrideprotectedvirtual |
Implements L1GctProcessor.
Definition at line 82 of file L1GctElectronSorter.h.
References setupObjects().
|
overrideprotectedvirtual |
Separate reset methods for the processor itself and any data stored in pipelines.
Implements L1GctProcessor.
Definition at line 17 of file L1GctElectronSorter.cc.
References m_id, m_inputCands, and m_outputCands.
Referenced by getOutputCands().
void L1GctElectronSorter::setInputEmCand | ( | const L1CaloEmCand & | cand | ) |
set input candidate
Definition at line 62 of file L1GctElectronSorter.cc.
References mps_fire::i, L1CaloEmCand::index(), input, m_id, m_inputCands, and L1CaloEmCand::rctCrate().
Referenced by rankByGt().
|
overrideprotectedvirtual |
Initialise inputs with null objects for the correct bunch crossing if required.
Initialise inputs with null objects for the correct bunch crossing If no other input candidates "arrive", we have the correct bunch crossing to propagate through the processing.
Create a null input electron with the right bunch crossing, and fill the input candidates with copies of this.
Implements L1GctProcessor.
Definition at line 28 of file L1GctElectronSorter.cc.
References L1GctProcessor::bxAbs(), m_id, m_inputCands, L1CaloEmCand::setBx(), and groupFilesInBlocks::temp.
Referenced by resetPipelines().
|
friend |
overload of cout operator
Definition at line 77 of file L1GctElectronSorter.cc.
Referenced by getOutputCands().
|
private |
algo ID (is it FPGA 1 or 2 processing)
Definition at line 90 of file L1GctElectronSorter.h.
Referenced by resetProcessor(), setInputEmCand(), and setupObjects().
|
private |
input data
Definition at line 96 of file L1GctElectronSorter.h.
Referenced by getInputCands(), operator<<(), process(), resetProcessor(), setInputEmCand(), and setupObjects().
|
private |
type of electron to sort (isolated = 0 or non isolated = 1)
Definition at line 93 of file L1GctElectronSorter.h.
Referenced by operator<<().
|
private |
output data
Definition at line 99 of file L1GctElectronSorter.h.
Referenced by getOutputCands(), operator<<(), process(), and resetProcessor().