#include <L1GtJetCountsCondition.h>
Public Member Functions | |
const bool | evaluateCondition () const |
the core function to check if the condition matches | |
const L1GtJetCountsTemplate * | gtJetCountsTemplate () const |
get / set the pointer to a L1GtCondition | |
const L1GlobalTriggerPSB * | gtPSB () const |
get / set the pointer to PSB | |
L1GtJetCountsCondition (const L1GtCondition *, const L1GlobalTriggerPSB *, const int nrL1JetCounts) | |
from base template condition (from event setup usually) | |
L1GtJetCountsCondition () | |
L1GtJetCountsCondition (const L1GtJetCountsCondition &) | |
L1GtJetCountsCondition & | operator= (const L1GtJetCountsCondition &) |
void | print (std::ostream &myCout) const |
print condition | |
void | setGtJetCountsTemplate (const L1GtJetCountsTemplate *) |
void | setGtPSB (const L1GlobalTriggerPSB *) |
set the pointer to PSB | |
virtual | ~L1GtJetCountsCondition () |
Private Member Functions | |
void | copy (const L1GtJetCountsCondition &cp) |
copy function for copy constructor and operator= | |
Private Attributes | |
const L1GtJetCountsTemplate * | m_gtJetCountsTemplate |
pointer to a L1GtJetCountsTemplate | |
const L1GlobalTriggerPSB * | m_gtPSB |
pointer to PSB, to be able to get the trigger objects | |
unsigned int | m_numberL1JetCounts |
maximum number of jet counts |
Description: evaluation of a CondJetCounts condition.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 35 of file L1GtJetCountsCondition.h.
L1GtJetCountsCondition::L1GtJetCountsCondition | ( | ) |
constructors default
Definition at line 39 of file L1GtJetCountsCondition.cc.
: L1GtConditionEvaluation() { //empty }
L1GtJetCountsCondition::L1GtJetCountsCondition | ( | const L1GtCondition * | jcTemplate, |
const L1GlobalTriggerPSB * | ptrPSB, | ||
const int | nrL1JetCounts | ||
) |
from base template condition (from event setup usually)
Definition at line 47 of file L1GtJetCountsCondition.cc.
References L1GtConditionEvaluation::m_condMaxNumberObjects.
: L1GtConditionEvaluation(), m_gtJetCountsTemplate(static_cast<const L1GtJetCountsTemplate*>(jcTemplate)), m_gtPSB(ptrPSB), m_numberL1JetCounts(nrL1JetCounts) { // maximum number of objects received for the evaluation of the condition // no objects, in fact, just a number m_condMaxNumberObjects = 1; }
L1GtJetCountsCondition::L1GtJetCountsCondition | ( | const L1GtJetCountsCondition & | cp | ) |
Definition at line 75 of file L1GtJetCountsCondition.cc.
References copy().
: L1GtConditionEvaluation() { copy(cp); }
L1GtJetCountsCondition::~L1GtJetCountsCondition | ( | ) | [virtual] |
Definition at line 83 of file L1GtJetCountsCondition.cc.
{
// empty
}
void L1GtJetCountsCondition::copy | ( | const L1GtJetCountsCondition & | cp | ) | [private] |
copy function for copy constructor and operator=
Definition at line 62 of file L1GtJetCountsCondition.cc.
References L1GtConditionEvaluation::condLastResult(), L1GtConditionEvaluation::condMaxNumberObjects(), L1GtConditionEvaluation::getCombinationsInCond(), gtJetCountsTemplate(), gtPSB(), L1GtConditionEvaluation::m_combinationsInCond, L1GtConditionEvaluation::m_condLastResult, L1GtConditionEvaluation::m_condMaxNumberObjects, m_gtJetCountsTemplate, m_gtPSB, and L1GtConditionEvaluation::m_verbosity.
Referenced by L1GtJetCountsCondition(), and operator=().
{ m_gtJetCountsTemplate = cp.gtJetCountsTemplate(); m_gtPSB = cp.gtPSB(); m_condMaxNumberObjects = cp.condMaxNumberObjects(); m_condLastResult = cp.condLastResult(); m_combinationsInCond = cp.getCombinationsInCond(); m_verbosity = cp.m_verbosity; }
const bool L1GtJetCountsCondition::evaluateCondition | ( | ) | const [virtual] |
the core function to check if the condition matches
Implements L1GtConditionEvaluation.
Definition at line 111 of file L1GtJetCountsCondition.cc.
References L1GtConditionEvaluation::checkThreshold(), hitfit::clear(), L1GtConditionEvaluation::combinationsInCond(), L1GtCondition::condGEq(), L1GctJetCounts::count(), L1GtJetCountsTemplate::ObjectParameter::countIndex, L1GtJetCountsTemplate::ObjectParameter::countThreshold, L1GlobalTriggerPSB::getCandL1JetCounts(), m_gtJetCountsTemplate, m_gtPSB, m_numberL1JetCounts, and L1GtJetCountsTemplate::objectParameter().
{ // number of trigger objects in the condition // in fact, there is only one object int iCondition = 0; // condition result condResult will be set to true if the jet counts // passes the requirement bool condResult = false; // store the index of the JetCount object // from the combination evaluated in the condition SingleCombInCond objectsInComb; // clear the m_combinationsInCond vector (combinationsInCond()).clear(); // get the jet counts (event / condition) const L1GctJetCounts* jetCounts = m_gtPSB->getCandL1JetCounts(); // protection against missing jet counts collection if (jetCounts == 0) { return false; } const L1GtJetCountsTemplate::ObjectParameter objPar = ( *(m_gtJetCountsTemplate->objectParameter()) )[iCondition]; unsigned int cIndex = objPar.countIndex; if (cIndex >= m_numberL1JetCounts) { edm::LogError("L1GlobalTrigger") << "\nL1GtJetCountsCondition error: countIndex " << cIndex << "greater than maximum allowed count = " << m_numberL1JetCounts << "\n ==> condResult = false " << std::endl; return false; } unsigned int countValue = jetCounts->count(cIndex); // check countThreshold if ( !checkThreshold(objPar.countThreshold, countValue, m_gtJetCountsTemplate->condGEq()) ) { return false; } // index is always zero, as they are global quantities (there is only one object) 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 L1GtJetCountsTemplate* L1GtJetCountsCondition::gtJetCountsTemplate | ( | ) | const [inline] |
get / set the pointer to a L1GtCondition
Definition at line 67 of file L1GtJetCountsCondition.h.
References m_gtJetCountsTemplate.
Referenced by copy().
{ return m_gtJetCountsTemplate; }
const L1GlobalTriggerPSB* L1GtJetCountsCondition::gtPSB | ( | ) | const [inline] |
get / set the pointer to PSB
Definition at line 74 of file L1GtJetCountsCondition.h.
References m_gtPSB.
Referenced by copy().
{ return m_gtPSB; }
L1GtJetCountsCondition & L1GtJetCountsCondition::operator= | ( | const L1GtJetCountsCondition & | cp | ) |
Definition at line 90 of file L1GtJetCountsCondition.cc.
References copy().
{ copy(cp); return *this; }
void L1GtJetCountsCondition::print | ( | std::ostream & | myCout | ) | const [virtual] |
print condition
Reimplemented from L1GtConditionEvaluation.
Definition at line 172 of file L1GtJetCountsCondition.cc.
References m_gtJetCountsTemplate, and L1GtJetCountsTemplate::print().
Referenced by L1GlobalTriggerGTL::run().
{ m_gtJetCountsTemplate->print(myCout); L1GtConditionEvaluation::print(myCout); }
void L1GtJetCountsCondition::setGtJetCountsTemplate | ( | const L1GtJetCountsTemplate * | jcTemplate | ) |
Definition at line 97 of file L1GtJetCountsCondition.cc.
References m_gtJetCountsTemplate.
{ m_gtJetCountsTemplate = jcTemplate; }
void L1GtJetCountsCondition::setGtPSB | ( | const L1GlobalTriggerPSB * | ptrPSB | ) |
set the pointer to PSB
Definition at line 104 of file L1GtJetCountsCondition.cc.
References m_gtPSB.
{ m_gtPSB = ptrPSB; }
const L1GtJetCountsTemplate* L1GtJetCountsCondition::m_gtJetCountsTemplate [private] |
pointer to a L1GtJetCountsTemplate
Definition at line 88 of file L1GtJetCountsCondition.h.
Referenced by copy(), evaluateCondition(), gtJetCountsTemplate(), print(), and setGtJetCountsTemplate().
const L1GlobalTriggerPSB* L1GtJetCountsCondition::m_gtPSB [private] |
pointer to PSB, to be able to get the trigger objects
Definition at line 91 of file L1GtJetCountsCondition.h.
Referenced by copy(), evaluateCondition(), gtPSB(), and setGtPSB().
unsigned int L1GtJetCountsCondition::m_numberL1JetCounts [private] |
maximum number of jet counts
Definition at line 94 of file L1GtJetCountsCondition.h.
Referenced by evaluateCondition().