51 const int ifCaloEtaNumberBits) :
144 const int& corrParDeltaPhiNrBins) {
188 if( ( useBx < candVec->getFirstBX() ) ||
194 int numberObjects = candVec->
size(useBx);
197 if (numberObjects < nObjInCond) {
201 std::vector<int>
index(numberObjects);
203 for (
int i = 0;
i < numberObjects; ++
i) {
213 bool condResult =
false;
218 objectsInComb.reserve(nObjInCond);
229 for(
int i=0;
i<numberObjects;
i++ ){
232 objectsInComb.clear();
237 objectsInComb.push_back(
i);
244 else if( nObjInCond==2 ){
246 for(
int i=0;
i<numberObjects;
i++ ){
251 if( !( passCondition0i || passCondition1i ) )
continue;
253 for(
int j=0; j<numberObjects; j++ ){
261 (passCondition0i && passCondition1j) ||
262 (passCondition0j && passCondition1i)
272 const int ObjInWscComb = 2;
273 if (nObjInCond != ObjInWscComb) {
278 <<
"number of particles in condition with spatial correlation = " 279 << nObjInCond <<
"\n it must be = " << ObjInWscComb
291 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRangeDeltaEta" << std::endl;
298 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRangeDeltaPhi" << std::endl;
305 objectsInComb.clear();
306 objectsInComb.push_back(
i);
307 objectsInComb.push_back(j);
315 else if( nObjInCond==3 ){
317 for(
int i=0;
i<numberObjects;
i++ ){
324 if( !( passCondition0i || passCondition1i || passCondition2i ) )
continue;
326 for(
int j=0; j<numberObjects; j++ ){
333 if( !( passCondition0j || passCondition1j || passCondition2j ) )
continue;
335 for(
int k=0;
k<numberObjects;
k++ ){
336 if(
k==
i ||
k==j )
continue;
344 (passCondition0i && passCondition1j && passCondition2k) ||
345 (passCondition0i && passCondition1k && passCondition2j) ||
346 (passCondition0j && passCondition1k && passCondition2i) ||
347 (passCondition0j && passCondition1i && passCondition2k) ||
348 (passCondition0k && passCondition1i && passCondition2j) ||
349 (passCondition0k && passCondition1j && passCondition2i)
354 objectsInComb.clear();
355 objectsInComb.push_back(
i);
356 objectsInComb.push_back(j);
357 objectsInComb.push_back(
k);
364 else if( nObjInCond==4 ){
367 for(
int i=0;
i<numberObjects;
i++ ){
374 if( !( passCondition0i || passCondition1i || passCondition2i || passCondition3i ) )
continue;
376 for(
int j=0; j<numberObjects; j++ ){
384 if( !( passCondition0j || passCondition1j || passCondition2j || passCondition3j ) )
continue;
386 for(
int k=0;
k<numberObjects;
k++ ){
387 if(
k==
i ||
k==j )
continue;
394 if( !( passCondition0k || passCondition1k || passCondition2k || passCondition3k ) )
continue;
396 for(
int m=0;
m<numberObjects;
m++ ){
397 if(
m==
i ||
m==j ||
m==
k )
continue;
406 (passCondition0i && passCondition1j && passCondition2k && passCondition3m) ||
407 (passCondition0i && passCondition1j && passCondition2m && passCondition3k) ||
408 (passCondition0i && passCondition1k && passCondition2j && passCondition3m) ||
409 (passCondition0i && passCondition1k && passCondition2m && passCondition3j) ||
410 (passCondition0i && passCondition1m && passCondition2j && passCondition3k) ||
411 (passCondition0i && passCondition1m && passCondition2k && passCondition3j) ||
412 (passCondition0j && passCondition1i && passCondition2k && passCondition3m) ||
413 (passCondition0j && passCondition1i && passCondition2m && passCondition3k) ||
414 (passCondition0j && passCondition1k && passCondition2i && passCondition3m) ||
415 (passCondition0j && passCondition1k && passCondition2m && passCondition3i) ||
416 (passCondition0j && passCondition1m && passCondition2i && passCondition3k) ||
417 (passCondition0j && passCondition1m && passCondition2k && passCondition3i) ||
418 (passCondition0k && passCondition1i && passCondition2j && passCondition3m) ||
419 (passCondition0k && passCondition1i && passCondition2m && passCondition3j) ||
420 (passCondition0k && passCondition1j && passCondition2i && passCondition3m) ||
421 (passCondition0k && passCondition1j && passCondition2m && passCondition3i) ||
422 (passCondition0k && passCondition1m && passCondition2i && passCondition3j) ||
423 (passCondition0k && passCondition1m && passCondition2j && passCondition3i) ||
424 (passCondition0m && passCondition1i && passCondition2j && passCondition3k) ||
425 (passCondition0m && passCondition1i && passCondition2k && passCondition3j) ||
426 (passCondition0m && passCondition1j && passCondition2i && passCondition3k) ||
427 (passCondition0m && passCondition1j && passCondition2k && passCondition3i) ||
428 (passCondition0m && passCondition1k && passCondition2i && passCondition3j) ||
429 (passCondition0m && passCondition1k && passCondition2j && passCondition3i)
432 objectsInComb.clear();
433 objectsInComb.push_back(
i);
434 objectsInComb.push_back(j);
435 objectsInComb.push_back(
k);
436 objectsInComb.push_back(
m);
449 <<
"\n CaloCondition: total number of permutations found: " << totalLoops
450 <<
"\n CaloCondition: number of permutations passing requirements: " << passLoops
451 <<
"\n" << std::endl;
497 if (iCondition >= nObjInCond || iCondition < 0) {
509 <<
"\n CaloTemplate: " 511 <<
"\n ObjectParameter : " 513 <<
"\n\t etaRange = " << objPar.
etaRange 514 <<
"\n\t phiRange = " << objPar.
phiRange 519 <<
"\n l1t::Candidate : " 520 <<
"\n\t hwPt = " << cand.
hwPt()
521 <<
"\n\t hwEta = " << cand.
hwEta()
522 <<
"\n\t hwPhi = " << cand.
hwPhi()
528 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkThreshold" << std::endl;
534 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRange(eta)" << std::endl;
544 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRange(phi)" << std::endl;
550 if( cand.
hwIso()>4 ){
551 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate has out of range hwIso = " << cand.
hwIso() << std::endl;
556 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed isolation requirement" << std::endl;
575 myCout <<
" Number of bits for eta of calorimeter objects = " 577 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 &)
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 &)
const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate &cand) const
function to check a single object if it matches a condition
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 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