96 m_gtEnergySumTemplate = eSumTempl;
116 bool condResult =
false;
123 (combinationsInCond()).
clear();
126 objectsInComb.clear();
131 int useBx = bxEval + m_gtEnergySumTemplate->condRelativeBx();
134 if( ( useBx < candVec->getFirstBX() ) ||
140 int numberObjects = candVec->
size(useBx);
141 if (numberObjects < 1) {
147 bool MissingEnergy =
false;
148 switch( (m_gtEnergySumTemplate->objectType())[0] ){
151 MissingEnergy =
true;
155 MissingEnergy =
false;
158 type = l1t::EtSum::EtSumType::kTotalEtEm;
159 MissingEnergy =
false;
163 MissingEnergy =
true;
167 MissingEnergy =
false;
170 type = l1t::EtSum::EtSumType::kMissingEtHF;
171 MissingEnergy =
true;
174 type = l1t::EtSum::EtSumType::kTowerCount;
175 MissingEnergy =
false;
178 type = l1t::EtSum::EtSumType::kMinBiasHFP0;
179 MissingEnergy =
false;
182 type = l1t::EtSum::EtSumType::kMinBiasHFM0;
183 MissingEnergy =
false;
186 type = l1t::EtSum::EtSumType::kMinBiasHFP1;
187 MissingEnergy =
false;
190 type = l1t::EtSum::EtSumType::kMinBiasHFM1;
191 MissingEnergy =
false;
196 <<
"Unmatched object type from template to EtSumType, (m_gtEnergySumTemplate->objectType())[0] = "
197 << (m_gtEnergySumTemplate->objectType())[0]
205 unsigned int candEt = 0;
206 unsigned int candPhi = 0;
207 bool candOverflow =
false;
208 for(
int iEtSum = 0; iEtSum < numberObjects; ++iEtSum ){
211 candEt = cand.
hwPt();
212 candPhi = cand.
hwPhi();
217 ( *(m_gtEnergySumTemplate->objectParameter()) )[iCondition];
229 bool condGEqVal = m_gtEnergySumTemplate->condGEq();
233 LogDebug(
"L1TGlobal") <<
"\t\t l1t::EtSum failed checkThreshold" << std::endl;
237 if( !condGEqVal && candOverflow )
return false;
244 LogDebug(
"L1TGlobal") <<
"\t\t l1t::EtSum failed checkRange(phi)" << std::endl;
253 objectsInComb.push_back(indexObj);
254 (combinationsInCond()).push_back(objectsInComb);
266 m_gtEnergySumTemplate->print(myCout);
unsigned size(int bx) const
CombinationsInCond const & getCombinationsInCond() const
get all the object combinations evaluated to true in the condition
const GlobalBoard * getuGtB() const
get / set the pointer to uGt GlobalBoard
unsigned int etLowThreshold
const bool evaluateCondition(const int bxEval) const
the core function to check if the condition matches
unsigned int phiWindow1Lower
virtual void print(std::ostream &myCout) const
print condition
std::vector< int > SingleCombInCond
typedefs
void setuGtB(const GlobalBoard *)
set the pointer to uGT GlobalBoard
unsigned int etHighThreshold
bool condLastResult() const
get the latest result for the condition
const EnergySumTemplate * gtEnergySumTemplate() const
get / set the pointer to a L1GtCondition
unsigned int phiWindow2Lower
EnergySumCondition & operator=(const EnergySumCondition &)
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
virtual ~EnergySumCondition()
typedef for a single object template
void print(std::ostream &myCout) const
print condition
int m_verbosity
verbosity level
int condMaxNumberObjects() const
unsigned int phiWindow1Upper
unsigned int phiWindow2Upper
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