50 const int nrL1MuShower)
59 m_gtMuonShowerTemplate =
cp.gtMuonShowerTemplate();
62 m_condMaxNumberObjects =
cp.condMaxNumberObjects();
63 m_condLastResult =
cp.condLastResult();
64 m_combinationsInCond =
cp.getCombinationsInCond();
66 m_verbosity =
cp.m_verbosity;
84 m_gtMuonShowerTemplate = muonTempl;
92 bool condResult =
false;
98 int nObjInCond = m_gtMuonShowerTemplate->nrObjects();
103 int useBx = bxEval + m_gtMuonShowerTemplate->condRelativeBx();
104 LogDebug(
"MuonShowerCondition") <<
"Considering BX " << useBx << std::endl;
107 if ((useBx < candVec->getFirstBX()) || (useBx > candVec->
getLastBX())) {
113 objectsInComb.reserve(nObjInCond);
116 combinationsInCond().clear();
118 objectsInComb.clear();
124 int numberObjects = candVec->
size(useBx);
125 if (numberObjects < 1) {
129 std::vector<int>
index(numberObjects);
130 for (
int i = 0;
i < numberObjects; ++
i) {
137 bool passCondition =
false;
139 for (
int i = 0;
i < numberObjects;
i++) {
140 passCondition = checkObjectParameter(0, *(candVec->
at(useBx,
index[
i])),
index[
i]);
141 condResult |= passCondition;
144 <<
"===> MuShowerCondition::evaluateCondition, PASS! This muon shower passed the condition." << std::endl;
145 objectsInComb.push_back(indexObj);
148 <<
"===> MuShowerCondition::evaluateCondition, FAIL! This muon shower failed the condition." << std::endl;
153 (combinationsInCond()).
push_back(objectsInComb);
168 const unsigned int index)
const {
170 int nObjInCond = m_gtMuonShowerTemplate->nrObjects();
172 if (iCondition >= nObjInCond || iCondition < 0) {
178 LogDebug(
"L1TGlobal") <<
"\n MuonShowerTemplate::ObjectParameter (utm objects, checking which condition is parsed): " 179 << std::hex <<
"\n\t MuonShower0 = 0x " << objPar.
MuonShower0 <<
"\n\t MuonShower1 = 0x " 183 LogDebug(
"L1TGlobal") <<
"\n l1t::MuonShower (uGT emulator bits): " 184 <<
"\n\t MuonShower0: isOneNominalInTime() = " <<
cand.isOneNominalInTime()
185 <<
"\n\t MuonShower1: isOneTightInTime() = " <<
cand.isOneTightInTime()
186 <<
"\n\t MuonShowerOutOfTime0: musOutOfTime0() = " <<
cand.musOutOfTime0()
187 <<
"\n\t MuonShowerOutOfTime1: musOutOfTime1() = " <<
cand.musOutOfTime1() << std::endl;
191 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShower0 requirement" << std::endl;
196 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShower1 requirement" << std::endl;
200 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShowerOutOfTime0 requirement" << std::endl;
204 LogDebug(
"L1TGlobal") <<
"\t\t MuonShower failed MuonShowerOutOfTime1 requirement" << std::endl;
212 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.