CMS 3D CMS Logo

TriggerMenuParser.cc
Go to the documentation of this file.
1 
21 // this class header
22 #include "TriggerMenuParser.h"
23 
24 // system include files
25 #include <string>
26 #include <vector>
27 
28 #include <iostream>
29 #include <fstream>
30 #include <iomanip>
31 #include <cmath>
32 
34 
37 
38 #include "tmEventSetup/tmEventSetup.hh"
39 #include "tmEventSetup/esTriggerMenu.hh"
40 #include "tmEventSetup/esAlgorithm.hh"
41 #include "tmEventSetup/esCondition.hh"
42 #include "tmEventSetup/esObject.hh"
43 #include "tmEventSetup/esCut.hh"
44 #include "tmEventSetup/esScale.hh"
45 #include "tmGrammar/Algorithm.hh"
46 #include <cstdint>
47 
48 // constructor
50  : m_triggerMenuInterface("NULL"),
51  m_triggerMenuName("NULL"),
52  m_triggerMenuImplementation(0x0),
53  m_scaleDbKey("NULL")
54 
55 {
56  // menu names, scale key initialized to NULL due to ORACLE treatment of strings
57 
58  // empty
59 }
60 
61 // destructor
63 
64 // set the number of condition chips in GTL
65 void l1t::TriggerMenuParser::setGtNumberConditionChips(const unsigned int& numberConditionChipsValue) {
66  m_numberConditionChips = numberConditionChipsValue;
67 }
68 
69 // set the number of pins on the GTL condition chips
70 void l1t::TriggerMenuParser::setGtPinsOnConditionChip(const unsigned int& pinsOnConditionChipValue) {
71  m_pinsOnConditionChip = pinsOnConditionChipValue;
72 }
73 
74 // set the correspondence "condition chip - GTL algorithm word"
75 // in the hardware
76 void l1t::TriggerMenuParser::setGtOrderConditionChip(const std::vector<int>& orderConditionChipValue) {
77  m_orderConditionChip = orderConditionChipValue;
78 }
79 
80 // set the number of physics trigger algorithms
81 void l1t::TriggerMenuParser::setGtNumberPhysTriggers(const unsigned int& numberPhysTriggersValue) {
82  m_numberPhysTriggers = numberPhysTriggersValue;
83 }
84 
85 // set the condition maps
86 void l1t::TriggerMenuParser::setGtConditionMap(const std::vector<ConditionMap>& condMap) { m_conditionMap = condMap; }
87 
88 // set the trigger menu name
90  m_triggerMenuInterface = menuInterface;
91 }
92 
93 // set the trigger menu uuid
94 void l1t::TriggerMenuParser::setGtTriggerMenuUUID(const int uuid) { m_triggerMenuUUID = uuid; }
95 
96 void l1t::TriggerMenuParser::setGtTriggerMenuName(const std::string& menuName) { m_triggerMenuName = menuName; }
97 
98 void l1t::TriggerMenuParser::setGtTriggerMenuImplementation(const unsigned long& menuImplementation) {
99  m_triggerMenuImplementation = menuImplementation;
100 }
101 
102 // set menu associated scale key
103 void l1t::TriggerMenuParser::setGtScaleDbKey(const std::string& scaleKey) { m_scaleDbKey = scaleKey; }
104 
105 // set the vectors containing the conditions
106 void l1t::TriggerMenuParser::setVecMuonTemplate(const std::vector<std::vector<MuonTemplate> >& vecMuonTempl) {
107  m_vecMuonTemplate = vecMuonTempl;
108 }
109 
110 void l1t::TriggerMenuParser::setVecCaloTemplate(const std::vector<std::vector<CaloTemplate> >& vecCaloTempl) {
111  m_vecCaloTemplate = vecCaloTempl;
112 }
113 
115  const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTempl) {
116  m_vecEnergySumTemplate = vecEnergySumTempl;
117 }
118 
120  const std::vector<std::vector<ExternalTemplate> >& vecExternalTempl) {
121  m_vecExternalTemplate = vecExternalTempl;
122 }
123 
125  const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTempl) {
126  m_vecCorrelationTemplate = vecCorrelationTempl;
127 }
128 
130  const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& vecCorrelationWithOverlapRemovalTempl) {
131  m_vecCorrelationWithOverlapRemovalTemplate = vecCorrelationWithOverlapRemovalTempl;
132 }
133 
134 // set the vectors containing the conditions for correlation templates
135 //
136 void l1t::TriggerMenuParser::setCorMuonTemplate(const std::vector<std::vector<MuonTemplate> >& corMuonTempl) {
137  m_corMuonTemplate = corMuonTempl;
138 }
139 
140 void l1t::TriggerMenuParser::setCorCaloTemplate(const std::vector<std::vector<CaloTemplate> >& corCaloTempl) {
141  m_corCaloTemplate = corCaloTempl;
142 }
143 
145  const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTempl) {
146  m_corEnergySumTemplate = corEnergySumTempl;
147 }
148 
149 // set the algorithm map (by algorithm names)
150 void l1t::TriggerMenuParser::setGtAlgorithmMap(const AlgorithmMap& algoMap) { m_algorithmMap = algoMap; }
151 
152 // set the algorithm map (by algorithm aliases)
153 void l1t::TriggerMenuParser::setGtAlgorithmAliasMap(const AlgorithmMap& algoMap) { m_algorithmAliasMap = algoMap; }
154 
155 std::map<std::string, unsigned int> l1t::TriggerMenuParser::getExternalSignals(const L1TUtmTriggerMenu* utmMenu) {
156  using namespace tmeventsetup;
157  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*>(utmMenu);
158  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
159 
160  std::map<std::string, unsigned int> extBitMap;
161 
162  //loop over the algorithms
163  for (std::map<std::string, esCondition>::const_iterator cit = condMap.begin(); cit != condMap.end(); cit++) {
164  const esCondition& condition = cit->second;
165  if (condition.getType() == esConditionType::Externals) {
166  // Get object for External conditions
167  const std::vector<esObject>& objects = condition.getObjects();
168  for (size_t jj = 0; jj < objects.size(); jj++) {
169  const esObject object = objects.at(jj);
170  if (object.getType() == esObjectType::EXT) {
171  unsigned int channelID = object.getExternalChannelId();
172  std::string name = object.getExternalSignalName();
173 
174  if (extBitMap.count(name) == 0)
175  extBitMap.insert(std::map<std::string, unsigned int>::value_type(name, channelID));
176  }
177  }
178  }
179  }
180  /*
181  for (std::map<std::string, unsigned int>::const_iterator cit = extBitMap.begin();
182  cit != extBitMap.end(); cit++) {
183  std::cout << " Ext Map: Name " << cit->first << " Bit " << cit->second << std::endl;
184  }
185 */
186  return extBitMap;
187 }
188 
189 // parse def.xml file
191  // resize the vector of condition maps
192  // the number of condition chips should be correctly set before calling parseXmlFile
193  m_conditionMap.resize(m_numberConditionChips);
194 
195  m_vecMuonTemplate.resize(m_numberConditionChips);
196  m_vecCaloTemplate.resize(m_numberConditionChips);
197  m_vecEnergySumTemplate.resize(m_numberConditionChips);
198  m_vecExternalTemplate.resize(m_numberConditionChips);
199 
200  m_vecCorrelationTemplate.resize(m_numberConditionChips);
201  m_vecCorrelationWithOverlapRemovalTemplate.resize(m_numberConditionChips);
202  m_corMuonTemplate.resize(m_numberConditionChips);
203  m_corCaloTemplate.resize(m_numberConditionChips);
204  m_corEnergySumTemplate.resize(m_numberConditionChips);
205 
206  using namespace tmeventsetup;
207  using namespace Algorithm;
208 
209  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*>(utmMenu);
210 
211  //get the meta data
212  m_triggerMenuDescription = menu->getComment();
213  m_triggerMenuDate = menu->getDatetime();
214  m_triggerMenuImplementation = (getMmHashN(menu->getFirmwareUuid()) & 0xFFFFFFFF); //make sure we only have 32 bits
215  m_triggerMenuName = menu->getName();
216  m_triggerMenuInterface = menu->getVersion(); //BLW: correct descriptor?
217  m_triggerMenuUUID = (getMmHashN(menu->getName()) & 0xFFFFFFFF); //make sure we only have 32 bits
218 
219  const std::map<std::string, esAlgorithm>& algoMap = menu->getAlgorithmMap();
220  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
221  const std::map<std::string, esScale>& scaleMap = menu->getScaleMap();
222 
223  // parse the scales
224  m_gtScales.setScalesName(menu->getScaleSetName());
225  parseScales(scaleMap);
226 
227  //loop over the algorithms
228  for (std::map<std::string, esAlgorithm>::const_iterator cit = algoMap.begin(); cit != algoMap.end(); cit++) {
229  //condition chip (artifact) TO DO: Update
230  int chipNr = 0;
231 
232  //get algorithm
233  const esAlgorithm& algo = cit->second;
234 
235  //parse the algorithm
236  parseAlgorithm(algo, chipNr); //blw
237 
238  //get conditions for this algorithm
239  const std::vector<std::string>& rpn_vec = algo.getRpnVector();
240  for (size_t ii = 0; ii < rpn_vec.size(); ii++) {
241  const std::string& token = rpn_vec.at(ii);
242  if (isGate(token))
243  continue;
244  // long hash = getHash(token);
245  const esCondition& condition = condMap.find(token)->second;
246 
247  //check to see if this condtion already exists
248  if ((m_conditionMap[chipNr]).count(condition.getName()) == 0) {
249  // parse Calo Conditions (EG, Jets, Taus)
250  if (condition.getType() == esConditionType::SingleEgamma ||
251  condition.getType() == esConditionType::DoubleEgamma ||
252  condition.getType() == esConditionType::TripleEgamma ||
253  condition.getType() == esConditionType::QuadEgamma || condition.getType() == esConditionType::SingleTau ||
254  condition.getType() == esConditionType::DoubleTau || condition.getType() == esConditionType::TripleTau ||
255  condition.getType() == esConditionType::QuadTau || condition.getType() == esConditionType::SingleJet ||
256  condition.getType() == esConditionType::DoubleJet || condition.getType() == esConditionType::TripleJet ||
257  condition.getType() == esConditionType::QuadJet) {
258  parseCalo(condition, chipNr, false);
259 
260  // parse Energy Sums
261  } else if (condition.getType() == esConditionType::TotalEt ||
262  condition.getType() == esConditionType::TotalEtEM ||
263  condition.getType() == esConditionType::TotalHt ||
264  condition.getType() == esConditionType::MissingEt ||
265  condition.getType() == esConditionType::MissingHt ||
266  condition.getType() == esConditionType::MissingEtHF ||
267  condition.getType() == esConditionType::TowerCount ||
268  condition.getType() == esConditionType::MinBiasHFP0 ||
269  condition.getType() == esConditionType::MinBiasHFM0 ||
270  condition.getType() == esConditionType::MinBiasHFP1 ||
271  condition.getType() == esConditionType::MinBiasHFM1 ||
272  condition.getType() == esConditionType::AsymmetryEt ||
273  condition.getType() == esConditionType::AsymmetryHt ||
274  condition.getType() == esConditionType::AsymmetryEtHF ||
275  condition.getType() == esConditionType::AsymmetryHtHF ||
276  condition.getType() == esConditionType::Centrality0 ||
277  condition.getType() == esConditionType::Centrality1 ||
278  condition.getType() == esConditionType::Centrality2 ||
279  condition.getType() == esConditionType::Centrality3 ||
280  condition.getType() == esConditionType::Centrality4 ||
281  condition.getType() == esConditionType::Centrality5 ||
282  condition.getType() == esConditionType::Centrality6 ||
283  condition.getType() == esConditionType::Centrality7) {
284  parseEnergySum(condition, chipNr, false);
285 
286  //parse Muons
287  } else if (condition.getType() == esConditionType::SingleMuon ||
288  condition.getType() == esConditionType::DoubleMuon ||
289  condition.getType() == esConditionType::TripleMuon ||
290  condition.getType() == esConditionType::QuadMuon) {
291  parseMuon(condition, chipNr, false);
292 
293  //parse Correlation Conditions
294  } else if (condition.getType() == esConditionType::MuonMuonCorrelation ||
295  condition.getType() == esConditionType::MuonEsumCorrelation ||
296  condition.getType() == esConditionType::CaloMuonCorrelation ||
297  condition.getType() == esConditionType::CaloCaloCorrelation ||
298  condition.getType() == esConditionType::CaloEsumCorrelation ||
299  condition.getType() == esConditionType::InvariantMass ||
300  condition.getType() == esConditionType::TransverseMass) {
301  parseCorrelation(condition, chipNr);
302 
303  //parse Externals
304  } else if (condition.getType() == esConditionType::Externals) {
305  parseExternal(condition, chipNr);
306 
307  } else if (condition.getType() == esConditionType::SingleEgammaOvRm ||
308  condition.getType() == esConditionType::DoubleEgammaOvRm ||
309  condition.getType() == esConditionType::TripleEgammaOvRm ||
310  condition.getType() == esConditionType::QuadEgammaOvRm ||
311  condition.getType() == esConditionType::SingleTauOvRm ||
312  condition.getType() == esConditionType::DoubleTauOvRm ||
313  condition.getType() == esConditionType::TripleTauOvRm ||
314  condition.getType() == esConditionType::QuadTauOvRm ||
315  condition.getType() == esConditionType::SingleJetOvRm ||
316  condition.getType() == esConditionType::DoubleJetOvRm ||
317  condition.getType() == esConditionType::TripleJetOvRm ||
318  condition.getType() == esConditionType::QuadJetOvRm) {
319  edm::LogError("TriggerMenuParser")
320  << std::endl
321  << "SingleEgammaOvRm" << std::endl
322  << "DoubleEgammaOvRm" << std::endl
323  << "TripleEgammaOvRm" << std::endl
324  << "QuadEgammaOvRm" << std::endl
325  << "SingleTauOvRm" << std::endl
326  << "DoubleTauOvRm" << std::endl
327  << "TripleTauOvRm" << std::endl
328  << "QuadTauOvRm" << std::endl
329  << "SingleJetOvRm" << std::endl
330  << "DoubleJetOvRm" << std::endl
331  << "TripleJetOvRm" << std::endl
332  << "QuadJetOvRm" << std::endl
333  << "The above conditions types OvRm are not implemented yet in the parser. Please remove alogrithms that "
334  "use this type of condtion from L1T Menu!"
335  << std::endl;
336 
337  }
338  //parse CorrelationWithOverlapRemoval
339  else if (condition.getType() == esConditionType::CaloCaloCorrelationOvRm ||
340  condition.getType() == esConditionType::InvariantMassOvRm ||
341  condition.getType() == esConditionType::TransverseMassOvRm) {
342  parseCorrelationWithOverlapRemoval(condition, chipNr);
343  }
344 
345  } //if condition is a new one
346  } //loop over conditions
347  } //loop over algorithms
348 
349  return;
350 }
351 
352 //
353 
354 void l1t::TriggerMenuParser::setGtTriggerMenuInterfaceDate(const std::string& val) { m_triggerMenuInterfaceDate = val; }
355 
357  m_triggerMenuInterfaceAuthor = val;
358 }
359 
361  m_triggerMenuInterfaceDescription = val;
362 }
363 
365 
366 void l1t::TriggerMenuParser::setGtTriggerMenuAuthor(const std::string& val) { m_triggerMenuAuthor = val; }
367 
368 void l1t::TriggerMenuParser::setGtTriggerMenuDescription(const std::string& val) { m_triggerMenuDescription = val; }
369 
370 void l1t::TriggerMenuParser::setGtAlgorithmImplementation(const std::string& val) { m_algorithmImplementation = val; }
371 
372 // methods for conditions and algorithms
373 
374 // clearMaps - delete all conditions and algorithms in
375 // the maps and clear the maps.
377  // loop over condition maps (one map per condition chip)
378  // then loop over conditions in the map
379  for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip != m_conditionMap.end();
380  itCondOnChip++) {
381  // the conditions in the maps are deleted in L1uGtTriggerMenu, not here
382 
383  itCondOnChip->clear();
384  }
385 
386  // the algorithms in the maps are deleted in L1uGtTriggerMenu, not here
387  m_algorithmMap.clear();
388 }
389 
390 // insertConditionIntoMap - safe insert of condition into condition map.
391 // if the condition name already exists, do not insert it and return false
393  std::string cName = cond.condName();
394  LogTrace("TriggerMenuParser") << " Trying to insert condition \"" << cName << "\" in the condition map."
395  << std::endl;
396 
397  // no condition name has to appear twice!
398  if ((m_conditionMap[chipNr]).count(cName) != 0) {
399  LogTrace("TriggerMenuParser") << " Condition " << cName << " already exists - not inserted!" << std::endl;
400  return false;
401  }
402 
403  (m_conditionMap[chipNr])[cName] = &cond;
404  LogTrace("TriggerMenuParser") << " OK - condition inserted!" << std::endl;
405 
406  return true;
407 }
408 
409 // insert an algorithm into algorithm map
411  std::string algName = alg.algoName();
412  const std::string& algAlias = alg.algoAlias();
413  //LogTrace("TriggerMenuParser")
414  //<< " Trying to insert algorithm \"" << algName << "\" in the algorithm map." ;
415 
416  // no algorithm name has to appear twice!
417  if (m_algorithmMap.count(algName) != 0) {
418  LogTrace("TriggerMenuParser") << " Algorithm \"" << algName
419  << "\"already exists in the algorithm map- not inserted!" << std::endl;
420  return false;
421  }
422 
423  if (m_algorithmAliasMap.count(algAlias) != 0) {
424  LogTrace("TriggerMenuParser") << " Algorithm alias \"" << algAlias
425  << "\"already exists in the algorithm alias map- not inserted!" << std::endl;
426  return false;
427  }
428 
429  // bit number less than zero or greater than maximum number of algorithms
430  int bitNumber = alg.algoBitNumber();
431  if ((bitNumber < 0) || (bitNumber >= static_cast<int>(m_numberPhysTriggers))) {
432  LogTrace("TriggerMenuParser") << " Bit number " << bitNumber << " outside allowed range [0, "
433  << m_numberPhysTriggers << ") - algorithm not inserted!" << std::endl;
434  return false;
435  }
436 
437  // maximum number of algorithms
438  if (m_algorithmMap.size() >= m_numberPhysTriggers) {
439  LogTrace("TriggerMenuParser") << " More than maximum allowed " << m_numberPhysTriggers
440  << " algorithms in the algorithm map - not inserted!" << std::endl;
441  return false;
442  }
443 
444  // chip number outside allowed values
445  int chipNr = alg.algoChipNumber(
446  static_cast<int>(m_numberConditionChips), static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
447 
448  if ((chipNr < 0) || (chipNr > static_cast<int>(m_numberConditionChips))) {
449  LogTrace("TriggerMenuParser") << " Chip number " << chipNr << " outside allowed range [0, "
450  << m_numberConditionChips << ") - algorithm not inserted!" << std::endl;
451  return false;
452  }
453 
454  // output pin outside allowed values
455  int outputPin = alg.algoOutputPin(
456  static_cast<int>(m_numberConditionChips), static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
457 
458  if ((outputPin < 0) || (outputPin > static_cast<int>(m_pinsOnConditionChip))) {
459  LogTrace("TriggerMenuParser") << " Output pin " << outputPin << " outside allowed range [0, "
460  << m_pinsOnConditionChip << "] - algorithm not inserted!" << std::endl;
461  return false;
462  }
463 
464  // no two algorithms on the same chip can have the same output pin
465  for (CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
466  int iPin = (itAlgo->second)
467  .algoOutputPin(static_cast<int>(m_numberConditionChips),
468  static_cast<int>(m_pinsOnConditionChip),
469  m_orderConditionChip);
470  std::string iName = itAlgo->first;
471  int iChip = (itAlgo->second)
472  .algoChipNumber(static_cast<int>(m_numberConditionChips),
473  static_cast<int>(m_pinsOnConditionChip),
474  m_orderConditionChip);
475 
476  if ((outputPin == iPin) && (chipNr == iChip)) {
477  LogTrace("TriggerMenuParser") << " Output pin " << outputPin << " is the same as for algorithm " << iName
478  << "\n from the same chip number " << chipNr << " - algorithm not inserted!"
479  << std::endl;
480  return false;
481  }
482  }
483 
484  // insert algorithm
485  m_algorithmMap[algName] = alg;
486  m_algorithmAliasMap[algAlias] = alg;
487 
488  //LogTrace("TriggerMenuParser")
489  //<< " OK - algorithm inserted!"
490  //<< std::endl;
491 
492  return true;
493 }
494 
495 template <typename T>
497  std::stringstream ss;
498  ss << data;
499  return ss.str();
500 }
502  std::stringstream ss;
503  ss << data;
504  int value;
505  ss >> value;
506  return value;
507 }
508 
516 bool l1t::TriggerMenuParser::parseScales(std::map<std::string, tmeventsetup::esScale> scaleMap) {
517  using namespace tmeventsetup;
518 
519  // Setup ScaleParameter to hold information from parsing
525  GlobalScales::ScaleParameters ettEmScales;
527  GlobalScales::ScaleParameters etmHfScales;
530 
531  // Start by parsing the Scale Map
532  for (std::map<std::string, esScale>::const_iterator cit = scaleMap.begin(); cit != scaleMap.end(); cit++) {
533  const esScale& scale = cit->second;
534 
535  GlobalScales::ScaleParameters* scaleParam;
536  if (scale.getObjectType() == esObjectType::Muon)
537  scaleParam = &muScales;
538  else if (scale.getObjectType() == esObjectType::Egamma)
539  scaleParam = &egScales;
540  else if (scale.getObjectType() == esObjectType::Tau)
541  scaleParam = &tauScales;
542  else if (scale.getObjectType() == esObjectType::Jet)
543  scaleParam = &jetScales;
544  else if (scale.getObjectType() == esObjectType::ETT)
545  scaleParam = &ettScales;
546  else if (scale.getObjectType() == esObjectType::ETTEM)
547  scaleParam = &ettEmScales;
548  else if (scale.getObjectType() == esObjectType::ETM)
549  scaleParam = &etmScales;
550  else if (scale.getObjectType() == esObjectType::ETMHF)
551  scaleParam = &etmHfScales;
552  else if (scale.getObjectType() == esObjectType::HTT)
553  scaleParam = &httScales;
554  else if (scale.getObjectType() == esObjectType::HTM)
555  scaleParam = &htmScales;
556  else
557  scaleParam = nullptr;
558 
559  if (scaleParam != nullptr) {
560  switch (scale.getScaleType()) {
561  case esScaleType::EtScale: {
562  scaleParam->etMin = scale.getMinimum();
563  scaleParam->etMax = scale.getMaximum();
564  scaleParam->etStep = scale.getStep();
565 
566  //Get bin edges
567  const std::vector<esBin>& binsV = scale.getBins();
568  for (unsigned int i = 0; i < binsV.size(); i++) {
569  const esBin& bin = binsV.at(i);
570  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
571  scaleParam->etBins.push_back(binLimits);
572  }
573 
574  // If this is an energy sum fill dummy values for eta and phi
575  // There are no scales for these in the XML so the other case statements will not be seen....do it here.
576  if (scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
577  scale.getObjectType() == esObjectType::ETM || scale.getObjectType() == esObjectType::HTM ||
578  scale.getObjectType() == esObjectType::ETTEM || scale.getObjectType() == esObjectType::ETMHF) {
579  scaleParam->etaMin = -1.;
580  scaleParam->etaMax = -1.;
581  scaleParam->etaStep = -1.;
582  if (scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
583  scale.getObjectType() == esObjectType::ETTEM) {
584  // if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT) {
585  scaleParam->phiMin = -1.;
586  scaleParam->phiMax = -1.;
587  scaleParam->phiStep = -1.;
588  }
589  }
590  } break;
591  case esScaleType::EtaScale: {
592  scaleParam->etaMin = scale.getMinimum();
593  scaleParam->etaMax = scale.getMaximum();
594  scaleParam->etaStep = scale.getStep();
595 
596  //Get bin edges
597  const std::vector<esBin>& binsV = scale.getBins();
598  scaleParam->etaBins.resize(pow(2, scale.getNbits()));
599  for (unsigned int i = 0; i < binsV.size(); i++) {
600  const esBin& bin = binsV.at(i);
601  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
602  scaleParam->etaBins.at(bin.hw_index) = binLimits;
603  }
604  } break;
605  case esScaleType::PhiScale: {
606  scaleParam->phiMin = scale.getMinimum();
607  scaleParam->phiMax = scale.getMaximum();
608  scaleParam->phiStep = scale.getStep();
609 
610  //Get bin edges
611  const std::vector<esBin>& binsV = scale.getBins();
612  scaleParam->phiBins.resize(pow(2, scale.getNbits()));
613  for (unsigned int i = 0; i < binsV.size(); i++) {
614  const esBin& bin = binsV.at(i);
615  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
616  scaleParam->phiBins.at(bin.hw_index) = binLimits;
617  }
618  } break;
619  default:
620 
621  break;
622  } //end switch
623  } //end valid scale
624  } //end loop over scaleMap
625 
626  // put the ScaleParameters into the class
627  m_gtScales.setMuonScales(muScales);
628  m_gtScales.setEGScales(egScales);
629  m_gtScales.setTauScales(tauScales);
630  m_gtScales.setJetScales(jetScales);
631  m_gtScales.setETTScales(ettScales);
632  m_gtScales.setETTEmScales(ettEmScales);
633  m_gtScales.setETMScales(etmScales);
634  m_gtScales.setETMHfScales(etmHfScales);
635  m_gtScales.setHTTScales(httScales);
636  m_gtScales.setHTMScales(htmScales);
637 
638  // Setup the LUT for the Scale Conversions
639  bool hasPrecision = false;
640  std::map<std::string, unsigned int> precisions;
641  getPrecisions(precisions, scaleMap);
642  for (std::map<std::string, unsigned int>::const_iterator cit = precisions.begin(); cit != precisions.end(); cit++) {
643  //std::cout << cit->first << " = " << cit->second << "\n";
644  hasPrecision = true;
645  }
646 
647  if (hasPrecision) {
648  //Start with the Cal - Muon Eta LUTS
649  //----------------------------------
650  parseCalMuEta_LUTS(scaleMap, "EG", "MU");
651  parseCalMuEta_LUTS(scaleMap, "JET", "MU");
652  parseCalMuEta_LUTS(scaleMap, "TAU", "MU");
653 
654  //Now the Cal - Muon Phi LUTS
655  //-------------------------------------
656  parseCalMuPhi_LUTS(scaleMap, "EG", "MU");
657  parseCalMuPhi_LUTS(scaleMap, "JET", "MU");
658  parseCalMuPhi_LUTS(scaleMap, "TAU", "MU");
659  parseCalMuPhi_LUTS(scaleMap, "HTM", "MU");
660  parseCalMuPhi_LUTS(scaleMap, "ETM", "MU");
661  parseCalMuPhi_LUTS(scaleMap, "ETMHF", "MU");
662 
663  // Now the Pt LUTs (??? more combinations needed ??)
664  // ---------------
665  parsePt_LUTS(scaleMap, "Mass", "EG", precisions["PRECISION-EG-MU-MassPt"]);
666  parsePt_LUTS(scaleMap, "Mass", "MU", precisions["PRECISION-EG-MU-MassPt"]);
667  parsePt_LUTS(scaleMap, "Mass", "JET", precisions["PRECISION-EG-JET-MassPt"]);
668  parsePt_LUTS(scaleMap, "Mass", "TAU", precisions["PRECISION-EG-TAU-MassPt"]);
669  parsePt_LUTS(scaleMap, "Mass", "ETM", precisions["PRECISION-EG-ETM-MassPt"]);
670  parsePt_LUTS(scaleMap, "Mass", "ETMHF", precisions["PRECISION-EG-ETMHF-MassPt"]);
671  parsePt_LUTS(scaleMap, "Mass", "HTM", precisions["PRECISION-EG-HTM-MassPt"]);
672 
673  // Now the Pt LUTs for TBPT calculation (??? CCLA following what was done for MASS pt LUTs for now ??)
674  // ---------------
675  parsePt_LUTS(scaleMap, "TwoBody", "EG", precisions["PRECISION-EG-MU-TwoBodyPt"]);
676  parsePt_LUTS(scaleMap, "TwoBody", "MU", precisions["PRECISION-EG-MU-TwoBodyPt"]);
677  parsePt_LUTS(scaleMap, "TwoBody", "JET", precisions["PRECISION-EG-JET-TwoBodyPt"]);
678  parsePt_LUTS(scaleMap, "TwoBody", "TAU", precisions["PRECISION-EG-TAU-TwoBodyPt"]);
679  parsePt_LUTS(scaleMap, "TwoBody", "ETM", precisions["PRECISION-EG-ETM-TwoBodyPt"]);
680  parsePt_LUTS(scaleMap, "TwoBody", "ETMHF", precisions["PRECISION-EG-ETMHF-TwoBodyPt"]);
681  parsePt_LUTS(scaleMap, "TwoBody", "HTM", precisions["PRECISION-EG-HTM-TwoBodyPt"]);
682 
683  // Now the Delta Eta/Cosh LUTs (must be done in groups)
684  // ----------------------------------------------------
685  parseDeltaEta_Cosh_LUTS(
686  scaleMap, "EG", "EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
687  parseDeltaEta_Cosh_LUTS(
688  scaleMap, "EG", "JET", precisions["PRECISION-EG-JET-Delta"], precisions["PRECISION-EG-JET-Math"]);
689  parseDeltaEta_Cosh_LUTS(
690  scaleMap, "EG", "TAU", precisions["PRECISION-EG-TAU-Delta"], precisions["PRECISION-EG-TAU-Math"]);
691  parseDeltaEta_Cosh_LUTS(
692  scaleMap, "EG", "MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
693 
694  parseDeltaEta_Cosh_LUTS(
695  scaleMap, "JET", "JET", precisions["PRECISION-JET-JET-Delta"], precisions["PRECISION-JET-JET-Math"]);
696  parseDeltaEta_Cosh_LUTS(
697  scaleMap, "JET", "TAU", precisions["PRECISION-JET-TAU-Delta"], precisions["PRECISION-JET-TAU-Math"]);
698  parseDeltaEta_Cosh_LUTS(
699  scaleMap, "JET", "MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
700 
701  parseDeltaEta_Cosh_LUTS(
702  scaleMap, "TAU", "TAU", precisions["PRECISION-TAU-TAU-Delta"], precisions["PRECISION-TAU-TAU-Math"]);
703  parseDeltaEta_Cosh_LUTS(
704  scaleMap, "TAU", "MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
705 
706  parseDeltaEta_Cosh_LUTS(
707  scaleMap, "MU", "MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
708 
709  // Now the Delta Phi/Cos LUTs (must be done in groups)
710  // ----------------------------------------------------
711  parseDeltaPhi_Cos_LUTS(
712  scaleMap, "EG", "EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
713  parseDeltaPhi_Cos_LUTS(
714  scaleMap, "EG", "JET", precisions["PRECISION-EG-JET-Delta"], precisions["PRECISION-EG-JET-Math"]);
715  parseDeltaPhi_Cos_LUTS(
716  scaleMap, "EG", "TAU", precisions["PRECISION-EG-TAU-Delta"], precisions["PRECISION-EG-TAU-Math"]);
717  parseDeltaPhi_Cos_LUTS(
718  scaleMap, "EG", "ETM", precisions["PRECISION-EG-ETM-Delta"], precisions["PRECISION-EG-ETM-Math"]);
719  parseDeltaPhi_Cos_LUTS(
720  scaleMap, "EG", "ETMHF", precisions["PRECISION-EG-ETMHF-Delta"], precisions["PRECISION-EG-ETMHF-Math"]);
721  parseDeltaPhi_Cos_LUTS(
722  scaleMap, "EG", "HTM", precisions["PRECISION-EG-HTM-Delta"], precisions["PRECISION-EG-HTM-Math"]);
723  parseDeltaPhi_Cos_LUTS(
724  scaleMap, "EG", "MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
725 
726  parseDeltaPhi_Cos_LUTS(
727  scaleMap, "JET", "JET", precisions["PRECISION-JET-JET-Delta"], precisions["PRECISION-JET-JET-Math"]);
728  parseDeltaPhi_Cos_LUTS(
729  scaleMap, "JET", "TAU", precisions["PRECISION-JET-TAU-Delta"], precisions["PRECISION-JET-TAU-Math"]);
730  parseDeltaPhi_Cos_LUTS(
731  scaleMap, "JET", "ETM", precisions["PRECISION-JET-ETM-Delta"], precisions["PRECISION-JET-ETM-Math"]);
732  parseDeltaPhi_Cos_LUTS(
733  scaleMap, "JET", "ETMHF", precisions["PRECISION-JET-ETMHF-Delta"], precisions["PRECISION-JET-ETMHF-Math"]);
734  parseDeltaPhi_Cos_LUTS(
735  scaleMap, "JET", "HTM", precisions["PRECISION-JET-HTM-Delta"], precisions["PRECISION-JET-HTM-Math"]);
736  parseDeltaPhi_Cos_LUTS(
737  scaleMap, "JET", "MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
738 
739  parseDeltaPhi_Cos_LUTS(
740  scaleMap, "TAU", "TAU", precisions["PRECISION-TAU-TAU-Delta"], precisions["PRECISION-TAU-TAU-Math"]);
741  parseDeltaPhi_Cos_LUTS(
742  scaleMap, "TAU", "ETM", precisions["PRECISION-TAU-ETM-Delta"], precisions["PRECISION-TAU-ETM-Math"]);
743  parseDeltaPhi_Cos_LUTS(
744  scaleMap, "TAU", "ETMHF", precisions["PRECISION-TAU-ETMHF-Delta"], precisions["PRECISION-TAU-ETMHF-Math"]);
745  parseDeltaPhi_Cos_LUTS(
746  scaleMap, "TAU", "HTM", precisions["PRECISION-TAU-HTM-Delta"], precisions["PRECISION-TAU-HTM-Math"]);
747  parseDeltaPhi_Cos_LUTS(
748  scaleMap, "TAU", "MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
749 
750  parseDeltaPhi_Cos_LUTS(
751  scaleMap, "MU", "ETM", precisions["PRECISION-MU-ETM-Delta"], precisions["PRECISION-MU-ETM-Math"]);
752  parseDeltaPhi_Cos_LUTS(
753  scaleMap, "MU", "ETMHF", precisions["PRECISION-MU-ETMHF-Delta"], precisions["PRECISION-MU-ETMHF-Math"]);
754  parseDeltaPhi_Cos_LUTS(
755  scaleMap, "MU", "HTM", precisions["PRECISION-MU-HTM-Delta"], precisions["PRECISION-MU-HTM-Math"]);
756  parseDeltaPhi_Cos_LUTS(
757  scaleMap, "MU", "MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
758 
759  parsePhi_Trig_LUTS(scaleMap, "EG", l1t::COS, precisions["PRECISION-EG-EG-Math"]);
760  parsePhi_Trig_LUTS(scaleMap, "JET", l1t::COS, precisions["PRECISION-JET-JET-Math"]);
761  parsePhi_Trig_LUTS(scaleMap, "TAU", l1t::COS, precisions["PRECISION-TAU-TAU-Math"]);
762  parsePhi_Trig_LUTS(scaleMap, "MU", l1t::COS, precisions["PRECISION-MU-MU-Math"]);
763 
764  parsePhi_Trig_LUTS(scaleMap, "EG", l1t::SIN, precisions["PRECISION-EG-EG-Math"]);
765  parsePhi_Trig_LUTS(scaleMap, "JET", l1t::SIN, precisions["PRECISION-JET-JET-Math"]);
766  parsePhi_Trig_LUTS(scaleMap, "TAU", l1t::SIN, precisions["PRECISION-TAU-TAU-Math"]);
767  parsePhi_Trig_LUTS(scaleMap, "MU", l1t::SIN, precisions["PRECISION-MU-MU-Math"]);
768 
769  //CCLA
770  //m_gtScales.dumpAllLUTs(std::cout);
771  //m_gtScales.print(std::cout);
772  }
773 
774  return true;
775 }
776 
777 void l1t::TriggerMenuParser::parseCalMuEta_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
778  std::string obj1,
779  std::string obj2) {
780  using namespace tmeventsetup;
781 
782  // First Delta Eta for this set
783  std::string scLabel1 = obj1;
784  scLabel1 += "-ETA";
785  std::string scLabel2 = obj2;
786  scLabel2 += "-ETA";
787 
788  //This LUT does not exist in L1 Menu file, don't fill it
789  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
790  return;
791 
792  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
793  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
794 
795  std::vector<long long> lut_cal_2_mu_eta;
796  getCaloMuonEtaConversionLut(lut_cal_2_mu_eta, scale1, scale2);
797 
798  std::string lutName = obj1;
799  lutName += "-";
800  lutName += obj2;
801  m_gtScales.setLUT_CalMuEta(lutName, lut_cal_2_mu_eta);
802 }
803 
804 void l1t::TriggerMenuParser::parseCalMuPhi_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
805  std::string obj1,
806  std::string obj2) {
807  using namespace tmeventsetup;
808 
809  // First Delta Eta for this set
810  std::string scLabel1 = obj1;
811  scLabel1 += "-PHI";
812  std::string scLabel2 = obj2;
813  scLabel2 += "-PHI";
814 
815  //This LUT does not exist in L1 Menu file, don't fill it
816  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
817  return;
818 
819  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
820  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
821 
822  std::vector<long long> lut_cal_2_mu_phi;
823  getCaloMuonPhiConversionLut(lut_cal_2_mu_phi, scale1, scale2);
824 
825  std::string lutName = obj1;
826  lutName += "-";
827  lutName += obj2;
828  m_gtScales.setLUT_CalMuPhi(lutName, lut_cal_2_mu_phi);
829 }
830 
831 void l1t::TriggerMenuParser::parsePt_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
832  std::string lutpfx,
833  std::string obj1,
834  unsigned int prec) {
835  using namespace tmeventsetup;
836 
837  // First Delta Eta for this set
838  std::string scLabel1 = obj1;
839  scLabel1 += "-ET";
840 
841  //This LUT does not exist in L1 Menu file, don't fill it
842  if (scaleMap.find(scLabel1) == scaleMap.end())
843  return;
844 
845  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
846 
847  std::vector<long long> lut_pt;
848  getLut(lut_pt, scale1, prec);
849 
850  m_gtScales.setLUT_Pt(lutpfx + "_" + scLabel1, lut_pt, prec);
851 }
852 
853 void l1t::TriggerMenuParser::parseDeltaEta_Cosh_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
854  std::string obj1,
855  std::string obj2,
856  unsigned int prec1,
857  unsigned int prec2) {
858  using namespace tmeventsetup;
859 
860  // First Delta Eta for this set
861  std::string scLabel1 = obj1;
862  scLabel1 += "-ETA";
863  std::string scLabel2 = obj2;
864  scLabel2 += "-ETA";
865 
866  //This LUT does not exist in L1 Menu file, don't fill it
867  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
868  return;
869 
870  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
871  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
872  std::vector<double> val_delta_eta;
873  std::vector<long long> lut_delta_eta;
874  size_t n = getDeltaVector(val_delta_eta, scale1, scale2);
875  setLut(lut_delta_eta, val_delta_eta, prec1);
876  std::string lutName = obj1;
877  lutName += "-";
878  lutName += obj2;
879  m_gtScales.setLUT_DeltaEta(lutName, lut_delta_eta, prec1);
880 
881  // Second Get the Cosh for this delta Eta Set
882  std::vector<long long> lut_cosh;
883  applyCosh(val_delta_eta, n);
884  setLut(lut_cosh, val_delta_eta, prec2);
885  m_gtScales.setLUT_Cosh(lutName, lut_cosh, prec2);
886 }
887 
888 void l1t::TriggerMenuParser::parseDeltaPhi_Cos_LUTS(const std::map<std::string, tmeventsetup::esScale>& scaleMap,
889  const std::string& obj1,
890  const std::string& obj2,
891  unsigned int prec1,
892  unsigned int prec2) {
893  using namespace tmeventsetup;
894 
895  // First Delta phi for this set
896  std::string scLabel1 = obj1;
897  scLabel1 += "-PHI";
898  std::string scLabel2 = obj2;
899  scLabel2 += "-PHI";
900 
901  //This LUT does not exist in L1 Menu file, don't fill it
902  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
903  return;
904 
905  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
906  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
907  std::vector<double> val_delta_phi;
908  std::vector<long long> lut_delta_phi;
909  size_t n = getDeltaVector(val_delta_phi, scale1, scale2);
910  setLut(lut_delta_phi, val_delta_phi, prec1);
911  std::string lutName = obj1;
912  lutName += "-";
913  lutName += obj2;
914  m_gtScales.setLUT_DeltaPhi(lutName, lut_delta_phi, prec1);
915 
916  // Second Get the Cosh for this delta phi Set
917  std::vector<long long> lut_cos;
918  applyCos(val_delta_phi, n);
919  setLut(lut_cos, val_delta_phi, prec2);
920  m_gtScales.setLUT_Cos(lutName, lut_cos, prec2);
921 }
922 
923 void l1t::TriggerMenuParser::parsePhi_Trig_LUTS(const std::map<std::string, tmeventsetup::esScale>& scaleMap,
924  const std::string& obj,
926  unsigned int prec) {
927  using namespace tmeventsetup;
928 
929  std::string scLabel = obj;
930  scLabel += "-PHI";
931 
932  //This LUT does not exist in L1 Menu file, don't fill it
933  if (scaleMap.find(scLabel) == scaleMap.end())
934  return;
935  if (func != l1t::SIN and func != l1t::COS)
936  return;
937 
938  const esScale* scale = &scaleMap.find(scLabel)->second;
939 
940  const double step = scale->getStep();
941  const double range = scale->getMaximum() - scale->getMinimum();
942  const size_t n = std::ceil(range / step);
943  const size_t bitwidth = std::ceil(std::log10(n) / std::log10(2));
944 
945  std::vector<double> array(std::pow(2, bitwidth), 0);
946 
947  for (size_t ii = 0; ii < n; ii++) {
948  array.at(ii) = step * ii;
949  }
950 
951  const std::string& lutName = obj;
952  std::vector<long long> lut;
953  if (func == l1t::SIN) {
954  applySin(array, n);
955  setLut(lut, array, prec);
956  m_gtScales.setLUT_Sin(lutName, lut, prec);
957  } else if (func == l1t::COS) {
958  applyCos(array, n);
959  setLut(lut, array, prec);
960  m_gtScales.setLUT_Cos(lutName, lut, prec);
961  }
962 }
963 
975 bool l1t::TriggerMenuParser::parseMuon(tmeventsetup::esCondition condMu, unsigned int chipNr, const bool corrFlag) {
976  using namespace tmeventsetup;
977 
978  // get condition, particle name (must be muon) and type name
979  std::string condition = "muon";
980  std::string particle = "muon"; //l1t2string( condMu.objectType() );
981  std::string type = l1t2string(condMu.getType());
982  std::string name = l1t2string(condMu.getName());
983  int nrObj = -1;
984 
986 
987  if (condMu.getType() == esConditionType::SingleMuon) {
988  type = "1_s";
989  cType = l1t::Type1s;
990  nrObj = 1;
991  } else if (condMu.getType() == esConditionType::DoubleMuon) {
992  type = "2_s";
993  cType = l1t::Type2s;
994  nrObj = 2;
995  } else if (condMu.getType() == esConditionType::TripleMuon) {
996  type = "3";
997  cType = l1t::Type3s;
998  nrObj = 3;
999  } else if (condMu.getType() == esConditionType::QuadMuon) {
1000  type = "4";
1001  cType = l1t::Type4s;
1002  nrObj = 4;
1003  } else {
1004  edm::LogError("TriggerMenuParser") << "Wrong type for muon-condition (" << type << ")" << std::endl;
1005  return false;
1006  }
1007 
1008  if (nrObj < 0) {
1009  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type << ")"
1010  << "\nCan not determine number of trigger objects. " << std::endl;
1011  return false;
1012  }
1013 
1014  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1015  << "\n parseMuon "
1016  << "\n condition = " << condition << "\n particle = " << particle
1017  << "\n type = " << type << "\n name = " << name << std::endl;
1018 
1019  // // get values
1020 
1021  // temporary storage of the parameters
1022  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1023 
1024  // Do we need this?
1025  MuonTemplate::CorrelationParameter corrParameter;
1026 
1027  // need at least two values for deltaPhi
1028  std::vector<uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1029  tmpValues.reserve(nrObj);
1030 
1031  if (int(condMu.getObjects().size()) != nrObj) {
1032  edm::LogError("TriggerMenuParser") << " condMu objects: nrObj = " << nrObj
1033  << "condMu.getObjects().size() = " << condMu.getObjects().size() << std::endl;
1034  return false;
1035  }
1036 
1037  // Look for cuts on the objects in the condition
1038  unsigned int chargeCorrelation = 1;
1039  const std::vector<esCut>& cuts = condMu.getCuts();
1040  for (size_t jj = 0; jj < cuts.size(); jj++) {
1041  const esCut cut = cuts.at(jj);
1042  if (cut.getCutType() == esCutType::ChargeCorrelation) {
1043  if (cut.getData() == "ls")
1044  chargeCorrelation = 2;
1045  else if (cut.getData() == "os")
1046  chargeCorrelation = 4;
1047  else
1048  chargeCorrelation = 1; //ignore correlation
1049  }
1050  }
1051 
1052  //set charge correlation parameter
1053  corrParameter.chargeCorrelation = chargeCorrelation; //tmpValues[0];
1054 
1055  int cnt = 0;
1056 
1057  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1058  int relativeBx = 0;
1059  bool gEq = false;
1060 
1061  // Loop over objects and extract the cuts on the objects
1062  const std::vector<esObject>& objects = condMu.getObjects();
1063  for (size_t jj = 0; jj < objects.size(); jj++) {
1064  const esObject object = objects.at(jj);
1065  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1066 
1067  // BLW TO DO: This needs to be added to the Object Parameters
1068  relativeBx = object.getBxOffset();
1069 
1070  // Loop over the cuts for this object
1071  int upperUnconstrainedPtInd = -1;
1072  int lowerUnconstrainedPtInd = 0;
1073  int upperImpactParameterInd = -1;
1074  int lowerImpactParameterInd = 0;
1075  int upperThresholdInd = -1;
1076  int lowerThresholdInd = 0;
1077  int upperIndexInd = -1;
1078  int lowerIndexInd = 0;
1079  int cntEta = 0;
1080  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1081  int cntPhi = 0;
1082  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1083  int isolationLUT = 0xF; //default is to ignore unless specified.
1084  int impactParameterLUT = 0xF; //default is to ignore unless specified
1085  int charge = -1; //default value is to ignore unless specified
1086  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1087 
1088  const std::vector<esCut>& cuts = object.getCuts();
1089  for (size_t kk = 0; kk < cuts.size(); kk++) {
1090  const esCut cut = cuts.at(kk);
1091 
1092  switch (cut.getCutType()) {
1093  case esCutType::UnconstrainedPt:
1094  lowerUnconstrainedPtInd = cut.getMinimum().index;
1095  upperUnconstrainedPtInd = cut.getMaximum().index;
1096  break;
1097 
1098  case esCutType::ImpactParameter:
1099  lowerImpactParameterInd = cut.getMinimum().index;
1100  upperImpactParameterInd = cut.getMaximum().index;
1101  impactParameterLUT = l1tstr2int(cut.getData());
1102  break;
1103 
1104  case esCutType::Threshold:
1105  lowerThresholdInd = cut.getMinimum().index;
1106  upperThresholdInd = cut.getMaximum().index;
1107  break;
1108 
1109  case esCutType::Slice:
1110  lowerIndexInd = int(cut.getMinimum().value);
1111  upperIndexInd = int(cut.getMaximum().value);
1112  break;
1113 
1114  case esCutType::Eta: {
1115  if (cntEta == 0) {
1116  etaWindow1Lower = cut.getMinimum().index;
1117  etaWindow1Upper = cut.getMaximum().index;
1118  } else if (cntEta == 1) {
1119  etaWindow2Lower = cut.getMinimum().index;
1120  etaWindow2Upper = cut.getMaximum().index;
1121  } else {
1122  edm::LogError("TriggerMenuParser")
1123  << "Too Many Eta Cuts for muon-condition (" << particle << ")" << std::endl;
1124  return false;
1125  }
1126  cntEta++;
1127 
1128  } break;
1129 
1130  case esCutType::Phi: {
1131  if (cntPhi == 0) {
1132  phiWindow1Lower = cut.getMinimum().index;
1133  phiWindow1Upper = cut.getMaximum().index;
1134  } else if (cntPhi == 1) {
1135  phiWindow2Lower = cut.getMinimum().index;
1136  phiWindow2Upper = cut.getMaximum().index;
1137  } else {
1138  edm::LogError("TriggerMenuParser")
1139  << "Too Many Phi Cuts for muon-condition (" << particle << ")" << std::endl;
1140  return false;
1141  }
1142  cntPhi++;
1143 
1144  } break;
1145 
1146  case esCutType::Charge:
1147  if (cut.getData() == "positive")
1148  charge = 0;
1149  else if (cut.getData() == "negative")
1150  charge = 1;
1151  else
1152  charge = -1;
1153  break;
1154  case esCutType::Quality:
1155 
1156  qualityLUT = l1tstr2int(cut.getData());
1157 
1158  break;
1159  case esCutType::Isolation: {
1160  isolationLUT = l1tstr2int(cut.getData());
1161 
1162  } break;
1163  default:
1164  break;
1165  } //end switch
1166 
1167  } //end loop over cuts
1168 
1169  // Set the parameter cuts
1170  objParameter[cnt].unconstrainedPtHigh = upperUnconstrainedPtInd;
1171  objParameter[cnt].unconstrainedPtLow = lowerUnconstrainedPtInd;
1172  objParameter[cnt].impactParameterHigh = upperImpactParameterInd;
1173  objParameter[cnt].impactParameterLow = lowerImpactParameterInd;
1174  objParameter[cnt].impactParameterLUT = impactParameterLUT;
1175 
1176  objParameter[cnt].ptHighThreshold = upperThresholdInd;
1177  objParameter[cnt].ptLowThreshold = lowerThresholdInd;
1178 
1179  objParameter[cnt].indexHigh = upperIndexInd;
1180  objParameter[cnt].indexLow = lowerIndexInd;
1181 
1182  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1183  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1184  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1185  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1186 
1187  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1188  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1189  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1190  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1191 
1192  // BLW TO DO: Do we need these anymore? Drop them?
1193  objParameter[cnt].enableMip = false; //tmpMip[i];
1194  objParameter[cnt].enableIso = false; //tmpEnableIso[i];
1195  objParameter[cnt].requestIso = false; //tmpRequestIso[i];
1196 
1197  objParameter[cnt].charge = charge;
1198  objParameter[cnt].qualityLUT = qualityLUT;
1199  objParameter[cnt].isolationLUT = isolationLUT;
1200 
1201  cnt++;
1202  } //end loop over objects
1203 
1204  // object types - all muons
1205  std::vector<GlobalObject> objType(nrObj, gtMu);
1206 
1207  // now create a new CondMuonition
1208  MuonTemplate muonCond(name);
1209 
1210  muonCond.setCondType(cType);
1211  muonCond.setObjectType(objType);
1212  muonCond.setCondGEq(gEq);
1213  muonCond.setCondChipNr(chipNr);
1214  muonCond.setCondRelativeBx(relativeBx);
1215 
1216  muonCond.setConditionParameter(objParameter, corrParameter);
1217 
1218  if (edm::isDebugEnabled()) {
1219  std::ostringstream myCoutStream;
1220  muonCond.print(myCoutStream);
1221  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1222  }
1223 
1224  // insert condition into the map and into muon template vector
1225  if (!insertConditionIntoMap(muonCond, chipNr)) {
1226  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
1227  return false;
1228  } else {
1229  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1230  if (corrFlag) {
1231  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1232  } else {
1233  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the vecMuonTemplate vector" << std::endl;
1234  (m_vecMuonTemplate[chipNr]).push_back(muonCond);
1235  }
1236  }
1237 
1238  //
1239  return true;
1240 }
1241 
1242 bool l1t::TriggerMenuParser::parseMuonCorr(const tmeventsetup::esObject* corrMu, unsigned int chipNr) {
1243  // XERCES_CPP_NAMESPACE_USE
1244  using namespace tmeventsetup;
1245 
1246  // get condition, particle name (must be muon) and type name
1247  std::string condition = "muon";
1248  std::string particle = "muon"; //l1t2string( condMu.objectType() );
1249  std::string type = l1t2string(corrMu->getType());
1250  std::string name = l1t2string(corrMu->getName());
1251  int nrObj = 1;
1252  type = "1_s";
1253  GtConditionType cType = l1t::Type1s;
1254 
1255  if (nrObj < 0) {
1256  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type << ")"
1257  << "\nCan not determine number of trigger objects. " << std::endl;
1258  return false;
1259  }
1260 
1261  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1262  << "\n parseMuon "
1263  << "\n condition = " << condition << "\n particle = " << particle
1264  << "\n type = " << type << "\n name = " << name << std::endl;
1265 
1266  // // get values
1267 
1268  // temporary storage of the parameters
1269  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1270 
1271  // Do we need this?
1272  MuonTemplate::CorrelationParameter corrParameter;
1273 
1274  // need at least two values for deltaPhi
1275  std::vector<uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1276  tmpValues.reserve(nrObj);
1277 
1278  // BLW TO DO: How do we deal with these in the new format
1279  // std::string str_chargeCorrelation = l1t2string( condMu.requestedChargeCorr() );
1280  std::string str_chargeCorrelation = "ig";
1281  unsigned int chargeCorrelation = 0;
1282  if (str_chargeCorrelation == "ig")
1283  chargeCorrelation = 1;
1284  else if (str_chargeCorrelation == "ls")
1285  chargeCorrelation = 2;
1286  else if (str_chargeCorrelation == "os")
1287  chargeCorrelation = 4;
1288 
1289  //getXMLHexTextValue("1", dst);
1290  corrParameter.chargeCorrelation = chargeCorrelation; //tmpValues[0];
1291 
1292  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1293  int relativeBx = 0;
1294  bool gEq = false;
1295 
1296  //const esObject* object = condMu;
1297  gEq = (corrMu->getComparisonOperator() == esComparisonOperator::GE);
1298 
1299  // BLW TO DO: This needs to be added to the Object Parameters
1300  relativeBx = corrMu->getBxOffset();
1301 
1302  // Loop over the cuts for this object
1303  int upperThresholdInd = -1;
1304  int lowerThresholdInd = 0;
1305  int upperIndexInd = -1;
1306  int lowerIndexInd = 0;
1307  int cntEta = 0;
1308  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1309  int cntPhi = 0;
1310  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1311  int isolationLUT = 0xF; //default is to ignore unless specified.
1312  int charge = -1; //defaut is to ignore unless specified
1313  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1314 
1315  const std::vector<esCut>& cuts = corrMu->getCuts();
1316  for (size_t kk = 0; kk < cuts.size(); kk++) {
1317  const esCut cut = cuts.at(kk);
1318 
1319  switch (cut.getCutType()) {
1320  case esCutType::Threshold:
1321  lowerThresholdInd = cut.getMinimum().index;
1322  upperThresholdInd = cut.getMaximum().index;
1323  break;
1324 
1325  case esCutType::Slice:
1326  lowerIndexInd = int(cut.getMinimum().value);
1327  upperIndexInd = int(cut.getMaximum().value);
1328  break;
1329 
1330  case esCutType::Eta: {
1331  if (cntEta == 0) {
1332  etaWindow1Lower = cut.getMinimum().index;
1333  etaWindow1Upper = cut.getMaximum().index;
1334  } else if (cntEta == 1) {
1335  etaWindow2Lower = cut.getMinimum().index;
1336  etaWindow2Upper = cut.getMaximum().index;
1337  } else {
1338  edm::LogError("TriggerMenuParser")
1339  << "Too Many Eta Cuts for muon-condition (" << particle << ")" << std::endl;
1340  return false;
1341  }
1342  cntEta++;
1343 
1344  } break;
1345 
1346  case esCutType::Phi: {
1347  if (cntPhi == 0) {
1348  phiWindow1Lower = cut.getMinimum().index;
1349  phiWindow1Upper = cut.getMaximum().index;
1350  } else if (cntPhi == 1) {
1351  phiWindow2Lower = cut.getMinimum().index;
1352  phiWindow2Upper = cut.getMaximum().index;
1353  } else {
1354  edm::LogError("TriggerMenuParser")
1355  << "Too Many Phi Cuts for muon-condition (" << particle << ")" << std::endl;
1356  return false;
1357  }
1358  cntPhi++;
1359 
1360  } break;
1361 
1362  case esCutType::Charge:
1363  if (cut.getData() == "positive")
1364  charge = 0;
1365  else if (cut.getData() == "negative")
1366  charge = 1;
1367  else
1368  charge = -1;
1369  break;
1370  case esCutType::Quality:
1371 
1372  qualityLUT = l1tstr2int(cut.getData());
1373 
1374  break;
1375  case esCutType::Isolation: {
1376  isolationLUT = l1tstr2int(cut.getData());
1377 
1378  } break;
1379  default:
1380  break;
1381  } //end switch
1382 
1383  } //end loop over cuts
1384 
1385  // Set the parameter cuts
1386  objParameter[0].ptHighThreshold = upperThresholdInd;
1387  objParameter[0].ptLowThreshold = lowerThresholdInd;
1388 
1389  objParameter[0].indexHigh = upperIndexInd;
1390  objParameter[0].indexLow = lowerIndexInd;
1391 
1392  objParameter[0].etaWindow1Lower = etaWindow1Lower;
1393  objParameter[0].etaWindow1Upper = etaWindow1Upper;
1394  objParameter[0].etaWindow2Lower = etaWindow2Lower;
1395  objParameter[0].etaWindow2Upper = etaWindow2Upper;
1396 
1397  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1398  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1399  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1400  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1401 
1402  // BLW TO DO: Do we need these anymore? Drop them?
1403  objParameter[0].enableMip = false; //tmpMip[i];
1404  objParameter[0].enableIso = false; //tmpEnableIso[i];
1405  objParameter[0].requestIso = false; //tmpRequestIso[i];
1406 
1407  objParameter[0].charge = charge;
1408  objParameter[0].qualityLUT = qualityLUT;
1409  objParameter[0].isolationLUT = isolationLUT;
1410 
1411  // object types - all muons
1412  std::vector<GlobalObject> objType(nrObj, gtMu);
1413 
1414  // now create a new CondMuonition
1415  MuonTemplate muonCond(name);
1416 
1417  muonCond.setCondType(cType);
1418  muonCond.setObjectType(objType);
1419  muonCond.setCondGEq(gEq);
1420  muonCond.setCondChipNr(chipNr);
1421  muonCond.setCondRelativeBx(relativeBx);
1422  muonCond.setConditionParameter(objParameter, corrParameter);
1423 
1424  if (edm::isDebugEnabled()) {
1425  std::ostringstream myCoutStream;
1426  muonCond.print(myCoutStream);
1427  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1428  }
1429 
1430  /*
1431  // insert condition into the map and into muon template vector
1432  if ( !insertConditionIntoMap(muonCond, chipNr)) {
1433  edm::LogError("TriggerMenuParser")
1434  << " Error: duplicate condition (" << name << ")"
1435  << std::endl;
1436  return false;
1437  }
1438  else {
1439  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1440  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1441  }
1442 */
1443  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1444 
1445  //
1446  return true;
1447 }
1448 
1460 bool l1t::TriggerMenuParser::parseCalo(tmeventsetup::esCondition condCalo, unsigned int chipNr, const bool corrFlag) {
1461  // XERCES_CPP_NAMESPACE_USE
1462  using namespace tmeventsetup;
1463 
1464  // get condition, particle name and type name
1465 
1466  std::string condition = "calo";
1467  std::string particle = "test-fix";
1468  std::string type = l1t2string(condCalo.getType());
1469  std::string name = l1t2string(condCalo.getName());
1470 
1471  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1472  << "\n (in parseCalo) "
1473  << "\n condition = " << condition << "\n particle = " << particle
1474  << "\n type = " << type << "\n name = " << name << std::endl;
1475 
1477 
1478  // determine object type type
1479  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1480  GlobalObject caloObjType;
1481  int nrObj = -1;
1482 
1483  if (condCalo.getType() == esConditionType::SingleEgamma) {
1484  caloObjType = gtEG;
1485  type = "1_s";
1486  cType = l1t::Type1s;
1487  nrObj = 1;
1488  } else if (condCalo.getType() == esConditionType::DoubleEgamma) {
1489  caloObjType = gtEG;
1490  type = "2_s";
1491  cType = l1t::Type2s;
1492  nrObj = 2;
1493  } else if (condCalo.getType() == esConditionType::TripleEgamma) {
1494  caloObjType = gtEG;
1495  cType = l1t::Type3s;
1496  type = "3";
1497  nrObj = 3;
1498  } else if (condCalo.getType() == esConditionType::QuadEgamma) {
1499  caloObjType = gtEG;
1500  cType = l1t::Type4s;
1501  type = "4";
1502  nrObj = 4;
1503  } else if (condCalo.getType() == esConditionType::SingleJet) {
1504  caloObjType = gtJet;
1505  cType = l1t::Type1s;
1506  type = "1_s";
1507  nrObj = 1;
1508  } else if (condCalo.getType() == esConditionType::DoubleJet) {
1509  caloObjType = gtJet;
1510  cType = l1t::Type2s;
1511  type = "2_s";
1512  nrObj = 2;
1513  } else if (condCalo.getType() == esConditionType::TripleJet) {
1514  caloObjType = gtJet;
1515  cType = l1t::Type3s;
1516  type = "3";
1517  nrObj = 3;
1518  } else if (condCalo.getType() == esConditionType::QuadJet) {
1519  caloObjType = gtJet;
1520  cType = l1t::Type4s;
1521  type = "4";
1522  nrObj = 4;
1523  } else if (condCalo.getType() == esConditionType::SingleTau) {
1524  caloObjType = gtTau;
1525  cType = l1t::Type1s;
1526  type = "1_s";
1527  nrObj = 1;
1528  } else if (condCalo.getType() == esConditionType::DoubleTau) {
1529  caloObjType = gtTau;
1530  cType = l1t::Type2s;
1531  type = "2_s";
1532  nrObj = 2;
1533  } else if (condCalo.getType() == esConditionType::TripleTau) {
1534  caloObjType = gtTau;
1535  cType = l1t::Type3s;
1536  type = "3";
1537  nrObj = 3;
1538  } else if (condCalo.getType() == esConditionType::QuadTau) {
1539  caloObjType = gtTau;
1540  cType = l1t::Type4s;
1541  type = "4";
1542  nrObj = 4;
1543  } else {
1544  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition (" << particle << ")" << std::endl;
1545  return false;
1546  }
1547 
1548  // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1549 
1550  if (nrObj < 0) {
1551  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type << ")"
1552  << "\nCan not determine number of trigger objects. " << std::endl;
1553  return false;
1554  }
1555 
1556  // get values
1557 
1558  // temporary storage of the parameters
1559  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1560 
1561  //BLW TO DO: Can this be dropped?
1562  CaloTemplate::CorrelationParameter corrParameter;
1563 
1564  // need at least one value for deltaPhiRange
1565  std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1566  tmpValues.reserve(nrObj);
1567 
1568  if (int(condCalo.getObjects().size()) != nrObj) {
1569  edm::LogError("TriggerMenuParser") << " condCalo objects: nrObj = " << nrObj
1570  << "condCalo.getObjects().size() = " << condCalo.getObjects().size()
1571  << std::endl;
1572  return false;
1573  }
1574 
1575  // std::string str_condCalo = "";
1576  // uint64_t tempUIntH, tempUIntL;
1577  // uint64_t dst;
1578  int cnt = 0;
1579 
1580  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1581  int relativeBx = 0;
1582  bool gEq = false;
1583 
1584  // Loop over objects and extract the cuts on the objects
1585  const std::vector<esObject>& objects = condCalo.getObjects();
1586  for (size_t jj = 0; jj < objects.size(); jj++) {
1587  const esObject object = objects.at(jj);
1588  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1589 
1590  // BLW TO DO: This needs to be added to the Object Parameters
1591  relativeBx = object.getBxOffset();
1592 
1593  // Loop over the cuts for this object
1594  int upperThresholdInd = -1;
1595  int lowerThresholdInd = 0;
1596  int upperIndexInd = -1;
1597  int lowerIndexInd = 0;
1598  int cntEta = 0;
1599  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1600  int cntPhi = 0;
1601  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1602  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1603  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1604 
1605  const std::vector<esCut>& cuts = object.getCuts();
1606  for (size_t kk = 0; kk < cuts.size(); kk++) {
1607  const esCut cut = cuts.at(kk);
1608 
1609  switch (cut.getCutType()) {
1610  case esCutType::Threshold:
1611  lowerThresholdInd = cut.getMinimum().index;
1612  upperThresholdInd = cut.getMaximum().index;
1613  break;
1614  case esCutType::Slice:
1615  lowerIndexInd = int(cut.getMinimum().value);
1616  upperIndexInd = int(cut.getMaximum().value);
1617  break;
1618  case esCutType::Eta: {
1619  if (cntEta == 0) {
1620  etaWindow1Lower = cut.getMinimum().index;
1621  etaWindow1Upper = cut.getMaximum().index;
1622  } else if (cntEta == 1) {
1623  etaWindow2Lower = cut.getMinimum().index;
1624  etaWindow2Upper = cut.getMaximum().index;
1625  } else {
1626  edm::LogError("TriggerMenuParser")
1627  << "Too Many Eta Cuts for calo-condition (" << particle << ")" << std::endl;
1628  return false;
1629  }
1630  cntEta++;
1631 
1632  } break;
1633 
1634  case esCutType::Phi: {
1635  if (cntPhi == 0) {
1636  phiWindow1Lower = cut.getMinimum().index;
1637  phiWindow1Upper = cut.getMaximum().index;
1638  } else if (cntPhi == 1) {
1639  phiWindow2Lower = cut.getMinimum().index;
1640  phiWindow2Upper = cut.getMaximum().index;
1641  } else {
1642  edm::LogError("TriggerMenuParser")
1643  << "Too Many Phi Cuts for calo-condition (" << particle << ")" << std::endl;
1644  return false;
1645  }
1646  cntPhi++;
1647 
1648  } break;
1649 
1650  case esCutType::Charge: {
1651  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition (" << particle << ")" << std::endl;
1652  return false;
1653 
1654  } break;
1655  case esCutType::Quality: {
1656  qualityLUT = l1tstr2int(cut.getData());
1657 
1658  } break;
1659  case esCutType::Isolation: {
1660  isolationLUT = l1tstr2int(cut.getData());
1661 
1662  } break;
1663  default:
1664  break;
1665  } //end switch
1666 
1667  } //end loop over cuts
1668 
1669  // Fill the object parameters
1670  objParameter[cnt].etHighThreshold = upperThresholdInd;
1671  objParameter[cnt].etLowThreshold = lowerThresholdInd;
1672  objParameter[cnt].indexHigh = upperIndexInd;
1673  objParameter[cnt].indexLow = lowerIndexInd;
1674  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1675  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1676  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1677  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1678  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1679  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1680  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1681  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1682  objParameter[cnt].isolationLUT = isolationLUT;
1683  objParameter[cnt].qualityLUT = qualityLUT; //TO DO: Must add
1684 
1685  // Output for debugging
1686  LogDebug("TriggerMenuParser") << "\n Calo ET high thresholds (hex) for calo object " << caloObjType << " "
1687  << cnt << " = " << std::hex << objParameter[cnt].etLowThreshold << " - "
1688  << objParameter[cnt].etHighThreshold
1689  << "\n etaWindow Lower / Upper for calo object " << cnt << " = 0x"
1690  << objParameter[cnt].etaWindow1Lower << " / 0x" << objParameter[cnt].etaWindow1Upper
1691  << "\n etaWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1692  << objParameter[cnt].etaWindow2Lower << " / 0x" << objParameter[cnt].etaWindow2Upper
1693  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
1694  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
1695  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1696  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
1697  << "\n Isolation LUT for calo object " << cnt << " = 0x"
1698  << objParameter[cnt].isolationLUT << "\n Quality LUT for calo object " << cnt
1699  << " = 0x" << objParameter[cnt].qualityLUT << std::dec << std::endl;
1700 
1701  cnt++;
1702  } //end loop over objects
1703 
1704  // object types - all same caloObjType
1705  std::vector<GlobalObject> objType(nrObj, caloObjType);
1706 
1707  // now create a new calo condition
1708  CaloTemplate caloCond(name);
1709 
1710  caloCond.setCondType(cType);
1711  caloCond.setObjectType(objType);
1712 
1713  //BLW TO DO: This needs to be added to the object rather than the whole condition
1714  caloCond.setCondGEq(gEq);
1715  caloCond.setCondChipNr(chipNr);
1716 
1717  //BLW TO DO: This needs to be added to the object rather than the whole condition
1718  caloCond.setCondRelativeBx(relativeBx);
1719 
1720  caloCond.setConditionParameter(objParameter, corrParameter);
1721 
1722  if (edm::isDebugEnabled()) {
1723  std::ostringstream myCoutStream;
1724  caloCond.print(myCoutStream);
1725  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1726  }
1727 
1728  // insert condition into the map
1729  if (!insertConditionIntoMap(caloCond, chipNr)) {
1730  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
1731 
1732  return false;
1733  } else {
1734  if (corrFlag) {
1735  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1736  } else {
1737  (m_vecCaloTemplate[chipNr]).push_back(caloCond);
1738  }
1739  }
1740 
1741  //
1742  return true;
1743 }
1744 
1756 bool l1t::TriggerMenuParser::parseCaloCorr(const tmeventsetup::esObject* corrCalo, unsigned int chipNr) {
1757  // XERCES_CPP_NAMESPACE_USE
1758  using namespace tmeventsetup;
1759 
1760  // get condition, particle name and type name
1761 
1762  std::string condition = "calo";
1763  std::string particle = "test-fix";
1764  std::string type = l1t2string(corrCalo->getType());
1765  std::string name = l1t2string(corrCalo->getName());
1766 
1767  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1768  << "\n (in parseCalo) "
1769  << "\n condition = " << condition << "\n particle = " << particle
1770  << "\n type = " << type << "\n name = " << name << std::endl;
1771 
1772  // determine object type type
1773  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1774  GlobalObject caloObjType;
1775  int nrObj = 1;
1776  type = "1_s";
1777  GtConditionType cType = l1t::Type1s;
1778 
1779  if (corrCalo->getType() == esObjectType::Egamma) {
1780  caloObjType = gtEG;
1781  } else if (corrCalo->getType() == esObjectType::Jet) {
1782  caloObjType = gtJet;
1783  } else if (corrCalo->getType() == esObjectType::Tau) {
1784  caloObjType = gtTau;
1785  } else {
1786  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition (" << particle << ")" << std::endl;
1787  return false;
1788  }
1789 
1790  // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1791 
1792  if (nrObj < 0) {
1793  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type << ")"
1794  << "\nCan not determine number of trigger objects. " << std::endl;
1795  return false;
1796  }
1797 
1798  // get values
1799 
1800  // temporary storage of the parameters
1801  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1802 
1803  //BLW TO DO: Can this be dropped?
1804  CaloTemplate::CorrelationParameter corrParameter;
1805 
1806  // need at least one value for deltaPhiRange
1807  std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1808  tmpValues.reserve(nrObj);
1809 
1810  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1811  int relativeBx = 0;
1812  bool gEq = false;
1813 
1814  gEq = (corrCalo->getComparisonOperator() == esComparisonOperator::GE);
1815 
1816  // BLW TO DO: This needs to be added to the Object Parameters
1817  relativeBx = corrCalo->getBxOffset();
1818 
1819  // Loop over the cuts for this object
1820  int upperThresholdInd = -1;
1821  int lowerThresholdInd = 0;
1822  int upperIndexInd = -1;
1823  int lowerIndexInd = 0;
1824  int cntEta = 0;
1825  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1826  int cntPhi = 0;
1827  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1828  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1829  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1830 
1831  const std::vector<esCut>& cuts = corrCalo->getCuts();
1832  for (size_t kk = 0; kk < cuts.size(); kk++) {
1833  const esCut cut = cuts.at(kk);
1834 
1835  switch (cut.getCutType()) {
1836  case esCutType::Threshold:
1837  lowerThresholdInd = cut.getMinimum().index;
1838  upperThresholdInd = cut.getMaximum().index;
1839  break;
1840  case esCutType::Slice:
1841  lowerIndexInd = int(cut.getMinimum().value);
1842  upperIndexInd = int(cut.getMaximum().value);
1843  break;
1844  case esCutType::Eta: {
1845  if (cntEta == 0) {
1846  etaWindow1Lower = cut.getMinimum().index;
1847  etaWindow1Upper = cut.getMaximum().index;
1848  } else if (cntEta == 1) {
1849  etaWindow2Lower = cut.getMinimum().index;
1850  etaWindow2Upper = cut.getMaximum().index;
1851  } else {
1852  edm::LogError("TriggerMenuParser")
1853  << "Too Many Eta Cuts for calo-condition (" << particle << ")" << std::endl;
1854  return false;
1855  }
1856  cntEta++;
1857 
1858  } break;
1859 
1860  case esCutType::Phi: {
1861  if (cntPhi == 0) {
1862  phiWindow1Lower = cut.getMinimum().index;
1863  phiWindow1Upper = cut.getMaximum().index;
1864  } else if (cntPhi == 1) {
1865  phiWindow2Lower = cut.getMinimum().index;
1866  phiWindow2Upper = cut.getMaximum().index;
1867  } else {
1868  edm::LogError("TriggerMenuParser")
1869  << "Too Many Phi Cuts for calo-condition (" << particle << ")" << std::endl;
1870  return false;
1871  }
1872  cntPhi++;
1873 
1874  } break;
1875 
1876  case esCutType::Charge: {
1877  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition (" << particle << ")" << std::endl;
1878  return false;
1879 
1880  } break;
1881  case esCutType::Quality: {
1882  qualityLUT = l1tstr2int(cut.getData());
1883 
1884  } break;
1885  case esCutType::Isolation: {
1886  isolationLUT = l1tstr2int(cut.getData());
1887 
1888  } break;
1889  default:
1890  break;
1891  } //end switch
1892 
1893  } //end loop over cuts
1894 
1895  // Fill the object parameters
1896  objParameter[0].etLowThreshold = lowerThresholdInd;
1897  objParameter[0].etHighThreshold = upperThresholdInd;
1898  objParameter[0].indexHigh = upperIndexInd;
1899  objParameter[0].indexLow = lowerIndexInd;
1900  objParameter[0].etaWindow1Lower = etaWindow1Lower;
1901  objParameter[0].etaWindow1Upper = etaWindow1Upper;
1902  objParameter[0].etaWindow2Lower = etaWindow2Lower;
1903  objParameter[0].etaWindow2Upper = etaWindow2Upper;
1904  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1905  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1906  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1907  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1908  objParameter[0].isolationLUT = isolationLUT;
1909  objParameter[0].qualityLUT = qualityLUT; //TO DO: Must add
1910 
1911  // Output for debugging
1912  LogDebug("TriggerMenuParser") << "\n Calo ET high threshold (hex) for calo object " << caloObjType << " "
1913  << " = " << std::hex << objParameter[0].etLowThreshold << " - "
1914  << objParameter[0].etHighThreshold << "\n etaWindow Lower / Upper for calo object "
1915  << " = 0x" << objParameter[0].etaWindow1Lower << " / 0x"
1916  << objParameter[0].etaWindow1Upper
1917  << "\n etaWindowVeto Lower / Upper for calo object "
1918  << " = 0x" << objParameter[0].etaWindow2Lower << " / 0x"
1919  << objParameter[0].etaWindow2Upper << "\n phiWindow Lower / Upper for calo object "
1920  << " = 0x" << objParameter[0].phiWindow1Lower << " / 0x"
1921  << objParameter[0].phiWindow1Upper
1922  << "\n phiWindowVeto Lower / Upper for calo object "
1923  << " = 0x" << objParameter[0].phiWindow2Lower << " / 0x"
1924  << objParameter[0].phiWindow2Upper << "\n Isolation LUT for calo object "
1925  << " = 0x" << objParameter[0].isolationLUT << "\n Quality LUT for calo object "
1926  << " = 0x" << objParameter[0].qualityLUT << std::dec << std::endl;
1927 
1928  // object types - all same caloObjType
1929  std::vector<GlobalObject> objType(nrObj, caloObjType);
1930 
1931  // now create a new calo condition
1932  CaloTemplate caloCond(name);
1933 
1934  caloCond.setCondType(cType);
1935  caloCond.setObjectType(objType);
1936 
1937  //BLW TO DO: This needs to be added to the object rather than the whole condition
1938  caloCond.setCondGEq(gEq);
1939  caloCond.setCondChipNr(chipNr);
1940 
1941  //BLW TO DO: This needs to be added to the object rather than the whole condition
1942  caloCond.setCondRelativeBx(relativeBx);
1943 
1944  caloCond.setConditionParameter(objParameter, corrParameter);
1945 
1946  if (edm::isDebugEnabled()) {
1947  std::ostringstream myCoutStream;
1948  caloCond.print(myCoutStream);
1949  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1950  }
1951 
1952  /*
1953  // insert condition into the map
1954  if ( !insertConditionIntoMap(caloCond, chipNr)) {
1955 
1956  edm::LogError("TriggerMenuParser")
1957  << " Error: duplicate condition (" << name << ")"
1958  << std::endl;
1959 
1960  return false;
1961  }
1962  else {
1963  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1964  }
1965 */
1966  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1967 
1968  //
1969  return true;
1970 }
1971 
1983 bool l1t::TriggerMenuParser::parseEnergySum(tmeventsetup::esCondition condEnergySum,
1984  unsigned int chipNr,
1985  const bool corrFlag) {
1986  // XERCES_CPP_NAMESPACE_USE
1987  using namespace tmeventsetup;
1988 
1989  // get condition, particle name and type name
1990 
1991  std::string condition = "calo";
1992  std::string type = l1t2string(condEnergySum.getType());
1993  std::string name = l1t2string(condEnergySum.getName());
1994 
1995  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1996  << "\n (in parseEnergySum) "
1997  << "\n condition = " << condition << "\n type = " << type
1998  << "\n name = " << name << std::endl;
1999 
2000  // determine object type type
2001  GlobalObject energySumObjType;
2002  GtConditionType cType;
2003 
2004  if (condEnergySum.getType() == esConditionType::MissingEt) {
2005  energySumObjType = GlobalObject::gtETM;
2006  cType = TypeETM;
2007  } else if (condEnergySum.getType() == esConditionType::TotalEt) {
2008  energySumObjType = GlobalObject::gtETT;
2009  cType = TypeETT;
2010  } else if (condEnergySum.getType() == esConditionType::TotalEtEM) {
2011  energySumObjType = GlobalObject::gtETTem;
2012  cType = TypeETTem;
2013  } else if (condEnergySum.getType() == esConditionType::TotalHt) {
2014  energySumObjType = GlobalObject::gtHTT;
2015  cType = TypeHTT;
2016  } else if (condEnergySum.getType() == esConditionType::MissingHt) {
2017  energySumObjType = GlobalObject::gtHTM;
2018  cType = TypeHTM;
2019  } else if (condEnergySum.getType() == esConditionType::MissingEtHF) {
2020  energySumObjType = GlobalObject::gtETMHF;
2021  cType = TypeETMHF;
2022  } else if (condEnergySum.getType() == esConditionType::TowerCount) {
2023  energySumObjType = GlobalObject::gtTowerCount;
2024  cType = TypeTowerCount;
2025  } else if (condEnergySum.getType() == esConditionType::MinBiasHFP0) {
2026  energySumObjType = GlobalObject::gtMinBiasHFP0;
2027  cType = TypeMinBiasHFP0;
2028  } else if (condEnergySum.getType() == esConditionType::MinBiasHFM0) {
2029  energySumObjType = GlobalObject::gtMinBiasHFM0;
2030  cType = TypeMinBiasHFM0;
2031  } else if (condEnergySum.getType() == esConditionType::MinBiasHFP1) {
2032  energySumObjType = GlobalObject::gtMinBiasHFP1;
2033  cType = TypeMinBiasHFP1;
2034  } else if (condEnergySum.getType() == esConditionType::MinBiasHFM1) {
2035  energySumObjType = GlobalObject::gtMinBiasHFM1;
2036  cType = TypeMinBiasHFM1;
2037  } else if (condEnergySum.getType() == esConditionType::AsymmetryEt) {
2038  energySumObjType = GlobalObject::gtAsymmetryEt;
2039  cType = TypeAsymEt;
2040  } else if (condEnergySum.getType() == esConditionType::AsymmetryHt) {
2041  energySumObjType = GlobalObject::gtAsymmetryHt;
2042  cType = TypeAsymHt;
2043  } else if (condEnergySum.getType() == esConditionType::AsymmetryEtHF) {
2044  energySumObjType = GlobalObject::gtAsymmetryEtHF;
2045  cType = TypeAsymEtHF;
2046  } else if (condEnergySum.getType() == esConditionType::AsymmetryHtHF) {
2047  energySumObjType = GlobalObject::gtAsymmetryHtHF;
2048  cType = TypeAsymHtHF;
2049  } else if (condEnergySum.getType() == esConditionType::Centrality0) {
2050  energySumObjType = GlobalObject::gtCentrality0;
2051  cType = TypeCent0;
2052  } else if (condEnergySum.getType() == esConditionType::Centrality1) {
2053  energySumObjType = GlobalObject::gtCentrality1;
2054  cType = TypeCent1;
2055  } else if (condEnergySum.getType() == esConditionType::Centrality2) {
2056  energySumObjType = GlobalObject::gtCentrality2;
2057  cType = TypeCent2;
2058  } else if (condEnergySum.getType() == esConditionType::Centrality3) {
2059  energySumObjType = GlobalObject::gtCentrality3;
2060  cType = TypeCent3;
2061  } else if (condEnergySum.getType() == esConditionType::Centrality4) {
2062  energySumObjType = GlobalObject::gtCentrality4;
2063  cType = TypeCent4;
2064  } else if (condEnergySum.getType() == esConditionType::Centrality5) {
2065  energySumObjType = GlobalObject::gtCentrality5;
2066  cType = TypeCent5;
2067  } else if (condEnergySum.getType() == esConditionType::Centrality6) {
2068  energySumObjType = GlobalObject::gtCentrality6;
2069  cType = TypeCent6;
2070  } else if (condEnergySum.getType() == esConditionType::Centrality7) {
2071  energySumObjType = GlobalObject::gtCentrality7;
2072  cType = TypeCent7;
2073  } else {
2074  edm::LogError("TriggerMenuParser") << "Wrong type for energy-sum condition (" << type << ")" << std::endl;
2075  return false;
2076  }
2077 
2078  // global object
2079  int nrObj = 1;
2080 
2081  // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2082 
2083  // get values
2084 
2085  // temporary storage of the parameters
2086  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2087 
2088  int cnt = 0;
2089 
2090  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2091  int relativeBx = 0;
2092  bool gEq = false;
2093 
2094  // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2095 
2096  // Loop over objects and extract the cuts on the objects
2097  const std::vector<esObject>& objects = condEnergySum.getObjects();
2098  for (size_t jj = 0; jj < objects.size(); jj++) {
2099  const esObject object = objects.at(jj);
2100  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
2101 
2102  // BLW TO DO: This needs to be added to the Object Parameters
2103  relativeBx = object.getBxOffset();
2104 
2105  // Loop over the cuts for this object
2106  int lowerThresholdInd = 0;
2107  int upperThresholdInd = -1;
2108  int cntPhi = 0;
2109  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2110 
2111  const std::vector<esCut>& cuts = object.getCuts();
2112  for (size_t kk = 0; kk < cuts.size(); kk++) {
2113  const esCut cut = cuts.at(kk);
2114 
2115  switch (cut.getCutType()) {
2116  case esCutType::Threshold:
2117  lowerThresholdInd = cut.getMinimum().index;
2118  upperThresholdInd = cut.getMaximum().index;
2119  break;
2120 
2121  case esCutType::Eta:
2122  break;
2123 
2124  case esCutType::Phi: {
2125  if (cntPhi == 0) {
2126  phiWindow1Lower = cut.getMinimum().index;
2127  phiWindow1Upper = cut.getMaximum().index;
2128  } else if (cntPhi == 1) {
2129  phiWindow2Lower = cut.getMinimum().index;
2130  phiWindow2Upper = cut.getMaximum().index;
2131  } else {
2132  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition (" << type << ")" << std::endl;
2133  return false;
2134  }
2135  cntPhi++;
2136 
2137  } break;
2138 
2139  case esCutType::Count:
2140  lowerThresholdInd = cut.getMinimum().index;
2141  upperThresholdInd = 0xffffff;
2142  break;
2143 
2144  default:
2145  break;
2146  } //end switch
2147 
2148  } //end loop over cuts
2149 
2150  // Fill the object parameters
2151  objParameter[cnt].etLowThreshold = lowerThresholdInd;
2152  objParameter[cnt].etHighThreshold = upperThresholdInd;
2153  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
2154  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
2155  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
2156  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
2157 
2158  // Output for debugging
2159  LogDebug("TriggerMenuParser") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2160  << std::hex << objParameter[cnt].etLowThreshold << " - "
2161  << objParameter[cnt].etHighThreshold
2162  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2163  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
2164  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2165  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
2166  << std::dec << std::endl;
2167 
2168  cnt++;
2169  } //end loop over objects
2170 
2171  // object types - all same energySumObjType
2172  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2173 
2174  // now create a new energySum condition
2175 
2176  EnergySumTemplate energySumCond(name);
2177 
2178  energySumCond.setCondType(cType);
2179  energySumCond.setObjectType(objType);
2180  energySumCond.setCondGEq(gEq);
2181  energySumCond.setCondChipNr(chipNr);
2182  energySumCond.setCondRelativeBx(relativeBx);
2183 
2184  energySumCond.setConditionParameter(objParameter);
2185 
2186  if (edm::isDebugEnabled()) {
2187  std::ostringstream myCoutStream;
2188  energySumCond.print(myCoutStream);
2189  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2190  }
2191 
2192  // insert condition into the map
2193  if (!insertConditionIntoMap(energySumCond, chipNr)) {
2194  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2195 
2196  return false;
2197  } else {
2198  if (corrFlag) {
2199  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2200 
2201  } else {
2202  (m_vecEnergySumTemplate[chipNr]).push_back(energySumCond);
2203  }
2204  }
2205 
2206  //
2207  return true;
2208 }
2209 
2221 bool l1t::TriggerMenuParser::parseEnergySumCorr(const tmeventsetup::esObject* corrESum, unsigned int chipNr) {
2222  // XERCES_CPP_NAMESPACE_USE
2223  using namespace tmeventsetup;
2224 
2225  // get condition, particle name and type name
2226 
2227  std::string condition = "calo";
2228  std::string type = l1t2string(corrESum->getType());
2229  std::string name = l1t2string(corrESum->getName());
2230 
2231  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2232  << "\n (in parseEnergySum) "
2233  << "\n condition = " << condition << "\n type = " << type
2234  << "\n name = " << name << std::endl;
2235 
2236  // determine object type type
2237  GlobalObject energySumObjType;
2238  GtConditionType cType;
2239 
2240  if (corrESum->getType() == esObjectType::ETM) {
2241  energySumObjType = GlobalObject::gtETM;
2242  cType = TypeETM;
2243  } else if (corrESum->getType() == esObjectType::HTM) {
2244  energySumObjType = GlobalObject::gtHTM;
2245  cType = TypeHTM;
2246  } else if (corrESum->getType() == esObjectType::ETMHF) {
2247  energySumObjType = GlobalObject::gtETMHF;
2248  cType = TypeETMHF;
2249  } else if (corrESum->getType() == esObjectType::TOWERCOUNT) {
2250  energySumObjType = GlobalObject::gtTowerCount;
2251  cType = TypeTowerCount;
2252  } else {
2253  edm::LogError("TriggerMenuParser") << "Wrong type for energy-sum correclation condition (" << type << ")"
2254  << std::endl;
2255  return false;
2256  }
2257 
2258  // global object
2259  int nrObj = 1;
2260 
2261  // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2262 
2263  // get values
2264 
2265  // temporary storage of the parameters
2266  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2267 
2268  int cnt = 0;
2269 
2270  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2271  int relativeBx = 0;
2272  bool gEq = false;
2273 
2274  // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2275 
2276  gEq = (corrESum->getComparisonOperator() == esComparisonOperator::GE);
2277 
2278  // BLW TO DO: This needs to be added to the Object Parameters
2279  relativeBx = corrESum->getBxOffset();
2280 
2281  // Loop over the cuts for this object
2282  int lowerThresholdInd = 0;
2283  int upperThresholdInd = -1;
2284  int cntPhi = 0;
2285  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2286 
2287  const std::vector<esCut>& cuts = corrESum->getCuts();
2288  for (size_t kk = 0; kk < cuts.size(); kk++) {
2289  const esCut cut = cuts.at(kk);
2290 
2291  switch (cut.getCutType()) {
2292  case esCutType::Threshold:
2293  lowerThresholdInd = cut.getMinimum().index;
2294  upperThresholdInd = cut.getMaximum().index;
2295  break;
2296 
2297  case esCutType::Eta:
2298  break;
2299 
2300  case esCutType::Phi: {
2301  if (cntPhi == 0) {
2302  phiWindow1Lower = cut.getMinimum().index;
2303  phiWindow1Upper = cut.getMaximum().index;
2304  } else if (cntPhi == 1) {
2305  phiWindow2Lower = cut.getMinimum().index;
2306  phiWindow2Upper = cut.getMaximum().index;
2307  } else {
2308  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition (" << type << ")" << std::endl;
2309  return false;
2310  }
2311  cntPhi++;
2312 
2313  } break;
2314 
2315  default:
2316  break;
2317  } //end switch
2318 
2319  } //end loop over cuts
2320 
2321  // Fill the object parameters
2322  objParameter[0].etLowThreshold = lowerThresholdInd;
2323  objParameter[0].etHighThreshold = upperThresholdInd;
2324  objParameter[0].phiWindow1Lower = phiWindow1Lower;
2325  objParameter[0].phiWindow1Upper = phiWindow1Upper;
2326  objParameter[0].phiWindow2Lower = phiWindow2Lower;
2327  objParameter[0].phiWindow2Upper = phiWindow2Upper;
2328 
2329  // Output for debugging
2330  LogDebug("TriggerMenuParser") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2331  << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etLowThreshold
2332  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2333  << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
2334  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2335  << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper
2336  << std::dec << std::endl;
2337 
2338  // object types - all same energySumObjType
2339  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2340 
2341  // now create a new energySum condition
2342 
2343  EnergySumTemplate energySumCond(name);
2344 
2345  energySumCond.setCondType(cType);
2346  energySumCond.setObjectType(objType);
2347  energySumCond.setCondGEq(gEq);
2348  energySumCond.setCondChipNr(chipNr);
2349  energySumCond.setCondRelativeBx(relativeBx);
2350 
2351  energySumCond.setConditionParameter(objParameter);
2352 
2353  if (edm::isDebugEnabled()) {
2354  std::ostringstream myCoutStream;
2355  energySumCond.print(myCoutStream);
2356  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2357  }
2358  /*
2359  // insert condition into the map
2360  if ( !insertConditionIntoMap(energySumCond, chipNr)) {
2361 
2362  edm::LogError("TriggerMenuParser")
2363  << " Error: duplicate condition (" << name << ")"
2364  << std::endl;
2365 
2366  return false;
2367  }
2368  else {
2369 
2370  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2371 
2372  }
2373 */
2374  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2375 
2376  //
2377  return true;
2378 }
2379 
2392 bool l1t::TriggerMenuParser::parseExternal(tmeventsetup::esCondition condExt, unsigned int chipNr) {
2393  using namespace tmeventsetup;
2394 
2395  // get condition, particle name and type name
2396  std::string condition = "ext";
2397  std::string particle = "test-fix";
2398  std::string type = l1t2string(condExt.getType());
2399  std::string name = l1t2string(condExt.getName());
2400 
2401  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2402  << "\n (in parseExternal) "
2403  << "\n condition = " << condition << "\n particle = " << particle
2404  << "\n type = " << type << "\n name = " << name << std::endl;
2405 
2406  // object type and condition type
2407  // object type - irrelevant for External conditions
2408  GtConditionType cType = TypeExternal;
2409  GlobalObject extSignalType = GlobalObject::gtExternal;
2410  int nrObj = 1; //only one object for these conditions
2411 
2412  int relativeBx = 0;
2413  unsigned int channelID = 0;
2414 
2415  // Get object for External conditions
2416  const std::vector<esObject>& objects = condExt.getObjects();
2417  for (size_t jj = 0; jj < objects.size(); jj++) {
2418  const esObject object = objects.at(jj);
2419  if (object.getType() == esObjectType::EXT) {
2420  relativeBx = object.getBxOffset();
2421  channelID = object.getExternalChannelId();
2422  }
2423  }
2424 
2425  // set the boolean value for the ge_eq mode - irrelevant for External conditions
2426  bool gEq = false;
2427 
2428  //object types - all same for external conditions
2429  std::vector<GlobalObject> objType(nrObj, extSignalType);
2430 
2431  // now create a new External condition
2432  ExternalTemplate externalCond(name);
2433 
2434  externalCond.setCondType(cType);
2435  externalCond.setObjectType(objType);
2436  externalCond.setCondGEq(gEq);
2437  externalCond.setCondChipNr(chipNr);
2438  externalCond.setCondRelativeBx(relativeBx);
2439  externalCond.setExternalChannel(channelID);
2440 
2441  LogTrace("TriggerMenuParser") << externalCond << "\n" << std::endl;
2442 
2443  // insert condition into the map
2444  if (!insertConditionIntoMap(externalCond, chipNr)) {
2445  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2446 
2447  return false;
2448  } else {
2449  (m_vecExternalTemplate[chipNr]).push_back(externalCond);
2450  }
2451 
2452  return true;
2453 }
2454 
2467 bool l1t::TriggerMenuParser::parseCorrelation(tmeventsetup::esCondition corrCond, unsigned int chipNr) {
2468  using namespace tmeventsetup;
2469 
2470  std::string condition = "corr";
2471  std::string particle = "test-fix";
2472  std::string type = l1t2string(corrCond.getType());
2473  std::string name = l1t2string(corrCond.getName());
2474 
2475  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2476  << " (in parseCorrelation) " << std::endl
2477  << " condition = " << condition << std::endl
2478  << " particle = " << particle << std::endl
2479  << " type = " << type << std::endl
2480  << " name = " << name << std::endl;
2481 
2482  // create a new correlation condition
2483  CorrelationTemplate correlationCond(name);
2484 
2485  // check that the condition does not exist already in the map
2486  if (!insertConditionIntoMap(correlationCond, chipNr)) {
2487  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
2488 
2489  return false;
2490  }
2491 
2492  // Define some of the quantities to store the parased information
2493 
2494  // condition type BLW (Do we change this to the type of correlation condition?)
2496 
2497  // two objects (for sure)
2498  const int nrObj = 2;
2499 
2500  // object types and greater equal flag - filled in the loop
2501  int intGEq[nrObj] = {-1, -1};
2502  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
2503  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2504 
2505  // correlation flag and index in the cor*vector
2506  const bool corrFlag = true;
2507  int corrIndexVal[nrObj] = {-1, -1};
2508 
2509  // Storage of the correlation selection
2511  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2512 
2513  // Get the correlation Cuts on the legs
2514  int cutType = 0;
2515  const std::vector<esCut>& cuts = corrCond.getCuts();
2516  for (size_t jj = 0; jj < cuts.size(); jj++) {
2517  const esCut cut = cuts.at(jj);
2518 
2519  if (cut.getCutType() == esCutType::ChargeCorrelation) {
2520  if (cut.getData() == "ls")
2521  corrParameter.chargeCorrelation = 2;
2522  else if (cut.getData() == "os")
2523  corrParameter.chargeCorrelation = 4;
2524  else
2525  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2526  } else {
2527  //
2528  // Unitl utm has method to calculate these, do the integer value calculation with precision.
2529  //
2530  double minV = cut.getMinimum().value;
2531  double maxV = cut.getMaximum().value;
2532 
2533  //Scale down very large numbers out of xml
2534  if (maxV > 1.0e8)
2535  maxV = 1.0e8;
2536 
2537  if (cut.getCutType() == esCutType::DeltaEta) {
2538  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaEta Cut minV = " << minV
2539  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2540  << " precMax = " << cut.getMaximum().index << std::endl;
2541  corrParameter.minEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2542  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2543  corrParameter.precEtaCut = cut.getMinimum().index;
2544  cutType = cutType | 0x1;
2545  } else if (cut.getCutType() == esCutType::DeltaPhi) {
2546  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaPhi Cut minV = " << minV
2547  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2548  << " precMax = " << cut.getMaximum().index << std::endl;
2549  corrParameter.minPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2550  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2551  corrParameter.precPhiCut = cut.getMinimum().index;
2552  cutType = cutType | 0x2;
2553  } else if (cut.getCutType() == esCutType::DeltaR) {
2554  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaR Cut minV = " << minV
2555  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2556  << " precMax = " << cut.getMaximum().index << std::endl;
2557  corrParameter.minDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2558  corrParameter.maxDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2559  corrParameter.precDRCut = cut.getMinimum().index;
2560  cutType = cutType | 0x4;
2561  } else if (cut.getCutType() == esCutType::TwoBodyPt) {
2562  corrParameter.minTBPTCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2563  corrParameter.maxTBPTCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2564  corrParameter.precTBPTCut = cut.getMinimum().index;
2565  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tTPBT Cut minV = " << minV
2566  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2567  << " precMax = " << cut.getMaximum().index << std::endl;
2568  cutType = cutType | 0x20;
2569  } else if (cut.getCutType() == esCutType::Mass) {
2570  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV
2571  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2572  << " precMax = " << cut.getMaximum().index << std::endl;
2573  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2574  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2575  corrParameter.precMassCut = cut.getMinimum().index;
2576  // cutType = cutType | 0x8;
2577  if (corrCond.getType() == esConditionType::TransverseMass) {
2578  cutType = cutType | 0x10;
2579  //std::cout << "CCLA running Transverse mass cutType= " << cutType << std::endl;
2580  } else {
2581  cutType = cutType | 0x8;
2582  //std::cout << "CCLA running Invarient mass cutType= " << cutType << std::endl;
2583  }
2584  }
2585  }
2586  }
2587  corrParameter.corrCutType = cutType;
2588 
2589  // Get the two objects that form the legs
2590  const std::vector<esObject>& objects = corrCond.getObjects();
2591  if (objects.size() != 2) {
2592  edm::LogError("TriggerMenuParser") << "incorrect number of objects for the correlation condition " << name
2593  << " corrFlag " << corrFlag << std::endl;
2594  return false;
2595  }
2596 
2597  // loop over legs
2598  for (size_t jj = 0; jj < objects.size(); jj++) {
2599  const esObject object = objects.at(jj);
2600  //std::cout << " obj name = " << object.getName() << "\n";
2601  //std::cout << " obj type = " << object.getType() << "\n";
2602  //std::cout << " obj op = " << object.getComparisonOperator() << "\n";
2603  //std::cout << " obj bx = " << object.getBxOffset() << "\n";
2604 
2605  // check the leg type
2606  if (object.getType() == esObjectType::Muon) {
2607  // we have a muon
2608 
2609  /*
2610  //BLW Hold on to this code we may need to go back to it at some point.
2611  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
2612  // This is potentially a place to slim down the code. Note: We currently evaluate the
2613  // conditions every time, so even if we put the condition in the vector once, we would
2614  // still evaluate it multiple times. This is a place for optimization.
2615  {
2616 
2617  parseMuonCorr(&object,chipNr);
2618  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2619 
2620  } else {
2621  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
2622  bool found = false;
2623  int index = 0;
2624  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
2625  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
2626  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
2627  found = true;
2628  } else {
2629  index++;
2630  }
2631  }
2632  if(found) {
2633  corrIndexVal[jj] = index;
2634  } else {
2635  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
2636  }
2637 
2638  }
2639 */
2640  parseMuonCorr(&object, chipNr);
2641  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2642 
2643  //Now set some flags for this subCondition
2644  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2645  objType[jj] = gtMu;
2646  condCateg[jj] = CondMuon;
2647 
2648  } else if (object.getType() == esObjectType::Egamma || object.getType() == esObjectType::Jet ||
2649  object.getType() == esObjectType::Tau) {
2650  // we have an Calo object
2651  parseCaloCorr(&object, chipNr);
2652  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
2653 
2654  //Now set some flags for this subCondition
2655  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2656  switch (object.getType()) {
2657  case esObjectType::Egamma: {
2658  objType[jj] = gtEG;
2659  } break;
2660  case esObjectType::Jet: {
2661  objType[jj] = gtJet;
2662  } break;
2663  case esObjectType::Tau: {
2664  objType[jj] = gtTau;
2665  } break;
2666  default: {
2667  } break;
2668  }
2669  condCateg[jj] = CondCalo;
2670 
2671  } else if (object.getType() == esObjectType::ETM || object.getType() == esObjectType::ETMHF ||
2672  object.getType() == esObjectType::TOWERCOUNT || object.getType() == esObjectType::HTM) {
2673  // we have Energy Sum
2674  parseEnergySumCorr(&object, chipNr);
2675  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
2676 
2677  //Now set some flags for this subCondition
2678  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2679  switch (object.getType()) {
2680  case esObjectType::ETM: {
2682  } break;
2683  case esObjectType::HTM: {
2685  } break;
2686  case esObjectType::ETMHF: {
2688  } break;
2689  case esObjectType::TOWERCOUNT: {
2691  } break;
2692  default: {
2693  } break;
2694  }
2695  condCateg[jj] = CondEnergySum;
2696 
2697  } else {
2698  edm::LogError("TriggerMenuParser") << "Illegal Object Type " << object.getType()
2699  << " for the correlation condition " << name << std::endl;
2700  return false;
2701 
2702  } //if block on leg types
2703 
2704  } //loop over legs
2705 
2706  // get greater equal flag for the correlation condition
2707  bool gEq = true;
2708  if (intGEq[0] != intGEq[1]) {
2709  edm::LogError("TriggerMenuParser") << "Inconsistent GEq flags for sub-conditions "
2710  << " for the correlation condition " << name << std::endl;
2711  return false;
2712 
2713  } else {
2714  gEq = (intGEq[0] != 0);
2715  }
2716 
2717  // fill the correlation condition
2718  correlationCond.setCondType(cType);
2719  correlationCond.setObjectType(objType);
2720  correlationCond.setCondGEq(gEq);
2721  correlationCond.setCondChipNr(chipNr);
2722 
2723  correlationCond.setCond0Category(condCateg[0]);
2724  correlationCond.setCond1Category(condCateg[1]);
2725 
2726  correlationCond.setCond0Index(corrIndexVal[0]);
2727  correlationCond.setCond1Index(corrIndexVal[1]);
2728 
2729  correlationCond.setCorrelationParameter(corrParameter);
2730 
2731  if (edm::isDebugEnabled()) {
2732  std::ostringstream myCoutStream;
2733  correlationCond.print(myCoutStream);
2734  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2735  }
2736 
2737  // insert condition into the map
2738  // condition is not duplicate, check was done at the beginning
2739 
2740  (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond);
2741 
2742  //
2743  return true;
2744 }
2745 
2758 bool l1t::TriggerMenuParser::parseCorrelationWithOverlapRemoval(const tmeventsetup::esCondition& corrCond,
2759  unsigned int chipNr) {
2760  using namespace tmeventsetup;
2761 
2762  std::string condition = "corrWithOverlapRemoval";
2763  std::string particle = "test-fix";
2764  std::string type = l1t2string(corrCond.getType());
2765  std::string name = l1t2string(corrCond.getName());
2766 
2767  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2768  << " (in parseCorrelationWithOverlapRemoval) " << std::endl
2769  << " condition = " << condition << std::endl
2770  << " particle = " << particle << std::endl
2771  << " type = " << type << std::endl
2772  << " name = " << name << std::endl;
2773 
2774  // create a new correlation condition
2775  CorrelationWithOverlapRemovalTemplate correlationWORCond(name);
2776 
2777  // check that the condition does not exist already in the map
2778  if (!insertConditionIntoMap(correlationWORCond, chipNr)) {
2779  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
2780 
2781  return false;
2782  }
2783 
2784  // Define some of the quantities to store the parased information
2785 
2786  // condition type BLW (Do we change this to the type of correlation condition?)
2788 
2789  // three objects (for sure)
2790  const int nrObj = 3;
2791 
2792  // object types and greater equal flag - filled in the loop
2793  int intGEq[nrObj] = {-1, -1, -1};
2794  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
2795  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2796 
2797  // correlation flag and index in the cor*vector
2798  const bool corrFlag = true;
2799  int corrIndexVal[nrObj] = {-1, -1, -1};
2800 
2801  // Storage of the correlation selection
2803  corrParameter.chargeCorrelation = 1; //ignore charge correlation for corr-legs
2804 
2805  // Get the correlation Cuts on the legs
2806  int cutType = 0;
2807  const std::vector<esCut>& cuts = corrCond.getCuts();
2808  for (size_t jj = 0; jj < cuts.size(); jj++) {
2809  const esCut cut = cuts.at(jj);
2810 
2811  if (cut.getCutType() == esCutType::ChargeCorrelation) {
2812  if (cut.getData() == "ls")
2813  corrParameter.chargeCorrelation = 2;
2814  else if (cut.getData() == "os")
2815  corrParameter.chargeCorrelation = 4;
2816  else
2817  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2818  } else {
2819  //
2820  // Unitl utm has method to calculate these, do the integer value calculation with precision.
2821  //
2822  double minV = cut.getMinimum().value;
2823  double maxV = cut.getMaximum().value;
2824 
2825  //Scale down very large numbers out of xml
2826  if (maxV > 1.0e8)
2827  maxV = 1.0e8;
2828 
2829  if (cut.getCutType() == esCutType::DeltaEta) {
2830  //std::cout << "DeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2831  corrParameter.minEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2832  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2833  corrParameter.precEtaCut = cut.getMinimum().index;
2834  cutType = cutType | 0x1;
2835  } else if (cut.getCutType() == esCutType::DeltaPhi) {
2836  //std::cout << "DeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2837  corrParameter.minPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2838  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2839  corrParameter.precPhiCut = cut.getMinimum().index;
2840  cutType = cutType | 0x2;
2841  } else if (cut.getCutType() == esCutType::DeltaR) {
2842  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2843  corrParameter.minDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2844  corrParameter.maxDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2845  corrParameter.precDRCut = cut.getMinimum().index;
2846  cutType = cutType | 0x4;
2847  } else if (cut.getCutType() == esCutType::Mass) {
2848  //std::cout << "Mass Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2849  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2850  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2851  corrParameter.precMassCut = cut.getMinimum().index;
2852  cutType = cutType | 0x8;
2853  }
2854  if (cut.getCutType() == esCutType::OvRmDeltaEta) {
2855  //std::cout << "OverlapRemovalDeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2856  corrParameter.minOverlapRemovalEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2857  corrParameter.maxOverlapRemovalEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2858  corrParameter.precOverlapRemovalEtaCut = cut.getMinimum().index;
2859  cutType = cutType | 0x10;
2860  } else if (cut.getCutType() == esCutType::OvRmDeltaPhi) {
2861  //std::cout << "OverlapRemovalDeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2862  corrParameter.minOverlapRemovalPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2863  corrParameter.maxOverlapRemovalPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2864  corrParameter.precOverlapRemovalPhiCut = cut.getMinimum().index;
2865  cutType = cutType | 0x20;
2866  } else if (cut.getCutType() == esCutType::OvRmDeltaR) {
2867  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2868  corrParameter.minOverlapRemovalDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2869  corrParameter.maxOverlapRemovalDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2870  corrParameter.precOverlapRemovalDRCut = cut.getMinimum().index;
2871  cutType = cutType | 0x40;
2872  }
2873  }
2874  }
2875  corrParameter.corrCutType = cutType;
2876 
2877  // Get the two objects that form the legs
2878  const std::vector<esObject>& objects = corrCond.getObjects();
2879  if (objects.size() != 3) {
2880  edm::LogError("TriggerMenuParser")
2881  << "incorrect number of objects for the correlation condition with overlap removal " << name << " corrFlag "
2882  << corrFlag << std::endl;
2883  return false;
2884  }
2885 
2886  // loop over legs
2887  for (size_t jj = 0; jj < objects.size(); jj++) {
2888  const esObject& object = objects.at(jj);
2889  //std::cout << " obj name = " << object.getName() << "\n";
2890  //std::cout << " obj type = " << object.getType() << "\n";
2891  //std::cout << " obj op = " << object.getComparisonOperator() << "\n";
2892  //std::cout << " obj bx = " << object.getBxOffset() << "\n";
2893  //std::cout << "type = done" << std::endl;
2894 
2895  // check the leg type
2896  if (object.getType() == esObjectType::Muon) {
2897  // we have a muon
2898 
2899  /*
2900  //BLW Hold on to this code we may need to go back to it at some point.
2901  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
2902  // This is potentially a place to slim down the code. Note: We currently evaluate the
2903  // conditions every time, so even if we put the condition in the vector once, we would
2904  // still evaluate it multiple times. This is a place for optimization.
2905  {
2906 
2907  parseMuonCorr(&object,chipNr);
2908  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2909 
2910  } else {
2911  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
2912  bool found = false;
2913  int index = 0;
2914  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
2915  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
2916  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
2917  found = true;
2918  } else {
2919  index++;
2920  }
2921  }
2922  if(found) {
2923  corrIndexVal[jj] = index;
2924  } else {
2925  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
2926  }
2927 
2928  }
2929 */
2930  parseMuonCorr(&object, chipNr);
2931  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2932 
2933  //Now set some flags for this subCondition
2934  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2935  objType[jj] = gtMu;
2936  condCateg[jj] = CondMuon;
2937 
2938  } else if (object.getType() == esObjectType::Egamma || object.getType() == esObjectType::Jet ||
2939  object.getType() == esObjectType::Tau) {
2940  // we have an Calo object
2941  parseCaloCorr(&object, chipNr);
2942  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
2943 
2944  //Now set some flags for this subCondition
2945  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2946  switch (object.getType()) {
2947  case esObjectType::Egamma: {
2948  objType[jj] = gtEG;
2949  } break;
2950  case esObjectType::Jet: {
2951  objType[jj] = gtJet;
2952  } break;
2953  case esObjectType::Tau: {
2954  objType[jj] = gtTau;
2955  } break;
2956  default: {
2957  } break;
2958  }
2959  condCateg[jj] = CondCalo;
2960 
2961  } else if (object.getType() == esObjectType::ETM || object.getType() == esObjectType::ETMHF ||
2962  object.getType() == esObjectType::TOWERCOUNT || object.getType() == esObjectType::HTM) {
2963  // we have Energy Sum
2964  parseEnergySumCorr(&object, chipNr);
2965  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
2966 
2967  //Now set some flags for this subCondition
2968  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2969  switch (object.getType()) {
2970  case esObjectType::ETM: {
2972  } break;
2973  case esObjectType::HTM: {
2975  } break;
2976  case esObjectType::ETMHF: {
2978  } break;
2979  case esObjectType::TOWERCOUNT: {
2981  } break;
2982  default: {
2983  } break;
2984  }
2985  condCateg[jj] = CondEnergySum;
2986 
2987  } else {
2988  edm::LogError("TriggerMenuParser") << "Illegal Object Type " << object.getType()
2989  << " for the correlation condition " << name << std::endl;
2990  return false;
2991 
2992  } //if block on leg types
2993 
2994  } //loop over legs
2995 
2996  // get greater equal flag for the correlation condition
2997  bool gEq = true;
2998  if (intGEq[0] != intGEq[1]) {
2999  edm::LogError("TriggerMenuParser") << "Inconsistent GEq flags for sub-conditions "
3000  << " for the correlation condition " << name << std::endl;
3001  return false;
3002 
3003  } else {
3004  gEq = (intGEq[0] != 0);
3005  }
3006 
3007  // fill the correlation condition
3008  correlationWORCond.setCondType(cType);
3009  correlationWORCond.setObjectType(objType);
3010  correlationWORCond.setCondGEq(gEq);
3011  correlationWORCond.setCondChipNr(chipNr);
3012 
3013  correlationWORCond.setCond0Category(condCateg[0]);
3014  correlationWORCond.setCond1Category(condCateg[1]);
3015  correlationWORCond.setCond2Category(condCateg[2]);
3016 
3017  correlationWORCond.setCond0Index(corrIndexVal[0]);
3018  correlationWORCond.setCond1Index(corrIndexVal[1]);
3019  correlationWORCond.setCond2Index(corrIndexVal[2]);
3020 
3021  correlationWORCond.setCorrelationWithOverlapRemovalParameter(corrParameter);
3022 
3023  if (edm::isDebugEnabled()) {
3024  std::ostringstream myCoutStream;
3025  correlationWORCond.print(myCoutStream);
3026  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3027  }
3028 
3029  // insert condition into the map
3030  // condition is not duplicate, check was done at the beginning
3031 
3032  (m_vecCorrelationWithOverlapRemovalTemplate[chipNr]).push_back(correlationWORCond);
3033 
3034  //
3035  return true;
3036 }
3037 
3049 bool l1t::TriggerMenuParser::parseAlgorithm(tmeventsetup::esAlgorithm algorithm, unsigned int chipNr) {
3050  using namespace tmeventsetup;
3051  //using namespace Algorithm;
3052 
3053  // get alias
3054  std::string algAlias = algorithm.getName();
3055  const std::string& algName = algorithm.getName();
3056 
3057  if (algAlias.empty()) {
3058  algAlias = algName;
3059  LogDebug("TriggerMenuParser") << "\n No alias defined for algorithm. Alias set to algorithm name."
3060  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3061  << std::endl;
3062  } else {
3063  //LogDebug("TriggerMenuParser")
3064  LogDebug("TriggerMenuParser") << "\n Alias defined for algorithm."
3065  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3066  << std::endl;
3067  }
3068 
3069  // get the logical expression
3070  const std::string& logExpression = algorithm.getExpressionInCondition();
3071 
3072  LogDebug("TriggerMenuParser") << " Logical expression: " << logExpression
3073  << " Chip number: " << chipNr << std::endl;
3074 
3075  // determine output pin
3076  int outputPin = algorithm.getIndex();
3077 
3078  //LogTrace("TriggerMenuParser")
3079  LogDebug("TriggerMenuParser") << " Output pin: " << outputPin << std::endl;
3080 
3081  // compute the bit number from chip number, output pin and order of the chips
3082  // pin numbering start with 1, bit numbers with 0
3083  int bitNumber = outputPin; // + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1;
3084 
3085  //LogTrace("TriggerMenuParser")
3086  LogDebug("TriggerMenuParser") << " Bit number: " << bitNumber << std::endl;
3087 
3088  // create a new algorithm and insert it into algorithm map
3089  GlobalAlgorithm alg(algName, logExpression, bitNumber);
3090  alg.setAlgoChipNumber(static_cast<int>(chipNr));
3091  alg.setAlgoAlias(algAlias);
3092 
3093  if (edm::isDebugEnabled()) {
3094  std::ostringstream myCoutStream;
3095  alg.print(myCoutStream);
3096  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3097  }
3098 
3099  // insert algorithm into the map
3100  if (!insertAlgorithmIntoMap(alg)) {
3101  return false;
3102  }
3103 
3104  return true;
3105 }
3106 
3107 // static class members
l1t::TriggerMenuParser::l1t2string
std::string l1t2string(T)
Definition: TriggerMenuParser.cc:496
l1t::GlobalScales::ScaleParameters::etaStep
double etaStep
Definition: GlobalScales.h:48
CaloTemplate
Definition: CaloTemplate.h:33
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precMassCut
unsigned int precMassCut
Definition: CorrelationWithOverlapRemovalTemplate.h:82
CorrelationTemplate::setCond1Category
void setCond1Category(const l1t::GtConditionCategory &)
Definition: CorrelationTemplate.cc:115
l1t::gtHTM
Definition: GlobalObject.h:24
CorrelationTemplate::setCond0Index
void setCond0Index(const int &)
Definition: CorrelationTemplate.cc:118
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
l1t::Type2cor
Definition: GlobalDefinitions.h:53
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minOverlapRemovalEtaCutValue
long long minOverlapRemovalEtaCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:88
l1t::TypeCent5
Definition: GlobalDefinitions.h:74
GlobalCondition::setCondType
void setCondType(const l1t::GtConditionType &cType)
Definition: GlobalCondition.h:62
l1t::gtCentrality0
Definition: GlobalObject.h:36
CorrelationTemplate::CorrelationParameter::maxEtaCutValue
long long maxEtaCutValue
Definition: CorrelationTemplate.h:63
l1t::gtExternal
Definition: GlobalObject.h:44
HLT_FULL_cff.Threshold
Threshold
Definition: HLT_FULL_cff.py:11663
HTM
Definition: L1GtObject.h:38
mps_fire.i
i
Definition: mps_fire.py:428
l1t::TriggerMenuParser::setGtPinsOnConditionChip
void setGtPinsOnConditionChip(const unsigned int &)
Definition: TriggerMenuParser.cc:70
l1t::TriggerMenuParser::getExternalSignals
std::map< std::string, unsigned int > getExternalSignals(const L1TUtmTriggerMenu *utmMenu)
Definition: TriggerMenuParser.cc:155
l1t::TriggerMenuParser::parseMuon
bool parseMuon(tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon condition
Definition: TriggerMenuParser.cc:975
l1t::TriggerMenuParser::setGtScaleDbKey
void setGtScaleDbKey(const std::string &)
Definition: TriggerMenuParser.cc:103
MessageLogger.h
l1t::TriggerMenuParser::setVecMuonTemplate
void setVecMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
Definition: TriggerMenuParser.cc:106
GlobalAlgorithm::setAlgoChipNumber
void setAlgoChipNumber(const int algoChipNumberValue)
Definition: GlobalAlgorithm.h:79
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
GlobalAlgorithm::algoName
const std::string algoName() const
get / set algorithm name
Definition: GlobalAlgorithm.h:52
MuonTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: MuonTemplate.cc:64
GlobalCondition::setCondRelativeBx
void setCondRelativeBx(const int &cRelativeBx)
Definition: GlobalCondition.h:82
CaloTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: CaloTemplate.cc:63
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
l1t::GlobalScales::ScaleParameters::etStep
double etStep
Definition: GlobalScales.h:38
TkAlMuonSelectors_cfi.cut
cut
Definition: TkAlMuonSelectors_cfi.py:5
l1t::TriggerMenuParser::setGtNumberPhysTriggers
void setGtNumberPhysTriggers(const unsigned int &)
Definition: TriggerMenuParser.cc:81
l1t::TriggerMenuParser::setGtTriggerMenuUUID
void setGtTriggerMenuUUID(const int)
Definition: TriggerMenuParser.cc:94
step
step
Definition: StallMonitor.cc:94
CorrelationTemplate::CorrelationParameter::precPhiCut
unsigned int precPhiCut
Definition: CorrelationTemplate.h:68
l1t::TriggerMenuParser::setGtTriggerMenuInterfaceDate
void setGtTriggerMenuInterfaceDate(const std::string &)
Definition: TriggerMenuParser.cc:354
ETM
Definition: L1GtObject.h:35
EnergySumTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
Definition: EnergySumTemplate.cc:66
l1t::TriggerMenuParser::parseCorrelationWithOverlapRemoval
bool parseCorrelationWithOverlapRemoval(const tmeventsetup::esCondition &corrCond, unsigned int chipNr=0)
parse a correlation condition with overlap removal
Definition: TriggerMenuParser.cc:2758
l1t::GlobalScales::ScaleParameters::phiMax
double phiMax
Definition: GlobalScales.h:42
GlobalAlgorithm::algoAlias
std::string const & algoAlias() const
get / set algorithm alias
Definition: GlobalAlgorithm.h:57
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxDRCutValue
long long maxDRCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:76
l1t::TriggerMenuParser::setVecEnergySumTemplate
void setVecEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
Definition: TriggerMenuParser.cc:114
l1t::TriggerMenuParser::parseDeltaEta_Cosh_LUTS
void parseDeltaEta_Cosh_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2, unsigned int prec1, unsigned int prec2)
Definition: TriggerMenuParser.cc:853
l1t::TriggerMenuParser::setCorCaloTemplate
void setCorCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
Definition: TriggerMenuParser.cc:140
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precEtaCut
unsigned int precEtaCut
Definition: CorrelationWithOverlapRemovalTemplate.h:69
L1TRate_Offline_cfi.Tau
Tau
Definition: L1TRate_Offline_cfi.py:43
l1t::TypeNull
Definition: GlobalDefinitions.h:49
l1t::TrigFunc_t
TrigFunc_t
Definition: TriggerMenuParser.h:54
l1t::GlobalScales::ScaleParameters::etMin
double etMin
Definition: GlobalScales.h:36
CorrelationTemplate::setCond1Index
void setCond1Index(const int &)
Definition: CorrelationTemplate.cc:120
HLT_FULL_cff.Algorithm
Algorithm
Definition: HLT_FULL_cff.py:9477
objects
Definition: __init__.py:1
CorrelationTemplate::CorrelationParameter::minMassCutValue
long long minMassCutValue
Definition: CorrelationTemplate.h:74
l1t::GlobalScales::ScaleParameters::etaMin
double etaMin
Definition: GlobalScales.h:46
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxMassCutValue
long long maxMassCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:81
l1t::TypeETM
Definition: GlobalDefinitions.h:56
l1t::gtEG
Definition: GlobalObject.h:18
l1t::Type3s
Definition: GlobalDefinitions.h:54
CorrelationTemplate::CorrelationParameter::precDRCut
unsigned int precDRCut
Definition: CorrelationTemplate.h:72
l1t::TriggerMenuParser::setVecCorrelationTemplate
void setVecCorrelationTemplate(const std::vector< std::vector< CorrelationTemplate > > &)
Definition: TriggerMenuParser.cc:124
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precDRCut
unsigned int precDRCut
Definition: CorrelationWithOverlapRemovalTemplate.h:78
CorrelationTemplate::CorrelationParameter::precMassCut
unsigned int precMassCut
Definition: CorrelationTemplate.h:76
l1t::gtETTem
Definition: GlobalObject.h:31
l1t::TriggerMenuParser::parseDeltaPhi_Cos_LUTS
void parseDeltaPhi_Cos_LUTS(const std::map< std::string, tmeventsetup::esScale > &scaleMap, const std::string &obj1, const std::string &obj2, unsigned int prec1, unsigned int prec2)
Definition: TriggerMenuParser.cc:888
CorrelationWithOverlapRemovalTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: CorrelationWithOverlapRemovalTemplate.cc:152
CaloTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: CaloTemplate.cc:69
l1t::gtMinBiasHFP1
Definition: GlobalObject.h:29
l1t::gtMinBiasHFM1
Definition: GlobalObject.h:30
CorrelationTemplate::CorrelationParameter::corrCutType
int corrCutType
Definition: CorrelationTemplate.h:85
l1t::GlobalScales::ScaleParameters::phiMin
double phiMin
Definition: GlobalScales.h:41
mps_check.array
array
Definition: mps_check.py:216
l1t::TypeAsymEtHF
Definition: GlobalDefinitions.h:79
l1t::TriggerMenuParser::parseCondFormats
void parseCondFormats(const L1TUtmTriggerMenu *utmMenu)
Definition: TriggerMenuParser.cc:190
MuonTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: MuonTemplate.cc:70
l1t::gtAsymmetryEt
Definition: GlobalObject.h:32
HLT_FULL_cff.DeltaEta
DeltaEta
Definition: HLT_FULL_cff.py:454
GlobalCondition.h
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minDRCutValue
long long minDRCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:75
l1t::TypeMinBiasHFP0
Definition: GlobalDefinitions.h:62
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxEtaCutValue
long long maxEtaCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:68
HLT_FULL_cff.SingleMuon
SingleMuon
Definition: HLT_FULL_cff.py:6072
l1t::TriggerMenuParser::~TriggerMenuParser
virtual ~TriggerMenuParser()
destructor
Definition: TriggerMenuParser.cc:62
l1t::TriggerMenuParser::setGtTriggerMenuInterfaceDescription
void setGtTriggerMenuInterfaceDescription(const std::string &)
Definition: TriggerMenuParser.cc:360
l1t::TypeCent2
Definition: GlobalDefinitions.h:71
l1t::TriggerMenuParser::setGtTriggerMenuInterface
void setGtTriggerMenuInterface(const std::string &)
Definition: TriggerMenuParser.cc:89
l1t::TypeCent3
Definition: GlobalDefinitions.h:72
CorrelationTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: CorrelationTemplate.cc:127
l1t::gtCentrality5
Definition: GlobalObject.h:41
l1t::TypeCent7
Definition: GlobalDefinitions.h:76
l1t::TriggerMenuParser::setVecExternalTemplate
void setVecExternalTemplate(const std::vector< std::vector< ExternalTemplate > > &)
Definition: TriggerMenuParser.cc:119
ntuple_cfi.Egamma
Egamma
Definition: ntuple_cfi.py:5
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::corrCutType
int corrCutType
Definition: CorrelationWithOverlapRemovalTemplate.h:103
l1t::TypeMinBiasHFM1
Definition: GlobalDefinitions.h:65
l1t::gtCentrality7
Definition: GlobalObject.h:43
HLT_FULL_cff.DeltaPhi
DeltaPhi
Definition: HLT_FULL_cff.py:465
l1t::TriggerMenuParser::setGtTriggerMenuDescription
void setGtTriggerMenuDescription(const std::string &)
Definition: TriggerMenuParser.cc:368
l1t::gtAsymmetryHt
Definition: GlobalObject.h:33
CorrelationWithOverlapRemovalTemplate::setCond2Category
void setCond2Category(const l1t::GtConditionCategory &)
Definition: CorrelationWithOverlapRemovalTemplate.cc:135
l1t::gtCentrality4
Definition: GlobalObject.h:40
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minPhiCutValue
long long minPhiCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:71
l1t::gtJet
Definition: GlobalObject.h:19
CorrelationTemplate::CorrelationParameter::minTBPTCutValue
long long minTBPTCutValue
Definition: CorrelationTemplate.h:78
l1t::gtTowerCount
Definition: GlobalObject.h:26
CorrelationTemplate::CorrelationParameter::precTBPTCut
unsigned int precTBPTCut
Definition: CorrelationTemplate.h:80
L1TUtmTriggerMenu
Definition: L1TUtmTriggerMenu.h:25
l1t::Type2corWithOverlapRemoval
Definition: GlobalDefinitions.h:68
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
GlobalObject
cmsdt::algo
algo
Definition: constants.h:164
ExternalTemplate
Definition: ExternalTemplate.h:32
CorrelationWithOverlapRemovalTemplate::setCond0Index
void setCond0Index(const int &)
Definition: CorrelationWithOverlapRemovalTemplate.cc:140
l1t::TriggerMenuParser::parseCaloCorr
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
Definition: TriggerMenuParser.cc:1756
CorrelationWithOverlapRemovalTemplate::setCorrelationWithOverlapRemovalParameter
void setCorrelationWithOverlapRemovalParameter(const CorrelationWithOverlapRemovalParameter &corrParameter)
Definition: CorrelationWithOverlapRemovalTemplate.cc:147
l1t::TypeCent1
Definition: GlobalDefinitions.h:70
l1t::CondCalo
Definition: GlobalDefinitions.h:95
l1t::SIN
Definition: TriggerMenuParser.h:54
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minOverlapRemovalDRCutValue
long long minOverlapRemovalDRCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:96
GlobalAlgorithm
Definition: GlobalAlgorithm.h:32
createPayload.uuid
uuid
Definition: createPayload.py:391
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
CorrelationWithOverlapRemovalTemplate::setCond2Index
void setCond2Index(const int &)
Definition: CorrelationWithOverlapRemovalTemplate.cc:144
CorrelationTemplate::CorrelationParameter::maxPhiCutValue
long long maxPhiCutValue
Definition: CorrelationTemplate.h:67
l1t::GtConditionType
GtConditionType
Definition: GlobalDefinitions.h:48
GlobalCondition::setCondChipNr
void setCondChipNr(const int &cChipNr)
Definition: GlobalCondition.h:77
HLT_FULL_cff.DoubleMuon
DoubleMuon
Definition: HLT_FULL_cff.py:3857
l1t::GlobalScales::ScaleParameters::etaMax
double etaMax
Definition: GlobalScales.h:47
GlobalAlgorithm::algoBitNumber
int algoBitNumber() const
get / set algorithm bit number
Definition: GlobalAlgorithm.h:72
HTT
Definition: L1GtObject.h:37
l1t::TypeAsymEt
Definition: GlobalDefinitions.h:77
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxOverlapRemovalDRCutValue
long long maxOverlapRemovalDRCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:97
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
l1t::gtETMHF
Definition: GlobalObject.h:25
l1t::COS
Definition: TriggerMenuParser.h:54
l1t::TypeHTT
Definition: GlobalDefinitions.h:58
l1t::TriggerMenuParser::parseCalMuPhi_LUTS
void parseCalMuPhi_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2)
Definition: TriggerMenuParser.cc:804
L1TRate_cfi.Jet
Jet
Definition: L1TRate_cfi.py:43
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
HLTSiStripMonitoring_cff.Mass
Mass
Definition: HLTSiStripMonitoring_cff.py:135
l1t::TriggerMenuParser::setCorMuonTemplate
void setCorMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
Definition: TriggerMenuParser.cc:136
l1t::TriggerMenuParser::setVecCaloTemplate
void setVecCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
Definition: TriggerMenuParser.cc:110
l1t::gtHTT
Definition: GlobalObject.h:23
VtxSmearedParameters_cfi.Phi
Phi
Definition: VtxSmearedParameters_cfi.py:112
l1t::TriggerMenuParser::parseScales
bool parseScales(std::map< std::string, tmeventsetup::esScale > scaleMap)
parse scales
Definition: TriggerMenuParser.cc:516
MuonTemplate
Definition: MuonTemplate.h:33
l1t::TypeCent4
Definition: GlobalDefinitions.h:73
l1t::TriggerMenuParser::insertConditionIntoMap
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
Definition: TriggerMenuParser.cc:392
GlobalAlgorithm::algoOutputPin
const int algoOutputPin(const int numberConditionChips, const int pinsOnConditionChip, const std::vector< int > &orderConditionChip) const
get the output pin on the condition chip for the algorithm
Definition: GlobalAlgorithm.cc:95
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minOverlapRemovalPhiCutValue
long long minOverlapRemovalPhiCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:92
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
l1t::TriggerMenuParser::l1tstr2int
int l1tstr2int(const std::string data)
Definition: TriggerMenuParser.cc:501
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CorrelationTemplate::CorrelationParameter::chargeCorrelation
unsigned int chargeCorrelation
Definition: CorrelationTemplate.h:83
l1t::TriggerMenuParser::setGtAlgorithmAliasMap
void setGtAlgorithmAliasMap(const AlgorithmMap &)
Definition: TriggerMenuParser.cc:153
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
cond
Definition: plugin.cc:23
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxOverlapRemovalEtaCutValue
long long maxOverlapRemovalEtaCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:89
l1t::TriggerMenuParser::setVecCorrelationWithOverlapRemovalTemplate
void setVecCorrelationWithOverlapRemovalTemplate(const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &)
Definition: TriggerMenuParser.cc:129
l1t::gtCentrality1
Definition: GlobalObject.h:37
CorrelationWithOverlapRemovalTemplate::setCond0Category
void setCond0Category(const l1t::GtConditionCategory &)
Definition: CorrelationWithOverlapRemovalTemplate.cc:127
l1t::gtETM
Definition: GlobalObject.h:21
electrons_cff.objType
objType
Definition: electrons_cff.py:514
optionsL1T.menu
menu
Definition: optionsL1T.py:29
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
MessageDrop.h
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxOverlapRemovalPhiCutValue
long long maxOverlapRemovalPhiCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:93
l1t::TriggerMenuParser::parseEnergySum
bool parseEnergySum(tmeventsetup::esCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
parse an "energy sum" condition
Definition: TriggerMenuParser.cc:1983
EnergySumTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: EnergySumTemplate.cc:70
l1t::TriggerMenuParser::TriggerMenuParser
TriggerMenuParser()
Definition: TriggerMenuParser.cc:49
l1t::TriggerMenuParser::setGtTriggerMenuDate
void setGtTriggerMenuDate(const std::string &)
Definition: TriggerMenuParser.cc:364
l1t::gtMu
Definition: GlobalObject.h:17
l1t::GlobalScales::ScaleParameters::etaBins
std::vector< std::pair< double, double > > etaBins
Definition: GlobalScales.h:49
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalEtaCut
unsigned int precOverlapRemovalEtaCut
Definition: CorrelationWithOverlapRemovalTemplate.h:90
l1t::TriggerMenuParser::setCorEnergySumTemplate
void setCorEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
Definition: TriggerMenuParser.cc:144
l1t::Type1s
Definition: GlobalDefinitions.h:50
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
CorrelationTemplate::CorrelationParameter::maxTBPTCutValue
long long maxTBPTCutValue
Definition: CorrelationTemplate.h:79
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter
typedef for correlation parameters
Definition: CorrelationWithOverlapRemovalTemplate.h:65
EnergySumTemplate
Definition: EnergySumTemplate.h:32
l1t::gtAsymmetryEtHF
Definition: GlobalObject.h:34
CorrelationTemplate::CorrelationParameter::minPhiCutValue
long long minPhiCutValue
Definition: CorrelationTemplate.h:66
l1t::gtCentrality6
Definition: GlobalObject.h:42
l1t::TriggerMenuParser::setGtAlgorithmMap
void setGtAlgorithmMap(const AlgorithmMap &)
Definition: TriggerMenuParser.cc:150
CorrelationTemplate::CorrelationParameter::minDRCutValue
long long minDRCutValue
Definition: CorrelationTemplate.h:70
qcdUeDQM_cfi.algorithm
algorithm
Definition: qcdUeDQM_cfi.py:32
l1t::gtMinBiasHFP0
Definition: GlobalObject.h:27
l1t::TypeMinBiasHFP1
Definition: GlobalDefinitions.h:64
createfilelist.int
int
Definition: createfilelist.py:10
dumpRecoGeometry_cfg.Muon
Muon
Definition: dumpRecoGeometry_cfg.py:190
l1t::AlgorithmMap
std::map< std::string, GlobalAlgorithm > AlgorithmMap
map containing the algorithms
Definition: TriggerMenuFwd.h:32
l1t::GlobalScales::ScaleParameters
typedef for a single object template
Definition: GlobalScales.h:35
l1t::TriggerMenuParser::setGtConditionMap
void setGtConditionMap(const std::vector< ConditionMap > &)
Definition: TriggerMenuParser.cc:86
l1t::TypeTowerCount
Definition: GlobalDefinitions.h:61
l1t::TriggerMenuParser::setGtTriggerMenuAuthor
void setGtTriggerMenuAuthor(const std::string &)
Definition: TriggerMenuParser.cc:366
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
ETT
Definition: L1GtObject.h:36
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxPhiCutValue
long long maxPhiCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:72
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
CorrelationTemplate
Definition: CorrelationTemplate.h:34
electronAnalyzer_cfi.DeltaR
DeltaR
Definition: electronAnalyzer_cfi.py:33
l1t::CondEnergySum
Definition: GlobalDefinitions.h:96
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CorrelationWithOverlapRemovalTemplate::setCond1Category
void setCond1Category(const l1t::GtConditionCategory &)
Definition: CorrelationWithOverlapRemovalTemplate.cc:131
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
l1t::TriggerMenuParser::setGtAlgorithmImplementation
void setGtAlgorithmImplementation(const std::string &)
Definition: TriggerMenuParser.cc:370
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precPhiCut
unsigned int precPhiCut
Definition: CorrelationWithOverlapRemovalTemplate.h:73
l1t::GlobalScales::ScaleParameters::phiStep
double phiStep
Definition: GlobalScales.h:43
MuonTemplate::CorrelationParameter::chargeCorrelation
unsigned int chargeCorrelation
Definition: MuonTemplate.h:91
CorrelationWithOverlapRemovalTemplate::setCond1Index
void setCond1Index(const int &)
Definition: CorrelationWithOverlapRemovalTemplate.cc:142
l1t::gtETT
Definition: GlobalObject.h:22
goodZToMuMu_cfi.condition
condition
Definition: goodZToMuMu_cfi.py:37
l1t::TypeETMHF
Definition: GlobalDefinitions.h:60
l1t::TypeAsymHt
Definition: GlobalDefinitions.h:78
l1t::TriggerMenuParser::setGtTriggerMenuName
void setGtTriggerMenuName(const std::string &)
Definition: TriggerMenuParser.cc:96
l1t::gtCentrality3
Definition: GlobalObject.h:39
l1t::TriggerMenuParser::setGtTriggerMenuInterfaceAuthor
void setGtTriggerMenuInterfaceAuthor(const std::string &)
Definition: TriggerMenuParser.cc:356
l1t::TypeETTem
Definition: GlobalDefinitions.h:66
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minMassCutValue
long long minMassCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:80
l1t::CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: TriggerMenuFwd.h:39
l1t::Type2s
Definition: GlobalDefinitions.h:51
heppy_batch.val
val
Definition: heppy_batch.py:351
l1t::GlobalScales::ScaleParameters::etBins
std::vector< std::pair< double, double > > etBins
Definition: GlobalScales.h:39
l1t::TypeETT
Definition: GlobalDefinitions.h:57
GlobalAlgorithm::setAlgoAlias
void setAlgoAlias(const std::string &algoAliasValue)
Definition: GlobalAlgorithm.h:59
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minEtaCutValue
long long minEtaCutValue
Definition: CorrelationWithOverlapRemovalTemplate.h:67
TriggerMenuParser.h
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalPhiCut
unsigned int precOverlapRemovalPhiCut
Definition: CorrelationWithOverlapRemovalTemplate.h:94
l1t::TriggerMenuParser::parsePt_LUTS
void parsePt_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string lutpfx, std::string obj1, unsigned int prec)
Definition: TriggerMenuParser.cc:831
l1t::TypeHTM
Definition: GlobalDefinitions.h:59
CorrelationTemplate::CorrelationParameter::maxDRCutValue
long long maxDRCutValue
Definition: CorrelationTemplate.h:71
GlobalAlgorithm::print
virtual void print(std::ostream &myCout) const
print condition
Definition: GlobalAlgorithm.cc:106
l1t::TriggerMenuParser::setGtOrderConditionChip
void setGtOrderConditionChip(const std::vector< int > &)
Definition: TriggerMenuParser.cc:76
T
long double T
Definition: Basic3DVectorLD.h:48
l1t::TriggerMenuParser::insertAlgorithmIntoMap
bool insertAlgorithmIntoMap(const GlobalAlgorithm &alg)
insert an algorithm into algorithm map
Definition: TriggerMenuParser.cc:410
relativeConstraints.value
value
Definition: relativeConstraints.py:53
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalDRCut
unsigned int precOverlapRemovalDRCut
Definition: CorrelationWithOverlapRemovalTemplate.h:98
l1t::gtTau
Definition: GlobalObject.h:20
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
l1t::TypeExternal
Definition: GlobalDefinitions.h:67
l1t::TriggerMenuParser::setGtNumberConditionChips
void setGtNumberConditionChips(const unsigned int &)
Definition: TriggerMenuParser.cc:65
CorrelationTemplate::setCond0Category
void setCond0Category(const l1t::GtConditionCategory &)
Definition: CorrelationTemplate.cc:113
GlobalCondition::setObjectType
void setObjectType(const std::vector< l1t::GlobalObject > &objType)
Definition: GlobalCondition.h:67
PixelTestBeamValidation_cfi.Charge
Charge
Definition: PixelTestBeamValidation_cfi.py:91
l1t::TriggerMenuParser::parseCalMuEta_LUTS
void parseCalMuEta_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2)
Definition: TriggerMenuParser.cc:777
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
CaloTemplate::CorrelationParameter
typedef for correlation parameters
Definition: CaloTemplate.h:78
l1t::TypeCent6
Definition: GlobalDefinitions.h:75
l1t::CondMuon
Definition: GlobalDefinitions.h:94
CorrelationTemplate::CorrelationParameter::precEtaCut
unsigned int precEtaCut
Definition: CorrelationTemplate.h:64
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
l1t::gtMinBiasHFM0
Definition: GlobalObject.h:28
l1t::TypeAsymHtHF
Definition: GlobalDefinitions.h:80
l1t::TriggerMenuParser::parseCalo
bool parseCalo(tmeventsetup::esCondition condCalo, unsigned int chipNr=0, const bool corrFlag=false)
parse a calorimeter condition
Definition: TriggerMenuParser.cc:1460
edm::isDebugEnabled
bool isDebugEnabled()
Definition: MessageLogger.cc:12
l1t::Type4s
Definition: GlobalDefinitions.h:55
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
MuonTemplate::CorrelationParameter
Definition: MuonTemplate.h:90
l1t::GlobalScales::ScaleParameters::phiBins
std::vector< std::pair< double, double > > phiBins
Definition: GlobalScales.h:44
L1TBPTX_cfi.bitNumber
bitNumber
Definition: L1TBPTX_cfi.py:26
l1t::TypeMinBiasHFM0
Definition: GlobalDefinitions.h:63
CorrelationTemplate::CorrelationParameter::minEtaCutValue
long long minEtaCutValue
Definition: CorrelationTemplate.h:62
ExternalTemplate::setExternalChannel
void setExternalChannel(unsigned int extCh)
set functions
Definition: ExternalTemplate.h:58
l1t::TriggerMenuParser::parseEnergySumCorr
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
Definition: TriggerMenuParser.cc:2221
L1TMuonDQMOffline_cfi.cuts
cuts
Definition: L1TMuonDQMOffline_cfi.py:41
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
GlobalCondition
Definition: GlobalCondition.h:33
GlobalAlgorithm::algoChipNumber
const int algoChipNumber() const
get / set algorithm bit number
Definition: GlobalAlgorithm.h:77
CorrelationWithOverlapRemovalTemplate
Definition: CorrelationWithOverlapRemovalTemplate.h:34
l1t::TypeCent0
Definition: GlobalDefinitions.h:69
l1t::TriggerMenuParser::parseMuonCorr
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
Definition: TriggerMenuParser.cc:1242
CorrelationTemplate::setCorrelationParameter
void setCorrelationParameter(const CorrelationParameter &corrParameter)
Definition: CorrelationTemplate.cc:123
l1t::TriggerMenuParser::setGtTriggerMenuImplementation
void setGtTriggerMenuImplementation(const unsigned long &)
Definition: TriggerMenuParser.cc:98
CorrelationTemplate::CorrelationParameter::maxMassCutValue
long long maxMassCutValue
Definition: CorrelationTemplate.h:75
l1t::gtCentrality2
Definition: GlobalObject.h:38
l1t::TriggerMenuParser::parseExternal
bool parseExternal(tmeventsetup::esCondition condExt, unsigned int chipNr=0)
Definition: TriggerMenuParser.cc:2392
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
l1t::TriggerMenuParser::parsePhi_Trig_LUTS
void parsePhi_Trig_LUTS(const std::map< std::string, tmeventsetup::esScale > &scaleMap, const std::string &obj, TrigFunc_t func, unsigned int prec)
Definition: TriggerMenuParser.cc:923
cuy.ii
ii
Definition: cuy.py:590
l1t::GlobalScales::ScaleParameters::etMax
double etMax
Definition: GlobalScales.h:37
CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::chargeCorrelation
unsigned int chargeCorrelation
Definition: CorrelationWithOverlapRemovalTemplate.h:101
GlobalCondition::setCondGEq
void setCondGEq(const bool &cGEq)
Definition: GlobalCondition.h:72
l1t::gtAsymmetryHtHF
Definition: GlobalObject.h:35
l1t::TriggerMenuParser::parseCorrelation
bool parseCorrelation(tmeventsetup::esCondition corrCond, unsigned int chipNr=0)
parse a correlation condition
Definition: TriggerMenuParser.cc:2467
CorrelationTemplate::CorrelationParameter
typedef for correlation parameters
Definition: CorrelationTemplate.h:60
l1t::TriggerMenuParser::parseAlgorithm
bool parseAlgorithm(tmeventsetup::esAlgorithm algorithm, unsigned int chipNr=0)
parse all algorithms
Definition: TriggerMenuParser.cc:3049
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
ecaldqm::Quality
Quality
Definition: DBWriterWorkers.cc:55
l1t::TriggerMenuParser::clearMaps
void clearMaps()
Definition: TriggerMenuParser.cc:376
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:318