109 m_gtEnergySumTemplate = eSumTempl;
129 bool condResult =
false;
136 (combinationsInCond()).
clear();
139 objectsInComb.clear();
144 int useBx = bxEval + m_gtEnergySumTemplate->condRelativeBx();
146 int numberObjects = candVec->
size(useBx);
147 if (numberObjects < 1) {
152 if( ( useBx < candVec->getFirstBX() ) ||
159 bool MissingEnergy =
false;
160 switch( (m_gtEnergySumTemplate->objectType())[0] ){
162 type = l1t::EtSum::EtSumType::kMissingEt;
163 MissingEnergy =
true;
166 type = l1t::EtSum::EtSumType::kTotalEt;
167 MissingEnergy =
false;
170 type = l1t::EtSum::EtSumType::kMissingHt;
171 MissingEnergy =
true;
174 type = l1t::EtSum::EtSumType::kTotalHt;
175 MissingEnergy =
false;
180 <<
"Unmatched object type from template to EtSumType, (m_gtEnergySumTemplate->objectType())[0] = "
181 << (m_gtEnergySumTemplate->objectType())[0]
183 type = l1t::EtSum::EtSumType::kTotalEt;
189 unsigned int candEt = 0;
190 unsigned int candPhi = 0;
191 bool candOverflow =
false;
192 for(
int iEtSum = 0; iEtSum < numberObjects; ++iEtSum ){
195 candEt = cand.
hwPt();
196 candPhi = cand.
hwPhi();
201 ( *(m_gtEnergySumTemplate->objectParameter()) )[iCondition];
213 bool condGEqVal = m_gtEnergySumTemplate->condGEq();
216 if ( !checkThreshold(objPar.
etThreshold, candEt, condGEqVal) ) {
217 LogDebug(
"l1t|Global") <<
"\t\t l1t::EtSum failed checkThreshold" << std::endl;
221 if( !condGEqVal && candOverflow )
return false;
228 LogDebug(
"l1t|Global") <<
"\t\t l1t::EtSum failed checkRange(phi)" << std::endl;
237 objectsInComb.push_back(indexObj);
238 (combinationsInCond()).push_back(objectsInComb);
250 m_gtEnergySumTemplate->print(myCout);
unsigned size(int bx) const
const GtBoard * getuGtB() const
get / set the pointer to uGt GtBoard
CombinationsInCond const & getCombinationsInCond() const
get all the object combinations evaluated to true in the condition
const bool evaluateCondition(const int bxEval) const
the core function to check if the condition matches
unsigned int phiWindowLower
virtual void print(std::ostream &myCout) const
print condition
std::vector< int > SingleCombInCond
typedefs
unsigned int phiWindowVetoLower
bool condLastResult() const
get the latest result for the condition
const EnergySumTemplate * gtEnergySumTemplate() const
get / set the pointer to a L1GtCondition
EnergySumCondition & operator=(const EnergySumCondition &)
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
virtual ~EnergySumCondition()
unsigned int phiWindowUpper
typedef for a single object template
void print(std::ostream &myCout) const
print condition
void setuGtB(const GtBoard *)
set the pointer to uGT GtBoard
int m_verbosity
verbosity level
int condMaxNumberObjects() const
int m_condMaxNumberObjects
EtSumType getType() const
void setGtEnergySumTemplate(const EnergySumTemplate *)
void copy(const EnergySumCondition &cp)
copy function for copy constructor and operator=
const T & at(int bx, unsigned i) const