52 const int ifCaloEtaNumberBits) :
145 const int& corrParDeltaPhiNrBins) {
189 if( ( useBx < candVec->getFirstBX() ) ||
195 int numberObjects = candVec->
size(useBx);
198 if (numberObjects < nObjInCond) {
202 std::vector<int>
index(numberObjects);
204 for (
int i = 0;
i < numberObjects; ++
i) {
214 bool condResult =
false;
219 objectsInComb.reserve(nObjInCond);
230 for(
int i=0;
i<numberObjects;
i++ ){
233 objectsInComb.clear();
238 objectsInComb.push_back(i);
245 else if( nObjInCond==2 ){
247 for(
int i=0;
i<numberObjects;
i++ ){
252 if( !( passCondition0i || passCondition1i ) )
continue;
254 for(
int j=0; j<numberObjects; j++ ){
262 (passCondition0i && passCondition1j) ||
263 (passCondition0j && passCondition1i)
273 const int ObjInWscComb = 2;
274 if (nObjInCond != ObjInWscComb) {
279 <<
"number of particles in condition with spatial correlation = " 280 << nObjInCond <<
"\n it must be = " << ObjInWscComb
292 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRangeDeltaEta" << std::endl;
299 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRangeDeltaPhi" << std::endl;
306 objectsInComb.clear();
307 objectsInComb.push_back(i);
308 objectsInComb.push_back(j);
316 else if( nObjInCond==3 ){
318 for(
int i=0;
i<numberObjects;
i++ ){
325 if( !( passCondition0i || passCondition1i || passCondition2i ) )
continue;
327 for(
int j=0; j<numberObjects; j++ ){
334 if( !( passCondition0j || passCondition1j || passCondition2j ) )
continue;
336 for(
int k=0;
k<numberObjects;
k++ ){
337 if(
k==i ||
k==j )
continue;
345 (passCondition0i && passCondition1j && passCondition2k) ||
346 (passCondition0i && passCondition1k && passCondition2j) ||
347 (passCondition0j && passCondition1k && passCondition2i) ||
348 (passCondition0j && passCondition1i && passCondition2k) ||
349 (passCondition0k && passCondition1i && passCondition2j) ||
350 (passCondition0k && passCondition1j && passCondition2i)
355 objectsInComb.clear();
356 objectsInComb.push_back(i);
357 objectsInComb.push_back(j);
358 objectsInComb.push_back(
k);
365 else if( nObjInCond==4 ){
368 for(
int i=0;
i<numberObjects;
i++ ){
375 if( !( passCondition0i || passCondition1i || passCondition2i || passCondition3i ) )
continue;
377 for(
int j=0; j<numberObjects; j++ ){
385 if( !( passCondition0j || passCondition1j || passCondition2j || passCondition3j ) )
continue;
387 for(
int k=0;
k<numberObjects;
k++ ){
388 if(
k==i ||
k==j )
continue;
395 if( !( passCondition0k || passCondition1k || passCondition2k || passCondition3k ) )
continue;
397 for(
int m=0;
m<numberObjects;
m++ ){
398 if(
m==i ||
m==j ||
m==
k )
continue;
407 (passCondition0i && passCondition1j && passCondition2k && passCondition3m) ||
408 (passCondition0i && passCondition1j && passCondition2m && passCondition3k) ||
409 (passCondition0i && passCondition1k && passCondition2j && passCondition3m) ||
410 (passCondition0i && passCondition1k && passCondition2m && passCondition3j) ||
411 (passCondition0i && passCondition1m && passCondition2j && passCondition3k) ||
412 (passCondition0i && passCondition1m && passCondition2k && passCondition3j) ||
413 (passCondition0j && passCondition1i && passCondition2k && passCondition3m) ||
414 (passCondition0j && passCondition1i && passCondition2m && passCondition3k) ||
415 (passCondition0j && passCondition1k && passCondition2i && passCondition3m) ||
416 (passCondition0j && passCondition1k && passCondition2m && passCondition3i) ||
417 (passCondition0j && passCondition1m && passCondition2i && passCondition3k) ||
418 (passCondition0j && passCondition1m && passCondition2k && passCondition3i) ||
419 (passCondition0k && passCondition1i && passCondition2j && passCondition3m) ||
420 (passCondition0k && passCondition1i && passCondition2m && passCondition3j) ||
421 (passCondition0k && passCondition1j && passCondition2i && passCondition3m) ||
422 (passCondition0k && passCondition1j && passCondition2m && passCondition3i) ||
423 (passCondition0k && passCondition1m && passCondition2i && passCondition3j) ||
424 (passCondition0k && passCondition1m && passCondition2j && passCondition3i) ||
425 (passCondition0m && passCondition1i && passCondition2j && passCondition3k) ||
426 (passCondition0m && passCondition1i && passCondition2k && passCondition3j) ||
427 (passCondition0m && passCondition1j && passCondition2i && passCondition3k) ||
428 (passCondition0m && passCondition1j && passCondition2k && passCondition3i) ||
429 (passCondition0m && passCondition1k && passCondition2i && passCondition3j) ||
430 (passCondition0m && passCondition1k && passCondition2j && passCondition3i)
433 objectsInComb.clear();
434 objectsInComb.push_back(i);
435 objectsInComb.push_back(j);
436 objectsInComb.push_back(
k);
437 objectsInComb.push_back(
m);
450 <<
"\n CaloCondition: total number of permutations found: " << totalLoops
451 <<
"\n CaloCondition: number of permutations passing requirements: " << passLoops
452 <<
"\n" << std::endl;
498 if (iCondition >= nObjInCond || iCondition < 0) {
510 <<
"\n CaloTemplate: " 512 <<
"\n ObjectParameter : " 515 <<
"\n\t etaRange = " << objPar.
etaRange 516 <<
"\n\t phiRange = " << objPar.
phiRange 521 <<
"\n l1t::Candidate : " 522 <<
"\n\t hwPt = " << cand.
hwPt()
523 <<
"\n\t hwEta = " << cand.
hwEta()
524 <<
"\n\t hwPhi = " << cand.
hwPhi()
530 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkThreshold" << std::endl;
536 LogDebug(
"L1TGlobal") <<
"\t\t ilt::Candidate Failed checkIndex " << std::endl;
542 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRange(eta)" << std::endl;
552 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRange(phi)" << std::endl;
558 if( cand.
hwIso()>4 ){
559 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate has out of range hwIso = " << cand.
hwIso() << std::endl;
564 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed isolation requirement" << std::endl;
583 myCout <<
" Number of bits for eta of calorimeter objects = " 585 myCout <<
" Maximum number of bins for the delta phi scales = "
const int nrObjects() const
get number of trigger objects
const CaloTemplate * gtCaloTemplate() const
get / set the pointer to a Condition
const BXVector< const l1t::L1Candidate * > * getCandL1Tau() const
pointer to Tau data list
const BXVector< const l1t::L1Candidate * > * getCandL1Jet() const
pointer to Jet data list
unsigned int m_corrParDeltaPhiNrBins
const std::vector< ObjectParameter > * objectParameter() const
unsigned size(int bx) const
CombinationsInCond const & getCombinationsInCond() const
get all the object combinations evaluated to true in the condition
const bool checkRangeDeltaPhi(const unsigned int obj1Phi, const unsigned int obj2Phi, const Type1 &lowerR, const Type1 &upperR) const
check if a value is in a given range
const bool checkRangeEta(const unsigned int bitNumber, const Type1 &W1beginR, const Type1 &W1endR, const Type1 &W2beginR, const Type1 &W2endR, const unsigned int nEtaBits) const
check if a value is in a given range and outside of a veto range
void setGtCorrParDeltaPhiNrBins(const int &)
const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate &cand, const unsigned int index) const
function to check a single object if it matches a condition
unsigned int phiWindow2Upper
void print(std::ostream &myCout) const
print condition
virtual void print(std::ostream &myCout) const
print condition
void setGtIfCaloEtaNumberBits(const int &)
std::vector< int > SingleCombInCond
typedefs
const bool condGEq() const
get / set condition GEq flag
unsigned int deltaPhiRangeLower
unsigned int phiWindow2Lower
unsigned int phiWindow1Upper
unsigned int etLowThreshold
const bool checkThreshold(const Type1 &thresholdL, const Type1 &thresholdH, const Type2 &value, bool condGEqValue) const
typedef for a single object template
void setGtCaloTemplate(const CaloTemplate *)
bool condLastResult() const
get the latest result for the condition
const int & condRelativeBx() const
get / set the condition relative bx
const BXVector< const l1t::L1Candidate * > * getCandL1EG() const
pointer to EG data list
unsigned int deltaEtaRangeUpper
const std::vector< l1t::GlobalObject > & objectType() const
get / set the trigger object type(s) in the condition
const int gtIfCaloEtaNumberBits() const
get / set the number of bits for eta of calorimeter objects
unsigned int etaWindow1Lower
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
const GlobalBoard * m_uGtB
pointer to uGt GlobalBoard, to be able to get the trigger objects
void setuGtB(const GlobalBoard *)
set the pointer to uGT GlobalBoard
unsigned int phiWindow1Lower
unsigned int deltaPhiRangeUpper
unsigned int etaWindow2Upper
const l1t::L1Candidate * getCandidate(const int bx, const int indexCand) const
load calo candidates
int m_verbosity
verbosity level
int condMaxNumberObjects() const
bool m_condLastResult
the last result of evaluateCondition()
CaloCondition & operator=(const CaloCondition &)
typedef for correlation parameters
void copy(const CaloCondition &cp)
copy function for copy constructor and operator=
const GlobalBoard * getuGtB() const
get / set the pointer to uGt GlobalBoard
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
unsigned int etaWindow2Lower
unsigned int etHighThreshold
int m_condMaxNumberObjects
unsigned int isolationLUT
unsigned int etaWindow1Upper
const bool checkRangeDeltaEta(const unsigned int obj1Eta, const unsigned int obj2Eta, const Type1 &lowerR, const Type1 &upperR, const unsigned int nEtaBits) const
check if a value is in a given range
const bool checkIndex(const Type1 &indexLo, const Type1 &indexHi, const unsigned int index) const
check if a index is in a given range
const bool evaluateCondition(const int bxEval) const
the core function to check if the condition matches
virtual void print(std::ostream &myCout) const
print the condition
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
const bool checkRangePhi(const unsigned int bitNumber, const Type1 &W1beginR, const Type1 &W1endR, const Type1 &W2beginR, const Type1 &W2endR) const
check if a value is in a given range and outside of a veto range
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
unsigned int deltaEtaRangeLower
const CorrelationParameter * correlationParameter() const
const T & at(int bx, unsigned i) const