Emulates the GCT global energy algorithms. More...
#include <L1GctGlobalEnergyAlgos.h>
Public Types | |
typedef L1GctWheelEnergyFpga::etComponentType | etComponentType |
typedef L1GctUnsignedInt < L1GctEtHad::kEtHadNBits > | etHadType |
typedef L1GctMet::etmiss_vec | etmiss_vec |
typedef L1GctMet::etMissPhiType | etMissPhiType |
typedef L1GctMet::etMissType | etMissType |
typedef L1GctUnsignedInt < L1GctEtTotal::kEtTotalNBits > | etTotalType |
enum | maxValues { etTotalMaxValue = L1GctEtTotal::kEtTotalMaxValue, etHadMaxValue = L1GctEtHad::kEtHadMaxValue, etMissMaxValue = L1GctEtMiss::kEtMissMaxValue } |
Public Member Functions | |
virtual void | fetchInput () |
get input data from sources | |
std::vector< etHadType > | getEtHadColl () const |
return std::vector< output calibrated jet Et | |
std::vector< etMissType > | getEtMissColl () const |
std::vector< etMissPhiType > | getEtMissPhiColl () const |
return output missing Et value | |
std::vector< etTotalType > | getEtSumColl () const |
return output total scalar Et | |
L1GctGlobalHfSumAlgos * | getHfSumProcessor () const |
provide access to hf sum processor | |
std::vector< etMissType > | getHtMissColl () const |
return output missing Ht magnitude | |
const L1GctHtMissLut * | getHtMissLut () const |
std::vector< etMissPhiType > | getHtMissPhiColl () const |
return output missing Ht value | |
std::vector< etTotalType > | getInputEtValPlusWheel () const |
return input Et value wheel 1 | |
std::vector< etTotalType > | getInputEtVlMinusWheel () const |
return input Et value wheel 0 | |
std::vector< etComponentType > | getInputExValPlusWheel () const |
return input Ex value wheel 1 | |
std::vector< etComponentType > | getInputExVlMinusWheel () const |
return input Ey value wheel 0 | |
std::vector< etComponentType > | getInputEyValPlusWheel () const |
return input Ex value wheel 1 | |
std::vector< etComponentType > | getInputEyVlMinusWheel () const |
return input Ey value wheel 0 | |
std::vector< etHadType > | getInputHtValPlusWheel () const |
return input Ht value wheel 1 | |
std::vector< etHadType > | getInputHtVlMinusWheel () const |
return input Ht value wheel 0 | |
std::vector< etComponentType > | getInputHxValPlusWheel () const |
return input Ht component values wheel 1 | |
std::vector< etComponentType > | getInputHxVlMinusWheel () const |
return input Ht value wheel 0 | |
std::vector< etComponentType > | getInputHyValPlusWheel () const |
std::vector< etComponentType > | getInputHyVlMinusWheel () const |
L1GctWheelEnergyFpga * | getMinusWheelFpga () const |
provide access to input pointer, Wheel Energy Fpga 0 | |
L1GctWheelJetFpga * | getMinusWheelJetFpga () const |
provide access to input pointer, Wheel Jet Fpga 0 | |
L1GctWheelEnergyFpga * | getPlusWheelFpga () const |
provide access to input pointer, Wheel Energy Fpga 1 | |
L1GctWheelJetFpga * | getPlusWheelJetFpga () const |
provide access to input pointer, Wheel Jet Fpga 1 | |
L1GctGlobalEnergyAlgos (std::vector< L1GctWheelEnergyFpga * > WheelFpga, std::vector< L1GctWheelJetFpga * > WheelJetFpga) | |
Constructor needs the Wheel card Fpgas set up first. | |
virtual void | process () |
process the data, fill output buffers | |
void | reset () |
clear internal buffers | |
void | setBxRange (const int firstBx, const int numberOfBx) |
define the bunch crossing range to process | |
void | setHtMissScale (const L1CaloEtScale *const scale) |
void | setInputWheelEt (unsigned wheel, unsigned energy, bool overflow) |
set input Et value per wheel (0 or 1); not used in normal operation | |
void | setInputWheelEx (unsigned wheel, int energy, bool overflow) |
set input Ex value per wheel (0 or 1); not used in normal operation | |
void | setInputWheelEy (unsigned wheel, int energy, bool overflow) |
set input Ey value per wheel (0 or 1); not used in normal operation | |
void | setInputWheelHt (unsigned wheel, unsigned energy, bool overflow) |
set input Ht value per wheel (0 or 1); not used in normal operation | |
void | setInputWheelHx (unsigned wheel, unsigned energy, bool overflow) |
set input Ht component values per wheel (0 or 1); not used in normal operation | |
void | setInputWheelHy (unsigned wheel, unsigned energy, bool overflow) |
void | setInputWheelJc (unsigned wheel, unsigned jcnum, unsigned count) |
set input jet count (number 0-11) per wheel (0 or 1); not used in normal operation | |
void | setJetFinderParams (const L1GctJetFinderParams *const jfpars) |
void | setNextBx (const int bx) |
partially clear buffers | |
bool | setupOk () const |
check setup | |
~L1GctGlobalEnergyAlgos () | |
Destructor. | |
Protected Member Functions | |
virtual void | resetPipelines () |
virtual void | resetProcessor () |
Separate reset methods for the processor itself and any data stored in pipelines. | |
virtual void | setupObjects () |
Initialise inputs with null objects for the correct bunch crossing if required. | |
Private Attributes | |
Pipeline< etTotalType > | m_etValPlusPipe |
etTotalType | m_etValPlusWheel |
Pipeline< etTotalType > | m_etVlMinusPipe |
etTotalType | m_etVlMinusWheel |
Pipeline< etComponentType > | m_exValPlusPipe |
etComponentType | m_exValPlusWheel |
Pipeline< etComponentType > | m_exVlMinusPipe |
etComponentType | m_exVlMinusWheel |
Pipeline< etComponentType > | m_eyValPlusPipe |
etComponentType | m_eyValPlusWheel |
Pipeline< etComponentType > | m_eyVlMinusPipe |
etComponentType | m_eyVlMinusWheel |
L1GctGlobalHfSumAlgos * | m_hfSumProcessor |
Pipeline< etHadType > | m_htValPlusPipe |
etHadType | m_htValPlusWheel |
Pipeline< etHadType > | m_htVlMinusPipe |
etHadType | m_htVlMinusWheel |
Pipeline< etComponentType > | m_hxValPlusPipe |
etComponentType | m_hxValPlusWheel |
Pipeline< etComponentType > | m_hxVlMinusPipe |
etComponentType | m_hxVlMinusWheel |
Pipeline< etComponentType > | m_hyValPlusPipe |
etComponentType | m_hyValPlusWheel |
Pipeline< etComponentType > | m_hyVlMinusPipe |
etComponentType | m_hyVlMinusWheel |
L1GctMet | m_metComponents |
L1GctMet | m_mhtComponents |
L1GctWheelEnergyFpga * | m_minusWheelFpga |
L1GctWheelJetFpga * | m_minusWheelJetFpga |
Pipeline< etHadType > | m_outputEtHad |
Pipeline< etMissType > | m_outputEtMiss |
Pipeline< etMissPhiType > | m_outputEtMissPhi |
Pipeline< etTotalType > | m_outputEtSum |
Pipeline< etMissType > | m_outputHtMiss |
Pipeline< etMissPhiType > | m_outputHtMissPhi |
L1GctWheelEnergyFpga * | m_plusWheelFpga |
L1GctWheelJetFpga * | m_plusWheelJetFpga |
bool | m_setupOk |
Friends | |
std::ostream & | operator<< (std::ostream &os, const L1GctGlobalEnergyAlgos &fpga) |
Overload << operator. |
Emulates the GCT global energy algorithms.
This class carries out the final stage of summing of total Et, missing Et components Ex and Ey, calibrated jet energy Ht, and jet counts. It converts the final missing Ex and Ey sums to magnitude and direction. The inputs come from the two Wheel cards and the outputs are sent to the Global Trigger.
Definition at line 34 of file L1GctGlobalEnergyAlgos.h.
Definition at line 43 of file L1GctGlobalEnergyAlgos.h.
typedef L1GctUnsignedInt< L1GctEtHad::kEtHadNBits > L1GctGlobalEnergyAlgos::etHadType |
Definition at line 39 of file L1GctGlobalEnergyAlgos.h.
Definition at line 42 of file L1GctGlobalEnergyAlgos.h.
Definition at line 41 of file L1GctGlobalEnergyAlgos.h.
Definition at line 40 of file L1GctGlobalEnergyAlgos.h.
typedef L1GctUnsignedInt< L1GctEtTotal::kEtTotalNBits > L1GctGlobalEnergyAlgos::etTotalType |
Definition at line 38 of file L1GctGlobalEnergyAlgos.h.
Definition at line 45 of file L1GctGlobalEnergyAlgos.h.
L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos | ( | std::vector< L1GctWheelEnergyFpga * > | WheelFpga, |
std::vector< L1GctWheelJetFpga * > | WheelJetFpga | ||
) |
Constructor needs the Wheel card Fpgas set up first.
Definition at line 16 of file L1GctGlobalEnergyAlgos.cc.
References m_hfSumProcessor, m_metComponents, m_mhtComponents, m_minusWheelFpga, m_minusWheelJetFpga, m_plusWheelFpga, m_plusWheelJetFpga, m_setupOk, L1GctProcessor::m_verbose, L1GctMet::setBitShift(), and L1GctGlobalHfSumAlgos::setupOk().
: L1GctProcessor(), m_plusWheelFpga(wheelFpga.at(1)), m_minusWheelFpga(wheelFpga.at(0)), m_plusWheelJetFpga(wheelJetFpga.at(1)), m_minusWheelJetFpga(wheelJetFpga.at(0)), m_metComponents(0,0, L1GctMet::cordicTranslate), m_mhtComponents(0,0, L1GctMet::useHtMissLut), m_exValPlusWheel(), m_eyValPlusWheel(), m_etValPlusWheel(), m_htValPlusWheel(), m_exVlMinusWheel(), m_eyVlMinusWheel(), m_etVlMinusWheel(), m_htVlMinusWheel(), m_exValPlusPipe(), m_eyValPlusPipe(), m_etValPlusPipe(), m_htValPlusPipe(), m_exVlMinusPipe(), m_eyVlMinusPipe(), m_etVlMinusPipe(), m_htVlMinusPipe(), m_outputEtMiss(), m_outputEtMissPhi(), m_outputEtSum(), m_outputEtHad(), m_setupOk(true) { if(wheelFpga.size() != 2) { m_setupOk = false; if (m_verbose) { edm::LogWarning("L1GctSetupError") << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() : Global Energy Algos has been incorrectly constructed!\n" << "This class needs two wheel card pointers. " << "Number of wheel card pointers present is " << wheelFpga.size() << ".\n"; } } if(wheelJetFpga.size() != 2) { m_setupOk = false; if (m_verbose) { edm::LogWarning("L1GctSetupError") << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() : Global Energy Algos has been incorrectly constructed!\n" << "This class needs two wheel jet fpga pointers. " << "Number of wheel jet fpga pointers present is " << wheelJetFpga.size() << ".\n"; } } if(m_plusWheelFpga == 0) { m_setupOk = false; if (m_verbose) { edm::LogWarning("L1GctSetupError") << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() has been incorrectly constructed!\n" << "Plus Wheel Fpga pointer has not been set!\n"; } } if(m_minusWheelFpga == 0) { m_setupOk = false; if (m_verbose) { edm::LogWarning("L1GctSetupError") << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() has been incorrectly constructed!\n" << "Minus Wheel Fpga pointer has not been set!\n"; } } if(m_plusWheelJetFpga == 0) { m_setupOk = false; if (m_verbose) { edm::LogWarning("L1GctSetupError") << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() has been incorrectly constructed!\n" << "Plus Wheel Jet Fpga pointer has not been set!\n"; } } if(m_minusWheelJetFpga == 0) { m_setupOk = false; if (m_verbose) { edm::LogWarning("L1GctSetupError") << "L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos() has been incorrectly constructed!\n" << "Minus Wheel Jet Fpga pointer has not been set!\n"; } } // Set the scale for missing Et and missing Ht // Missing Et has one extra bit of precision added in the (Ex, Ey) // conversion step, so we reverse this here. m_metComponents.setBitShift(1); // Missing Ht has its own bit shifting before the LUT, so we don't // need any extra m_mhtComponents.setBitShift(0); // Setup to perform the Hf sums m_hfSumProcessor = new L1GctGlobalHfSumAlgos(wheelJetFpga); m_setupOk &= m_hfSumProcessor->setupOk(); if (!m_setupOk && m_verbose) { edm::LogError("L1GctSetupError") << "L1GctGlobalEnergyAlgos has been incorrectly constructed"; } }
L1GctGlobalEnergyAlgos::~L1GctGlobalEnergyAlgos | ( | ) |
Destructor.
Definition at line 114 of file L1GctGlobalEnergyAlgos.cc.
References m_hfSumProcessor.
{ if (m_hfSumProcessor != 0) { delete m_hfSumProcessor; } }
void L1GctGlobalEnergyAlgos::fetchInput | ( | ) | [virtual] |
get input data from sources
Implements L1GctProcessor.
Definition at line 202 of file L1GctGlobalEnergyAlgos.cc.
References L1GctGlobalHfSumAlgos::fetchInput(), L1GctWheelEnergyFpga::getOutputEt(), L1GctWheelEnergyFpga::getOutputEx(), L1GctWheelEnergyFpga::getOutputEy(), L1GctWheelEnergyFpga::getOutputHt(), L1GctWheelJetFpga::getOutputHx(), L1GctWheelJetFpga::getOutputHy(), m_etValPlusWheel, m_etVlMinusWheel, m_exValPlusWheel, m_exVlMinusWheel, m_eyValPlusWheel, m_eyVlMinusWheel, m_hfSumProcessor, m_htValPlusWheel, m_htVlMinusWheel, m_hxValPlusWheel, m_hxVlMinusWheel, m_hyValPlusWheel, m_hyVlMinusWheel, m_minusWheelFpga, m_minusWheelJetFpga, m_plusWheelFpga, m_plusWheelJetFpga, and m_setupOk.
Referenced by L1GlobalCaloTrigger::bxProcess().
{ if (m_setupOk) { // input from WheelEnergyFpgas m_exValPlusWheel = m_plusWheelFpga->getOutputEx(); m_eyValPlusWheel = m_plusWheelFpga->getOutputEy(); m_etValPlusWheel = m_plusWheelFpga->getOutputEt(); m_htValPlusWheel = m_plusWheelFpga->getOutputHt(); m_hxValPlusWheel = m_plusWheelJetFpga->getOutputHx(); m_hyValPlusWheel = m_plusWheelJetFpga->getOutputHy(); m_exVlMinusWheel = m_minusWheelFpga->getOutputEx(); m_eyVlMinusWheel = m_minusWheelFpga->getOutputEy(); m_etVlMinusWheel = m_minusWheelFpga->getOutputEt(); m_htVlMinusWheel = m_minusWheelFpga->getOutputHt(); m_hxVlMinusWheel = m_minusWheelJetFpga->getOutputHx(); m_hyVlMinusWheel = m_minusWheelJetFpga->getOutputHy(); m_hfSumProcessor->fetchInput(); } }
std::vector< etHadType > L1GctGlobalEnergyAlgos::getEtHadColl | ( | ) | const [inline] |
return std::vector< output calibrated jet Et
Definition at line 132 of file L1GctGlobalEnergyAlgos.h.
References m_outputEtHad.
Referenced by L1GlobalCaloTrigger::getEtHadCollection().
{ return m_outputEtHad.contents; }
std::vector< etMissType > L1GctGlobalEnergyAlgos::getEtMissColl | ( | ) | const [inline] |
Access to output quantities for all bunch crossings return output missing Et magnitude
Definition at line 126 of file L1GctGlobalEnergyAlgos.h.
References m_outputEtMiss.
Referenced by L1GlobalCaloTrigger::getEtMissCollection().
{ return m_outputEtMiss.contents; }
std::vector< etMissPhiType > L1GctGlobalEnergyAlgos::getEtMissPhiColl | ( | ) | const [inline] |
return output missing Et value
Definition at line 128 of file L1GctGlobalEnergyAlgos.h.
References m_outputEtMissPhi.
Referenced by L1GlobalCaloTrigger::getEtMissCollection().
{ return m_outputEtMissPhi.contents; }
std::vector< etTotalType > L1GctGlobalEnergyAlgos::getEtSumColl | ( | ) | const [inline] |
return output total scalar Et
Definition at line 130 of file L1GctGlobalEnergyAlgos.h.
References m_outputEtSum.
Referenced by L1GlobalCaloTrigger::getEtSumCollection().
{ return m_outputEtSum.contents; }
L1GctGlobalHfSumAlgos* L1GctGlobalEnergyAlgos::getHfSumProcessor | ( | ) | const [inline] |
provide access to hf sum processor
Definition at line 99 of file L1GctGlobalEnergyAlgos.h.
References m_hfSumProcessor.
Referenced by L1GctPrintLuts::analyze(), and L1GlobalCaloTrigger::getHfSumProcessor().
{ return m_hfSumProcessor; }
std::vector< etMissType > L1GctGlobalEnergyAlgos::getHtMissColl | ( | ) | const [inline] |
return output missing Ht magnitude
Definition at line 134 of file L1GctGlobalEnergyAlgos.h.
References m_outputHtMiss.
Referenced by L1GlobalCaloTrigger::getHtMissCollection().
{ return m_outputHtMiss.contents; }
const L1GctHtMissLut* L1GctGlobalEnergyAlgos::getHtMissLut | ( | ) | const [inline] |
Definition at line 142 of file L1GctGlobalEnergyAlgos.h.
References L1GctMet::getHtMissLut(), and m_mhtComponents.
Referenced by L1GctPrintLuts::analyze().
{ return m_mhtComponents.getHtMissLut(); }
std::vector< etMissPhiType > L1GctGlobalEnergyAlgos::getHtMissPhiColl | ( | ) | const [inline] |
return output missing Ht value
Definition at line 136 of file L1GctGlobalEnergyAlgos.h.
References m_outputHtMissPhi.
Referenced by L1GlobalCaloTrigger::getHtMissCollection().
{ return m_outputHtMissPhi.contents; }
std::vector< etTotalType > L1GctGlobalEnergyAlgos::getInputEtValPlusWheel | ( | ) | const [inline] |
return input Et value wheel 1
Definition at line 110 of file L1GctGlobalEnergyAlgos.h.
References m_etValPlusPipe.
{ return m_etValPlusPipe.contents; }
std::vector< etTotalType > L1GctGlobalEnergyAlgos::getInputEtVlMinusWheel | ( | ) | const [inline] |
return input Et value wheel 0
Definition at line 117 of file L1GctGlobalEnergyAlgos.h.
References m_etVlMinusPipe.
{ return m_etVlMinusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputExValPlusWheel | ( | ) | const [inline] |
return input Ex value wheel 1
Definition at line 102 of file L1GctGlobalEnergyAlgos.h.
References m_exValPlusPipe.
{ return m_exValPlusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputExVlMinusWheel | ( | ) | const [inline] |
return input Ey value wheel 0
Definition at line 106 of file L1GctGlobalEnergyAlgos.h.
References m_exVlMinusPipe.
{ return m_exVlMinusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputEyValPlusWheel | ( | ) | const [inline] |
return input Ex value wheel 1
Definition at line 104 of file L1GctGlobalEnergyAlgos.h.
References m_eyValPlusPipe.
{ return m_eyValPlusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputEyVlMinusWheel | ( | ) | const [inline] |
return input Ey value wheel 0
Definition at line 108 of file L1GctGlobalEnergyAlgos.h.
References m_eyVlMinusPipe.
{ return m_eyVlMinusPipe.contents; }
std::vector< etHadType > L1GctGlobalEnergyAlgos::getInputHtValPlusWheel | ( | ) | const [inline] |
return input Ht value wheel 1
Definition at line 112 of file L1GctGlobalEnergyAlgos.h.
References m_htValPlusPipe.
{ return m_htValPlusPipe.contents; }
std::vector< etHadType > L1GctGlobalEnergyAlgos::getInputHtVlMinusWheel | ( | ) | const [inline] |
return input Ht value wheel 0
Definition at line 119 of file L1GctGlobalEnergyAlgos.h.
References m_htVlMinusPipe.
{ return m_htVlMinusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputHxValPlusWheel | ( | ) | const [inline] |
return input Ht component values wheel 1
Definition at line 114 of file L1GctGlobalEnergyAlgos.h.
References m_hxValPlusPipe.
{ return m_hxValPlusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputHxVlMinusWheel | ( | ) | const [inline] |
return input Ht value wheel 0
Definition at line 121 of file L1GctGlobalEnergyAlgos.h.
References m_hxVlMinusPipe.
{ return m_hxVlMinusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputHyValPlusWheel | ( | ) | const [inline] |
Definition at line 115 of file L1GctGlobalEnergyAlgos.h.
References m_hyValPlusPipe.
{ return m_hyValPlusPipe.contents; }
std::vector< etComponentType > L1GctGlobalEnergyAlgos::getInputHyVlMinusWheel | ( | ) | const [inline] |
Definition at line 122 of file L1GctGlobalEnergyAlgos.h.
References m_hyVlMinusPipe.
{ return m_hyVlMinusPipe.contents; }
L1GctWheelEnergyFpga* L1GctGlobalEnergyAlgos::getMinusWheelFpga | ( | ) | const [inline] |
provide access to input pointer, Wheel Energy Fpga 0
Definition at line 93 of file L1GctGlobalEnergyAlgos.h.
References m_minusWheelFpga.
{ return m_minusWheelFpga; }
L1GctWheelJetFpga* L1GctGlobalEnergyAlgos::getMinusWheelJetFpga | ( | ) | const [inline] |
provide access to input pointer, Wheel Jet Fpga 0
Definition at line 97 of file L1GctGlobalEnergyAlgos.h.
References m_minusWheelJetFpga.
{ return m_minusWheelJetFpga; }
L1GctWheelEnergyFpga* L1GctGlobalEnergyAlgos::getPlusWheelFpga | ( | ) | const [inline] |
provide access to input pointer, Wheel Energy Fpga 1
Definition at line 91 of file L1GctGlobalEnergyAlgos.h.
References m_plusWheelFpga.
{ return m_plusWheelFpga; }
L1GctWheelJetFpga* L1GctGlobalEnergyAlgos::getPlusWheelJetFpga | ( | ) | const [inline] |
provide access to input pointer, Wheel Jet Fpga 1
Definition at line 95 of file L1GctGlobalEnergyAlgos.h.
References m_plusWheelJetFpga.
{ return m_plusWheelJetFpga; }
void L1GctGlobalEnergyAlgos::process | ( | ) | [virtual] |
process the data, fill output buffers
Implements L1GctProcessor.
Definition at line 225 of file L1GctGlobalEnergyAlgos.cc.
References L1GctProcessor::bxRel(), etHadMaxValue, etMissMaxValue, etTotalMaxValue, m_etValPlusPipe, m_etValPlusWheel, m_etVlMinusPipe, m_etVlMinusWheel, m_exValPlusPipe, m_exValPlusWheel, m_exVlMinusPipe, m_exVlMinusWheel, m_eyValPlusPipe, m_eyValPlusWheel, m_eyVlMinusPipe, m_eyVlMinusWheel, m_hfSumProcessor, m_htValPlusPipe, m_htValPlusWheel, m_htVlMinusPipe, m_htVlMinusWheel, m_hxValPlusPipe, m_hxValPlusWheel, m_hxVlMinusPipe, m_hxVlMinusWheel, m_hyValPlusPipe, m_hyValPlusWheel, m_hyVlMinusPipe, m_hyVlMinusWheel, m_metComponents, m_mhtComponents, m_outputEtHad, m_outputEtMiss, m_outputEtMissPhi, m_outputEtSum, m_outputHtMiss, m_outputHtMissPhi, m_setupOk, L1GctMet::etmiss_vec::mag, L1GctMet::metVector(), L1GctUnsignedInt< nBits >::overFlow(), L1GctMet::etmiss_vec::phi, L1GctGlobalHfSumAlgos::process(), L1GctMet::setComponents(), L1GctUnsignedInt< nBits >::setOverFlow(), L1GctUnsignedInt< nBits >::setValue(), and L1GctUnsignedInt< nBits >::value().
Referenced by L1GlobalCaloTrigger::bxProcess().
{ if (m_setupOk) { // Store the inputs in pipelines m_exValPlusPipe.store(m_exValPlusWheel, bxRel()); m_eyValPlusPipe.store(m_eyValPlusWheel, bxRel()); m_etValPlusPipe.store(m_etValPlusWheel, bxRel()); m_htValPlusPipe.store(m_htValPlusWheel, bxRel()); m_hxValPlusPipe.store(m_hxValPlusWheel, bxRel()); m_hyValPlusPipe.store(m_hyValPlusWheel, bxRel()); m_exVlMinusPipe.store(m_exVlMinusWheel, bxRel()); m_eyVlMinusPipe.store(m_eyVlMinusWheel, bxRel()); m_etVlMinusPipe.store(m_etVlMinusWheel, bxRel()); m_htVlMinusPipe.store(m_htVlMinusWheel, bxRel()); m_hxVlMinusPipe.store(m_hxVlMinusWheel, bxRel()); m_hyVlMinusPipe.store(m_hyVlMinusWheel, bxRel()); // Process to produce the outputs etComponentType ExSum, EySum; etmiss_vec EtMissing, HtMissing; // //----------------------------------------------------------------------------- // Form the Ex and Ey sums ExSum = m_exValPlusWheel + m_exVlMinusWheel; EySum = m_eyValPlusWheel + m_eyVlMinusWheel; // Execute the missing Et algorithm // Rotate by pi to evaluate MISSING Et. // Implement this in the same way as the firmware m_metComponents.setComponents(ExSum, EySum); EtMissing = m_metComponents.metVector(); if (EtMissing.phi.value() > 35) { EtMissing.phi.setValue(EtMissing.phi.value() - 36); } else { EtMissing.phi.setValue(EtMissing.phi.value() + 36); } if (EtMissing.mag.value() == etMissMaxValue) EtMissing.mag.setOverFlow(true); m_outputEtMiss.store (EtMissing.mag, bxRel()); m_outputEtMissPhi.store (EtMissing.phi, bxRel()); // //----------------------------------------------------------------------------- // Form the Hx and Hy sums ExSum = m_hxValPlusWheel + m_hxVlMinusWheel; EySum = m_hyValPlusWheel + m_hyVlMinusWheel; // Execute the missing Et algorithm // Implement this in the same way as the firmware m_mhtComponents.setComponents(ExSum, EySum); HtMissing = m_mhtComponents.metVector(); if (HtMissing.phi.value() > 8) { HtMissing.phi.setValue(HtMissing.phi.value() - 9); } else { HtMissing.phi.setValue(HtMissing.phi.value() + 9); } // Store 7 bits of magnitude and 5 bits of phi angle. static const unsigned MAX_HT_VALUE = 0x7f; static const unsigned PHI_HT_MASK = 0x1f; if ( (HtMissing.mag.value() > MAX_HT_VALUE) || (HtMissing.mag.overFlow()) ) { HtMissing.mag.setValue(MAX_HT_VALUE); } HtMissing.phi.setValue(HtMissing.phi.value() & PHI_HT_MASK); m_outputHtMiss.store (HtMissing.mag, bxRel()); m_outputHtMissPhi.store (HtMissing.phi, bxRel()); // //----------------------------------------------------------------------------- // Form the Et and Ht sums etTotalType ettTemp = m_etValPlusWheel + m_etVlMinusWheel; if (ettTemp.overFlow()) ettTemp.setValue(etTotalMaxValue); etHadType httTemp = m_htValPlusWheel + m_htVlMinusWheel; if (httTemp.overFlow()) httTemp.setValue(etHadMaxValue); m_outputEtSum.store (ettTemp, bxRel()); m_outputEtHad.store (httTemp, bxRel()); m_hfSumProcessor->process(); } }
void L1GctGlobalEnergyAlgos::reset | ( | void | ) |
clear internal buffers
clear buffers
Reimplemented from L1GctProcessor.
Definition at line 147 of file L1GctGlobalEnergyAlgos.cc.
References m_hfSumProcessor, and L1GctProcessor::reset().
Referenced by L1GlobalCaloTrigger::reset().
{ L1GctProcessor::reset(); m_hfSumProcessor->reset(); }
void L1GctGlobalEnergyAlgos::resetPipelines | ( | ) | [protected, virtual] |
Implements L1GctProcessor.
Definition at line 178 of file L1GctGlobalEnergyAlgos.cc.
References m_etValPlusPipe, m_etVlMinusPipe, m_exValPlusPipe, m_exVlMinusPipe, m_eyValPlusPipe, m_eyVlMinusPipe, m_htValPlusPipe, m_htVlMinusPipe, m_hxValPlusPipe, m_hxVlMinusPipe, m_hyValPlusPipe, m_hyVlMinusPipe, m_outputEtHad, m_outputEtMiss, m_outputEtMissPhi, m_outputEtSum, m_outputHtMiss, m_outputHtMissPhi, and L1GctProcessor::numOfBx().
{ m_outputEtMiss.reset (numOfBx()); m_outputEtMissPhi.reset (numOfBx()); m_outputEtSum.reset (numOfBx()); m_outputEtHad.reset (numOfBx()); m_outputHtMiss.reset (numOfBx()); m_outputHtMissPhi.reset (numOfBx()); m_exValPlusPipe.reset (numOfBx()); m_eyValPlusPipe.reset (numOfBx()); m_etValPlusPipe.reset (numOfBx()); m_htValPlusPipe.reset (numOfBx()); m_hxValPlusPipe.reset (numOfBx()); m_hyValPlusPipe.reset (numOfBx()); m_exVlMinusPipe.reset (numOfBx()); m_eyVlMinusPipe.reset (numOfBx()); m_etVlMinusPipe.reset (numOfBx()); m_htVlMinusPipe.reset (numOfBx()); m_hxVlMinusPipe.reset (numOfBx()); m_hyVlMinusPipe.reset (numOfBx()); }
void L1GctGlobalEnergyAlgos::resetProcessor | ( | ) | [protected, virtual] |
Separate reset methods for the processor itself and any data stored in pipelines.
Implements L1GctProcessor.
Definition at line 163 of file L1GctGlobalEnergyAlgos.cc.
References m_etValPlusWheel, m_etVlMinusWheel, m_exValPlusWheel, m_exVlMinusWheel, m_eyValPlusWheel, m_eyVlMinusWheel, m_htValPlusWheel, m_htVlMinusWheel, m_hxValPlusWheel, m_hxVlMinusWheel, m_hyValPlusWheel, m_hyVlMinusWheel, L1GctUnsignedInt< nBits >::reset(), and L1GctTwosComplement< nBits >::reset().
{ m_exValPlusWheel.reset(); m_exVlMinusWheel.reset(); m_eyValPlusWheel.reset(); m_eyVlMinusWheel.reset(); m_etValPlusWheel.reset(); m_etVlMinusWheel.reset(); m_htValPlusWheel.reset(); m_htVlMinusWheel.reset(); m_hxValPlusWheel.reset(); m_hxVlMinusWheel.reset(); m_hyValPlusWheel.reset(); m_hyVlMinusWheel.reset(); }
void L1GctGlobalEnergyAlgos::setBxRange | ( | const int | firstBx, |
const int | numberOfBx | ||
) |
define the bunch crossing range to process
partially clear buffers
Reimplemented from L1GctProcessor.
Definition at line 153 of file L1GctGlobalEnergyAlgos.cc.
References m_hfSumProcessor, and L1GctProcessor::setBxRange().
Referenced by L1GlobalCaloTrigger::bxSetup().
{ L1GctProcessor::setBxRange(firstBx, numberOfBx); m_hfSumProcessor->setBxRange(firstBx, numberOfBx); }
void L1GctGlobalEnergyAlgos::setHtMissScale | ( | const L1CaloEtScale *const | scale | ) |
Definition at line 316 of file L1GctGlobalEnergyAlgos.cc.
References m_mhtComponents, and L1GctMet::setEtScale().
Referenced by L1GlobalCaloTrigger::setHtMissScale().
{ m_mhtComponents.setEtScale(scale); }
void L1GctGlobalEnergyAlgos::setInputWheelEt | ( | unsigned | wheel, |
unsigned | energy, | ||
bool | overflow | ||
) |
set input Et value per wheel (0 or 1); not used in normal operation
Definition at line 362 of file L1GctGlobalEnergyAlgos.cc.
References m_etValPlusWheel, m_etVlMinusWheel, L1GctUnsignedInt< nBits >::setOverFlow(), and L1GctUnsignedInt< nBits >::setValue().
{ if (wheel==0) { m_etValPlusWheel.setValue(energy); m_etValPlusWheel.setOverFlow(overflow); } else if (wheel==1) { m_etVlMinusWheel.setValue(energy); m_etVlMinusWheel.setOverFlow(overflow); } }
void L1GctGlobalEnergyAlgos::setInputWheelEx | ( | unsigned | wheel, |
int | energy, | ||
bool | overflow | ||
) |
set input Ex value per wheel (0 or 1); not used in normal operation
Definition at line 334 of file L1GctGlobalEnergyAlgos.cc.
References m_exValPlusWheel, m_exVlMinusWheel, L1GctTwosComplement< nBits >::setOverFlow(), and L1GctTwosComplement< nBits >::setValue().
{ if (wheel==0) { m_exValPlusWheel.setValue(energy); m_exValPlusWheel.setOverFlow(overflow); } else if (wheel==1) { m_exVlMinusWheel.setValue(energy); m_exVlMinusWheel.setOverFlow(overflow); } }
void L1GctGlobalEnergyAlgos::setInputWheelEy | ( | unsigned | wheel, |
int | energy, | ||
bool | overflow | ||
) |
set input Ey value per wheel (0 or 1); not used in normal operation
Definition at line 348 of file L1GctGlobalEnergyAlgos.cc.
References m_eyValPlusWheel, m_eyVlMinusWheel, L1GctTwosComplement< nBits >::setOverFlow(), and L1GctTwosComplement< nBits >::setValue().
{ if (wheel==0) { m_eyValPlusWheel.setValue(energy); m_eyValPlusWheel.setOverFlow(overflow); } else if (wheel==1) { m_eyVlMinusWheel.setValue(energy); m_eyVlMinusWheel.setOverFlow(overflow); } }
void L1GctGlobalEnergyAlgos::setInputWheelHt | ( | unsigned | wheel, |
unsigned | energy, | ||
bool | overflow | ||
) |
set input Ht value per wheel (0 or 1); not used in normal operation
Definition at line 376 of file L1GctGlobalEnergyAlgos.cc.
References m_htValPlusWheel, m_htVlMinusWheel, L1GctUnsignedInt< nBits >::setOverFlow(), and L1GctUnsignedInt< nBits >::setValue().
{ if (wheel==0) { m_htValPlusWheel.setValue(energy); m_htValPlusWheel.setOverFlow(overflow); } else if (wheel==1) { m_htVlMinusWheel.setValue(energy); m_htVlMinusWheel.setOverFlow(overflow); } }
void L1GctGlobalEnergyAlgos::setInputWheelHx | ( | unsigned | wheel, |
unsigned | energy, | ||
bool | overflow | ||
) |
set input Ht component values per wheel (0 or 1); not used in normal operation
Definition at line 391 of file L1GctGlobalEnergyAlgos.cc.
References m_hxValPlusWheel, m_hxVlMinusWheel, L1GctTwosComplement< nBits >::setOverFlow(), and L1GctTwosComplement< nBits >::setValue().
{ if (wheel==0) { m_hxValPlusWheel.setValue(energy); m_hxValPlusWheel.setOverFlow(overflow); } else if (wheel==1) { m_hxVlMinusWheel.setValue(energy); m_hxVlMinusWheel.setOverFlow(overflow); } }
void L1GctGlobalEnergyAlgos::setInputWheelHy | ( | unsigned | wheel, |
unsigned | energy, | ||
bool | overflow | ||
) |
Definition at line 406 of file L1GctGlobalEnergyAlgos.cc.
References m_hyValPlusWheel, m_hyVlMinusWheel, L1GctTwosComplement< nBits >::setOverFlow(), and L1GctTwosComplement< nBits >::setValue().
{ if (wheel==0) { m_hyValPlusWheel.setValue(energy); m_hyValPlusWheel.setOverFlow(overflow); } else if (wheel==1) { m_hyVlMinusWheel.setValue(energy); m_hyVlMinusWheel.setOverFlow(overflow); } }
void L1GctGlobalEnergyAlgos::setInputWheelJc | ( | unsigned | wheel, |
unsigned | jcnum, | ||
unsigned | count | ||
) |
set input jet count (number 0-11) per wheel (0 or 1); not used in normal operation
void L1GctGlobalEnergyAlgos::setJetFinderParams | ( | const L1GctJetFinderParams *const | jfpars | ) |
Definition at line 309 of file L1GctGlobalEnergyAlgos.cc.
References L1GctJetFinderParams::getHtLsbGeV(), m_mhtComponents, and L1GctMet::setEtComponentLsb().
Referenced by L1GlobalCaloTrigger::setJetFinderParams().
{ // The jetFinders add an LSB when converting to x and y components, // so the scale lsb for htx and hty is half the lsb for htt. m_mhtComponents.setEtComponentLsb(jfpars->getHtLsbGeV()/2); }
void L1GctGlobalEnergyAlgos::setNextBx | ( | const int | bx | ) |
partially clear buffers
Reimplemented from L1GctProcessor.
Definition at line 158 of file L1GctGlobalEnergyAlgos.cc.
References m_hfSumProcessor, and L1GctProcessor::setNextBx().
Referenced by L1GlobalCaloTrigger::bxReset().
{ L1GctProcessor::setNextBx(bx); m_hfSumProcessor->setNextBx(bx); }
virtual void L1GctGlobalEnergyAlgos::setupObjects | ( | ) | [inline, protected, virtual] |
Initialise inputs with null objects for the correct bunch crossing if required.
Implements L1GctProcessor.
Definition at line 153 of file L1GctGlobalEnergyAlgos.h.
{}
bool L1GctGlobalEnergyAlgos::setupOk | ( | ) | const |
check setup
Reimplemented from L1GctProcessor.
Definition at line 324 of file L1GctGlobalEnergyAlgos.cc.
References m_hfSumProcessor, m_setupOk, and L1GctGlobalHfSumAlgos::setupOk().
Referenced by L1GlobalCaloTrigger::setupOk().
{ return (m_setupOk && m_hfSumProcessor != 0 && m_hfSumProcessor->setupOk()); }
std::ostream& operator<< | ( | std::ostream & | os, |
const L1GctGlobalEnergyAlgos & | fpga | ||
) | [friend] |
Overload << operator.
Pipeline< etTotalType > L1GctGlobalEnergyAlgos::m_etValPlusPipe [private] |
Definition at line 187 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputEtValPlusWheel(), process(), and resetPipelines().
Definition at line 172 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), operator<<(), process(), resetProcessor(), and setInputWheelEt().
Pipeline< etTotalType > L1GctGlobalEnergyAlgos::m_etVlMinusPipe [private] |
Definition at line 194 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputEtVlMinusWheel(), process(), and resetPipelines().
Definition at line 179 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), operator<<(), process(), resetProcessor(), and setInputWheelEt().
Definition at line 185 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputExValPlusWheel(), process(), and resetPipelines().
Definition at line 170 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), operator<<(), process(), resetProcessor(), and setInputWheelEx().
Definition at line 192 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputExVlMinusWheel(), process(), and resetPipelines().
Definition at line 177 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), operator<<(), process(), resetProcessor(), and setInputWheelEx().
Definition at line 186 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputEyValPlusWheel(), process(), and resetPipelines().
Definition at line 171 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), operator<<(), process(), resetProcessor(), and setInputWheelEy().
Definition at line 193 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputEyVlMinusWheel(), process(), and resetPipelines().
Definition at line 178 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), operator<<(), process(), resetProcessor(), and setInputWheelEy().
Definition at line 163 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), getHfSumProcessor(), L1GctGlobalEnergyAlgos(), operator<<(), process(), reset(), setBxRange(), setNextBx(), setupOk(), and ~L1GctGlobalEnergyAlgos().
Pipeline< etHadType > L1GctGlobalEnergyAlgos::m_htValPlusPipe [private] |
Definition at line 188 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputHtValPlusWheel(), process(), and resetPipelines().
Definition at line 173 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), operator<<(), process(), resetProcessor(), and setInputWheelHt().
Pipeline< etHadType > L1GctGlobalEnergyAlgos::m_htVlMinusPipe [private] |
Definition at line 195 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputHtVlMinusWheel(), process(), and resetPipelines().
Definition at line 180 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), operator<<(), process(), resetProcessor(), and setInputWheelHt().
Definition at line 189 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputHxValPlusWheel(), process(), and resetPipelines().
Definition at line 174 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), process(), resetProcessor(), and setInputWheelHx().
Definition at line 196 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputHxVlMinusWheel(), process(), and resetPipelines().
Definition at line 181 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), process(), resetProcessor(), and setInputWheelHx().
Definition at line 190 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputHyValPlusWheel(), process(), and resetPipelines().
Definition at line 175 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), process(), resetProcessor(), and setInputWheelHy().
Definition at line 197 of file L1GctGlobalEnergyAlgos.h.
Referenced by getInputHyVlMinusWheel(), process(), and resetPipelines().
Definition at line 182 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), process(), resetProcessor(), and setInputWheelHy().
Definition at line 166 of file L1GctGlobalEnergyAlgos.h.
Referenced by L1GctGlobalEnergyAlgos(), and process().
Definition at line 167 of file L1GctGlobalEnergyAlgos.h.
Referenced by getHtMissLut(), L1GctGlobalEnergyAlgos(), process(), setHtMissScale(), and setJetFinderParams().
Definition at line 158 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), getMinusWheelFpga(), L1GctGlobalEnergyAlgos(), and operator<<().
Definition at line 160 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), getMinusWheelJetFpga(), L1GctGlobalEnergyAlgos(), and operator<<().
Definition at line 203 of file L1GctGlobalEnergyAlgos.h.
Referenced by getEtHadColl(), operator<<(), process(), and resetPipelines().
Definition at line 200 of file L1GctGlobalEnergyAlgos.h.
Referenced by getEtMissColl(), operator<<(), process(), and resetPipelines().
Definition at line 201 of file L1GctGlobalEnergyAlgos.h.
Referenced by getEtMissPhiColl(), operator<<(), process(), and resetPipelines().
Definition at line 202 of file L1GctGlobalEnergyAlgos.h.
Referenced by getEtSumColl(), operator<<(), process(), and resetPipelines().
Definition at line 204 of file L1GctGlobalEnergyAlgos.h.
Referenced by getHtMissColl(), process(), and resetPipelines().
Definition at line 205 of file L1GctGlobalEnergyAlgos.h.
Referenced by getHtMissPhiColl(), process(), and resetPipelines().
Definition at line 157 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), getPlusWheelFpga(), L1GctGlobalEnergyAlgos(), and operator<<().
Definition at line 159 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), getPlusWheelJetFpga(), L1GctGlobalEnergyAlgos(), and operator<<().
bool L1GctGlobalEnergyAlgos::m_setupOk [private] |
Definition at line 207 of file L1GctGlobalEnergyAlgos.h.
Referenced by fetchInput(), L1GctGlobalEnergyAlgos(), process(), and setupOk().