52 const int nrL1MuShower)
61 m_gtMuonShowerTemplate =
cp.gtMuonShowerTemplate();
64 m_condMaxNumberObjects =
cp.condMaxNumberObjects();
65 m_condLastResult =
cp.condLastResult();
66 m_combinationsInCond =
cp.getCombinationsInCond();
68 m_verbosity =
cp.m_verbosity;
86 m_gtMuonShowerTemplate = muonTempl;
94 bool condResult =
false;
100 int nObjInCond = m_gtMuonShowerTemplate->nrObjects();
105 int useBx = bxEval + m_gtMuonShowerTemplate->condRelativeBx();
106 LogDebug(
"MuonShowerCondition") <<
"Considering BX " << useBx << std::endl;
109 if ((useBx < candVec->getFirstBX()) || (useBx > candVec->
getLastBX())) {
115 objectsInComb.reserve(nObjInCond);
118 combinationsInCond().clear();
120 objectsInComb.clear();
126 int numberObjects = candVec->
size(useBx);
127 if (numberObjects < 1) {
131 std::vector<int>
index(numberObjects);
132 for (
int i = 0;
i < numberObjects; ++
i) {
139 bool passCondition =
false;
141 for (
int i = 0;
i < numberObjects;
i++) {
142 passCondition = checkObjectParameter(0, *(candVec->
at(useBx,
index[
i])),
index[
i]);
143 condResult |= passCondition;
146 <<
"===> MuShowerCondition::evaluateCondition, PASS! This muon shower passed the condition." << std::endl;
147 objectsInComb.push_back(indexObj);
150 <<
"===> MuShowerCondition::evaluateCondition, FAIL! This muon shower failed the condition." << std::endl;
155 (combinationsInCond()).
push_back(objectsInComb);
170 const unsigned int index)
const {
172 int nObjInCond = m_gtMuonShowerTemplate->nrObjects();
174 if (iCondition >= nObjInCond || iCondition < 0) {
180 LogDebug(
"L1TGlobal") <<
"\n MuonShowerTemplate::ObjectParameter (utm objects, checking which condition is parsed): " 181 << std::hex <<
"\n\t MuonShower0 = 0x " << objPar.
MuonShower0 <<
"\n\t MuonShower1 = 0x " 186 LogDebug(
"L1TGlobal") <<
"\n l1t::MuonShower (uGT emulator bits): " 187 <<
"\n\t MuonShower0: isOneNominalInTime() = " <<
cand.isOneNominalInTime()
188 <<
"\n\t MuonShower1: isOneTightInTime() = " <<
cand.isOneTightInTime()
189 <<
"\n\t MuonShower2: isTwoLooseDiffSectorsInTime() = " <<
cand.isTwoLooseDiffSectorsInTime()
190 <<
"\n\t MuonShowerOutOfTime0: musOutOfTime0() = " <<
cand.musOutOfTime0()
191 <<
"\n\t MuonShowerOutOfTime1: musOutOfTime1() = " <<
cand.musOutOfTime1() << std::endl;
195 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShower0 requirement" << std::endl;
200 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShower1 requirement" << std::endl;
205 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShower2 requirement" << std::endl;
209 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShowerOutOfTime0 requirement" << std::endl;
213 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShowerOutOfTime1 requirement" << std::endl;
221 m_gtMuonShowerTemplate->print(myCout);
const bool checkObjectParameter(const int iCondition, const l1t::MuonShower &cand, const unsigned int index) const
function to check a single object if it matches a condition
void copy(const MuonShowerCondition &cp)
copy function for copy constructor and operator=
std::vector< int > SingleCombInCond
typedefs
unsigned size(int bx) const
const bool evaluateCondition(const int bxEval) const override
the core function to check if the condition matches
void setGtMuonShowerTemplate(const MuonShowerTemplate *)
MuonShowerCondition & operator=(const MuonShowerCondition &)
const T & at(int bx, unsigned i) const
virtual void print(std::ostream &myCout) const
print condition
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
~MuonShowerCondition() override
int m_condMaxNumberObjects
void print(std::ostream &myCout) const override
print condition
bool MuonShowerOutOfTime0
bool MuonShowerOutOfTime1
void setGtGTL(const GlobalBoard *)
Set the pointer to GTL.