CMS 3D CMS Logo

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