20 #include <ext/hash_map>
123 const edm::InputTag& muGmtInputTag,
const int iBxInEvent,
const bool receiveMu,
128 <<
"\n**** L1GlobalTriggerGTL receiving muon data for BxInEvent = "
129 << iBxInEvent <<
"\n from input tag " << muGmtInputTag <<
"\n"
145 <<
"\nWarning: std::vector<L1MuGMTCand> with input tag "
147 <<
"\nrequested in configuration, but not found in the event.\n"
152 std::vector<L1MuGMTCand>::const_iterator itMuon;
153 for (itMuon = muonData->begin(); itMuon != muonData->end(); itMuon++) {
154 if ((*itMuon).bx() == iBxInEvent) {
156 (*m_candL1Mu).push_back(&(*itMuon));
177 const bool produceL1GtObjectMapRecord,
178 const int iBxInEvent,
179 std::auto_ptr<L1GlobalTriggerObjectMapRecord>& gtObjectMapRecord,
180 const unsigned int numberPhysTriggers,
182 const int nrL1NoIsoEG,
const int nrL1IsoEG,
183 const int nrL1CenJet,
const int nrL1ForJet,
const int nrL1TauJet,
184 const int nrL1JetCounts,
185 const int ifMuEtaNumberBits,
const int ifCaloEtaNumberBits) {
207 const std::vector<std::vector<L1GtMuonTemplate> >& corrMuon =
210 const std::vector<std::vector<L1GtCaloTemplate> >& corrCalo =
213 const std::vector<std::vector<L1GtEnergySumTemplate> >& corrEnergySum =
218 bool convertScale =
false;
222 unsigned long long l1CaloGeometryCacheID =
238 unsigned long long l1MuTriggerScalesCacheID =
259 std::ostringstream myCout;
262 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
268 convertScale =
false;
284 for (std::vector<ConditionMap>::const_iterator
285 itCondOnChip = conditionMap.begin(); itCondOnChip != conditionMap.end(); itCondOnChip++) {
294 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
297 switch ((itCond->second)->condCategory()) {
301 nrL1Mu, ifMuEtaNumberBits);
309 cMapResults[itCond->first] = muCondition;
312 std::ostringstream myCout;
313 muCondition->
print(myCout);
315 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
325 itCond->second, ptrGtPSB,
331 ifCaloEtaNumberBits);
336 ((itCond->second)->objectType())[0])) / 2
340 cMapResults[itCond->first] = caloCondition;
343 std::ostringstream myCout;
344 caloCondition->
print(myCout);
346 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
354 itCond->second, ptrGtPSB);
359 cMapResults[itCond->first] = eSumCondition;
362 std::ostringstream myCout;
363 eSumCondition->
print(myCout);
365 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
373 itCond->second, ptrGtPSB, nrL1JetCounts);
378 cMapResults[itCond->first] = jcCondition;
381 std::ostringstream myCout;
382 jcCondition->
print(myCout);
384 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
393 itCond->second, ptrGtPSB);
398 cMapResults[itCond->first] = bcCondition;
401 std::ostringstream myCout;
402 bcCondition->
print(myCout);
404 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
413 itCond->second, ptrGtPSB);
418 cMapResults[itCond->first] = etCondition;
421 std::ostringstream myCout;
422 etCondition->
print(myCout);
424 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
432 bool castorCondResult =
false;
440 itCond->second, castorCondResult);
445 cMapResults[itCond->first] = castorCondition;
448 std::ostringstream myCout;
449 castorCondition->
print(myCout);
451 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
459 bool bptxCondResult =
true;
464 itCond->second, bptxCondResult);
469 cMapResults[itCond->first] = bptxCondition;
472 std::ostringstream myCout;
473 bptxCondition->
print(myCout);
475 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
483 bool externalCondResult =
true;
488 itCond->second, externalCondResult);
493 cMapResults[itCond->first] = externalCondition;
496 std::ostringstream myCout;
497 externalCondition->
print(myCout);
499 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
513 const int cond0Ind = corrTemplate->
cond0Index();
514 const int cond1Ind = corrTemplate->
cond1Index();
520 int cond0NrL1Objects = 0;
521 int cond1NrL1Objects = 0;
523 int cond0EtaBits = 0;
524 int cond1EtaBits = 0;
526 switch (cond0Categ) {
528 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
529 cond0NrL1Objects = nrL1Mu;
530 cond0EtaBits = ifMuEtaNumberBits;
534 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
538 cond0NrL1Objects= nrL1NoIsoEG;
541 cond0NrL1Objects = nrL1IsoEG;
544 cond0NrL1Objects = nrL1CenJet;
547 cond0NrL1Objects = nrL1ForJet;
550 cond0NrL1Objects = nrL1TauJet;
553 cond0NrL1Objects = 0;
557 cond0EtaBits = ifCaloEtaNumberBits;
561 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
562 cond0NrL1Objects = 1;
571 switch (cond1Categ) {
573 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
574 cond1NrL1Objects = nrL1Mu;
575 cond1EtaBits = ifMuEtaNumberBits;
579 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
583 cond1NrL1Objects= nrL1NoIsoEG;
586 cond1NrL1Objects = nrL1IsoEG;
589 cond1NrL1Objects = nrL1CenJet;
592 cond1NrL1Objects = nrL1ForJet;
595 cond1NrL1Objects = nrL1TauJet;
598 cond1NrL1Objects = 0;
602 cond1EtaBits = ifCaloEtaNumberBits;
606 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
607 cond1NrL1Objects = 1;
618 cond0Condition, cond1Condition,
619 cond0NrL1Objects, cond1NrL1Objects,
620 cond0EtaBits, cond1EtaBits,
626 cMapResults[itCond->first] = correlationCond;
629 std::ostringstream myCout;
630 correlationCond->
print(myCout);
632 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
660 std::vector<L1GlobalTriggerObjectMap> objMapVec;
661 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) objMapVec.reserve(numberPhysTriggers);
663 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
668 int algBitNumber = (itAlgo->second).algoBitNumber();
676 std::ostringstream myCout;
677 ( itAlgo->second ).
print(myCout);
680 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
685 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
698 std::ostringstream myCout1;
699 objMap.
print(myCout1);
701 LogTrace(
"L1GlobalTrigger") << myCout1.str() << std::endl;
704 objMapVec.push_back(objMap);
712 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
713 gtObjectMapRecord->swapGtObjectMap(objMapVec);
719 for (std::vector<L1GtAlgorithmEvaluation::ConditionEvaluationMap>::iterator
724 itCond = itCondOnChip->begin();
725 itCond != itCondOnChip->end(); itCond++) {
727 delete itCond->second;
748 <<
"\nL1GlobalTrigger: GMT data received for BxInEvent = "
749 << iBxInEvent << std::endl;
753 <<
"Number of GMT muons = " << nrL1Mu <<
"\n"
756 for (std::vector<const L1MuGMTCand*>::const_iterator iter =
759 LogTrace(
"L1GlobalTrigger") << *(*iter) << std::endl;
763 LogTrace(
"L1GlobalTrigger") << std::endl;
void print(std::ostream &myCout) const
print condition
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
print condition
virtual ~L1GlobalTriggerGTL()
void run(edm::Event &iEvent, const edm::EventSetup &evSetup, const L1GlobalTriggerPSB *ptrGtPSB, const bool produceL1GtObjectMapRecord, const int iBxInEvent, std::auto_ptr< L1GlobalTriggerObjectMapRecord > >ObjectMapRecord, 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
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
void setAlgoName(const std::string &algoNameValue)
void print(std::ostream &myCout) const
print condition
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
std::vector< CombinationsInCond > & gtAlgoCombinationVector()
void setVerbosity(const int verbosity)
__gnu_cxx::hash_map< std::string, L1GtConditionEvaluation * > ConditionEvaluationMap
copy constructor
std::vector< L1GtLogicParser::OperandToken > & operandTokenVector()
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
void print(std::ostream &myCout) const
print condition
void swapOperandTokenVector(std::vector< L1GtLogicParser::OperandToken > &operandTokenVectorValue)
void print(std::ostream &myCout) const
print condition
std::vector< const L1MuGMTCand * > * m_candL1Mu
const L1GtConditionCategory cond1Category() const
void evaluateConditionStoreResult()
call evaluateCondition and save last result
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
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
unsigned long long m_l1GtMenuCacheID
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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
print condition
void print(std::ostream &myCout) const
print condition
T const * product() const
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
print condition
void print(std::ostream &myCout) const
print condition
void setAlgoBitNumber(int algoBitNumberValue)
void print(std::ostream &myCout) const
print condition
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
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 &)