#include <L1GtHfRingEtSumsCondition.h>
Public Member Functions | |
const bool | evaluateCondition () const |
the core function to check if the condition matches | |
const L1GtHfRingEtSumsTemplate * | gtHfRingEtSumsTemplate () const |
get / set the pointer to a L1GtCondition | |
const L1GlobalTriggerPSB * | gtPSB () const |
get / set the pointer to PSB | |
L1GtHfRingEtSumsCondition (const L1GtCondition *, const L1GlobalTriggerPSB *) | |
from base template condition (from event setup usually) | |
L1GtHfRingEtSumsCondition () | |
L1GtHfRingEtSumsCondition (const L1GtHfRingEtSumsCondition &) | |
L1GtHfRingEtSumsCondition & | operator= (const L1GtHfRingEtSumsCondition &) |
void | print (std::ostream &myCout) const |
print condition | |
void | setGtHfRingEtSumsTemplate (const L1GtHfRingEtSumsTemplate *) |
void | setGtPSB (const L1GlobalTriggerPSB *) |
set the pointer to PSB | |
virtual | ~L1GtHfRingEtSumsCondition () |
Private Member Functions | |
void | copy (const L1GtHfRingEtSumsCondition &cp) |
copy function for copy constructor and operator= | |
Private Attributes | |
const L1GtHfRingEtSumsTemplate * | m_gtHfRingEtSumsTemplate |
pointer to a L1GtHfRingEtSumsTemplate | |
const L1GlobalTriggerPSB * | m_gtPSB |
pointer to PSB, to be able to get the trigger objects |
Description: evaluation of a CondHfRingEtSums condition.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 34 of file L1GtHfRingEtSumsCondition.h.
L1GtHfRingEtSumsCondition::L1GtHfRingEtSumsCondition | ( | ) |
constructors default
Definition at line 39 of file L1GtHfRingEtSumsCondition.cc.
: L1GtConditionEvaluation() { //empty }
L1GtHfRingEtSumsCondition::L1GtHfRingEtSumsCondition | ( | const L1GtCondition * | etTemplate, |
const L1GlobalTriggerPSB * | ptrPSB | ||
) |
from base template condition (from event setup usually)
Definition at line 47 of file L1GtHfRingEtSumsCondition.cc.
References L1GtConditionEvaluation::m_condMaxNumberObjects.
: L1GtConditionEvaluation(), m_gtHfRingEtSumsTemplate( static_cast<const L1GtHfRingEtSumsTemplate*> (etTemplate)), m_gtPSB( ptrPSB) { // maximum number of objects received for the evaluation of the condition // no objects, in fact, just a number m_condMaxNumberObjects = 1; }
L1GtHfRingEtSumsCondition::L1GtHfRingEtSumsCondition | ( | const L1GtHfRingEtSumsCondition & | cp | ) |
Definition at line 74 of file L1GtHfRingEtSumsCondition.cc.
References copy().
: L1GtConditionEvaluation() { copy(cp); }
L1GtHfRingEtSumsCondition::~L1GtHfRingEtSumsCondition | ( | ) | [virtual] |
Definition at line 82 of file L1GtHfRingEtSumsCondition.cc.
{
// empty
}
void L1GtHfRingEtSumsCondition::copy | ( | const L1GtHfRingEtSumsCondition & | cp | ) | [private] |
copy function for copy constructor and operator=
Definition at line 61 of file L1GtHfRingEtSumsCondition.cc.
References L1GtConditionEvaluation::condLastResult(), L1GtConditionEvaluation::condMaxNumberObjects(), L1GtConditionEvaluation::getCombinationsInCond(), gtHfRingEtSumsTemplate(), gtPSB(), L1GtConditionEvaluation::m_combinationsInCond, L1GtConditionEvaluation::m_condLastResult, L1GtConditionEvaluation::m_condMaxNumberObjects, m_gtHfRingEtSumsTemplate, m_gtPSB, and L1GtConditionEvaluation::m_verbosity.
Referenced by L1GtHfRingEtSumsCondition(), and operator=().
{ m_gtHfRingEtSumsTemplate = cp.gtHfRingEtSumsTemplate(); m_gtPSB = cp.gtPSB(); m_condMaxNumberObjects = cp.condMaxNumberObjects(); m_condLastResult = cp.condLastResult(); m_combinationsInCond = cp.getCombinationsInCond(); m_verbosity = cp.m_verbosity; }
const bool L1GtHfRingEtSumsCondition::evaluateCondition | ( | ) | const [virtual] |
the core function to check if the condition matches
Implements L1GtConditionEvaluation.
Definition at line 110 of file L1GtHfRingEtSumsCondition.cc.
References L1GtConditionEvaluation::checkThreshold(), hitfit::clear(), L1GtConditionEvaluation::combinationsInCond(), L1GtCondition::condGEq(), L1GctHFRingEtSums::etSum(), L1GtHfRingEtSumsTemplate::ObjectParameter::etSumIndex, L1GtHfRingEtSumsTemplate::ObjectParameter::etSumThreshold, L1GlobalTriggerPSB::getCandL1HfRingEtSums(), m_gtHfRingEtSumsTemplate, m_gtPSB, and L1GtHfRingEtSumsTemplate::objectParameter().
{ // number of trigger objects in the condition // no objects, in fact, just a number int iCondition = 0; // condition result condResult will be set to true if the HF Ring Et sums // passes the requirement bool condResult = false; // store the index of the HfRingEtSums object // from the combination evaluated in the condition SingleCombInCond objectsInComb; // clear the m_combinationsInCond vector (combinationsInCond()).clear(); // get the HF Ring Et sums (event / condition) const L1GctHFRingEtSums* etSumCand = m_gtPSB->getCandL1HfRingEtSums(); // protection against missing HF Ring Et sums collection if (etSumCand == 0) { return false; } const L1GtHfRingEtSumsTemplate::ObjectParameter objPar = ( *(m_gtHfRingEtSumsTemplate->objectParameter()) )[iCondition]; // FIXME ask GCT to provide a method to retrieve it const unsigned int numberL1HfRingEtSums = 4; const unsigned int cIndex = objPar.etSumIndex; if (cIndex >= numberL1HfRingEtSums) { edm::LogError("L1GlobalTrigger") << "\nL1GtHfRingEtSumsCondition error: etSumIndex " << cIndex << "greater than GCT maximum index = " << numberL1HfRingEtSums << "\n ==> condResult = false " << std::endl; return false; } const unsigned int etSumValue = etSumCand->etSum(cIndex); // check countThreshold if ( !checkThreshold(objPar.etSumThreshold, etSumValue, m_gtHfRingEtSumsTemplate->condGEq()) ) { return false; } // index is always zero - the object is in fact a count int indexObj = 0; objectsInComb.push_back(indexObj); (combinationsInCond()).push_back(objectsInComb); // if we get here all checks were successful for this combination // set the general result for evaluateCondition to "true" condResult = true; return condResult; }
const L1GtHfRingEtSumsTemplate* L1GtHfRingEtSumsCondition::gtHfRingEtSumsTemplate | ( | ) | const [inline] |
get / set the pointer to a L1GtCondition
Definition at line 66 of file L1GtHfRingEtSumsCondition.h.
References m_gtHfRingEtSumsTemplate.
Referenced by copy().
{ return m_gtHfRingEtSumsTemplate; }
const L1GlobalTriggerPSB* L1GtHfRingEtSumsCondition::gtPSB | ( | ) | const [inline] |
get / set the pointer to PSB
Definition at line 73 of file L1GtHfRingEtSumsCondition.h.
References m_gtPSB.
Referenced by copy().
{ return m_gtPSB; }
L1GtHfRingEtSumsCondition & L1GtHfRingEtSumsCondition::operator= | ( | const L1GtHfRingEtSumsCondition & | cp | ) |
Definition at line 89 of file L1GtHfRingEtSumsCondition.cc.
References copy().
{ copy(cp); return *this; }
void L1GtHfRingEtSumsCondition::print | ( | std::ostream & | myCout | ) | const [virtual] |
print condition
Reimplemented from L1GtConditionEvaluation.
Definition at line 173 of file L1GtHfRingEtSumsCondition.cc.
References m_gtHfRingEtSumsTemplate, and L1GtHfRingEtSumsTemplate::print().
Referenced by L1GlobalTriggerGTL::run().
{ m_gtHfRingEtSumsTemplate->print(myCout); L1GtConditionEvaluation::print(myCout); }
void L1GtHfRingEtSumsCondition::setGtHfRingEtSumsTemplate | ( | const L1GtHfRingEtSumsTemplate * | etTemplate | ) |
Definition at line 96 of file L1GtHfRingEtSumsCondition.cc.
References m_gtHfRingEtSumsTemplate.
{ m_gtHfRingEtSumsTemplate = etTemplate; }
void L1GtHfRingEtSumsCondition::setGtPSB | ( | const L1GlobalTriggerPSB * | ptrPSB | ) |
set the pointer to PSB
Definition at line 103 of file L1GtHfRingEtSumsCondition.cc.
References m_gtPSB.
{ m_gtPSB = ptrPSB; }
pointer to a L1GtHfRingEtSumsTemplate
Definition at line 87 of file L1GtHfRingEtSumsCondition.h.
Referenced by copy(), evaluateCondition(), gtHfRingEtSumsTemplate(), print(), and setGtHfRingEtSumsTemplate().
const L1GlobalTriggerPSB* L1GtHfRingEtSumsCondition::m_gtPSB [private] |
pointer to PSB, to be able to get the trigger objects
Definition at line 90 of file L1GtHfRingEtSumsCondition.h.
Referenced by copy(), evaluateCondition(), gtPSB(), and setGtPSB().