20 #include <ext/hash_map> 91 iC.consumes<std::vector<L1MuGMTCand>>(m_muGmtInputTag);
118 const int iBxInEvent,
119 const bool receiveMu,
122 LogDebug(
"L1GlobalTrigger") <<
"\n**** L1GlobalTriggerGTL receiving muon data for BxInEvent = " << iBxInEvent
123 <<
"\n from input tag " << muGmtInputTag <<
"\n" 136 edm::LogWarning(
"L1GlobalTrigger") <<
"\nWarning: std::vector<L1MuGMTCand> with input tag " << muGmtInputTag
137 <<
"\nrequested in configuration, but not found in the event.\n" 141 std::vector<L1MuGMTCand>::const_iterator itMuon;
142 for (itMuon = muonData->begin(); itMuon != muonData->end(); itMuon++) {
143 if ((*itMuon).bx() == iBxInEvent) {
144 (*m_candL1Mu).push_back(&(*itMuon));
161 const bool produceL1GtObjectMapRecord,
162 const int iBxInEvent,
164 const unsigned int numberPhysTriggers,
166 const int nrL1NoIsoEG,
168 const int nrL1CenJet,
169 const int nrL1ForJet,
170 const int nrL1TauJet,
171 const int nrL1JetCounts,
172 const int ifMuEtaNumberBits,
173 const int ifCaloEtaNumberBits) {
198 bool convertScale =
false;
234 std::ostringstream myCout;
237 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
243 convertScale =
false;
258 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
259 itCondOnChip != conditionMap.end();
268 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
270 switch ((itCond->second)->condCategory()) {
278 cMapResults[itCond->first] = muCondition;
281 std::ostringstream myCout;
282 muCondition->
print(myCout);
284 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
292 itCond->second, ptrGtPSB, nrL1NoIsoEG, nrL1IsoEG, nrL1CenJet, nrL1ForJet, nrL1TauJet, ifCaloEtaNumberBits);
299 cMapResults[itCond->first] = caloCondition;
302 std::ostringstream myCout;
303 caloCondition->
print(myCout);
305 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
316 cMapResults[itCond->first] = eSumCondition;
319 std::ostringstream myCout;
320 eSumCondition->
print(myCout);
322 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
333 cMapResults[itCond->first] = jcCondition;
336 std::ostringstream myCout;
337 jcCondition->
print(myCout);
339 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
351 cMapResults[itCond->first] = bcCondition;
354 std::ostringstream myCout;
355 bcCondition->
print(myCout);
357 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
369 cMapResults[itCond->first] = etCondition;
372 std::ostringstream myCout;
373 etCondition->
print(myCout);
375 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
382 bool castorCondResult =
false;
394 cMapResults[itCond->first] = castorCondition;
397 std::ostringstream myCout;
398 castorCondition->
print(myCout);
400 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
407 bool bptxCondResult =
true;
416 cMapResults[itCond->first] = bptxCondition;
419 std::ostringstream myCout;
420 bptxCondition->
print(myCout);
422 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
429 bool externalCondResult =
true;
438 cMapResults[itCond->first] = externalCondition;
441 std::ostringstream myCout;
442 externalCondition->
print(myCout);
444 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
455 const int cond0Ind = corrTemplate->
cond0Index();
456 const int cond1Ind = corrTemplate->
cond1Index();
462 int cond0NrL1Objects = 0;
463 int cond1NrL1Objects = 0;
465 int cond0EtaBits = 0;
466 int cond1EtaBits = 0;
468 switch (cond0Categ) {
470 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
471 cond0NrL1Objects = nrL1Mu;
472 cond0EtaBits = ifMuEtaNumberBits;
475 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
479 cond0NrL1Objects = nrL1NoIsoEG;
482 cond0NrL1Objects = nrL1IsoEG;
485 cond0NrL1Objects = nrL1CenJet;
488 cond0NrL1Objects = nrL1ForJet;
491 cond0NrL1Objects = nrL1TauJet;
494 cond0NrL1Objects = 0;
498 cond0EtaBits = ifCaloEtaNumberBits;
501 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
502 cond0NrL1Objects = 1;
509 switch (cond1Categ) {
511 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
512 cond1NrL1Objects = nrL1Mu;
513 cond1EtaBits = ifMuEtaNumberBits;
516 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
520 cond1NrL1Objects = nrL1NoIsoEG;
523 cond1NrL1Objects = nrL1IsoEG;
526 cond1NrL1Objects = nrL1CenJet;
529 cond1NrL1Objects = nrL1ForJet;
532 cond1NrL1Objects = nrL1TauJet;
535 cond1NrL1Objects = 0;
539 cond1EtaBits = ifCaloEtaNumberBits;
542 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
543 cond1NrL1Objects = 1;
564 cMapResults[itCond->first] = correlationCond;
567 std::ostringstream myCout;
568 correlationCond->
print(myCout);
570 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
591 std::vector<L1GlobalTriggerObjectMap> objMapVec;
592 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
593 objMapVec.reserve(numberPhysTriggers);
595 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
599 int algBitNumber = (itAlgo->second).algoBitNumber();
607 std::ostringstream myCout;
608 (itAlgo->second).
print(myCout);
611 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
615 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
627 std::ostringstream myCout1;
628 objMap.
print(myCout1);
630 LogTrace(
"L1GlobalTrigger") << myCout1.str() << std::endl;
633 objMapVec.push_back(objMap);
638 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
646 for (std::vector<L1GtAlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip =
651 delete itCond->second;
652 itCond->second =
nullptr;
667 LogTrace(
"L1GlobalTrigger") <<
"\nL1GlobalTrigger: GMT data received for BxInEvent = " << iBxInEvent << std::endl;
670 LogTrace(
"L1GlobalTrigger") <<
"Number of GMT muons = " << nrL1Mu <<
"\n" << std::endl;
672 for (std::vector<const L1MuGMTCand *>::const_iterator iter =
m_candL1Mu->begin(); iter !=
m_candL1Mu->end(); iter++) {
673 LogTrace(
"L1GlobalTrigger") << *(*iter) << std::endl;
676 LogTrace(
"L1GlobalTrigger") << std::endl;
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlAlgorithmOR
std::vector< L1GtAlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
void init(const int nrL1Mu, const int numberPhysTriggers)
initialize the class (mainly reserve)
void print(std::ostream &myCout) const override
print condition
virtual ~L1GlobalTriggerGTL()
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
void setAlgoName(const std::string &algoNameValue)
std::vector< CombinationsInCond > & gtAlgoCombinationVector()
L1GlobalTriggerGTL(const edm::InputTag &mutag, edm::ConsumesCollector &&iC)
void print(std::ostream &myCout) const override
print condition
void swapGtObjectMap(std::vector< L1GlobalTriggerObjectMap > >ObjectMapValue)
void setVerbosity(const int verbosity)
void print(std::ostream &myCout) const override
print condition
std::vector< L1GtLogicParser::OperandToken > & operandTokenVector()
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
void swapOperandTokenVector(std::vector< L1GtLogicParser::OperandToken > &operandTokenVectorValue)
S & print(S &os, JobReport::InputFile const &f)
const L1GtConditionCategory cond1Category() const
void evaluateConditionStoreResult()
call evaluateCondition and save last result
void print(std::ostream &myCout) const override
print condition
void print(std::ostream &myCout) const override
print condition
void setVerbosity(const int verbosity)
bool gtAlgoResult() const
get / set the result of the algorithm
void convertL1Scales(const L1CaloGeometry *, const L1MuTriggerScales *, const int, const int)
perform all scale conversions
int m_verbosity
verbosity level
const L1GtTriggerMenu * m_l1GtMenu
void print(std::ostream &myCout) const
print the full object map
L1GtConditionCategory
condition categories
void print(std::ostream &myCout) const override
print condition
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlDecisionWord
const L1GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
const unsigned int gtObjectNrBinsPhi(const L1GtObject &) const
return the number of phi bins for a GT object
void run(edm::Event &iEvent, const edm::EventSetup &evSetup, const L1GlobalTriggerPSB *ptrGtPSB, const bool produceL1GtObjectMapRecord, const int iBxInEvent, L1GlobalTriggerObjectMapRecord *gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1NoIsoEG, const int nrL1IsoEG, const int nrL1CenJet, const int nrL1ForJet, const int nrL1TauJet, const int nrL1JetCounts, const int ifMuEtaNumberBits, const int ifCaloEtaNumberBits)
run the GTL
unsigned long long m_l1GtMenuCacheID
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< const L1MuGMTCand * > * m_candL1Mu
void print(std::ostream &myCout) const override
print condition
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
const L1MuTriggerScales * m_l1MuTriggerScales
void setAlgoGtlResult(bool algoGtlResultValue)
L1GtEtaPhiConversions * m_gtEtaPhiConversions
void print(std::ostream &myCout) const override
print condition
void receiveGmtObjectData(edm::Event &, const edm::InputTag &, const int iBxInEvent, const bool receiveMu, const int nrL1Mu)
receive data from Global Muon Trigger
void print(std::ostream &myCout) const override
print condition
void setAlgoBitNumber(int algoBitNumberValue)
const int cond1Index() const
void setGtCorrParDeltaPhiNrBins(const int &)
virtual void print(std::ostream &myCout) const
print all the performed conversions
ConditionEvaluationMap::iterator ItEvalMap
void print(std::ostream &myCout) const
const L1CaloGeometry * m_l1CaloGeometry
__gnu_cxx::hash_map< std::string, L1GtConditionEvaluation * > ConditionEvaluationMap
copy constructor
T const * product() const
void print(std::ostream &myCout) const override
print condition
void evaluateAlgorithm(const int chipNumber, const std::vector< ConditionEvaluationMap > &)
evaluate an algorithm
unsigned long long m_l1MuTriggerScalesCacheID
unsigned long long m_l1CaloGeometryCacheID
void setGtCorrParDeltaPhiNrBins(const int &)