39 #include "tmEventSetup/tmEventSetup.hh"
40 #include "tmEventSetup/esTriggerMenu.hh"
41 #include "tmEventSetup/esAlgorithm.hh"
42 #include "tmEventSetup/esCondition.hh"
43 #include "tmEventSetup/esObject.hh"
44 #include "tmEventSetup/esCut.hh"
45 #include "tmEventSetup/esScale.hh"
46 #include "tmGrammar/Algorithm.hh"
51 : m_triggerMenuInterface(
"NULL"),
52 m_triggerMenuName(
"NULL"),
53 m_triggerMenuImplementation(0x0),
67 m_numberConditionChips = numberConditionChipsValue;
72 m_pinsOnConditionChip = pinsOnConditionChipValue;
78 m_orderConditionChip = orderConditionChipValue;
83 m_numberPhysTriggers = numberPhysTriggersValue;
91 m_triggerMenuInterface = menuInterface;
100 m_triggerMenuImplementation = menuImplementation;
108 m_vecMuonTemplate = vecMuonTempl;
112 m_vecCaloTemplate = vecCaloTempl;
116 const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTempl) {
117 m_vecEnergySumTemplate = vecEnergySumTempl;
121 const std::vector<std::vector<ExternalTemplate> >& vecExternalTempl) {
122 m_vecExternalTemplate = vecExternalTempl;
126 const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTempl) {
127 m_vecCorrelationTemplate = vecCorrelationTempl;
131 const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& vecCorrelationWithOverlapRemovalTempl) {
132 m_vecCorrelationWithOverlapRemovalTemplate = vecCorrelationWithOverlapRemovalTempl;
138 m_corMuonTemplate = corMuonTempl;
142 m_corCaloTemplate = corCaloTempl;
146 const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTempl) {
147 m_corEnergySumTemplate = corEnergySumTempl;
157 using namespace tmeventsetup;
158 const esTriggerMenu*
menu = reinterpret_cast<const esTriggerMenu*>(utmMenu);
159 const std::map<std::string, esCondition>& condMap =
menu->getConditionMap();
161 std::map<std::string, unsigned int> extBitMap;
164 for (std::map<std::string, esCondition>::const_iterator cit = condMap.begin(); cit != condMap.end(); cit++) {
165 const esCondition& condition = cit->second;
166 if (condition.getType() == esConditionType::Externals) {
168 const std::vector<esObject>&
objects = condition.getObjects();
171 if (
object.getType() == esObjectType::EXT) {
172 unsigned int channelID =
object.getExternalChannelId();
175 if (extBitMap.count(
name) == 0)
194 m_conditionMap.resize(m_numberConditionChips);
196 m_vecMuonTemplate.resize(m_numberConditionChips);
197 m_vecCaloTemplate.resize(m_numberConditionChips);
198 m_vecEnergySumTemplate.resize(m_numberConditionChips);
199 m_vecExternalTemplate.resize(m_numberConditionChips);
201 m_vecCorrelationTemplate.resize(m_numberConditionChips);
202 m_vecCorrelationWithOverlapRemovalTemplate.resize(m_numberConditionChips);
203 m_corMuonTemplate.resize(m_numberConditionChips);
204 m_corCaloTemplate.resize(m_numberConditionChips);
205 m_corEnergySumTemplate.resize(m_numberConditionChips);
207 using namespace tmeventsetup;
210 const esTriggerMenu*
menu = reinterpret_cast<const esTriggerMenu*>(utmMenu);
213 m_triggerMenuDescription =
menu->getComment();
214 m_triggerMenuDate =
menu->getDatetime();
215 m_triggerMenuImplementation = (getMmHashN(
menu->getFirmwareUuid()) & 0xFFFFFFFF);
216 m_triggerMenuName =
menu->getName();
217 m_triggerMenuInterface =
menu->getVersion();
218 m_triggerMenuUUID = (getMmHashN(
menu->getName()) & 0xFFFFFFFF);
220 const std::map<std::string, esAlgorithm>& algoMap =
menu->getAlgorithmMap();
221 const std::map<std::string, esCondition>& condMap =
menu->getConditionMap();
222 const std::map<std::string, esScale>& scaleMap =
menu->getScaleMap();
225 m_gtScales.setScalesName(
menu->getScaleSetName());
226 parseScales(scaleMap);
229 for (std::map<std::string, esAlgorithm>::const_iterator cit = algoMap.begin(); cit != algoMap.end(); cit++) {
234 const esAlgorithm&
algo = cit->second;
237 parseAlgorithm(
algo, chipNr);
240 const std::vector<std::string>& rpn_vec =
algo.getRpnVector();
241 for (
size_t ii = 0;
ii < rpn_vec.size();
ii++) {
246 const esCondition& condition = condMap.find(
token)->second;
249 if ((m_conditionMap[chipNr]).
count(condition.getName()) == 0) {
251 if (condition.getType() == esConditionType::SingleEgamma ||
252 condition.getType() == esConditionType::DoubleEgamma ||
253 condition.getType() == esConditionType::TripleEgamma ||
254 condition.getType() == esConditionType::QuadEgamma || condition.getType() == esConditionType::SingleTau ||
255 condition.getType() == esConditionType::DoubleTau || condition.getType() == esConditionType::TripleTau ||
256 condition.getType() == esConditionType::QuadTau || condition.getType() == esConditionType::SingleJet ||
257 condition.getType() == esConditionType::DoubleJet || condition.getType() == esConditionType::TripleJet ||
258 condition.getType() == esConditionType::QuadJet) {
259 parseCalo(condition, chipNr,
false);
262 }
else if (condition.getType() == esConditionType::TotalEt ||
263 condition.getType() == esConditionType::TotalEtEM ||
264 condition.getType() == esConditionType::TotalHt ||
265 condition.getType() == esConditionType::MissingEt ||
266 condition.getType() == esConditionType::MissingHt ||
267 condition.getType() == esConditionType::MissingEtHF ||
268 condition.getType() == esConditionType::TowerCount ||
269 condition.getType() == esConditionType::MinBiasHFP0 ||
270 condition.getType() == esConditionType::MinBiasHFM0 ||
271 condition.getType() == esConditionType::MinBiasHFP1 ||
272 condition.getType() == esConditionType::MinBiasHFM1 ||
273 condition.getType() == esConditionType::AsymmetryEt ||
274 condition.getType() == esConditionType::AsymmetryHt ||
275 condition.getType() == esConditionType::AsymmetryEtHF ||
276 condition.getType() == esConditionType::AsymmetryHtHF ||
277 condition.getType() == esConditionType::Centrality0 ||
278 condition.getType() == esConditionType::Centrality1 ||
279 condition.getType() == esConditionType::Centrality2 ||
280 condition.getType() == esConditionType::Centrality3 ||
281 condition.getType() == esConditionType::Centrality4 ||
282 condition.getType() == esConditionType::Centrality5 ||
283 condition.getType() == esConditionType::Centrality6 ||
284 condition.getType() == esConditionType::Centrality7) {
285 parseEnergySum(condition, chipNr,
false);
290 condition.getType() == esConditionType::TripleMuon ||
291 condition.getType() == esConditionType::QuadMuon) {
292 parseMuon(condition, chipNr,
false);
295 }
else if (condition.getType() == esConditionType::MuonMuonCorrelation ||
296 condition.getType() == esConditionType::MuonEsumCorrelation ||
297 condition.getType() == esConditionType::CaloMuonCorrelation ||
298 condition.getType() == esConditionType::CaloCaloCorrelation ||
299 condition.getType() == esConditionType::CaloEsumCorrelation ||
300 condition.getType() == esConditionType::InvariantMass ||
301 condition.getType() == esConditionType::TransverseMass ||
302 condition.getType() == esConditionType::InvariantMassUpt) {
303 parseCorrelation(condition, chipNr);
306 }
else if (condition.getType() == esConditionType::Externals) {
307 parseExternal(condition, chipNr);
309 }
else if (condition.getType() == esConditionType::SingleEgammaOvRm ||
310 condition.getType() == esConditionType::DoubleEgammaOvRm ||
311 condition.getType() == esConditionType::TripleEgammaOvRm ||
312 condition.getType() == esConditionType::QuadEgammaOvRm ||
313 condition.getType() == esConditionType::SingleTauOvRm ||
314 condition.getType() == esConditionType::DoubleTauOvRm ||
315 condition.getType() == esConditionType::TripleTauOvRm ||
316 condition.getType() == esConditionType::QuadTauOvRm ||
317 condition.getType() == esConditionType::SingleJetOvRm ||
318 condition.getType() == esConditionType::DoubleJetOvRm ||
319 condition.getType() == esConditionType::TripleJetOvRm ||
320 condition.getType() == esConditionType::QuadJetOvRm) {
323 <<
"SingleEgammaOvRm" << std::endl
324 <<
"DoubleEgammaOvRm" << std::endl
325 <<
"TripleEgammaOvRm" << std::endl
326 <<
"QuadEgammaOvRm" << std::endl
327 <<
"SingleTauOvRm" << std::endl
328 <<
"DoubleTauOvRm" << std::endl
329 <<
"TripleTauOvRm" << std::endl
330 <<
"QuadTauOvRm" << std::endl
331 <<
"SingleJetOvRm" << std::endl
332 <<
"DoubleJetOvRm" << std::endl
333 <<
"TripleJetOvRm" << std::endl
334 <<
"QuadJetOvRm" << std::endl
335 <<
"The above conditions types OvRm are not implemented yet in the parser. Please remove alogrithms that "
336 "use this type of condtion from L1T Menu!"
341 else if (condition.getType() == esConditionType::CaloCaloCorrelationOvRm ||
342 condition.getType() == esConditionType::InvariantMassOvRm ||
343 condition.getType() == esConditionType::TransverseMassOvRm) {
344 parseCorrelationWithOverlapRemoval(condition, chipNr);
359 m_triggerMenuInterfaceAuthor =
val;
363 m_triggerMenuInterfaceDescription =
val;
381 for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip != m_conditionMap.end();
385 itCondOnChip->clear();
389 m_algorithmMap.clear();
396 LogTrace(
"TriggerMenuParser") <<
" Trying to insert condition \"" << cName <<
"\" in the condition map."
400 if ((m_conditionMap[chipNr]).
count(cName) != 0) {
401 LogTrace(
"TriggerMenuParser") <<
" Condition " << cName <<
" already exists - not inserted!" << std::endl;
405 (m_conditionMap[chipNr])[cName] = &
cond;
406 LogTrace(
"TriggerMenuParser") <<
" OK - condition inserted!" << std::endl;
419 if (m_algorithmMap.count(algName) != 0) {
420 LogTrace(
"TriggerMenuParser") <<
" Algorithm \"" << algName
421 <<
"\"already exists in the algorithm map- not inserted!" << std::endl;
425 if (m_algorithmAliasMap.count(algAlias) != 0) {
426 LogTrace(
"TriggerMenuParser") <<
" Algorithm alias \"" << algAlias
427 <<
"\"already exists in the algorithm alias map- not inserted!" << std::endl;
434 LogTrace(
"TriggerMenuParser") <<
" Bit number " <<
bitNumber <<
" outside allowed range [0, "
435 << m_numberPhysTriggers <<
") - algorithm not inserted!" << std::endl;
440 if (m_algorithmMap.size() >= m_numberPhysTriggers) {
441 LogTrace(
"TriggerMenuParser") <<
" More than maximum allowed " << m_numberPhysTriggers
442 <<
" algorithms in the algorithm map - not inserted!" << std::endl;
448 static_cast<int>(m_numberConditionChips), static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
450 if ((chipNr < 0) || (chipNr > static_cast<int>(m_numberConditionChips))) {
451 LogTrace(
"TriggerMenuParser") <<
" Chip number " << chipNr <<
" outside allowed range [0, "
452 << m_numberConditionChips <<
") - algorithm not inserted!" << std::endl;
458 static_cast<int>(m_numberConditionChips), static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
460 if ((outputPin < 0) || (outputPin > static_cast<int>(m_pinsOnConditionChip))) {
461 LogTrace(
"TriggerMenuParser") <<
" Output pin " << outputPin <<
" outside allowed range [0, "
462 << m_pinsOnConditionChip <<
"] - algorithm not inserted!" << std::endl;
467 for (
CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
468 int iPin = (itAlgo->second)
469 .algoOutputPin(static_cast<int>(m_numberConditionChips),
470 static_cast<int>(m_pinsOnConditionChip),
471 m_orderConditionChip);
473 int iChip = (itAlgo->second)
474 .algoChipNumber(static_cast<int>(m_numberConditionChips),
475 static_cast<int>(m_pinsOnConditionChip),
476 m_orderConditionChip);
478 if ((outputPin == iPin) && (chipNr == iChip)) {
479 LogTrace(
"TriggerMenuParser") <<
" Output pin " << outputPin <<
" is the same as for algorithm " << iName
480 <<
"\n from the same chip number " << chipNr <<
" - algorithm not inserted!"
487 m_algorithmMap[algName] = alg;
488 m_algorithmAliasMap[algAlias] = alg;
497 template <
typename T>
499 std::stringstream
ss;
504 std::stringstream
ss;
519 using namespace tmeventsetup;
534 for (std::map<std::string, esScale>::const_iterator cit = scaleMap.begin(); cit != scaleMap.end(); cit++) {
535 const esScale&
scale = cit->second;
539 scaleParam = &muScales;
541 scaleParam = &egScales;
543 scaleParam = &tauScales;
545 scaleParam = &jetScales;
547 scaleParam = &ettScales;
548 else if (
scale.getObjectType() == esObjectType::ETTEM)
549 scaleParam = &ettEmScales;
551 scaleParam = &etmScales;
552 else if (
scale.getObjectType() == esObjectType::ETMHF)
553 scaleParam = &etmHfScales;
555 scaleParam = &httScales;
557 scaleParam = &htmScales;
559 scaleParam =
nullptr;
561 if (scaleParam !=
nullptr) {
562 switch (
scale.getScaleType()) {
563 case esScaleType::EtScale: {
569 const std::vector<esBin>& binsV =
scale.getBins();
570 for (
unsigned int i = 0;
i < binsV.size();
i++) {
571 const esBin&
bin = binsV.at(
i);
572 std::pair<double, double> binLimits(
bin.minimum,
bin.maximum);
573 scaleParam->
etBins.push_back(binLimits);
580 scale.getObjectType() == esObjectType::ETTEM ||
scale.getObjectType() == esObjectType::ETMHF) {
585 scale.getObjectType() == esObjectType::ETTEM) {
593 case esScaleType::UnconstrainedPtScale: {
599 const std::vector<esBin>& binsV =
scale.getBins();
600 for (
unsigned int i = 0;
i < binsV.size();
i++) {
601 const esBin&
bin = binsV.at(
i);
602 std::pair<double, double> binLimits(
bin.minimum,
bin.maximum);
603 scaleParam->
uptBins.push_back(binLimits);
606 case esScaleType::EtaScale: {
612 const std::vector<esBin>& binsV =
scale.getBins();
614 for (
unsigned int i = 0;
i < binsV.size();
i++) {
615 const esBin&
bin = binsV.at(
i);
616 std::pair<double, double> binLimits(
bin.minimum,
bin.maximum);
617 scaleParam->
etaBins.at(
bin.hw_index) = binLimits;
620 case esScaleType::PhiScale: {
626 const std::vector<esBin>& binsV =
scale.getBins();
628 for (
unsigned int i = 0;
i < binsV.size();
i++) {
629 const esBin&
bin = binsV.at(
i);
630 std::pair<double, double> binLimits(
bin.minimum,
bin.maximum);
631 scaleParam->
phiBins.at(
bin.hw_index) = binLimits;
642 m_gtScales.setMuonScales(muScales);
643 m_gtScales.setEGScales(egScales);
644 m_gtScales.setTauScales(tauScales);
645 m_gtScales.setJetScales(jetScales);
646 m_gtScales.setETTScales(ettScales);
647 m_gtScales.setETTEmScales(ettEmScales);
648 m_gtScales.setETMScales(etmScales);
649 m_gtScales.setETMHfScales(etmHfScales);
650 m_gtScales.setHTTScales(httScales);
651 m_gtScales.setHTMScales(htmScales);
654 bool hasPrecision =
false;
655 std::map<std::string, unsigned int> precisions;
656 getPrecisions(precisions, scaleMap);
657 for (std::map<std::string, unsigned int>::const_iterator cit = precisions.begin(); cit != precisions.end(); cit++) {
665 parseCalMuEta_LUTS(scaleMap,
"EG",
"MU");
666 parseCalMuEta_LUTS(scaleMap,
"JET",
"MU");
667 parseCalMuEta_LUTS(scaleMap,
"TAU",
"MU");
671 parseCalMuPhi_LUTS(scaleMap,
"EG",
"MU");
672 parseCalMuPhi_LUTS(scaleMap,
"JET",
"MU");
673 parseCalMuPhi_LUTS(scaleMap,
"TAU",
"MU");
674 parseCalMuPhi_LUTS(scaleMap,
"HTM",
"MU");
675 parseCalMuPhi_LUTS(scaleMap,
"ETM",
"MU");
676 parseCalMuPhi_LUTS(scaleMap,
"ETMHF",
"MU");
680 parsePt_LUTS(scaleMap,
"Mass",
"EG", precisions[
"PRECISION-EG-MU-MassPt"]);
681 parsePt_LUTS(scaleMap,
"Mass",
"MU", precisions[
"PRECISION-EG-MU-MassPt"]);
682 parseUpt_LUTS(scaleMap,
"Mass",
"MU", precisions[
"PRECISION-EG-MU-MassPt"]);
683 parsePt_LUTS(scaleMap,
"Mass",
"JET", precisions[
"PRECISION-EG-JET-MassPt"]);
684 parsePt_LUTS(scaleMap,
"Mass",
"TAU", precisions[
"PRECISION-EG-TAU-MassPt"]);
685 parsePt_LUTS(scaleMap,
"Mass",
"ETM", precisions[
"PRECISION-EG-ETM-MassPt"]);
686 parsePt_LUTS(scaleMap,
"Mass",
"ETMHF", precisions[
"PRECISION-EG-ETMHF-MassPt"]);
687 parsePt_LUTS(scaleMap,
"Mass",
"HTM", precisions[
"PRECISION-EG-HTM-MassPt"]);
691 parsePt_LUTS(scaleMap,
"TwoBody",
"EG", precisions[
"PRECISION-EG-MU-TwoBodyPt"]);
692 parsePt_LUTS(scaleMap,
"TwoBody",
"MU", precisions[
"PRECISION-EG-MU-TwoBodyPt"]);
693 parsePt_LUTS(scaleMap,
"TwoBody",
"JET", precisions[
"PRECISION-EG-JET-TwoBodyPt"]);
694 parsePt_LUTS(scaleMap,
"TwoBody",
"TAU", precisions[
"PRECISION-EG-TAU-TwoBodyPt"]);
695 parsePt_LUTS(scaleMap,
"TwoBody",
"ETM", precisions[
"PRECISION-EG-ETM-TwoBodyPt"]);
696 parsePt_LUTS(scaleMap,
"TwoBody",
"ETMHF", precisions[
"PRECISION-EG-ETMHF-TwoBodyPt"]);
697 parsePt_LUTS(scaleMap,
"TwoBody",
"HTM", precisions[
"PRECISION-EG-HTM-TwoBodyPt"]);
701 parseDeltaEta_Cosh_LUTS(
702 scaleMap,
"EG",
"EG", precisions[
"PRECISION-EG-EG-Delta"], precisions[
"PRECISION-EG-EG-Math"]);
703 parseDeltaEta_Cosh_LUTS(
704 scaleMap,
"EG",
"JET", precisions[
"PRECISION-EG-JET-Delta"], precisions[
"PRECISION-EG-JET-Math"]);
705 parseDeltaEta_Cosh_LUTS(
706 scaleMap,
"EG",
"TAU", precisions[
"PRECISION-EG-TAU-Delta"], precisions[
"PRECISION-EG-TAU-Math"]);
707 parseDeltaEta_Cosh_LUTS(
708 scaleMap,
"EG",
"MU", precisions[
"PRECISION-EG-MU-Delta"], precisions[
"PRECISION-EG-MU-Math"]);
710 parseDeltaEta_Cosh_LUTS(
711 scaleMap,
"JET",
"JET", precisions[
"PRECISION-JET-JET-Delta"], precisions[
"PRECISION-JET-JET-Math"]);
712 parseDeltaEta_Cosh_LUTS(
713 scaleMap,
"JET",
"TAU", precisions[
"PRECISION-JET-TAU-Delta"], precisions[
"PRECISION-JET-TAU-Math"]);
714 parseDeltaEta_Cosh_LUTS(
715 scaleMap,
"JET",
"MU", precisions[
"PRECISION-JET-MU-Delta"], precisions[
"PRECISION-JET-MU-Math"]);
717 parseDeltaEta_Cosh_LUTS(
718 scaleMap,
"TAU",
"TAU", precisions[
"PRECISION-TAU-TAU-Delta"], precisions[
"PRECISION-TAU-TAU-Math"]);
719 parseDeltaEta_Cosh_LUTS(
720 scaleMap,
"TAU",
"MU", precisions[
"PRECISION-TAU-MU-Delta"], precisions[
"PRECISION-TAU-MU-Math"]);
722 parseDeltaEta_Cosh_LUTS(
723 scaleMap,
"MU",
"MU", precisions[
"PRECISION-MU-MU-Delta"], precisions[
"PRECISION-MU-MU-Math"]);
727 parseDeltaPhi_Cos_LUTS(
728 scaleMap,
"EG",
"EG", precisions[
"PRECISION-EG-EG-Delta"], precisions[
"PRECISION-EG-EG-Math"]);
729 parseDeltaPhi_Cos_LUTS(
730 scaleMap,
"EG",
"JET", precisions[
"PRECISION-EG-JET-Delta"], precisions[
"PRECISION-EG-JET-Math"]);
731 parseDeltaPhi_Cos_LUTS(
732 scaleMap,
"EG",
"TAU", precisions[
"PRECISION-EG-TAU-Delta"], precisions[
"PRECISION-EG-TAU-Math"]);
733 parseDeltaPhi_Cos_LUTS(
734 scaleMap,
"EG",
"ETM", precisions[
"PRECISION-EG-ETM-Delta"], precisions[
"PRECISION-EG-ETM-Math"]);
735 parseDeltaPhi_Cos_LUTS(
736 scaleMap,
"EG",
"ETMHF", precisions[
"PRECISION-EG-ETMHF-Delta"], precisions[
"PRECISION-EG-ETMHF-Math"]);
737 parseDeltaPhi_Cos_LUTS(
738 scaleMap,
"EG",
"HTM", precisions[
"PRECISION-EG-HTM-Delta"], precisions[
"PRECISION-EG-HTM-Math"]);
739 parseDeltaPhi_Cos_LUTS(
740 scaleMap,
"EG",
"MU", precisions[
"PRECISION-EG-MU-Delta"], precisions[
"PRECISION-EG-MU-Math"]);
742 parseDeltaPhi_Cos_LUTS(
743 scaleMap,
"JET",
"JET", precisions[
"PRECISION-JET-JET-Delta"], precisions[
"PRECISION-JET-JET-Math"]);
744 parseDeltaPhi_Cos_LUTS(
745 scaleMap,
"JET",
"TAU", precisions[
"PRECISION-JET-TAU-Delta"], precisions[
"PRECISION-JET-TAU-Math"]);
746 parseDeltaPhi_Cos_LUTS(
747 scaleMap,
"JET",
"ETM", precisions[
"PRECISION-JET-ETM-Delta"], precisions[
"PRECISION-JET-ETM-Math"]);
748 parseDeltaPhi_Cos_LUTS(
749 scaleMap,
"JET",
"ETMHF", precisions[
"PRECISION-JET-ETMHF-Delta"], precisions[
"PRECISION-JET-ETMHF-Math"]);
750 parseDeltaPhi_Cos_LUTS(
751 scaleMap,
"JET",
"HTM", precisions[
"PRECISION-JET-HTM-Delta"], precisions[
"PRECISION-JET-HTM-Math"]);
752 parseDeltaPhi_Cos_LUTS(
753 scaleMap,
"JET",
"MU", precisions[
"PRECISION-JET-MU-Delta"], precisions[
"PRECISION-JET-MU-Math"]);
755 parseDeltaPhi_Cos_LUTS(
756 scaleMap,
"TAU",
"TAU", precisions[
"PRECISION-TAU-TAU-Delta"], precisions[
"PRECISION-TAU-TAU-Math"]);
757 parseDeltaPhi_Cos_LUTS(
758 scaleMap,
"TAU",
"ETM", precisions[
"PRECISION-TAU-ETM-Delta"], precisions[
"PRECISION-TAU-ETM-Math"]);
759 parseDeltaPhi_Cos_LUTS(
760 scaleMap,
"TAU",
"ETMHF", precisions[
"PRECISION-TAU-ETMHF-Delta"], precisions[
"PRECISION-TAU-ETMHF-Math"]);
761 parseDeltaPhi_Cos_LUTS(
762 scaleMap,
"TAU",
"HTM", precisions[
"PRECISION-TAU-HTM-Delta"], precisions[
"PRECISION-TAU-HTM-Math"]);
763 parseDeltaPhi_Cos_LUTS(
764 scaleMap,
"TAU",
"MU", precisions[
"PRECISION-TAU-MU-Delta"], precisions[
"PRECISION-TAU-MU-Math"]);
766 parseDeltaPhi_Cos_LUTS(
767 scaleMap,
"MU",
"ETM", precisions[
"PRECISION-MU-ETM-Delta"], precisions[
"PRECISION-MU-ETM-Math"]);
768 parseDeltaPhi_Cos_LUTS(
769 scaleMap,
"MU",
"ETMHF", precisions[
"PRECISION-MU-ETMHF-Delta"], precisions[
"PRECISION-MU-ETMHF-Math"]);
770 parseDeltaPhi_Cos_LUTS(
771 scaleMap,
"MU",
"HTM", precisions[
"PRECISION-MU-HTM-Delta"], precisions[
"PRECISION-MU-HTM-Math"]);
772 parseDeltaPhi_Cos_LUTS(
773 scaleMap,
"MU",
"MU", precisions[
"PRECISION-MU-MU-Delta"], precisions[
"PRECISION-MU-MU-Math"]);
775 parsePhi_Trig_LUTS(scaleMap,
"EG",
l1t::COS, precisions[
"PRECISION-EG-EG-Math"]);
776 parsePhi_Trig_LUTS(scaleMap,
"JET",
l1t::COS, precisions[
"PRECISION-JET-JET-Math"]);
777 parsePhi_Trig_LUTS(scaleMap,
"TAU",
l1t::COS, precisions[
"PRECISION-TAU-TAU-Math"]);
778 parsePhi_Trig_LUTS(scaleMap,
"MU",
l1t::COS, precisions[
"PRECISION-MU-MU-Math"]);
780 parsePhi_Trig_LUTS(scaleMap,
"EG",
l1t::SIN, precisions[
"PRECISION-EG-EG-Math"]);
781 parsePhi_Trig_LUTS(scaleMap,
"JET",
l1t::SIN, precisions[
"PRECISION-JET-JET-Math"]);
782 parsePhi_Trig_LUTS(scaleMap,
"TAU",
l1t::SIN, precisions[
"PRECISION-TAU-TAU-Math"]);
783 parsePhi_Trig_LUTS(scaleMap,
"MU",
l1t::SIN, precisions[
"PRECISION-MU-MU-Math"]);
796 using namespace tmeventsetup;
805 if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
808 const esScale* scale1 = &scaleMap.find(scLabel1)->second;
809 const esScale* scale2 = &scaleMap.find(scLabel2)->second;
811 std::vector<long long> lut_cal_2_mu_eta;
812 getCaloMuonEtaConversionLut(lut_cal_2_mu_eta, scale1, scale2);
817 m_gtScales.setLUT_CalMuEta(lutName, lut_cal_2_mu_eta);
823 using namespace tmeventsetup;
832 if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
835 const esScale* scale1 = &scaleMap.find(scLabel1)->second;
836 const esScale* scale2 = &scaleMap.find(scLabel2)->second;
838 std::vector<long long> lut_cal_2_mu_phi;
839 getCaloMuonPhiConversionLut(lut_cal_2_mu_phi, scale1, scale2);
844 m_gtScales.setLUT_CalMuPhi(lutName, lut_cal_2_mu_phi);
851 using namespace tmeventsetup;
858 if (scaleMap.find(scLabel1) == scaleMap.end())
861 const esScale* scale1 = &scaleMap.find(scLabel1)->second;
863 std::vector<long long> lut_pt;
864 getLut(lut_pt, scale1, prec);
866 m_gtScales.setLUT_Pt(lutpfx +
"_" + scLabel1, lut_pt, prec);
874 using namespace tmeventsetup;
881 if (scaleMap.find(scLabel1) == scaleMap.end())
884 const esScale* scale1 = &scaleMap.find(scLabel1)->second;
886 std::vector<long long> lut_pt;
887 getLut(lut_pt, scale1, prec);
889 m_gtScales.setLUT_Upt(lutpfx +
"_" + scLabel1, lut_pt, prec);
896 unsigned int prec2) {
897 using namespace tmeventsetup;
906 if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
909 const esScale* scale1 = &scaleMap.find(scLabel1)->second;
910 const esScale* scale2 = &scaleMap.find(scLabel2)->second;
911 std::vector<double> val_delta_eta;
912 std::vector<long long> lut_delta_eta;
913 size_t n = getDeltaVector(val_delta_eta, scale1, scale2);
914 setLut(lut_delta_eta, val_delta_eta, prec1);
918 m_gtScales.setLUT_DeltaEta(lutName, lut_delta_eta, prec1);
921 std::vector<long long> lut_cosh;
922 applyCosh(val_delta_eta,
n);
923 setLut(lut_cosh, val_delta_eta, prec2);
924 m_gtScales.setLUT_Cosh(lutName, lut_cosh, prec2);
931 unsigned int prec2) {
932 using namespace tmeventsetup;
941 if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
944 const esScale* scale1 = &scaleMap.find(scLabel1)->second;
945 const esScale* scale2 = &scaleMap.find(scLabel2)->second;
946 std::vector<double> val_delta_phi;
947 std::vector<long long> lut_delta_phi;
948 size_t n = getDeltaVector(val_delta_phi, scale1, scale2);
949 setLut(lut_delta_phi, val_delta_phi, prec1);
953 m_gtScales.setLUT_DeltaPhi(lutName, lut_delta_phi, prec1);
956 std::vector<long long> lut_cos;
957 applyCos(val_delta_phi,
n);
958 setLut(lut_cos, val_delta_phi, prec2);
959 m_gtScales.setLUT_Cos(lutName, lut_cos, prec2);
966 using namespace tmeventsetup;
972 if (scaleMap.find(scLabel) == scaleMap.end())
977 const esScale*
scale = &scaleMap.find(scLabel)->second;
982 const size_t bitwidth =
std::ceil(std::log10(
n) / std::log10(2));
986 for (
size_t ii = 0;
ii <
n;
ii++) {
991 std::vector<long long> lut;
994 setLut(lut,
array, prec);
995 m_gtScales.setLUT_Sin(lutName, lut, prec);
998 setLut(lut,
array, prec);
999 m_gtScales.setLUT_Cos(lutName, lut, prec);
1015 using namespace tmeventsetup;
1034 }
else if (condMu.getType() == esConditionType::TripleMuon) {
1038 }
else if (condMu.getType() == esConditionType::QuadMuon) {
1043 edm::LogError(
"TriggerMenuParser") <<
"Wrong type for muon-condition (" <<
type <<
")" << std::endl;
1048 edm::LogError(
"TriggerMenuParser") <<
"Unknown type for muon-condition (" <<
type <<
")"
1049 <<
"\nCan not determine number of trigger objects. " << std::endl;
1053 LogDebug(
"TriggerMenuParser") <<
"\n ****************************************** "
1055 <<
"\n condition = " << condition <<
"\n particle = " << particle
1056 <<
"\n type = " <<
type <<
"\n name = " <<
name << std::endl;
1061 std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1067 std::vector<uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1068 tmpValues.reserve(nrObj);
1070 if (
int(condMu.getObjects().size()) != nrObj) {
1071 edm::LogError(
"TriggerMenuParser") <<
" condMu objects: nrObj = " << nrObj
1072 <<
"condMu.getObjects().size() = " << condMu.getObjects().size() << std::endl;
1077 unsigned int chargeCorrelation = 1;
1078 const std::vector<esCut>&
cuts = condMu.getCuts();
1079 for (
size_t jj = 0;
jj <
cuts.size();
jj++) {
1081 if (
cut.getCutType() == esCutType::ChargeCorrelation) {
1082 if (
cut.getData() ==
"ls")
1083 chargeCorrelation = 2;
1084 else if (
cut.getData() ==
"os")
1085 chargeCorrelation = 4;
1087 chargeCorrelation = 1;
1101 const std::vector<esObject>&
objects = condMu.getObjects();
1104 gEq = (
object.getComparisonOperator() == esComparisonOperator::GE);
1107 relativeBx =
object.getBxOffset();
1110 int upperUnconstrainedPtInd = -1;
1111 int lowerUnconstrainedPtInd = 0;
1112 int upperImpactParameterInd = -1;
1113 int lowerImpactParameterInd = 0;
1114 int upperThresholdInd = -1;
1115 int lowerThresholdInd = 0;
1116 int upperIndexInd = -1;
1117 int lowerIndexInd = 0;
1119 unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1121 unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1122 int isolationLUT = 0xF;
1123 int impactParameterLUT = 0xF;
1125 int qualityLUT = 0xFFFF;
1127 const std::vector<esCut>&
cuts =
object.getCuts();
1128 for (
size_t kk = 0;
kk <
cuts.size();
kk++) {
1131 switch (
cut.getCutType()) {
1132 case esCutType::UnconstrainedPt:
1133 lowerUnconstrainedPtInd =
cut.getMinimum().index;
1134 upperUnconstrainedPtInd =
cut.getMaximum().index;
1137 case esCutType::ImpactParameter:
1138 lowerImpactParameterInd =
cut.getMinimum().index;
1139 upperImpactParameterInd =
cut.getMaximum().index;
1140 impactParameterLUT = l1tstr2int(
cut.getData());
1144 lowerThresholdInd =
cut.getMinimum().index;
1145 upperThresholdInd =
cut.getMaximum().index;
1148 case esCutType::Slice:
1149 lowerIndexInd =
int(
cut.getMinimum().value);
1150 upperIndexInd =
int(
cut.getMaximum().value);
1153 case esCutType::Eta: {
1155 etaWindow1Lower =
cut.getMinimum().index;
1156 etaWindow1Upper =
cut.getMaximum().index;
1157 }
else if (cntEta == 1) {
1158 etaWindow2Lower =
cut.getMinimum().index;
1159 etaWindow2Upper =
cut.getMaximum().index;
1162 <<
"Too Many Eta Cuts for muon-condition (" << particle <<
")" << std::endl;
1171 phiWindow1Lower =
cut.getMinimum().index;
1172 phiWindow1Upper =
cut.getMaximum().index;
1173 }
else if (cntPhi == 1) {
1174 phiWindow2Lower =
cut.getMinimum().index;
1175 phiWindow2Upper =
cut.getMaximum().index;
1178 <<
"Too Many Phi Cuts for muon-condition (" << particle <<
")" << std::endl;
1186 if (
cut.getData() ==
"positive")
1188 else if (
cut.getData() ==
"negative")
1195 qualityLUT = l1tstr2int(
cut.getData());
1198 case esCutType::Isolation: {
1199 isolationLUT = l1tstr2int(
cut.getData());
1209 objParameter[cnt].unconstrainedPtHigh = upperUnconstrainedPtInd;
1210 objParameter[cnt].unconstrainedPtLow = lowerUnconstrainedPtInd;
1211 objParameter[cnt].impactParameterHigh = upperImpactParameterInd;
1212 objParameter[cnt].impactParameterLow = lowerImpactParameterInd;
1213 objParameter[cnt].impactParameterLUT = impactParameterLUT;
1215 objParameter[cnt].ptHighThreshold = upperThresholdInd;
1216 objParameter[cnt].ptLowThreshold = lowerThresholdInd;
1218 objParameter[cnt].indexHigh = upperIndexInd;
1219 objParameter[cnt].indexLow = lowerIndexInd;
1221 objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1222 objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1223 objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1224 objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1226 objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1227 objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1228 objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1229 objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1232 objParameter[cnt].enableMip =
false;
1233 objParameter[cnt].enableIso =
false;
1234 objParameter[cnt].requestIso =
false;
1236 objParameter[cnt].charge =
charge;
1237 objParameter[cnt].qualityLUT = qualityLUT;
1238 objParameter[cnt].isolationLUT = isolationLUT;
1258 std::ostringstream myCoutStream;
1259 muonCond.
print(myCoutStream);
1260 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
1264 if (!insertConditionIntoMap(muonCond, chipNr)) {
1265 edm::LogError(
"TriggerMenuParser") <<
" Error: duplicate condition (" <<
name <<
")" << std::endl;
1268 LogDebug(
"TriggerMenuParser") <<
"Added Condition " <<
name <<
" to the ConditionMap" << std::endl;
1270 (m_corMuonTemplate[chipNr]).push_back(muonCond);
1272 LogDebug(
"TriggerMenuParser") <<
"Added Condition " <<
name <<
" to the vecMuonTemplate vector" << std::endl;
1273 (m_vecMuonTemplate[chipNr]).push_back(muonCond);
1283 using namespace tmeventsetup;
1295 edm::LogError(
"TriggerMenuParser") <<
"Unknown type for muon-condition (" <<
type <<
")"
1296 <<
"\nCan not determine number of trigger objects. " << std::endl;
1300 LogDebug(
"TriggerMenuParser") <<
"\n ****************************************** "
1302 <<
"\n condition = " << condition <<
"\n particle = " << particle
1303 <<
"\n type = " <<
type <<
"\n name = " <<
name << std::endl;
1308 std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1314 std::vector<uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1315 tmpValues.reserve(nrObj);
1320 unsigned int chargeCorrelation = 0;
1321 if (str_chargeCorrelation ==
"ig")
1322 chargeCorrelation = 1;
1323 else if (str_chargeCorrelation ==
"ls")
1324 chargeCorrelation = 2;
1325 else if (str_chargeCorrelation ==
"os")
1326 chargeCorrelation = 4;
1336 gEq = (corrMu->getComparisonOperator() == esComparisonOperator::GE);
1339 relativeBx = corrMu->getBxOffset();
1342 int upperUnconstrainedPtInd = -1;
1343 int lowerUnconstrainedPtInd = 0;
1344 int upperImpactParameterInd = -1;
1345 int lowerImpactParameterInd = 0;
1346 int impactParameterLUT = 0xF;
1347 int upperThresholdInd = -1;
1348 int lowerThresholdInd = 0;
1349 int upperIndexInd = -1;
1350 int lowerIndexInd = 0;
1352 unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1354 unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1355 int isolationLUT = 0xF;
1357 int qualityLUT = 0xFFFF;
1359 const std::vector<esCut>&
cuts = corrMu->getCuts();
1360 for (
size_t kk = 0;
kk <
cuts.size();
kk++) {
1363 switch (
cut.getCutType()) {
1364 case esCutType::UnconstrainedPt:
1365 lowerUnconstrainedPtInd =
cut.getMinimum().index;
1366 upperUnconstrainedPtInd =
cut.getMaximum().index;
1369 case esCutType::ImpactParameter:
1370 lowerImpactParameterInd =
cut.getMinimum().index;
1371 upperImpactParameterInd =
cut.getMaximum().index;
1372 impactParameterLUT = l1tstr2int(
cut.getData());
1376 lowerThresholdInd =
cut.getMinimum().index;
1377 upperThresholdInd =
cut.getMaximum().index;
1380 case esCutType::Slice:
1381 lowerIndexInd =
int(
cut.getMinimum().value);
1382 upperIndexInd =
int(
cut.getMaximum().value);
1385 case esCutType::Eta: {
1387 etaWindow1Lower =
cut.getMinimum().index;
1388 etaWindow1Upper =
cut.getMaximum().index;
1389 }
else if (cntEta == 1) {
1390 etaWindow2Lower =
cut.getMinimum().index;
1391 etaWindow2Upper =
cut.getMaximum().index;
1394 <<
"Too Many Eta Cuts for muon-condition (" << particle <<
")" << std::endl;
1403 phiWindow1Lower =
cut.getMinimum().index;
1404 phiWindow1Upper =
cut.getMaximum().index;
1405 }
else if (cntPhi == 1) {
1406 phiWindow2Lower =
cut.getMinimum().index;
1407 phiWindow2Upper =
cut.getMaximum().index;
1410 <<
"Too Many Phi Cuts for muon-condition (" << particle <<
")" << std::endl;
1418 if (
cut.getData() ==
"positive")
1420 else if (
cut.getData() ==
"negative")
1427 qualityLUT = l1tstr2int(
cut.getData());
1430 case esCutType::Isolation: {
1431 isolationLUT = l1tstr2int(
cut.getData());
1441 objParameter[0].unconstrainedPtHigh = upperUnconstrainedPtInd;
1442 objParameter[0].unconstrainedPtLow = lowerUnconstrainedPtInd;
1443 objParameter[0].impactParameterHigh = upperImpactParameterInd;
1444 objParameter[0].impactParameterLow = lowerImpactParameterInd;
1445 objParameter[0].impactParameterLUT = impactParameterLUT;
1447 objParameter[0].ptHighThreshold = upperThresholdInd;
1448 objParameter[0].ptLowThreshold = lowerThresholdInd;
1450 objParameter[0].indexHigh = upperIndexInd;
1451 objParameter[0].indexLow = lowerIndexInd;
1453 objParameter[0].etaWindow1Lower = etaWindow1Lower;
1454 objParameter[0].etaWindow1Upper = etaWindow1Upper;
1455 objParameter[0].etaWindow2Lower = etaWindow2Lower;
1456 objParameter[0].etaWindow2Upper = etaWindow2Upper;
1458 objParameter[0].phiWindow1Lower = phiWindow1Lower;
1459 objParameter[0].phiWindow1Upper = phiWindow1Upper;
1460 objParameter[0].phiWindow2Lower = phiWindow2Lower;
1461 objParameter[0].phiWindow2Upper = phiWindow2Upper;
1464 objParameter[0].enableMip =
false;
1465 objParameter[0].enableIso =
false;
1466 objParameter[0].requestIso =
false;
1468 objParameter[0].charge =
charge;
1469 objParameter[0].qualityLUT = qualityLUT;
1470 objParameter[0].isolationLUT = isolationLUT;
1486 std::ostringstream myCoutStream;
1487 muonCond.
print(myCoutStream);
1488 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
1504 (m_corMuonTemplate[chipNr]).push_back(muonCond);
1523 using namespace tmeventsetup;
1532 LogDebug(
"TriggerMenuParser") <<
"\n ****************************************** "
1533 <<
"\n (in parseCalo) "
1534 <<
"\n condition = " << condition <<
"\n particle = " << particle
1535 <<
"\n type = " <<
type <<
"\n name = " <<
name << std::endl;
1544 if (condCalo.getType() == esConditionType::SingleEgamma) {
1549 }
else if (condCalo.getType() == esConditionType::DoubleEgamma) {
1554 }
else if (condCalo.getType() == esConditionType::TripleEgamma) {
1559 }
else if (condCalo.getType() == esConditionType::QuadEgamma) {
1564 }
else if (condCalo.getType() == esConditionType::SingleJet) {
1565 caloObjType =
gtJet;
1569 }
else if (condCalo.getType() == esConditionType::DoubleJet) {
1570 caloObjType =
gtJet;
1574 }
else if (condCalo.getType() == esConditionType::TripleJet) {
1575 caloObjType =
gtJet;
1579 }
else if (condCalo.getType() == esConditionType::QuadJet) {
1580 caloObjType =
gtJet;
1584 }
else if (condCalo.getType() == esConditionType::SingleTau) {
1585 caloObjType =
gtTau;
1589 }
else if (condCalo.getType() == esConditionType::DoubleTau) {
1590 caloObjType =
gtTau;
1594 }
else if (condCalo.getType() == esConditionType::TripleTau) {
1595 caloObjType =
gtTau;
1599 }
else if (condCalo.getType() == esConditionType::QuadTau) {
1600 caloObjType =
gtTau;
1605 edm::LogError(
"TriggerMenuParser") <<
"Wrong particle for calo-condition (" << particle <<
")" << std::endl;
1612 edm::LogError(
"TriggerMenuParser") <<
"Unknown type for calo-condition (" <<
type <<
")"
1613 <<
"\nCan not determine number of trigger objects. " << std::endl;
1620 std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1626 std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1627 tmpValues.reserve(nrObj);
1629 if (
int(condCalo.getObjects().size()) != nrObj) {
1630 edm::LogError(
"TriggerMenuParser") <<
" condCalo objects: nrObj = " << nrObj
1631 <<
"condCalo.getObjects().size() = " << condCalo.getObjects().size()
1646 const std::vector<esObject>&
objects = condCalo.getObjects();
1649 gEq = (
object.getComparisonOperator() == esComparisonOperator::GE);
1652 relativeBx =
object.getBxOffset();
1655 int upperThresholdInd = -1;
1656 int lowerThresholdInd = 0;
1657 int upperIndexInd = -1;
1658 int lowerIndexInd = 0;
1660 unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1662 unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1663 int isolationLUT = 0xF;
1664 int qualityLUT = 0xF;
1666 const std::vector<esCut>&
cuts =
object.getCuts();
1667 for (
size_t kk = 0;
kk <
cuts.size();
kk++) {
1670 switch (
cut.getCutType()) {
1672 lowerThresholdInd =
cut.getMinimum().index;
1673 upperThresholdInd =
cut.getMaximum().index;
1675 case esCutType::Slice:
1676 lowerIndexInd =
int(
cut.getMinimum().value);
1677 upperIndexInd =
int(
cut.getMaximum().value);
1679 case esCutType::Eta: {
1681 etaWindow1Lower =
cut.getMinimum().index;
1682 etaWindow1Upper =
cut.getMaximum().index;
1683 }
else if (cntEta == 1) {
1684 etaWindow2Lower =
cut.getMinimum().index;
1685 etaWindow2Upper =
cut.getMaximum().index;
1688 <<
"Too Many Eta Cuts for calo-condition (" << particle <<
")" << std::endl;
1697 phiWindow1Lower =
cut.getMinimum().index;
1698 phiWindow1Upper =
cut.getMaximum().index;
1699 }
else if (cntPhi == 1) {
1700 phiWindow2Lower =
cut.getMinimum().index;
1701 phiWindow2Upper =
cut.getMaximum().index;
1704 <<
"Too Many Phi Cuts for calo-condition (" << particle <<
")" << std::endl;
1712 edm::LogError(
"TriggerMenuParser") <<
"No charge cut for calo-condition (" << particle <<
")" << std::endl;
1717 qualityLUT = l1tstr2int(
cut.getData());
1720 case esCutType::Isolation: {
1721 isolationLUT = l1tstr2int(
cut.getData());
1731 objParameter[cnt].etHighThreshold = upperThresholdInd;
1732 objParameter[cnt].etLowThreshold = lowerThresholdInd;
1733 objParameter[cnt].indexHigh = upperIndexInd;
1734 objParameter[cnt].indexLow = lowerIndexInd;
1735 objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1736 objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1737 objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1738 objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1739 objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1740 objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1741 objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1742 objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1743 objParameter[cnt].isolationLUT = isolationLUT;
1744 objParameter[cnt].qualityLUT = qualityLUT;
1747 LogDebug(
"TriggerMenuParser") <<
"\n Calo ET high thresholds (hex) for calo object " << caloObjType <<
" "
1748 << cnt <<
" = " << std::hex << objParameter[cnt].etLowThreshold <<
" - "
1749 << objParameter[cnt].etHighThreshold
1750 <<
"\n etaWindow Lower / Upper for calo object " << cnt <<
" = 0x"
1751 << objParameter[cnt].etaWindow1Lower <<
" / 0x" << objParameter[cnt].etaWindow1Upper
1752 <<
"\n etaWindowVeto Lower / Upper for calo object " << cnt <<
" = 0x"
1753 << objParameter[cnt].etaWindow2Lower <<
" / 0x" << objParameter[cnt].etaWindow2Upper
1754 <<
"\n phiWindow Lower / Upper for calo object " << cnt <<
" = 0x"
1755 << objParameter[cnt].phiWindow1Lower <<
" / 0x" << objParameter[cnt].phiWindow1Upper
1756 <<
"\n phiWindowVeto Lower / Upper for calo object " << cnt <<
" = 0x"
1757 << objParameter[cnt].phiWindow2Lower <<
" / 0x" << objParameter[cnt].phiWindow2Upper
1758 <<
"\n Isolation LUT for calo object " << cnt <<
" = 0x"
1759 << objParameter[cnt].isolationLUT <<
"\n Quality LUT for calo object " << cnt
1760 <<
" = 0x" << objParameter[cnt].qualityLUT <<
std::dec << std::endl;
1766 std::vector<GlobalObject>
objType(nrObj, caloObjType);
1784 std::ostringstream myCoutStream;
1785 caloCond.
print(myCoutStream);
1786 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
1790 if (!insertConditionIntoMap(caloCond, chipNr)) {
1791 edm::LogError(
"TriggerMenuParser") <<
" Error: duplicate condition (" <<
name <<
")" << std::endl;
1796 (m_corCaloTemplate[chipNr]).push_back(caloCond);
1798 (m_vecCaloTemplate[chipNr]).push_back(caloCond);
1819 using namespace tmeventsetup;
1828 LogDebug(
"TriggerMenuParser") <<
"\n ****************************************** "
1829 <<
"\n (in parseCalo) "
1830 <<
"\n condition = " << condition <<
"\n particle = " << particle
1831 <<
"\n type = " <<
type <<
"\n name = " <<
name << std::endl;
1843 caloObjType =
gtJet;
1845 caloObjType =
gtTau;
1847 edm::LogError(
"TriggerMenuParser") <<
"Wrong particle for calo-condition (" << particle <<
")" << std::endl;
1854 edm::LogError(
"TriggerMenuParser") <<
"Unknown type for calo-condition (" <<
type <<
")"
1855 <<
"\nCan not determine number of trigger objects. " << std::endl;
1862 std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1868 std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1869 tmpValues.reserve(nrObj);
1875 gEq = (corrCalo->getComparisonOperator() == esComparisonOperator::GE);
1878 relativeBx = corrCalo->getBxOffset();
1881 int upperThresholdInd = -1;
1882 int lowerThresholdInd = 0;
1883 int upperIndexInd = -1;
1884 int lowerIndexInd = 0;
1886 unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1888 unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1889 int isolationLUT = 0xF;
1890 int qualityLUT = 0xF;
1892 const std::vector<esCut>&
cuts = corrCalo->getCuts();
1893 for (
size_t kk = 0;
kk <
cuts.size();
kk++) {
1896 switch (
cut.getCutType()) {
1898 lowerThresholdInd =
cut.getMinimum().index;
1899 upperThresholdInd =
cut.getMaximum().index;
1901 case esCutType::Slice:
1902 lowerIndexInd =
int(
cut.getMinimum().value);
1903 upperIndexInd =
int(
cut.getMaximum().value);
1905 case esCutType::Eta: {
1907 etaWindow1Lower =
cut.getMinimum().index;
1908 etaWindow1Upper =
cut.getMaximum().index;
1909 }
else if (cntEta == 1) {
1910 etaWindow2Lower =
cut.getMinimum().index;
1911 etaWindow2Upper =
cut.getMaximum().index;
1914 <<
"Too Many Eta Cuts for calo-condition (" << particle <<
")" << std::endl;
1923 phiWindow1Lower =
cut.getMinimum().index;
1924 phiWindow1Upper =
cut.getMaximum().index;
1925 }
else if (cntPhi == 1) {
1926 phiWindow2Lower =
cut.getMinimum().index;
1927 phiWindow2Upper =
cut.getMaximum().index;
1930 <<
"Too Many Phi Cuts for calo-condition (" << particle <<
")" << std::endl;
1938 edm::LogError(
"TriggerMenuParser") <<
"No charge cut for calo-condition (" << particle <<
")" << std::endl;
1943 qualityLUT = l1tstr2int(
cut.getData());
1946 case esCutType::Isolation: {
1947 isolationLUT = l1tstr2int(
cut.getData());
1957 objParameter[0].etLowThreshold = lowerThresholdInd;
1958 objParameter[0].etHighThreshold = upperThresholdInd;
1959 objParameter[0].indexHigh = upperIndexInd;
1960 objParameter[0].indexLow = lowerIndexInd;
1961 objParameter[0].etaWindow1Lower = etaWindow1Lower;
1962 objParameter[0].etaWindow1Upper = etaWindow1Upper;
1963 objParameter[0].etaWindow2Lower = etaWindow2Lower;
1964 objParameter[0].etaWindow2Upper = etaWindow2Upper;
1965 objParameter[0].phiWindow1Lower = phiWindow1Lower;
1966 objParameter[0].phiWindow1Upper = phiWindow1Upper;
1967 objParameter[0].phiWindow2Lower = phiWindow2Lower;
1968 objParameter[0].phiWindow2Upper = phiWindow2Upper;
1969 objParameter[0].isolationLUT = isolationLUT;
1970 objParameter[0].qualityLUT = qualityLUT;
1973 LogDebug(
"TriggerMenuParser") <<
"\n Calo ET high threshold (hex) for calo object " << caloObjType <<
" "
1974 <<
" = " << std::hex << objParameter[0].etLowThreshold <<
" - "
1975 << objParameter[0].etHighThreshold <<
"\n etaWindow Lower / Upper for calo object "
1976 <<
" = 0x" << objParameter[0].etaWindow1Lower <<
" / 0x"
1977 << objParameter[0].etaWindow1Upper
1978 <<
"\n etaWindowVeto Lower / Upper for calo object "
1979 <<
" = 0x" << objParameter[0].etaWindow2Lower <<
" / 0x"
1980 << objParameter[0].etaWindow2Upper <<
"\n phiWindow Lower / Upper for calo object "
1981 <<
" = 0x" << objParameter[0].phiWindow1Lower <<
" / 0x"
1982 << objParameter[0].phiWindow1Upper
1983 <<
"\n phiWindowVeto Lower / Upper for calo object "
1984 <<
" = 0x" << objParameter[0].phiWindow2Lower <<
" / 0x"
1985 << objParameter[0].phiWindow2Upper <<
"\n Isolation LUT for calo object "
1986 <<
" = 0x" << objParameter[0].isolationLUT <<
"\n Quality LUT for calo object "
1987 <<
" = 0x" << objParameter[0].qualityLUT <<
std::dec << std::endl;
1990 std::vector<GlobalObject>
objType(nrObj, caloObjType);
2008 std::ostringstream myCoutStream;
2009 caloCond.
print(myCoutStream);
2010 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
2027 (m_corCaloTemplate[chipNr]).push_back(caloCond);
2045 unsigned int chipNr,
2046 const bool corrFlag) {
2048 using namespace tmeventsetup;
2056 LogDebug(
"TriggerMenuParser") <<
"\n ****************************************** "
2057 <<
"\n (in parseEnergySum) "
2058 <<
"\n condition = " << condition <<
"\n type = " <<
type
2059 <<
"\n name = " <<
name << std::endl;
2065 if (condEnergySum.getType() == esConditionType::MissingEt) {
2068 }
else if (condEnergySum.getType() == esConditionType::TotalEt) {
2071 }
else if (condEnergySum.getType() == esConditionType::TotalEtEM) {
2074 }
else if (condEnergySum.getType() == esConditionType::TotalHt) {
2077 }
else if (condEnergySum.getType() == esConditionType::MissingHt) {
2080 }
else if (condEnergySum.getType() == esConditionType::MissingEtHF) {
2083 }
else if (condEnergySum.getType() == esConditionType::TowerCount) {
2086 }
else if (condEnergySum.getType() == esConditionType::MinBiasHFP0) {
2089 }
else if (condEnergySum.getType() == esConditionType::MinBiasHFM0) {
2092 }
else if (condEnergySum.getType() == esConditionType::MinBiasHFP1) {
2095 }
else if (condEnergySum.getType() == esConditionType::MinBiasHFM1) {
2098 }
else if (condEnergySum.getType() == esConditionType::AsymmetryEt) {
2101 }
else if (condEnergySum.getType() == esConditionType::AsymmetryHt) {
2104 }
else if (condEnergySum.getType() == esConditionType::AsymmetryEtHF) {
2107 }
else if (condEnergySum.getType() == esConditionType::AsymmetryHtHF) {
2110 }
else if (condEnergySum.getType() == esConditionType::Centrality0) {
2113 }
else if (condEnergySum.getType() == esConditionType::Centrality1) {
2116 }
else if (condEnergySum.getType() == esConditionType::Centrality2) {
2119 }
else if (condEnergySum.getType() == esConditionType::Centrality3) {
2122 }
else if (condEnergySum.getType() == esConditionType::Centrality4) {
2125 }
else if (condEnergySum.getType() == esConditionType::Centrality5) {
2128 }
else if (condEnergySum.getType() == esConditionType::Centrality6) {
2131 }
else if (condEnergySum.getType() == esConditionType::Centrality7) {
2135 edm::LogError(
"TriggerMenuParser") <<
"Wrong type for energy-sum condition (" <<
type <<
")" << std::endl;
2147 std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2158 const std::vector<esObject>&
objects = condEnergySum.getObjects();
2161 gEq = (
object.getComparisonOperator() == esComparisonOperator::GE);
2164 relativeBx =
object.getBxOffset();
2167 int lowerThresholdInd = 0;
2168 int upperThresholdInd = -1;
2170 unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2172 const std::vector<esCut>&
cuts =
object.getCuts();
2173 for (
size_t kk = 0;
kk <
cuts.size();
kk++) {
2176 switch (
cut.getCutType()) {
2178 lowerThresholdInd =
cut.getMinimum().index;
2179 upperThresholdInd =
cut.getMaximum().index;
2182 case esCutType::Eta:
2187 phiWindow1Lower =
cut.getMinimum().index;
2188 phiWindow1Upper =
cut.getMaximum().index;
2189 }
else if (cntPhi == 1) {
2190 phiWindow2Lower =
cut.getMinimum().index;
2191 phiWindow2Upper =
cut.getMaximum().index;
2193 edm::LogError(
"TriggerMenuParser") <<
"Too Many Phi Cuts for esum-condition (" <<
type <<
")" << std::endl;
2200 case esCutType::Count:
2201 lowerThresholdInd =
cut.getMinimum().index;
2202 upperThresholdInd = 0xffffff;
2212 objParameter[cnt].etLowThreshold = lowerThresholdInd;
2213 objParameter[cnt].etHighThreshold = upperThresholdInd;
2214 objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
2215 objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
2216 objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
2217 objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
2220 LogDebug(
"TriggerMenuParser") <<
"\n EnergySum ET high threshold (hex) for energy sum object " << cnt <<
" = "
2221 << std::hex << objParameter[cnt].etLowThreshold <<
" - "
2222 << objParameter[cnt].etHighThreshold
2223 <<
"\n phiWindow Lower / Upper for calo object " << cnt <<
" = 0x"
2224 << objParameter[cnt].phiWindow1Lower <<
" / 0x" << objParameter[cnt].phiWindow1Upper
2225 <<
"\n phiWindowVeto Lower / Upper for calo object " << cnt <<
" = 0x"
2226 << objParameter[cnt].phiWindow2Lower <<
" / 0x" << objParameter[cnt].phiWindow2Upper
2233 std::vector<GlobalObject>
objType(nrObj, energySumObjType);
2248 std::ostringstream myCoutStream;
2249 energySumCond.
print(myCoutStream);
2250 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
2254 if (!insertConditionIntoMap(energySumCond, chipNr)) {
2255 edm::LogError(
"TriggerMenuParser") <<
" Error: duplicate condition (" <<
name <<
")" << std::endl;
2260 (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2263 (m_vecEnergySumTemplate[chipNr]).push_back(energySumCond);
2284 using namespace tmeventsetup;
2292 LogDebug(
"TriggerMenuParser") <<
"\n ****************************************** "
2293 <<
"\n (in parseEnergySum) "
2294 <<
"\n condition = " << condition <<
"\n type = " <<
type
2295 <<
"\n name = " <<
name << std::endl;
2307 }
else if (corrESum->getType() == esObjectType::ETMHF) {
2310 }
else if (corrESum->getType() == esObjectType::TOWERCOUNT) {
2314 edm::LogError(
"TriggerMenuParser") <<
"Wrong type for energy-sum correclation condition (" <<
type <<
")"
2327 std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2337 gEq = (corrESum->getComparisonOperator() == esComparisonOperator::GE);
2340 relativeBx = corrESum->getBxOffset();
2343 int lowerThresholdInd = 0;
2344 int upperThresholdInd = -1;
2346 unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2348 const std::vector<esCut>&
cuts = corrESum->getCuts();
2349 for (
size_t kk = 0;
kk <
cuts.size();
kk++) {
2352 switch (
cut.getCutType()) {
2354 lowerThresholdInd =
cut.getMinimum().index;
2355 upperThresholdInd =
cut.getMaximum().index;
2358 case esCutType::Eta:
2363 phiWindow1Lower =
cut.getMinimum().index;
2364 phiWindow1Upper =
cut.getMaximum().index;
2365 }
else if (cntPhi == 1) {
2366 phiWindow2Lower =
cut.getMinimum().index;
2367 phiWindow2Upper =
cut.getMaximum().index;
2369 edm::LogError(
"TriggerMenuParser") <<
"Too Many Phi Cuts for esum-condition (" <<
type <<
")" << std::endl;
2383 objParameter[0].etLowThreshold = lowerThresholdInd;
2384 objParameter[0].etHighThreshold = upperThresholdInd;
2385 objParameter[0].phiWindow1Lower = phiWindow1Lower;
2386 objParameter[0].phiWindow1Upper = phiWindow1Upper;
2387 objParameter[0].phiWindow2Lower = phiWindow2Lower;
2388 objParameter[0].phiWindow2Upper = phiWindow2Upper;
2391 LogDebug(
"TriggerMenuParser") <<
"\n EnergySum ET high threshold (hex) for energy sum object " << cnt <<
" = "
2392 << std::hex << objParameter[0].etLowThreshold <<
" - " << objParameter[0].etLowThreshold
2393 <<
"\n phiWindow Lower / Upper for calo object " << cnt <<
" = 0x"
2394 << objParameter[0].phiWindow1Lower <<
" / 0x" << objParameter[0].phiWindow1Upper
2395 <<
"\n phiWindowVeto Lower / Upper for calo object " << cnt <<
" = 0x"
2396 << objParameter[0].phiWindow2Lower <<
" / 0x" << objParameter[0].phiWindow2Upper
2400 std::vector<GlobalObject>
objType(nrObj, energySumObjType);
2415 std::ostringstream myCoutStream;
2416 energySumCond.
print(myCoutStream);
2417 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
2435 (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2454 using namespace tmeventsetup;
2462 LogDebug(
"TriggerMenuParser") <<
"\n ****************************************** "
2463 <<
"\n (in parseExternal) "
2464 <<
"\n condition = " << condition <<
"\n particle = " << particle
2465 <<
"\n type = " <<
type <<
"\n name = " <<
name << std::endl;
2474 unsigned int channelID = 0;
2477 const std::vector<esObject>&
objects = condExt.getObjects();
2480 if (
object.getType() == esObjectType::EXT) {
2481 relativeBx =
object.getBxOffset();
2482 channelID =
object.getExternalChannelId();
2490 std::vector<GlobalObject>
objType(nrObj, extSignalType);
2502 LogTrace(
"TriggerMenuParser") << externalCond <<
"\n" << std::endl;
2505 if (!insertConditionIntoMap(externalCond, chipNr)) {
2506 edm::LogError(
"TriggerMenuParser") <<
" Error: duplicate condition (" <<
name <<
")" << std::endl;
2510 (m_vecExternalTemplate[chipNr]).push_back(externalCond);
2529 using namespace tmeventsetup;
2536 LogDebug(
"TriggerMenuParser") <<
" ****************************************** " << std::endl
2537 <<
" (in parseCorrelation) " << std::endl
2538 <<
" condition = " << condition << std::endl
2539 <<
" particle = " << particle << std::endl
2540 <<
" type = " <<
type << std::endl
2541 <<
" name = " <<
name << std::endl;
2547 if (!insertConditionIntoMap(correlationCond, chipNr)) {
2548 edm::LogError(
"TriggerMenuParser") <<
" Error: duplicate correlation condition (" <<
name <<
")" << std::endl;
2559 const int nrObj = 2;
2562 int intGEq[nrObj] = {-1, -1};
2563 std::vector<GlobalObject>
objType(nrObj);
2564 std::vector<GtConditionCategory> condCateg(nrObj);
2567 const bool corrFlag =
true;
2568 int corrIndexVal[nrObj] = {-1, -1};
2576 const std::vector<esCut>&
cuts = corrCond.getCuts();
2577 for (
size_t jj = 0;
jj <
cuts.size();
jj++) {
2580 if (
cut.getCutType() == esCutType::ChargeCorrelation) {
2581 if (
cut.getData() ==
"ls")
2583 else if (
cut.getData() ==
"os")
2591 double minV =
cut.getMinimum().value;
2592 double maxV =
cut.getMaximum().value;
2599 LogDebug(
"TriggerMenuParser") <<
"CutType: " <<
cut.getCutType() <<
"\tDeltaEta Cut minV = " << minV
2600 <<
" Max = " << maxV <<
" precMin = " <<
cut.getMinimum().index
2601 <<
" precMax = " <<
cut.getMaximum().index << std::endl;
2605 cutType = cutType | 0x1;
2607 LogDebug(
"TriggerMenuParser") <<
"CutType: " <<
cut.getCutType() <<
"\tDeltaPhi Cut minV = " << minV
2608 <<
" Max = " << maxV <<
" precMin = " <<
cut.getMinimum().index
2609 <<
" precMax = " <<
cut.getMaximum().index << std::endl;
2613 cutType = cutType | 0x2;
2615 LogDebug(
"TriggerMenuParser") <<
"CutType: " <<
cut.getCutType() <<
"\tDeltaR Cut minV = " << minV
2616 <<
" Max = " << maxV <<
" precMin = " <<
cut.getMinimum().index
2617 <<
" precMax = " <<
cut.getMaximum().index << std::endl;
2621 cutType = cutType | 0x4;
2622 }
else if (
cut.getCutType() == esCutType::TwoBodyPt) {
2626 LogDebug(
"TriggerMenuParser") <<
"CutType: " <<
cut.getCutType() <<
"\tTPBT Cut minV = " << minV
2627 <<
" Max = " << maxV <<
" precMin = " <<
cut.getMinimum().index
2628 <<
" precMax = " <<
cut.getMaximum().index << std::endl;
2629 cutType = cutType | 0x20;
2631 LogDebug(
"TriggerMenuParser") <<
"CutType: " <<
cut.getCutType() <<
"\tMass Cut minV = " << minV
2632 <<
" Max = " << maxV <<
" precMin = " <<
cut.getMinimum().index
2633 <<
" precMax = " <<
cut.getMaximum().index << std::endl;
2638 if (corrCond.getType() == esConditionType::TransverseMass) {
2639 cutType = cutType | 0x10;
2641 cutType = cutType | 0x8;
2643 }
else if (
cut.getCutType() == esCutType::MassUpt) {
2644 LogDebug(
"TriggerMenuParser") <<
"CutType: " <<
cut.getCutType() <<
"\tMass Cut minV = " << minV
2645 <<
" Max = " << maxV <<
" precMin = " <<
cut.getMinimum().index
2646 <<
" precMax = " <<
cut.getMaximum().index << std::endl;
2650 cutType = cutType | 0x40;
2657 const std::vector<esObject>&
objects = corrCond.getObjects();
2659 edm::LogError(
"TriggerMenuParser") <<
"incorrect number of objects for the correlation condition " <<
name
2660 <<
" corrFlag " << corrFlag << std::endl;
2707 parseMuonCorr(&
object, chipNr);
2708 corrIndexVal[
jj] = (m_corMuonTemplate[chipNr]).
size() - 1;
2711 intGEq[
jj] = (
object.getComparisonOperator() == esComparisonOperator::GE);
2718 parseCaloCorr(&
object, chipNr);
2719 corrIndexVal[
jj] = (m_corCaloTemplate[chipNr]).
size() - 1;
2722 intGEq[
jj] = (
object.getComparisonOperator() == esComparisonOperator::GE);
2723 switch (
object.getType()) {
2738 }
else if (
object.getType() ==
esObjectType::ETM ||
object.getType() == esObjectType::ETMHF ||
2739 object.getType() == esObjectType::TOWERCOUNT ||
object.getType() ==
esObjectType::HTM) {
2741 parseEnergySumCorr(&
object, chipNr);
2742 corrIndexVal[
jj] = (m_corEnergySumTemplate[chipNr]).
size() - 1;
2745 intGEq[
jj] = (
object.getComparisonOperator() == esComparisonOperator::GE);
2746 switch (
object.getType()) {
2753 case esObjectType::ETMHF: {
2756 case esObjectType::TOWERCOUNT: {
2765 edm::LogError(
"TriggerMenuParser") <<
"Illegal Object Type " <<
object.getType()
2766 <<
" for the correlation condition " <<
name << std::endl;
2775 if (intGEq[0] != intGEq[1]) {
2776 edm::LogError(
"TriggerMenuParser") <<
"Inconsistent GEq flags for sub-conditions "
2777 <<
" for the correlation condition " <<
name << std::endl;
2781 gEq = (intGEq[0] != 0);
2799 std::ostringstream myCoutStream;
2800 correlationCond.
print(myCoutStream);
2801 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
2807 (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond);
2826 unsigned int chipNr) {
2827 using namespace tmeventsetup;
2834 LogDebug(
"TriggerMenuParser") <<
" ****************************************** " << std::endl
2835 <<
" (in parseCorrelationWithOverlapRemoval) " << std::endl
2836 <<
" condition = " << condition << std::endl
2837 <<
" particle = " << particle << std::endl
2838 <<
" type = " <<
type << std::endl
2839 <<
" name = " <<
name << std::endl;
2845 if (!insertConditionIntoMap(correlationWORCond, chipNr)) {
2846 edm::LogError(
"TriggerMenuParser") <<
" Error: duplicate correlation condition (" <<
name <<
")" << std::endl;
2857 const int nrObj = 3;
2860 int intGEq[nrObj] = {-1, -1, -1};
2861 std::vector<GlobalObject>
objType(nrObj);
2862 std::vector<GtConditionCategory> condCateg(nrObj);
2865 const bool corrFlag =
true;
2866 int corrIndexVal[nrObj] = {-1, -1, -1};
2874 const std::vector<esCut>&
cuts = corrCond.getCuts();
2875 for (
size_t jj = 0;
jj <
cuts.size();
jj++) {
2878 if (
cut.getCutType() == esCutType::ChargeCorrelation) {
2879 if (
cut.getData() ==
"ls")
2881 else if (
cut.getData() ==
"os")
2889 double minV =
cut.getMinimum().value;
2890 double maxV =
cut.getMaximum().value;
2901 cutType = cutType | 0x1;
2907 cutType = cutType | 0x2;
2913 cutType = cutType | 0x4;
2919 cutType = cutType | 0x8;
2921 if (
cut.getCutType() == esCutType::OvRmDeltaEta) {
2926 cutType = cutType | 0x10;
2927 }
else if (
cut.getCutType() == esCutType::OvRmDeltaPhi) {
2932 cutType = cutType | 0x20;
2933 }
else if (
cut.getCutType() == esCutType::OvRmDeltaR) {
2938 cutType = cutType | 0x40;
2945 const std::vector<esObject>&
objects = corrCond.getObjects();
2948 <<
"incorrect number of objects for the correlation condition with overlap removal " <<
name <<
" corrFlag "
2949 << corrFlag << std::endl;
2955 const esObject&
object =
objects.at(
jj);
2997 parseMuonCorr(&
object, chipNr);
2998 corrIndexVal[
jj] = (m_corMuonTemplate[chipNr]).
size() - 1;
3001 intGEq[
jj] = (
object.getComparisonOperator() == esComparisonOperator::GE);
3008 parseCaloCorr(&
object, chipNr);
3009 corrIndexVal[
jj] = (m_corCaloTemplate[chipNr]).
size() - 1;
3012 intGEq[
jj] = (
object.getComparisonOperator() == esComparisonOperator::GE);
3013 switch (
object.getType()) {
3028 }
else if (
object.getType() ==
esObjectType::ETM ||
object.getType() == esObjectType::ETMHF ||
3029 object.getType() == esObjectType::TOWERCOUNT ||
object.getType() ==
esObjectType::HTM) {
3031 parseEnergySumCorr(&
object, chipNr);
3032 corrIndexVal[
jj] = (m_corEnergySumTemplate[chipNr]).
size() - 1;
3035 intGEq[
jj] = (
object.getComparisonOperator() == esComparisonOperator::GE);
3036 switch (
object.getType()) {
3043 case esObjectType::ETMHF: {
3046 case esObjectType::TOWERCOUNT: {
3055 edm::LogError(
"TriggerMenuParser") <<
"Illegal Object Type " <<
object.getType()
3056 <<
" for the correlation condition " <<
name << std::endl;
3065 if (intGEq[0] != intGEq[1]) {
3066 edm::LogError(
"TriggerMenuParser") <<
"Inconsistent GEq flags for sub-conditions "
3067 <<
" for the correlation condition " <<
name << std::endl;
3071 gEq = (intGEq[0] != 0);
3091 std::ostringstream myCoutStream;
3092 correlationWORCond.
print(myCoutStream);
3093 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
3099 (m_vecCorrelationWithOverlapRemovalTemplate[chipNr]).push_back(correlationWORCond);
3117 using namespace tmeventsetup;
3124 if (algAlias.empty()) {
3126 LogDebug(
"TriggerMenuParser") <<
"\n No alias defined for algorithm. Alias set to algorithm name."
3127 <<
"\n Algorithm name: " << algName <<
"\n Algorithm alias: " << algAlias
3131 LogDebug(
"TriggerMenuParser") <<
"\n Alias defined for algorithm."
3132 <<
"\n Algorithm name: " << algName <<
"\n Algorithm alias: " << algAlias
3139 LogDebug(
"TriggerMenuParser") <<
" Logical expression: " << logExpression
3140 <<
" Chip number: " << chipNr << std::endl;
3146 LogDebug(
"TriggerMenuParser") <<
" Output pin: " << outputPin << std::endl;
3161 std::ostringstream myCoutStream;
3162 alg.
print(myCoutStream);
3163 LogTrace(
"TriggerMenuParser") << myCoutStream.str() <<
"\n" << std::endl;
3167 if (!insertAlgorithmIntoMap(alg)) {