50 const int ifCaloEtaNumberBits)
161 if ((useBx < candVec->getFirstBX()) || (useBx > candVec->
getLastBX())) {
165 int numberObjects = candVec->
size(useBx);
168 if (numberObjects < nObjInCond) {
172 std::vector<int>
index(numberObjects);
174 for (
int i = 0;
i < numberObjects; ++
i) {
184 bool condResult =
false;
189 objectsInComb.reserve(nObjInCond);
195 if (nObjInCond == 1) {
199 for (
int i = 0;
i < numberObjects;
i++) {
201 objectsInComb.clear();
206 objectsInComb.push_back(i);
212 }
else if (nObjInCond == 2) {
213 for (
int i = 0;
i < numberObjects;
i++) {
217 if (!(passCondition0i || passCondition1i))
220 for (
int j = 0;
j < numberObjects;
j++) {
228 bool pass = ((passCondition0i && passCondition1j) || (passCondition0j && passCondition1i));
235 const int ObjInWscComb = 2;
236 if (nObjInCond != ObjInWscComb) {
240 <<
"number of particles in condition with spatial correlation = " << nObjInCond
241 <<
"\n it must be = " << ObjInWscComb << std::endl;
251 (candVec->
at(useBx,
j))->hwEta(),
255 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRangeDeltaEta" << std::endl;
261 (candVec->
at(useBx,
j))->hwPhi(),
264 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRangeDeltaPhi" << std::endl;
270 objectsInComb.clear();
271 objectsInComb.push_back(i);
272 objectsInComb.push_back(
j);
279 }
else if (nObjInCond == 3) {
280 for (
int i = 0;
i < numberObjects;
i++) {
285 if (!(passCondition0i || passCondition1i || passCondition2i))
288 for (
int j = 0;
j < numberObjects;
j++) {
296 if (!(passCondition0j || passCondition1j || passCondition2j))
299 for (
int k = 0;
k < numberObjects;
k++) {
300 if (
k == i ||
k ==
j)
308 bool pass = ((passCondition0i && passCondition1j && passCondition2k) ||
309 (passCondition0i && passCondition1k && passCondition2j) ||
310 (passCondition0j && passCondition1k && passCondition2i) ||
311 (passCondition0j && passCondition1i && passCondition2k) ||
312 (passCondition0k && passCondition1i && passCondition2j) ||
313 (passCondition0k && passCondition1j && passCondition2i));
317 objectsInComb.clear();
318 objectsInComb.push_back(i);
319 objectsInComb.push_back(
j);
320 objectsInComb.push_back(
k);
327 else if (nObjInCond == 4) {
328 for (
int i = 0;
i < numberObjects;
i++) {
334 if (!(passCondition0i || passCondition1i || passCondition2i || passCondition3i))
337 for (
int j = 0;
j < numberObjects;
j++) {
346 if (!(passCondition0j || passCondition1j || passCondition2j || passCondition3j))
349 for (
int k = 0;
k < numberObjects;
k++) {
350 if (
k == i ||
k ==
j)
358 if (!(passCondition0k || passCondition1k || passCondition2k || passCondition3k))
361 for (
int m = 0;
m < numberObjects;
m++) {
362 if (
m == i ||
m ==
j ||
m ==
k)
371 bool pass = ((passCondition0i && passCondition1j && passCondition2k && passCondition3m) ||
372 (passCondition0i && passCondition1j && passCondition2m && passCondition3k) ||
373 (passCondition0i && passCondition1k && passCondition2j && passCondition3m) ||
374 (passCondition0i && passCondition1k && passCondition2m && passCondition3j) ||
375 (passCondition0i && passCondition1m && passCondition2j && passCondition3k) ||
376 (passCondition0i && passCondition1m && passCondition2k && passCondition3j) ||
377 (passCondition0j && passCondition1i && passCondition2k && passCondition3m) ||
378 (passCondition0j && passCondition1i && passCondition2m && passCondition3k) ||
379 (passCondition0j && passCondition1k && passCondition2i && passCondition3m) ||
380 (passCondition0j && passCondition1k && passCondition2m && passCondition3i) ||
381 (passCondition0j && passCondition1m && passCondition2i && passCondition3k) ||
382 (passCondition0j && passCondition1m && passCondition2k && passCondition3i) ||
383 (passCondition0k && passCondition1i && passCondition2j && passCondition3m) ||
384 (passCondition0k && passCondition1i && passCondition2m && passCondition3j) ||
385 (passCondition0k && passCondition1j && passCondition2i && passCondition3m) ||
386 (passCondition0k && passCondition1j && passCondition2m && passCondition3i) ||
387 (passCondition0k && passCondition1m && passCondition2i && passCondition3j) ||
388 (passCondition0k && passCondition1m && passCondition2j && passCondition3i) ||
389 (passCondition0m && passCondition1i && passCondition2j && passCondition3k) ||
390 (passCondition0m && passCondition1i && passCondition2k && passCondition3j) ||
391 (passCondition0m && passCondition1j && passCondition2i && passCondition3k) ||
392 (passCondition0m && passCondition1j && passCondition2k && passCondition3i) ||
393 (passCondition0m && passCondition1k && passCondition2i && passCondition3j) ||
394 (passCondition0m && passCondition1k && passCondition2j && passCondition3i));
396 objectsInComb.clear();
397 objectsInComb.push_back(i);
398 objectsInComb.push_back(
j);
399 objectsInComb.push_back(
k);
400 objectsInComb.push_back(
m);
411 LogTrace(
"L1TGlobal") <<
"\n CaloCondition: total number of permutations found: " << totalLoops
412 <<
"\n CaloCondition: number of permutations passing requirements: " << passLoops <<
"\n" 454 unsigned int index)
const {
458 if (iCondition >= nObjInCond || iCondition < 0) {
469 LogDebug(
"L1TGlobal") <<
"\n CaloTemplate: " 473 <<
"\n\t etaRange = " << objPar.
etaRange <<
"\n\t phiRange = " << objPar.
phiRange 474 <<
"\n\t isolationLUT= " << objPar.
isolationLUT << std::endl;
476 LogDebug(
"L1TGlobal") <<
"\n l1t::Candidate : " 477 <<
"\n\t hwPt = " << cand.
hwPt() <<
"\n\t hwEta = " << cand.
hwEta()
478 <<
"\n\t hwPhi = " << cand.
hwPhi() << std::endl;
482 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkThreshold" << std::endl;
488 LogDebug(
"L1TGlobal") <<
"\t\t ilt::Candidate Failed checkIndex " << std::endl;
499 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRange(eta)" << std::endl;
513 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed checkRange(phi)" << std::endl;
519 if (cand.
hwIso() > 4) {
520 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate has out of range hwIso = " << cand.
hwIso() << std::endl;
525 LogDebug(
"L1TGlobal") <<
"\t\t l1t::Candidate failed isolation requirement" << std::endl;
544 myCout <<
" Maximum number of bins for the delta phi scales = " <<
m_corrParDeltaPhiNrBins <<
"\n " << std::endl;
const bool evaluateCondition(const int bxEval) const override
the core function to check if the condition matches
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
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
void print(std::ostream &myCout) const override
print the condition
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
~CaloCondition() override
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
void print(std::ostream &myCout) const override
print condition
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
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