CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
l1t::TriggerMenuParser Class Reference

#include <TriggerMenuParser.h>

Public Member Functions

const std::vector< std::vector< CaloTemplate > > & corCaloTemplate () const
 
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate () const
 
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate () const
 
std::map< std::string, unsigned int > getExternalSignals (const L1TUtmTriggerMenu *utmMenu)
 
const AlgorithmMapgtAlgorithmAliasMap () const
 get / set the algorithm map (by alias) More...
 
const std::string & gtAlgorithmImplementation () const
 
const AlgorithmMapgtAlgorithmMap () const
 get / set the algorithm map (by name) More...
 
const std::vector< ConditionMap > & gtConditionMap () const
 get / set / build the condition maps More...
 
const unsigned int gtNumberConditionChips () const
 get / set the number of condition chips in GTL More...
 
const unsigned int gtNumberPhysTriggers () const
 get / set the number of physics trigger algorithms More...
 
std::vector< int > gtOrderConditionChip () const
 
const unsigned int gtPinsOnConditionChip () const
 get / set the number of pins on the GTL condition chips More...
 
const std::string & gtScaleDbKey () const
 menu associated scale key More...
 
const GlobalScalesgtScales () const
 menu associated scales More...
 
const std::string & gtTriggerMenuAuthor () const
 
const std::string & gtTriggerMenuDate () const
 
const std::string & gtTriggerMenuDescription () const
 
const unsigned long gtTriggerMenuImplementation () const
 
const std::string & gtTriggerMenuInterface () const
 get / set the trigger menu names More...
 
const std::string & gtTriggerMenuInterfaceAuthor () const
 
const std::string & gtTriggerMenuInterfaceDate () const
 get / set the XML parser creation date, author, description for menu interface, menu More...
 
const std::string & gtTriggerMenuInterfaceDescription () const
 
const std::string & gtTriggerMenuName () const
 
const int gtTriggerMenuUUID () const
 
void parseCondFormats (const L1TUtmTriggerMenu *utmMenu)
 
void setCorCaloTemplate (const std::vector< std::vector< CaloTemplate > > &)
 
void setCorEnergySumTemplate (const std::vector< std::vector< EnergySumTemplate > > &)
 
void setCorMuonTemplate (const std::vector< std::vector< MuonTemplate > > &)
 
void setGtAlgorithmAliasMap (const AlgorithmMap &)
 
void setGtAlgorithmImplementation (const std::string &)
 
void setGtAlgorithmMap (const AlgorithmMap &)
 
void setGtConditionMap (const std::vector< ConditionMap > &)
 
void setGtNumberConditionChips (const unsigned int &)
 
void setGtNumberPhysTriggers (const unsigned int &)
 
void setGtOrderConditionChip (const std::vector< int > &)
 
void setGtPinsOnConditionChip (const unsigned int &)
 
void setGtScaleDbKey (const std::string &)
 
void setGtTriggerMenuAuthor (const std::string &)
 
void setGtTriggerMenuDate (const std::string &)
 
void setGtTriggerMenuDescription (const std::string &)
 
void setGtTriggerMenuImplementation (const unsigned long &)
 
void setGtTriggerMenuInterface (const std::string &)
 
void setGtTriggerMenuInterfaceAuthor (const std::string &)
 
void setGtTriggerMenuInterfaceDate (const std::string &)
 
void setGtTriggerMenuInterfaceDescription (const std::string &)
 
void setGtTriggerMenuName (const std::string &)
 
void setGtTriggerMenuUUID (const int)
 
void setVecCaloTemplate (const std::vector< std::vector< CaloTemplate > > &)
 
void setVecCorrelationTemplate (const std::vector< std::vector< CorrelationTemplate > > &)
 
void setVecCorrelationWithOverlapRemovalTemplate (const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &)
 
void setVecEnergySumTemplate (const std::vector< std::vector< EnergySumTemplate > > &)
 
void setVecExternalTemplate (const std::vector< std::vector< ExternalTemplate > > &)
 
void setVecMuonTemplate (const std::vector< std::vector< MuonTemplate > > &)
 
 TriggerMenuParser ()
 
const std::vector< std::vector< CaloTemplate > > & vecCaloTemplate () const
 
const std::vector< std::vector< CorrelationTemplate > > & vecCorrelationTemplate () const
 
const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > & vecCorrelationWithOverlapRemovalTemplate () const
 
const std::vector< std::vector< EnergySumTemplate > > & vecEnergySumTemplate () const
 
const std::vector< std::vector< ExternalTemplate > > & vecExternalTemplate () const
 
const std::vector< std::vector< MuonTemplate > > & vecMuonTemplate () const
 get / set the vectors containing the conditions More...
 
virtual ~TriggerMenuParser ()
 destructor More...
 

Private Member Functions

void clearMaps ()
 
bool insertAlgorithmIntoMap (const GlobalAlgorithm &alg)
 insert an algorithm into algorithm map More...
 
bool insertConditionIntoMap (GlobalCondition &cond, const int chipNr)
 
template<typename T >
std::string l1t2string (T)
 
int l1tstr2int (const std::string data)
 
bool parseAlgorithm (tmeventsetup::esAlgorithm algorithm, unsigned int chipNr=0)
 parse all algorithms More...
 
void parseCalMuEta_LUTS (std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2)
 
void parseCalMuPhi_LUTS (std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2)
 
bool parseCalo (tmeventsetup::esCondition condCalo, unsigned int chipNr=0, const bool corrFlag=false)
 parse a calorimeter condition More...
 
bool parseCaloCorr (const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
 
bool parseCorrelation (tmeventsetup::esCondition corrCond, unsigned int chipNr=0)
 parse a correlation condition More...
 
bool parseCorrelationWithOverlapRemoval (const tmeventsetup::esCondition &corrCond, unsigned int chipNr=0)
 parse a correlation condition with overlap removal More...
 
void parseDeltaEta_Cosh_LUTS (std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2, unsigned int prec1, unsigned int prec2)
 
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)
 
bool parseEnergySum (tmeventsetup::esCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
 parse an "energy sum" condition More...
 
bool parseEnergySumCorr (const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
 
bool parseExternal (tmeventsetup::esCondition condExt, unsigned int chipNr=0)
 
bool parseMuon (tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
 parse a muon condition More...
 
bool parseMuonCorr (const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
 
void parsePhi_Trig_LUTS (const std::map< std::string, tmeventsetup::esScale > &scaleMap, const std::string &obj, TrigFunc_t func, unsigned int prec)
 
void parsePt_LUTS (std::map< std::string, tmeventsetup::esScale > scaleMap, std::string lutpfx, std::string obj1, unsigned int prec)
 
bool parseScales (std::map< std::string, tmeventsetup::esScale > scaleMap)
 parse scales More...
 

Private Attributes

AlgorithmMap m_algorithmAliasMap
 map containing the physics algorithms (by alias) More...
 
std::string m_algorithmImplementation
 
AlgorithmMap m_algorithmMap
 map containing the physics algorithms (by name) More...
 
std::vector< ConditionMapm_conditionMap
 map containing the conditions (per condition chip) - transient More...
 
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
 
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
 
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
 
GlobalScales m_gtScales
 
unsigned int m_numberConditionChips
 hardware limits More...
 
unsigned int m_numberPhysTriggers
 number of physics trigger algorithms More...
 
std::vector< int > m_orderConditionChip
 
unsigned int m_pinsOnConditionChip
 number of pins on the GTL condition chips More...
 
std::string m_scaleDbKey
 menu associated scale key More...
 
std::string m_triggerMenuAuthor
 
std::string m_triggerMenuDate
 
std::string m_triggerMenuDescription
 
unsigned long m_triggerMenuImplementation
 
std::string m_triggerMenuInterface
 menu names More...
 
std::string m_triggerMenuInterfaceAuthor
 
std::string m_triggerMenuInterfaceDate
 number of technical triggers More...
 
std::string m_triggerMenuInterfaceDescription
 
std::string m_triggerMenuName
 
unsigned long m_triggerMenuUUID
 
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
 
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
 
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
 
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
 
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
 
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
 

Detailed Description

Definition at line 57 of file TriggerMenuParser.h.

Constructor & Destructor Documentation

TriggerMenuParser::TriggerMenuParser ( )

constructor empty

Definition at line 49 of file TriggerMenuParser.cc.

50  : m_triggerMenuInterface("NULL"),
51  m_triggerMenuName("NULL"),
53  m_scaleDbKey("NULL")
54 
55 {
56  // menu names, scale key initialized to NULL due to ORACLE treatment of strings
57 
58  // empty
59 }
std::string m_triggerMenuInterface
menu names
std::string m_scaleDbKey
menu associated scale key
unsigned long m_triggerMenuImplementation
TriggerMenuParser::~TriggerMenuParser ( )
virtual

destructor

Definition at line 62 of file TriggerMenuParser.cc.

References clearMaps().

Member Function Documentation

void TriggerMenuParser::clearMaps ( )
private

clearMaps - delete all conditions and algorithms in the maps and clear the maps.

Definition at line 376 of file TriggerMenuParser.cc.

References m_algorithmMap, and m_conditionMap.

Referenced by gtAlgorithmImplementation(), and ~TriggerMenuParser().

376  {
377  // loop over condition maps (one map per condition chip)
378  // then loop over conditions in the map
379  for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip != m_conditionMap.end();
380  itCondOnChip++) {
381  // the conditions in the maps are deleted in L1uGtTriggerMenu, not here
382 
383  itCondOnChip->clear();
384  }
385 
386  // the algorithms in the maps are deleted in L1uGtTriggerMenu, not here
387  m_algorithmMap.clear();
388 }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::corCaloTemplate ( ) const
inline

Definition at line 163 of file TriggerMenuParser.h.

References m_corCaloTemplate, and setCorCaloTemplate().

Referenced by L1TGlobalProducer::produce().

163 { return m_corCaloTemplate; }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
const std::vector<std::vector<EnergySumTemplate> >& l1t::TriggerMenuParser::corEnergySumTemplate ( ) const
inline

Definition at line 168 of file TriggerMenuParser.h.

References m_corEnergySumTemplate, and setCorEnergySumTemplate().

Referenced by L1TGlobalProducer::produce().

168  {
169  return m_corEnergySumTemplate;
170  }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::corMuonTemplate ( ) const
inline

Definition at line 158 of file TriggerMenuParser.h.

References m_corMuonTemplate, and setCorMuonTemplate().

Referenced by L1TGlobalProducer::produce().

158 { return m_corMuonTemplate; }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::map< std::string, unsigned int > TriggerMenuParser::getExternalSignals ( const L1TUtmTriggerMenu utmMenu)

Definition at line 155 of file TriggerMenuParser.cc.

References goodZToMuMu_cfi::condition, findQualityFiles::jj, optionsL1T::menu, Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmAliasMap(), L1TExtCondProducer::produce(), and L1TExtCondLegacyToStage2::produce().

155  {
156  using namespace tmeventsetup;
157  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*>(utmMenu);
158  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
159 
160  std::map<std::string, unsigned int> extBitMap;
161 
162  //loop over the algorithms
163  for (std::map<std::string, esCondition>::const_iterator cit = condMap.begin(); cit != condMap.end(); cit++) {
164  const esCondition& condition = cit->second;
165  if (condition.getType() == esConditionType::Externals) {
166  // Get object for External conditions
167  const std::vector<esObject>& objects = condition.getObjects();
168  for (size_t jj = 0; jj < objects.size(); jj++) {
169  const esObject object = objects.at(jj);
170  if (object.getType() == esObjectType::EXT) {
171  unsigned int channelID = object.getExternalChannelId();
172  std::string name = object.getExternalSignalName();
173 
174  if (extBitMap.count(name) == 0)
175  extBitMap.insert(std::map<std::string, unsigned int>::value_type(name, channelID));
176  }
177  }
178  }
179  }
180  /*
181  for (std::map<std::string, unsigned int>::const_iterator cit = extBitMap.begin();
182  cit != extBitMap.end(); cit++) {
183  std::cout << " Ext Map: Name " << cit->first << " Bit " << cit->second << std::endl;
184  }
185 */
186  return extBitMap;
187 }
const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmAliasMap ( ) const
inline

get / set the algorithm map (by alias)

Definition at line 180 of file TriggerMenuParser.h.

References getExternalSignals(), m_algorithmAliasMap, parseCondFormats(), and setGtAlgorithmAliasMap().

Referenced by L1TGlobalProducer::produce().

180 { return m_algorithmAliasMap; }
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
const std::string& l1t::TriggerMenuParser::gtAlgorithmImplementation ( ) const
inline
const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmMap ( ) const
inline

get / set the algorithm map (by name)

Definition at line 175 of file TriggerMenuParser.h.

References m_algorithmMap, and setGtAlgorithmMap().

Referenced by L1TGlobalProducer::produce().

175 { return m_algorithmMap; }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
const std::vector<ConditionMap>& l1t::TriggerMenuParser::gtConditionMap ( ) const
inline

get / set / build the condition maps

Definition at line 90 of file TriggerMenuParser.h.

References m_conditionMap, and setGtConditionMap().

90 { return m_conditionMap; }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
const unsigned int l1t::TriggerMenuParser::gtNumberConditionChips ( ) const
inline

get / set the number of condition chips in GTL

Definition at line 68 of file TriggerMenuParser.h.

References m_numberConditionChips, and setGtNumberConditionChips().

68 { return m_numberConditionChips; }
unsigned int m_numberConditionChips
hardware limits
const unsigned int l1t::TriggerMenuParser::gtNumberPhysTriggers ( ) const
inline

get / set the number of physics trigger algorithms

Definition at line 84 of file TriggerMenuParser.h.

References m_numberPhysTriggers, and setGtNumberPhysTriggers().

84 { return m_numberPhysTriggers; }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
std::vector<int> l1t::TriggerMenuParser::gtOrderConditionChip ( ) const
inline

get / set the correspondence "condition chip - GTL algorithm word" in the hardware

Definition at line 79 of file TriggerMenuParser.h.

References m_orderConditionChip, and setGtOrderConditionChip().

79 { return m_orderConditionChip; }
std::vector< int > m_orderConditionChip
const unsigned int l1t::TriggerMenuParser::gtPinsOnConditionChip ( ) const
inline

get / set the number of pins on the GTL condition chips

Definition at line 73 of file TriggerMenuParser.h.

References m_pinsOnConditionChip, and setGtPinsOnConditionChip().

73 { return m_pinsOnConditionChip; }
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
const std::string& l1t::TriggerMenuParser::gtScaleDbKey ( ) const
inline

menu associated scale key

Definition at line 110 of file TriggerMenuParser.h.

References m_scaleDbKey.

Referenced by L1TGlobalProducer::produce().

110 { return m_scaleDbKey; }
std::string m_scaleDbKey
menu associated scale key
const GlobalScales& l1t::TriggerMenuParser::gtScales ( ) const
inline

menu associated scales

Definition at line 113 of file TriggerMenuParser.h.

References m_gtScales, setGtScaleDbKey(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by L1TGlobalProducer::produce().

113 { return m_gtScales; }
const std::string& l1t::TriggerMenuParser::gtTriggerMenuAuthor ( ) const
inline
const std::string& l1t::TriggerMenuParser::gtTriggerMenuDate ( ) const
inline
const std::string& l1t::TriggerMenuParser::gtTriggerMenuDescription ( ) const
inline
const unsigned long l1t::TriggerMenuParser::gtTriggerMenuImplementation ( ) const
inline
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterface ( ) const
inline

get / set the trigger menu names

Definition at line 95 of file TriggerMenuParser.h.

References m_triggerMenuInterface, setGtTriggerMenuInterface(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by L1TGlobalProducer::produce().

95 { return m_triggerMenuInterface; }
std::string m_triggerMenuInterface
menu names
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceAuthor ( ) const
inline
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDate ( ) const
inline

get / set the XML parser creation date, author, description for menu interface, menu

Definition at line 191 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDate, setGtTriggerMenuInterfaceDate(), and AlCaHLTBitMon_QueryRunRegistry::string.

191 { return m_triggerMenuInterfaceDate; }
std::string m_triggerMenuInterfaceDate
number of technical triggers
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDescription ( ) const
inline
const std::string& l1t::TriggerMenuParser::gtTriggerMenuName ( ) const
inline
const int l1t::TriggerMenuParser::gtTriggerMenuUUID ( ) const
inline

Definition at line 205 of file TriggerMenuParser.h.

References m_triggerMenuUUID, and setGtTriggerMenuUUID().

Referenced by L1TGlobalProducer::produce().

205 { return m_triggerMenuUUID; }
unsigned long m_triggerMenuUUID
bool TriggerMenuParser::insertAlgorithmIntoMap ( const GlobalAlgorithm alg)
private

insert an algorithm into algorithm map

Definition at line 410 of file TriggerMenuParser.cc.

References GlobalAlgorithm::algoAlias(), GlobalAlgorithm::algoBitNumber(), GlobalAlgorithm::algoChipNumber(), GlobalAlgorithm::algoName(), GlobalAlgorithm::algoOutputPin(), L1TBPTX_cfi::bitNumber, LogTrace, m_algorithmAliasMap, m_algorithmMap, m_numberConditionChips, m_numberPhysTriggers, m_orderConditionChip, m_pinsOnConditionChip, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseAlgorithm().

410  {
411  std::string algName = alg.algoName();
412  const std::string& algAlias = alg.algoAlias();
413  //LogTrace("TriggerMenuParser")
414  //<< " Trying to insert algorithm \"" << algName << "\" in the algorithm map." ;
415 
416  // no algorithm name has to appear twice!
417  if (m_algorithmMap.count(algName) != 0) {
418  LogTrace("TriggerMenuParser") << " Algorithm \"" << algName
419  << "\"already exists in the algorithm map- not inserted!" << std::endl;
420  return false;
421  }
422 
423  if (m_algorithmAliasMap.count(algAlias) != 0) {
424  LogTrace("TriggerMenuParser") << " Algorithm alias \"" << algAlias
425  << "\"already exists in the algorithm alias map- not inserted!" << std::endl;
426  return false;
427  }
428 
429  // bit number less than zero or greater than maximum number of algorithms
430  int bitNumber = alg.algoBitNumber();
431  if ((bitNumber < 0) || (bitNumber >= static_cast<int>(m_numberPhysTriggers))) {
432  LogTrace("TriggerMenuParser") << " Bit number " << bitNumber << " outside allowed range [0, "
433  << m_numberPhysTriggers << ") - algorithm not inserted!" << std::endl;
434  return false;
435  }
436 
437  // maximum number of algorithms
438  if (m_algorithmMap.size() >= m_numberPhysTriggers) {
439  LogTrace("TriggerMenuParser") << " More than maximum allowed " << m_numberPhysTriggers
440  << " algorithms in the algorithm map - not inserted!" << std::endl;
441  return false;
442  }
443 
444  // chip number outside allowed values
445  int chipNr = alg.algoChipNumber(
446  static_cast<int>(m_numberConditionChips), static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
447 
448  if ((chipNr < 0) || (chipNr > static_cast<int>(m_numberConditionChips))) {
449  LogTrace("TriggerMenuParser") << " Chip number " << chipNr << " outside allowed range [0, "
450  << m_numberConditionChips << ") - algorithm not inserted!" << std::endl;
451  return false;
452  }
453 
454  // output pin outside allowed values
455  int outputPin = alg.algoOutputPin(
456  static_cast<int>(m_numberConditionChips), static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
457 
458  if ((outputPin < 0) || (outputPin > static_cast<int>(m_pinsOnConditionChip))) {
459  LogTrace("TriggerMenuParser") << " Output pin " << outputPin << " outside allowed range [0, "
460  << m_pinsOnConditionChip << "] - algorithm not inserted!" << std::endl;
461  return false;
462  }
463 
464  // no two algorithms on the same chip can have the same output pin
465  for (CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
466  int iPin = (itAlgo->second)
467  .algoOutputPin(static_cast<int>(m_numberConditionChips),
468  static_cast<int>(m_pinsOnConditionChip),
470  std::string iName = itAlgo->first;
471  int iChip = (itAlgo->second)
472  .algoChipNumber(static_cast<int>(m_numberConditionChips),
473  static_cast<int>(m_pinsOnConditionChip),
475 
476  if ((outputPin == iPin) && (chipNr == iChip)) {
477  LogTrace("TriggerMenuParser") << " Output pin " << outputPin << " is the same as for algorithm " << iName
478  << "\n from the same chip number " << chipNr << " - algorithm not inserted!"
479  << std::endl;
480  return false;
481  }
482  }
483 
484  // insert algorithm
485  m_algorithmMap[algName] = alg;
486  m_algorithmAliasMap[algAlias] = alg;
487 
488  //LogTrace("TriggerMenuParser")
489  //<< " OK - algorithm inserted!"
490  //<< std::endl;
491 
492  return true;
493 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
unsigned int m_numberConditionChips
hardware limits
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
int algoBitNumber() const
get / set algorithm bit number
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
#define LogTrace(id)
const std::string algoName() const
get / set algorithm name
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
std::vector< int > m_orderConditionChip
std::string const & algoAlias() const
get / set algorithm alias
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
const int algoChipNumber() const
get / set algorithm bit number
bool TriggerMenuParser::insertConditionIntoMap ( GlobalCondition cond,
const int  chipNr 
)
private

insertConditionIntoMap - safe insert of condition into condition map. if the condition name already exists, do not insert it and return false

Definition at line 392 of file TriggerMenuParser.cc.

References GlobalCondition::condName(), KineDebug3::count(), LogTrace, m_conditionMap, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), parseCalo(), parseCorrelation(), parseCorrelationWithOverlapRemoval(), parseEnergySum(), parseExternal(), and parseMuon().

392  {
393  std::string cName = cond.condName();
394  LogTrace("TriggerMenuParser") << " Trying to insert condition \"" << cName << "\" in the condition map."
395  << std::endl;
396 
397  // no condition name has to appear twice!
398  if ((m_conditionMap[chipNr]).count(cName) != 0) {
399  LogTrace("TriggerMenuParser") << " Condition " << cName << " already exists - not inserted!" << std::endl;
400  return false;
401  }
402 
403  (m_conditionMap[chipNr])[cName] = &cond;
404  LogTrace("TriggerMenuParser") << " OK - condition inserted!" << std::endl;
405 
406  return true;
407 }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
#define LogTrace(id)
const std::string & condName() const
get / set condition name
template<typename T >
std::string TriggerMenuParser::l1t2string ( T  data)
private

Definition at line 496 of file TriggerMenuParser.cc.

References data, and contentValuesCheck::ss.

Referenced by gtAlgorithmImplementation(), parseCalo(), parseCaloCorr(), parseCorrelation(), parseCorrelationWithOverlapRemoval(), parseEnergySum(), parseEnergySumCorr(), parseExternal(), parseMuon(), and parseMuonCorr().

496  {
497  std::stringstream ss;
498  ss << data;
499  return ss.str();
500 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int TriggerMenuParser::l1tstr2int ( const std::string  data)
private

Definition at line 501 of file TriggerMenuParser.cc.

References data, contentValuesCheck::ss, and relativeConstraints::value.

Referenced by gtAlgorithmImplementation(), parseCalo(), parseCaloCorr(), parseMuon(), and parseMuonCorr().

501  {
502  std::stringstream ss;
503  ss << data;
504  int value;
505  ss >> value;
506  return value;
507 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
bool TriggerMenuParser::parseAlgorithm ( tmeventsetup::esAlgorithm  algorithm,
unsigned int  chipNr = 0 
)
private

parse all algorithms

workAlgorithm - parse the algorithm and insert it into algorithm map.

Parameters
nodeThe corresponding node to the algorithm.
nameThe name of the algorithm.
chipNrThe number of the chip the conditions for that algorithm are located on.
Returns
"true" on success, "false" if an error occurred.

Definition at line 3027 of file TriggerMenuParser.cc.

References L1TBPTX_cfi::bitNumber, insertAlgorithmIntoMap(), edm::isDebugEnabled(), LogDebug, LogTrace, GlobalAlgorithm::print(), GlobalAlgorithm::setAlgoAlias(), GlobalAlgorithm::setAlgoChipNumber(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

3027  {
3028  using namespace tmeventsetup;
3029  //using namespace Algorithm;
3030 
3031  // get alias
3032  std::string algAlias = algorithm.getName();
3033  const std::string& algName = algorithm.getName();
3034 
3035  if (algAlias.empty()) {
3036  algAlias = algName;
3037  LogDebug("TriggerMenuParser") << "\n No alias defined for algorithm. Alias set to algorithm name."
3038  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3039  << std::endl;
3040  } else {
3041  //LogDebug("TriggerMenuParser")
3042  LogDebug("TriggerMenuParser") << "\n Alias defined for algorithm."
3043  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3044  << std::endl;
3045  }
3046 
3047  // get the logical expression
3048  const std::string& logExpression = algorithm.getExpressionInCondition();
3049 
3050  LogDebug("TriggerMenuParser") << " Logical expression: " << logExpression
3051  << " Chip number: " << chipNr << std::endl;
3052 
3053  // determine output pin
3054  int outputPin = algorithm.getIndex();
3055 
3056  //LogTrace("TriggerMenuParser")
3057  LogDebug("TriggerMenuParser") << " Output pin: " << outputPin << std::endl;
3058 
3059  // compute the bit number from chip number, output pin and order of the chips
3060  // pin numbering start with 1, bit numbers with 0
3061  int bitNumber = outputPin; // + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1;
3062 
3063  //LogTrace("TriggerMenuParser")
3064  LogDebug("TriggerMenuParser") << " Bit number: " << bitNumber << std::endl;
3065 
3066  // create a new algorithm and insert it into algorithm map
3067  GlobalAlgorithm alg(algName, logExpression, bitNumber);
3068  alg.setAlgoChipNumber(static_cast<int>(chipNr));
3069  alg.setAlgoAlias(algAlias);
3070 
3071  if (edm::isDebugEnabled()) {
3072  std::ostringstream myCoutStream;
3073  alg.print(myCoutStream);
3074  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3075  }
3076 
3077  // insert algorithm into the map
3078  if (!insertAlgorithmIntoMap(alg)) {
3079  return false;
3080  }
3081 
3082  return true;
3083 }
#define LogDebug(id)
bool isDebugEnabled()
#define LogTrace(id)
bool insertAlgorithmIntoMap(const GlobalAlgorithm &alg)
insert an algorithm into algorithm map
void TriggerMenuParser::parseCalMuEta_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2 
)
private

Definition at line 777 of file TriggerMenuParser.cc.

References m_gtScales, l1t::GlobalScales::setLUT_CalMuEta(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseScales().

779  {
780  using namespace tmeventsetup;
781 
782  // First Delta Eta for this set
783  std::string scLabel1 = obj1;
784  scLabel1 += "-ETA";
785  std::string scLabel2 = obj2;
786  scLabel2 += "-ETA";
787 
788  //This LUT does not exist in L1 Menu file, don't fill it
789  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
790  return;
791 
792  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
793  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
794 
795  std::vector<long long> lut_cal_2_mu_eta;
796  getCaloMuonEtaConversionLut(lut_cal_2_mu_eta, scale1, scale2);
797 
798  std::string lutName = obj1;
799  lutName += "-";
800  lutName += obj2;
801  m_gtScales.setLUT_CalMuEta(lutName, lut_cal_2_mu_eta);
802 }
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:29
void TriggerMenuParser::parseCalMuPhi_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2 
)
private

Definition at line 804 of file TriggerMenuParser.cc.

References m_gtScales, l1t::GlobalScales::setLUT_CalMuPhi(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseScales().

806  {
807  using namespace tmeventsetup;
808 
809  // First Delta Eta for this set
810  std::string scLabel1 = obj1;
811  scLabel1 += "-PHI";
812  std::string scLabel2 = obj2;
813  scLabel2 += "-PHI";
814 
815  //This LUT does not exist in L1 Menu file, don't fill it
816  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
817  return;
818 
819  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
820  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
821 
822  std::vector<long long> lut_cal_2_mu_phi;
823  getCaloMuonPhiConversionLut(lut_cal_2_mu_phi, scale1, scale2);
824 
825  std::string lutName = obj1;
826  lutName += "-";
827  lutName += obj2;
828  m_gtScales.setLUT_CalMuPhi(lutName, lut_cal_2_mu_phi);
829 }
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:42
bool TriggerMenuParser::parseCalo ( tmeventsetup::esCondition  condCalo,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse a calorimeter condition

parseCalo Parse a calo condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 1438 of file TriggerMenuParser.cc.

References goodZToMuMu_cfi::condition, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, TauDecayModes::dec, l1t::gtEG, l1t::gtJet, l1t::gtTau, insertConditionIntoMap(), createfilelist::int, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), l1tstr2int(), LogDebug, LogTrace, m_corCaloTemplate, m_vecCaloTemplate, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, CaloTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2018_cff::Threshold, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

1438  {
1439  // XERCES_CPP_NAMESPACE_USE
1440  using namespace tmeventsetup;
1441 
1442  // get condition, particle name and type name
1443 
1444  std::string condition = "calo";
1445  std::string particle = "test-fix";
1446  std::string type = l1t2string(condCalo.getType());
1447  std::string name = l1t2string(condCalo.getName());
1448 
1449  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1450  << "\n (in parseCalo) "
1451  << "\n condition = " << condition << "\n particle = " << particle
1452  << "\n type = " << type << "\n name = " << name << std::endl;
1453 
1455 
1456  // determine object type type
1457  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1458  GlobalObject caloObjType;
1459  int nrObj = -1;
1460 
1461  if (condCalo.getType() == esConditionType::SingleEgamma) {
1462  caloObjType = gtEG;
1463  type = "1_s";
1464  cType = l1t::Type1s;
1465  nrObj = 1;
1466  } else if (condCalo.getType() == esConditionType::DoubleEgamma) {
1467  caloObjType = gtEG;
1468  type = "2_s";
1469  cType = l1t::Type2s;
1470  nrObj = 2;
1471  } else if (condCalo.getType() == esConditionType::TripleEgamma) {
1472  caloObjType = gtEG;
1473  cType = l1t::Type3s;
1474  type = "3";
1475  nrObj = 3;
1476  } else if (condCalo.getType() == esConditionType::QuadEgamma) {
1477  caloObjType = gtEG;
1478  cType = l1t::Type4s;
1479  type = "4";
1480  nrObj = 4;
1481  } else if (condCalo.getType() == esConditionType::SingleJet) {
1482  caloObjType = gtJet;
1483  cType = l1t::Type1s;
1484  type = "1_s";
1485  nrObj = 1;
1486  } else if (condCalo.getType() == esConditionType::DoubleJet) {
1487  caloObjType = gtJet;
1488  cType = l1t::Type2s;
1489  type = "2_s";
1490  nrObj = 2;
1491  } else if (condCalo.getType() == esConditionType::TripleJet) {
1492  caloObjType = gtJet;
1493  cType = l1t::Type3s;
1494  type = "3";
1495  nrObj = 3;
1496  } else if (condCalo.getType() == esConditionType::QuadJet) {
1497  caloObjType = gtJet;
1498  cType = l1t::Type4s;
1499  type = "4";
1500  nrObj = 4;
1501  } else if (condCalo.getType() == esConditionType::SingleTau) {
1502  caloObjType = gtTau;
1503  cType = l1t::Type1s;
1504  type = "1_s";
1505  nrObj = 1;
1506  } else if (condCalo.getType() == esConditionType::DoubleTau) {
1507  caloObjType = gtTau;
1508  cType = l1t::Type2s;
1509  type = "2_s";
1510  nrObj = 2;
1511  } else if (condCalo.getType() == esConditionType::TripleTau) {
1512  caloObjType = gtTau;
1513  cType = l1t::Type3s;
1514  type = "3";
1515  nrObj = 3;
1516  } else if (condCalo.getType() == esConditionType::QuadTau) {
1517  caloObjType = gtTau;
1518  cType = l1t::Type4s;
1519  type = "4";
1520  nrObj = 4;
1521  } else {
1522  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition (" << particle << ")" << std::endl;
1523  return false;
1524  }
1525 
1526  // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1527 
1528  if (nrObj < 0) {
1529  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type << ")"
1530  << "\nCan not determine number of trigger objects. " << std::endl;
1531  return false;
1532  }
1533 
1534  // get values
1535 
1536  // temporary storage of the parameters
1537  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1538 
1539  //BLW TO DO: Can this be dropped?
1540  CaloTemplate::CorrelationParameter corrParameter;
1541 
1542  // need at least one value for deltaPhiRange
1543  std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1544  tmpValues.reserve(nrObj);
1545 
1546  if (int(condCalo.getObjects().size()) != nrObj) {
1547  edm::LogError("TriggerMenuParser") << " condCalo objects: nrObj = " << nrObj
1548  << "condCalo.getObjects().size() = " << condCalo.getObjects().size()
1549  << std::endl;
1550  return false;
1551  }
1552 
1553  // std::string str_condCalo = "";
1554  // uint64_t tempUIntH, tempUIntL;
1555  // uint64_t dst;
1556  int cnt = 0;
1557 
1558  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1559  int relativeBx = 0;
1560  bool gEq = false;
1561 
1562  // Loop over objects and extract the cuts on the objects
1563  const std::vector<esObject>& objects = condCalo.getObjects();
1564  for (size_t jj = 0; jj < objects.size(); jj++) {
1565  const esObject object = objects.at(jj);
1566  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1567 
1568  // BLW TO DO: This needs to be added to the Object Parameters
1569  relativeBx = object.getBxOffset();
1570 
1571  // Loop over the cuts for this object
1572  int upperThresholdInd = -1;
1573  int lowerThresholdInd = 0;
1574  int upperIndexInd = -1;
1575  int lowerIndexInd = 0;
1576  int cntEta = 0;
1577  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1578  int cntPhi = 0;
1579  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1580  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1581  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1582 
1583  const std::vector<esCut>& cuts = object.getCuts();
1584  for (size_t kk = 0; kk < cuts.size(); kk++) {
1585  const esCut cut = cuts.at(kk);
1586 
1587  switch (cut.getCutType()) {
1588  case esCutType::Threshold:
1589  lowerThresholdInd = cut.getMinimum().index;
1590  upperThresholdInd = cut.getMaximum().index;
1591  break;
1592  case esCutType::Slice:
1593  lowerIndexInd = int(cut.getMinimum().value);
1594  upperIndexInd = int(cut.getMaximum().value);
1595  break;
1596  case esCutType::Eta: {
1597  if (cntEta == 0) {
1598  etaWindow1Lower = cut.getMinimum().index;
1599  etaWindow1Upper = cut.getMaximum().index;
1600  } else if (cntEta == 1) {
1601  etaWindow2Lower = cut.getMinimum().index;
1602  etaWindow2Upper = cut.getMaximum().index;
1603  } else {
1604  edm::LogError("TriggerMenuParser")
1605  << "Too Many Eta Cuts for calo-condition (" << particle << ")" << std::endl;
1606  return false;
1607  }
1608  cntEta++;
1609 
1610  } break;
1611 
1612  case esCutType::Phi: {
1613  if (cntPhi == 0) {
1614  phiWindow1Lower = cut.getMinimum().index;
1615  phiWindow1Upper = cut.getMaximum().index;
1616  } else if (cntPhi == 1) {
1617  phiWindow2Lower = cut.getMinimum().index;
1618  phiWindow2Upper = cut.getMaximum().index;
1619  } else {
1620  edm::LogError("TriggerMenuParser")
1621  << "Too Many Phi Cuts for calo-condition (" << particle << ")" << std::endl;
1622  return false;
1623  }
1624  cntPhi++;
1625 
1626  } break;
1627 
1628  case esCutType::Charge: {
1629  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition (" << particle << ")" << std::endl;
1630  return false;
1631 
1632  } break;
1633  case esCutType::Quality: {
1634  qualityLUT = l1tstr2int(cut.getData());
1635 
1636  } break;
1637  case esCutType::Isolation: {
1638  isolationLUT = l1tstr2int(cut.getData());
1639 
1640  } break;
1641  default:
1642  break;
1643  } //end switch
1644 
1645  } //end loop over cuts
1646 
1647  // Fill the object parameters
1648  objParameter[cnt].etHighThreshold = upperThresholdInd;
1649  objParameter[cnt].etLowThreshold = lowerThresholdInd;
1650  objParameter[cnt].indexHigh = upperIndexInd;
1651  objParameter[cnt].indexLow = lowerIndexInd;
1652  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1653  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1654  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1655  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1656  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1657  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1658  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1659  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1660  objParameter[cnt].isolationLUT = isolationLUT;
1661  objParameter[cnt].qualityLUT = qualityLUT; //TO DO: Must add
1662 
1663  // Output for debugging
1664  LogDebug("TriggerMenuParser") << "\n Calo ET high thresholds (hex) for calo object " << caloObjType << " "
1665  << cnt << " = " << std::hex << objParameter[cnt].etLowThreshold << " - "
1666  << objParameter[cnt].etHighThreshold
1667  << "\n etaWindow Lower / Upper for calo object " << cnt << " = 0x"
1668  << objParameter[cnt].etaWindow1Lower << " / 0x" << objParameter[cnt].etaWindow1Upper
1669  << "\n etaWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1670  << objParameter[cnt].etaWindow2Lower << " / 0x" << objParameter[cnt].etaWindow2Upper
1671  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
1672  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
1673  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1674  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
1675  << "\n Isolation LUT for calo object " << cnt << " = 0x"
1676  << objParameter[cnt].isolationLUT << "\n Quality LUT for calo object " << cnt
1677  << " = 0x" << objParameter[cnt].qualityLUT << std::dec << std::endl;
1678 
1679  cnt++;
1680  } //end loop over objects
1681 
1682  // object types - all same caloObjType
1683  std::vector<GlobalObject> objType(nrObj, caloObjType);
1684 
1685  // now create a new calo condition
1686  CaloTemplate caloCond(name);
1687 
1688  caloCond.setCondType(cType);
1689  caloCond.setObjectType(objType);
1690 
1691  //BLW TO DO: This needs to be added to the object rather than the whole condition
1692  caloCond.setCondGEq(gEq);
1693  caloCond.setCondChipNr(chipNr);
1694 
1695  //BLW TO DO: This needs to be added to the object rather than the whole condition
1696  caloCond.setCondRelativeBx(relativeBx);
1697 
1698  caloCond.setConditionParameter(objParameter, corrParameter);
1699 
1700  if (edm::isDebugEnabled()) {
1701  std::ostringstream myCoutStream;
1702  caloCond.print(myCoutStream);
1703  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1704  }
1705 
1706  // insert condition into the map
1707  if (!insertConditionIntoMap(caloCond, chipNr)) {
1708  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
1709 
1710  return false;
1711  } else {
1712  if (corrFlag) {
1713  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1714  } else {
1715  (m_vecCaloTemplate[chipNr]).push_back(caloCond);
1716  }
1717  }
1718 
1719  //
1720  return true;
1721 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
int l1tstr2int(const std::string data)
typedef for correlation parameters
Definition: CaloTemplate.h:78
bool TriggerMenuParser::parseCaloCorr ( const tmeventsetup::esObject *  corrCalo,
unsigned int  chipNr = 0 
)
private

parseCalo Parse a calo condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 1734 of file TriggerMenuParser.cc.

References goodZToMuMu_cfi::condition, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, TauDecayModes::dec, l1t::gtEG, l1t::gtJet, l1t::gtTau, createfilelist::int, edm::isDebugEnabled(), L1TRate_cfi::Jet, GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), l1tstr2int(), LogDebug, LogTrace, m_corCaloTemplate, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, CaloTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, L1TRate_Offline_cfi::Tau, HLT_2018_cff::Threshold, and l1t::Type1s.

Referenced by gtAlgorithmImplementation(), parseCorrelation(), and parseCorrelationWithOverlapRemoval().

1734  {
1735  // XERCES_CPP_NAMESPACE_USE
1736  using namespace tmeventsetup;
1737 
1738  // get condition, particle name and type name
1739 
1740  std::string condition = "calo";
1741  std::string particle = "test-fix";
1742  std::string type = l1t2string(corrCalo->getType());
1743  std::string name = l1t2string(corrCalo->getName());
1744 
1745  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1746  << "\n (in parseCalo) "
1747  << "\n condition = " << condition << "\n particle = " << particle
1748  << "\n type = " << type << "\n name = " << name << std::endl;
1749 
1750  // determine object type type
1751  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1752  GlobalObject caloObjType;
1753  int nrObj = 1;
1754  type = "1_s";
1755  GtConditionType cType = l1t::Type1s;
1756 
1757  if (corrCalo->getType() == esObjectType::Egamma) {
1758  caloObjType = gtEG;
1759  } else if (corrCalo->getType() == esObjectType::Jet) {
1760  caloObjType = gtJet;
1761  } else if (corrCalo->getType() == esObjectType::Tau) {
1762  caloObjType = gtTau;
1763  } else {
1764  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition (" << particle << ")" << std::endl;
1765  return false;
1766  }
1767 
1768  // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1769 
1770  if (nrObj < 0) {
1771  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type << ")"
1772  << "\nCan not determine number of trigger objects. " << std::endl;
1773  return false;
1774  }
1775 
1776  // get values
1777 
1778  // temporary storage of the parameters
1779  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1780 
1781  //BLW TO DO: Can this be dropped?
1782  CaloTemplate::CorrelationParameter corrParameter;
1783 
1784  // need at least one value for deltaPhiRange
1785  std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1786  tmpValues.reserve(nrObj);
1787 
1788  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1789  int relativeBx = 0;
1790  bool gEq = false;
1791 
1792  gEq = (corrCalo->getComparisonOperator() == esComparisonOperator::GE);
1793 
1794  // BLW TO DO: This needs to be added to the Object Parameters
1795  relativeBx = corrCalo->getBxOffset();
1796 
1797  // Loop over the cuts for this object
1798  int upperThresholdInd = -1;
1799  int lowerThresholdInd = 0;
1800  int upperIndexInd = -1;
1801  int lowerIndexInd = 0;
1802  int cntEta = 0;
1803  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1804  int cntPhi = 0;
1805  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1806  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1807  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1808 
1809  const std::vector<esCut>& cuts = corrCalo->getCuts();
1810  for (size_t kk = 0; kk < cuts.size(); kk++) {
1811  const esCut cut = cuts.at(kk);
1812 
1813  switch (cut.getCutType()) {
1814  case esCutType::Threshold:
1815  lowerThresholdInd = cut.getMinimum().index;
1816  upperThresholdInd = cut.getMaximum().index;
1817  break;
1818  case esCutType::Slice:
1819  lowerIndexInd = int(cut.getMinimum().value);
1820  upperIndexInd = int(cut.getMaximum().value);
1821  break;
1822  case esCutType::Eta: {
1823  if (cntEta == 0) {
1824  etaWindow1Lower = cut.getMinimum().index;
1825  etaWindow1Upper = cut.getMaximum().index;
1826  } else if (cntEta == 1) {
1827  etaWindow2Lower = cut.getMinimum().index;
1828  etaWindow2Upper = cut.getMaximum().index;
1829  } else {
1830  edm::LogError("TriggerMenuParser")
1831  << "Too Many Eta Cuts for calo-condition (" << particle << ")" << std::endl;
1832  return false;
1833  }
1834  cntEta++;
1835 
1836  } break;
1837 
1838  case esCutType::Phi: {
1839  if (cntPhi == 0) {
1840  phiWindow1Lower = cut.getMinimum().index;
1841  phiWindow1Upper = cut.getMaximum().index;
1842  } else if (cntPhi == 1) {
1843  phiWindow2Lower = cut.getMinimum().index;
1844  phiWindow2Upper = cut.getMaximum().index;
1845  } else {
1846  edm::LogError("TriggerMenuParser")
1847  << "Too Many Phi Cuts for calo-condition (" << particle << ")" << std::endl;
1848  return false;
1849  }
1850  cntPhi++;
1851 
1852  } break;
1853 
1854  case esCutType::Charge: {
1855  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition (" << particle << ")" << std::endl;
1856  return false;
1857 
1858  } break;
1859  case esCutType::Quality: {
1860  qualityLUT = l1tstr2int(cut.getData());
1861 
1862  } break;
1863  case esCutType::Isolation: {
1864  isolationLUT = l1tstr2int(cut.getData());
1865 
1866  } break;
1867  default:
1868  break;
1869  } //end switch
1870 
1871  } //end loop over cuts
1872 
1873  // Fill the object parameters
1874  objParameter[0].etLowThreshold = lowerThresholdInd;
1875  objParameter[0].etHighThreshold = upperThresholdInd;
1876  objParameter[0].indexHigh = upperIndexInd;
1877  objParameter[0].indexLow = lowerIndexInd;
1878  objParameter[0].etaWindow1Lower = etaWindow1Lower;
1879  objParameter[0].etaWindow1Upper = etaWindow1Upper;
1880  objParameter[0].etaWindow2Lower = etaWindow2Lower;
1881  objParameter[0].etaWindow2Upper = etaWindow2Upper;
1882  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1883  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1884  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1885  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1886  objParameter[0].isolationLUT = isolationLUT;
1887  objParameter[0].qualityLUT = qualityLUT; //TO DO: Must add
1888 
1889  // Output for debugging
1890  LogDebug("TriggerMenuParser") << "\n Calo ET high threshold (hex) for calo object " << caloObjType << " "
1891  << " = " << std::hex << objParameter[0].etLowThreshold << " - "
1892  << objParameter[0].etHighThreshold << "\n etaWindow Lower / Upper for calo object "
1893  << " = 0x" << objParameter[0].etaWindow1Lower << " / 0x"
1894  << objParameter[0].etaWindow1Upper
1895  << "\n etaWindowVeto Lower / Upper for calo object "
1896  << " = 0x" << objParameter[0].etaWindow2Lower << " / 0x"
1897  << objParameter[0].etaWindow2Upper << "\n phiWindow Lower / Upper for calo object "
1898  << " = 0x" << objParameter[0].phiWindow1Lower << " / 0x"
1899  << objParameter[0].phiWindow1Upper
1900  << "\n phiWindowVeto Lower / Upper for calo object "
1901  << " = 0x" << objParameter[0].phiWindow2Lower << " / 0x"
1902  << objParameter[0].phiWindow2Upper << "\n Isolation LUT for calo object "
1903  << " = 0x" << objParameter[0].isolationLUT << "\n Quality LUT for calo object "
1904  << " = 0x" << objParameter[0].qualityLUT << std::dec << std::endl;
1905 
1906  // object types - all same caloObjType
1907  std::vector<GlobalObject> objType(nrObj, caloObjType);
1908 
1909  // now create a new calo condition
1910  CaloTemplate caloCond(name);
1911 
1912  caloCond.setCondType(cType);
1913  caloCond.setObjectType(objType);
1914 
1915  //BLW TO DO: This needs to be added to the object rather than the whole condition
1916  caloCond.setCondGEq(gEq);
1917  caloCond.setCondChipNr(chipNr);
1918 
1919  //BLW TO DO: This needs to be added to the object rather than the whole condition
1920  caloCond.setCondRelativeBx(relativeBx);
1921 
1922  caloCond.setConditionParameter(objParameter, corrParameter);
1923 
1924  if (edm::isDebugEnabled()) {
1925  std::ostringstream myCoutStream;
1926  caloCond.print(myCoutStream);
1927  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1928  }
1929 
1930  /*
1931  // insert condition into the map
1932  if ( !insertConditionIntoMap(caloCond, chipNr)) {
1933 
1934  edm::LogError("TriggerMenuParser")
1935  << " Error: duplicate condition (" << name << ")"
1936  << std::endl;
1937 
1938  return false;
1939  }
1940  else {
1941  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1942  }
1943 */
1944  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1945 
1946  //
1947  return true;
1948 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
#define LogTrace(id)
int l1tstr2int(const std::string data)
typedef for correlation parameters
Definition: CaloTemplate.h:78
void TriggerMenuParser::parseCondFormats ( const L1TUtmTriggerMenu utmMenu)

Definition at line 190 of file TriggerMenuParser.cc.

References ecalcalib_dqm_sourceclient-live_cfg::algo, HLT_2018_cff::Algorithm, goodZToMuMu_cfi::condition, KineDebug3::count(), HLT_2018_cff::DoubleMuon, cuy::ii, m_conditionMap, m_corCaloTemplate, m_corEnergySumTemplate, m_corMuonTemplate, m_gtScales, m_numberConditionChips, m_triggerMenuDate, m_triggerMenuDescription, m_triggerMenuImplementation, m_triggerMenuInterface, m_triggerMenuName, m_triggerMenuUUID, m_vecCaloTemplate, m_vecCorrelationTemplate, m_vecCorrelationWithOverlapRemovalTemplate, m_vecEnergySumTemplate, m_vecExternalTemplate, m_vecMuonTemplate, optionsL1T::menu, parseAlgorithm(), parseCalo(), parseCorrelation(), parseCorrelationWithOverlapRemoval(), parseEnergySum(), parseExternal(), parseMuon(), parseScales(), l1t::GlobalScales::setScalesName(), HLT_2018_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

Referenced by gtAlgorithmAliasMap(), and L1TGlobalProducer::produce().

190  {
191  // resize the vector of condition maps
192  // the number of condition chips should be correctly set before calling parseXmlFile
194 
199 
205 
206  using namespace tmeventsetup;
207  using namespace Algorithm;
208 
209  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*>(utmMenu);
210 
211  //get the meta data
212  m_triggerMenuDescription = menu->getComment();
213  m_triggerMenuDate = menu->getDatetime();
214  m_triggerMenuImplementation = (getMmHashN(menu->getFirmwareUuid()) & 0xFFFFFFFF); //make sure we only have 32 bits
215  m_triggerMenuName = menu->getName();
216  m_triggerMenuInterface = menu->getVersion(); //BLW: correct descriptor?
217  m_triggerMenuUUID = (getMmHashN(menu->getName()) & 0xFFFFFFFF); //make sure we only have 32 bits
218 
219  const std::map<std::string, esAlgorithm>& algoMap = menu->getAlgorithmMap();
220  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
221  const std::map<std::string, esScale>& scaleMap = menu->getScaleMap();
222 
223  // parse the scales
224  m_gtScales.setScalesName(menu->getScaleSetName());
225  parseScales(scaleMap);
226 
227  //loop over the algorithms
228  for (std::map<std::string, esAlgorithm>::const_iterator cit = algoMap.begin(); cit != algoMap.end(); cit++) {
229  //condition chip (artifact) TO DO: Update
230  int chipNr = 0;
231 
232  //get algorithm
233  const esAlgorithm& algo = cit->second;
234 
235  //parse the algorithm
236  parseAlgorithm(algo, chipNr); //blw
237 
238  //get conditions for this algorithm
239  const std::vector<std::string>& rpn_vec = algo.getRpnVector();
240  for (size_t ii = 0; ii < rpn_vec.size(); ii++) {
241  const std::string& token = rpn_vec.at(ii);
242  if (isGate(token))
243  continue;
244  // long hash = getHash(token);
245  const esCondition& condition = condMap.find(token)->second;
246 
247  //check to see if this condtion already exists
248  if ((m_conditionMap[chipNr]).count(condition.getName()) == 0) {
249  // parse Calo Conditions (EG, Jets, Taus)
250  if (condition.getType() == esConditionType::SingleEgamma ||
251  condition.getType() == esConditionType::DoubleEgamma ||
252  condition.getType() == esConditionType::TripleEgamma ||
253  condition.getType() == esConditionType::QuadEgamma || condition.getType() == esConditionType::SingleTau ||
254  condition.getType() == esConditionType::DoubleTau || condition.getType() == esConditionType::TripleTau ||
255  condition.getType() == esConditionType::QuadTau || condition.getType() == esConditionType::SingleJet ||
256  condition.getType() == esConditionType::DoubleJet || condition.getType() == esConditionType::TripleJet ||
257  condition.getType() == esConditionType::QuadJet) {
258  parseCalo(condition, chipNr, false);
259 
260  // parse Energy Sums
261  } else if (condition.getType() == esConditionType::TotalEt ||
262  condition.getType() == esConditionType::TotalEtEM ||
263  condition.getType() == esConditionType::TotalHt ||
264  condition.getType() == esConditionType::MissingEt ||
265  condition.getType() == esConditionType::MissingHt ||
266  condition.getType() == esConditionType::MissingEtHF ||
267  condition.getType() == esConditionType::TowerCount ||
268  condition.getType() == esConditionType::MinBiasHFP0 ||
269  condition.getType() == esConditionType::MinBiasHFM0 ||
270  condition.getType() == esConditionType::MinBiasHFP1 ||
271  condition.getType() == esConditionType::MinBiasHFM1 ||
272  condition.getType() == esConditionType::AsymmetryEt ||
273  condition.getType() == esConditionType::AsymmetryHt ||
274  condition.getType() == esConditionType::AsymmetryEtHF ||
275  condition.getType() == esConditionType::AsymmetryHtHF ||
276  condition.getType() == esConditionType::Centrality0 ||
277  condition.getType() == esConditionType::Centrality1 ||
278  condition.getType() == esConditionType::Centrality2 ||
279  condition.getType() == esConditionType::Centrality3 ||
280  condition.getType() == esConditionType::Centrality4 ||
281  condition.getType() == esConditionType::Centrality5 ||
282  condition.getType() == esConditionType::Centrality6 ||
283  condition.getType() == esConditionType::Centrality7) {
284  parseEnergySum(condition, chipNr, false);
285 
286  //parse Muons
287  } else if (condition.getType() == esConditionType::SingleMuon ||
288  condition.getType() == esConditionType::DoubleMuon ||
289  condition.getType() == esConditionType::TripleMuon ||
290  condition.getType() == esConditionType::QuadMuon) {
291  parseMuon(condition, chipNr, false);
292 
293  //parse Correlation Conditions
294  } else if (condition.getType() == esConditionType::MuonMuonCorrelation ||
295  condition.getType() == esConditionType::MuonEsumCorrelation ||
296  condition.getType() == esConditionType::CaloMuonCorrelation ||
297  condition.getType() == esConditionType::CaloCaloCorrelation ||
298  condition.getType() == esConditionType::CaloEsumCorrelation ||
299  condition.getType() == esConditionType::InvariantMass ||
300  condition.getType() == esConditionType::TransverseMass) {
301  parseCorrelation(condition, chipNr);
302 
303  //parse Externals
304  } else if (condition.getType() == esConditionType::Externals) {
305  parseExternal(condition, chipNr);
306 
307  } else if (condition.getType() == esConditionType::SingleEgammaOvRm ||
308  condition.getType() == esConditionType::DoubleEgammaOvRm ||
309  condition.getType() == esConditionType::TripleEgammaOvRm ||
310  condition.getType() == esConditionType::QuadEgammaOvRm ||
311  condition.getType() == esConditionType::SingleTauOvRm ||
312  condition.getType() == esConditionType::DoubleTauOvRm ||
313  condition.getType() == esConditionType::TripleTauOvRm ||
314  condition.getType() == esConditionType::QuadTauOvRm ||
315  condition.getType() == esConditionType::SingleJetOvRm ||
316  condition.getType() == esConditionType::DoubleJetOvRm ||
317  condition.getType() == esConditionType::TripleJetOvRm ||
318  condition.getType() == esConditionType::QuadJetOvRm) {
319  edm::LogError("TriggerMenuParser")
320  << std::endl
321  << "SingleEgammaOvRm" << std::endl
322  << "DoubleEgammaOvRm" << std::endl
323  << "TripleEgammaOvRm" << std::endl
324  << "QuadEgammaOvRm" << std::endl
325  << "SingleTauOvRm" << std::endl
326  << "DoubleTauOvRm" << std::endl
327  << "TripleTauOvRm" << std::endl
328  << "QuadTauOvRm" << std::endl
329  << "SingleJetOvRm" << std::endl
330  << "DoubleJetOvRm" << std::endl
331  << "TripleJetOvRm" << std::endl
332  << "QuadJetOvRm" << std::endl
333  << "The above conditions types OvRm are not implemented yet in the parser. Please remove alogrithms that "
334  "use this type of condtion from L1T Menu!"
335  << std::endl;
336 
337  }
338  //parse CorrelationWithOverlapRemoval
339  else if (condition.getType() == esConditionType::CaloCaloCorrelationOvRm ||
340  condition.getType() == esConditionType::InvariantMassOvRm ||
341  condition.getType() == esConditionType::TransverseMassOvRm) {
342  parseCorrelationWithOverlapRemoval(condition, chipNr);
343  }
344 
345  } //if condition is a new one
346  } //loop over conditions
347  } //loop over algorithms
348 
349  return;
350 }
unsigned int m_numberConditionChips
hardware limits
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
void setScalesName(const std::string &name)
Definition: GlobalScales.h:74
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
bool parseExternal(tmeventsetup::esCondition condExt, unsigned int chipNr=0)
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
std::string m_triggerMenuInterface
menu names
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::string m_triggerMenuDescription
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
ii
Definition: cuy.py:590
bool parseScales(std::map< std::string, tmeventsetup::esScale > scaleMap)
parse scales
bool parseEnergySum(tmeventsetup::esCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
parse an "energy sum" condition
unsigned long m_triggerMenuUUID
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
bool parseMuon(tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon condition
bool parseAlgorithm(tmeventsetup::esAlgorithm algorithm, unsigned int chipNr=0)
parse all algorithms
unsigned long m_triggerMenuImplementation
bool parseCorrelationWithOverlapRemoval(const tmeventsetup::esCondition &corrCond, unsigned int chipNr=0)
parse a correlation condition with overlap removal
bool parseCalo(tmeventsetup::esCondition condCalo, unsigned int chipNr=0, const bool corrFlag=false)
parse a calorimeter condition
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
bool parseCorrelation(tmeventsetup::esCondition corrCond, unsigned int chipNr=0)
parse a correlation condition
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
bool TriggerMenuParser::parseCorrelation ( tmeventsetup::esCondition  corrCond,
unsigned int  chipNr = 0 
)
private

parse a correlation condition

parseCorrelation Parse a correlation condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 2445 of file TriggerMenuParser.cc.

References CorrelationTemplate::CorrelationParameter::chargeCorrelation, l1t::CondCalo, l1t::CondEnergySum, goodZToMuMu_cfi::condition, l1t::CondMuon, CorrelationTemplate::CorrelationParameter::corrCutType, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, HLT_2018_cff::DeltaEta, HLT_2018_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, ETM, l1t::gtEG, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtJet, l1t::gtMu, l1t::gtTau, l1t::gtTowerCount, HTM, insertConditionIntoMap(), edm::isDebugEnabled(), L1TRate_cfi::Jet, findQualityFiles::jj, l1t2string(), LogDebug, LogTrace, m_corCaloTemplate, m_corEnergySumTemplate, m_corMuonTemplate, m_vecCorrelationTemplate, HLTSiStripMonitoring_cff::Mass, CorrelationTemplate::CorrelationParameter::maxDRCutValue, CorrelationTemplate::CorrelationParameter::maxEtaCutValue, CorrelationTemplate::CorrelationParameter::maxMassCutValue, CorrelationTemplate::CorrelationParameter::maxPhiCutValue, CorrelationTemplate::CorrelationParameter::maxTBPTCutValue, CorrelationTemplate::CorrelationParameter::minDRCutValue, CorrelationTemplate::CorrelationParameter::minEtaCutValue, CorrelationTemplate::CorrelationParameter::minMassCutValue, CorrelationTemplate::CorrelationParameter::minPhiCutValue, CorrelationTemplate::CorrelationParameter::minTBPTCutValue, dumpRecoGeometry_cfg::Muon, Skims_PA_cff::name, electrons_cff::objType, parseCaloCorr(), parseEnergySumCorr(), parseMuonCorr(), funct::pow(), CorrelationTemplate::CorrelationParameter::precDRCut, CorrelationTemplate::CorrelationParameter::precEtaCut, CorrelationTemplate::CorrelationParameter::precMassCut, CorrelationTemplate::CorrelationParameter::precPhiCut, CorrelationTemplate::CorrelationParameter::precTBPTCut, CorrelationTemplate::print(), CorrelationTemplate::setCond0Category(), CorrelationTemplate::setCond0Index(), CorrelationTemplate::setCond1Category(), CorrelationTemplate::setCond1Index(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondType(), CorrelationTemplate::setCorrelationParameter(), GlobalCondition::setObjectType(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, L1TRate_Offline_cfi::Tau, and l1t::Type2cor.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

2445  {
2446  using namespace tmeventsetup;
2447 
2448  std::string condition = "corr";
2449  std::string particle = "test-fix";
2450  std::string type = l1t2string(corrCond.getType());
2451  std::string name = l1t2string(corrCond.getName());
2452 
2453  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2454  << " (in parseCorrelation) " << std::endl
2455  << " condition = " << condition << std::endl
2456  << " particle = " << particle << std::endl
2457  << " type = " << type << std::endl
2458  << " name = " << name << std::endl;
2459 
2460  // create a new correlation condition
2461  CorrelationTemplate correlationCond(name);
2462 
2463  // check that the condition does not exist already in the map
2464  if (!insertConditionIntoMap(correlationCond, chipNr)) {
2465  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
2466 
2467  return false;
2468  }
2469 
2470  // Define some of the quantities to store the parased information
2471 
2472  // condition type BLW (Do we change this to the type of correlation condition?)
2474 
2475  // two objects (for sure)
2476  const int nrObj = 2;
2477 
2478  // object types and greater equal flag - filled in the loop
2479  int intGEq[nrObj] = {-1, -1};
2480  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
2481  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2482 
2483  // correlation flag and index in the cor*vector
2484  const bool corrFlag = true;
2485  int corrIndexVal[nrObj] = {-1, -1};
2486 
2487  // Storage of the correlation selection
2489  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2490 
2491  // Get the correlation Cuts on the legs
2492  int cutType = 0;
2493  const std::vector<esCut>& cuts = corrCond.getCuts();
2494  for (size_t jj = 0; jj < cuts.size(); jj++) {
2495  const esCut cut = cuts.at(jj);
2496 
2497  if (cut.getCutType() == esCutType::ChargeCorrelation) {
2498  if (cut.getData() == "ls")
2499  corrParameter.chargeCorrelation = 2;
2500  else if (cut.getData() == "os")
2501  corrParameter.chargeCorrelation = 4;
2502  else
2503  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2504  } else {
2505  //
2506  // Unitl utm has method to calculate these, do the integer value calculation with precision.
2507  //
2508  double minV = cut.getMinimum().value;
2509  double maxV = cut.getMaximum().value;
2510 
2511  //Scale down very large numbers out of xml
2512  if (maxV > 1.0e8)
2513  maxV = 1.0e8;
2514 
2515  if (cut.getCutType() == esCutType::DeltaEta) {
2516  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaEta Cut minV = " << minV
2517  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2518  << " precMax = " << cut.getMaximum().index << std::endl;
2519  corrParameter.minEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2520  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2521  corrParameter.precEtaCut = cut.getMinimum().index;
2522  cutType = cutType | 0x1;
2523  } else if (cut.getCutType() == esCutType::DeltaPhi) {
2524  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaPhi Cut minV = " << minV
2525  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2526  << " precMax = " << cut.getMaximum().index << std::endl;
2527  corrParameter.minPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2528  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2529  corrParameter.precPhiCut = cut.getMinimum().index;
2530  cutType = cutType | 0x2;
2531  } else if (cut.getCutType() == esCutType::DeltaR) {
2532  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaR Cut minV = " << minV
2533  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2534  << " precMax = " << cut.getMaximum().index << std::endl;
2535  corrParameter.minDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2536  corrParameter.maxDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2537  corrParameter.precDRCut = cut.getMinimum().index;
2538  cutType = cutType | 0x4;
2539  } else if (cut.getCutType() == esCutType::TwoBodyPt) {
2540  corrParameter.minTBPTCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2541  corrParameter.maxTBPTCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2542  corrParameter.precTBPTCut = cut.getMinimum().index;
2543  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tTPBT Cut minV = " << minV
2544  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2545  << " precMax = " << cut.getMaximum().index << std::endl;
2546  cutType = cutType | 0x20;
2547  } else if (cut.getCutType() == esCutType::Mass) {
2548  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV
2549  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2550  << " precMax = " << cut.getMaximum().index << std::endl;
2551  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2552  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2553  corrParameter.precMassCut = cut.getMinimum().index;
2554  // cutType = cutType | 0x8;
2555  if (corrCond.getType() == esConditionType::TransverseMass) {
2556  cutType = cutType | 0x10;
2557  //std::cout << "CCLA running Transverse mass cutType= " << cutType << std::endl;
2558  } else {
2559  cutType = cutType | 0x8;
2560  //std::cout << "CCLA running Invarient mass cutType= " << cutType << std::endl;
2561  }
2562  }
2563  }
2564  }
2565  corrParameter.corrCutType = cutType;
2566 
2567  // Get the two objects that form the legs
2568  const std::vector<esObject>& objects = corrCond.getObjects();
2569  if (objects.size() != 2) {
2570  edm::LogError("TriggerMenuParser") << "incorrect number of objects for the correlation condition " << name
2571  << " corrFlag " << corrFlag << std::endl;
2572  return false;
2573  }
2574 
2575  // loop over legs
2576  for (size_t jj = 0; jj < objects.size(); jj++) {
2577  const esObject object = objects.at(jj);
2578  //std::cout << " obj name = " << object.getName() << "\n";
2579  //std::cout << " obj type = " << object.getType() << "\n";
2580  //std::cout << " obj op = " << object.getComparisonOperator() << "\n";
2581  //std::cout << " obj bx = " << object.getBxOffset() << "\n";
2582 
2583  // check the leg type
2584  if (object.getType() == esObjectType::Muon) {
2585  // we have a muon
2586 
2587  /*
2588  //BLW Hold on to this code we may need to go back to it at some point.
2589  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
2590  // This is potentially a place to slim down the code. Note: We currently evaluate the
2591  // conditions every time, so even if we put the condition in the vector once, we would
2592  // still evaluate it multiple times. This is a place for optimization.
2593  {
2594 
2595  parseMuonCorr(&object,chipNr);
2596  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2597 
2598  } else {
2599  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
2600  bool found = false;
2601  int index = 0;
2602  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
2603  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
2604  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
2605  found = true;
2606  } else {
2607  index++;
2608  }
2609  }
2610  if(found) {
2611  corrIndexVal[jj] = index;
2612  } else {
2613  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
2614  }
2615 
2616  }
2617 */
2618  parseMuonCorr(&object, chipNr);
2619  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2620 
2621  //Now set some flags for this subCondition
2622  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2623  objType[jj] = gtMu;
2624  condCateg[jj] = CondMuon;
2625 
2626  } else if (object.getType() == esObjectType::Egamma || object.getType() == esObjectType::Jet ||
2627  object.getType() == esObjectType::Tau) {
2628  // we have an Calo object
2629  parseCaloCorr(&object, chipNr);
2630  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
2631 
2632  //Now set some flags for this subCondition
2633  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2634  switch (object.getType()) {
2635  case esObjectType::Egamma: {
2636  objType[jj] = gtEG;
2637  } break;
2638  case esObjectType::Jet: {
2639  objType[jj] = gtJet;
2640  } break;
2641  case esObjectType::Tau: {
2642  objType[jj] = gtTau;
2643  } break;
2644  default: {
2645  } break;
2646  }
2647  condCateg[jj] = CondCalo;
2648 
2649  } else if (object.getType() == esObjectType::ETM || object.getType() == esObjectType::ETMHF ||
2650  object.getType() == esObjectType::TOWERCOUNT || object.getType() == esObjectType::HTM) {
2651  // we have Energy Sum
2652  parseEnergySumCorr(&object, chipNr);
2653  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
2654 
2655  //Now set some flags for this subCondition
2656  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2657  switch (object.getType()) {
2658  case esObjectType::ETM: {
2660  } break;
2661  case esObjectType::HTM: {
2663  } break;
2664  case esObjectType::ETMHF: {
2666  } break;
2667  case esObjectType::TOWERCOUNT: {
2669  } break;
2670  default: {
2671  } break;
2672  }
2673  condCateg[jj] = CondEnergySum;
2674 
2675  } else {
2676  edm::LogError("TriggerMenuParser") << "Illegal Object Type " << object.getType()
2677  << " for the correlation condition " << name << std::endl;
2678  return false;
2679 
2680  } //if block on leg types
2681 
2682  } //loop over legs
2683 
2684  // get greater equal flag for the correlation condition
2685  bool gEq = true;
2686  if (intGEq[0] != intGEq[1]) {
2687  edm::LogError("TriggerMenuParser") << "Inconsistent GEq flags for sub-conditions "
2688  << " for the correlation condition " << name << std::endl;
2689  return false;
2690 
2691  } else {
2692  gEq = (intGEq[0] != 0);
2693  }
2694 
2695  // fill the correlation condition
2696  correlationCond.setCondType(cType);
2697  correlationCond.setObjectType(objType);
2698  correlationCond.setCondGEq(gEq);
2699  correlationCond.setCondChipNr(chipNr);
2700 
2701  correlationCond.setCond0Category(condCateg[0]);
2702  correlationCond.setCond1Category(condCateg[1]);
2703 
2704  correlationCond.setCond0Index(corrIndexVal[0]);
2705  correlationCond.setCond1Index(corrIndexVal[1]);
2706 
2707  correlationCond.setCorrelationParameter(corrParameter);
2708 
2709  if (edm::isDebugEnabled()) {
2710  std::ostringstream myCoutStream;
2711  correlationCond.print(myCoutStream);
2712  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2713  }
2714 
2715  // insert condition into the map
2716  // condition is not duplicate, check was done at the beginning
2717 
2718  (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond);
2719 
2720  //
2721  return true;
2722 }
#define LogDebug(id)
size
Write out results.
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
Definition: L1GtObject.h:38
Definition: L1GtObject.h:35
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
typedef for correlation parameters
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
bool TriggerMenuParser::parseCorrelationWithOverlapRemoval ( const tmeventsetup::esCondition &  corrCond,
unsigned int  chipNr = 0 
)
private

parse a correlation condition with overlap removal

parseCorrelationWithOverlapRemoval Parse a correlation condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 2736 of file TriggerMenuParser.cc.

References CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::chargeCorrelation, l1t::CondCalo, l1t::CondEnergySum, goodZToMuMu_cfi::condition, l1t::CondMuon, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::corrCutType, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, HLT_2018_cff::DeltaEta, HLT_2018_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, ETM, l1t::gtEG, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtJet, l1t::gtMu, l1t::gtTau, l1t::gtTowerCount, HTM, insertConditionIntoMap(), edm::isDebugEnabled(), L1TRate_cfi::Jet, findQualityFiles::jj, l1t2string(), LogDebug, LogTrace, m_corCaloTemplate, m_corEnergySumTemplate, m_corMuonTemplate, m_vecCorrelationWithOverlapRemovalTemplate, HLTSiStripMonitoring_cff::Mass, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxDRCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxEtaCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxMassCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxOverlapRemovalDRCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxOverlapRemovalEtaCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxOverlapRemovalPhiCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::maxPhiCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minDRCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minEtaCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minMassCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minOverlapRemovalDRCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minOverlapRemovalEtaCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minOverlapRemovalPhiCutValue, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::minPhiCutValue, dumpRecoGeometry_cfg::Muon, Skims_PA_cff::name, electrons_cff::objType, parseCaloCorr(), parseEnergySumCorr(), parseMuonCorr(), funct::pow(), CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precDRCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precEtaCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precMassCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalDRCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalEtaCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalPhiCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precPhiCut, CorrelationWithOverlapRemovalTemplate::print(), CorrelationWithOverlapRemovalTemplate::setCond0Category(), CorrelationWithOverlapRemovalTemplate::setCond0Index(), CorrelationWithOverlapRemovalTemplate::setCond1Category(), CorrelationWithOverlapRemovalTemplate::setCond1Index(), CorrelationWithOverlapRemovalTemplate::setCond2Category(), CorrelationWithOverlapRemovalTemplate::setCond2Index(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondType(), CorrelationWithOverlapRemovalTemplate::setCorrelationWithOverlapRemovalParameter(), GlobalCondition::setObjectType(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, L1TRate_Offline_cfi::Tau, and l1t::Type2corWithOverlapRemoval.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

2737  {
2738  using namespace tmeventsetup;
2739 
2740  std::string condition = "corrWithOverlapRemoval";
2741  std::string particle = "test-fix";
2742  std::string type = l1t2string(corrCond.getType());
2743  std::string name = l1t2string(corrCond.getName());
2744 
2745  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2746  << " (in parseCorrelationWithOverlapRemoval) " << std::endl
2747  << " condition = " << condition << std::endl
2748  << " particle = " << particle << std::endl
2749  << " type = " << type << std::endl
2750  << " name = " << name << std::endl;
2751 
2752  // create a new correlation condition
2753  CorrelationWithOverlapRemovalTemplate correlationWORCond(name);
2754 
2755  // check that the condition does not exist already in the map
2756  if (!insertConditionIntoMap(correlationWORCond, chipNr)) {
2757  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
2758 
2759  return false;
2760  }
2761 
2762  // Define some of the quantities to store the parased information
2763 
2764  // condition type BLW (Do we change this to the type of correlation condition?)
2766 
2767  // three objects (for sure)
2768  const int nrObj = 3;
2769 
2770  // object types and greater equal flag - filled in the loop
2771  int intGEq[nrObj] = {-1, -1, -1};
2772  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
2773  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2774 
2775  // correlation flag and index in the cor*vector
2776  const bool corrFlag = true;
2777  int corrIndexVal[nrObj] = {-1, -1, -1};
2778 
2779  // Storage of the correlation selection
2781  corrParameter.chargeCorrelation = 1; //ignore charge correlation for corr-legs
2782 
2783  // Get the correlation Cuts on the legs
2784  int cutType = 0;
2785  const std::vector<esCut>& cuts = corrCond.getCuts();
2786  for (size_t jj = 0; jj < cuts.size(); jj++) {
2787  const esCut cut = cuts.at(jj);
2788 
2789  if (cut.getCutType() == esCutType::ChargeCorrelation) {
2790  if (cut.getData() == "ls")
2791  corrParameter.chargeCorrelation = 2;
2792  else if (cut.getData() == "os")
2793  corrParameter.chargeCorrelation = 4;
2794  else
2795  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2796  } else {
2797  //
2798  // Unitl utm has method to calculate these, do the integer value calculation with precision.
2799  //
2800  double minV = cut.getMinimum().value;
2801  double maxV = cut.getMaximum().value;
2802 
2803  //Scale down very large numbers out of xml
2804  if (maxV > 1.0e8)
2805  maxV = 1.0e8;
2806 
2807  if (cut.getCutType() == esCutType::DeltaEta) {
2808  //std::cout << "DeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2809  corrParameter.minEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2810  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2811  corrParameter.precEtaCut = cut.getMinimum().index;
2812  cutType = cutType | 0x1;
2813  } else if (cut.getCutType() == esCutType::DeltaPhi) {
2814  //std::cout << "DeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2815  corrParameter.minPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2816  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2817  corrParameter.precPhiCut = cut.getMinimum().index;
2818  cutType = cutType | 0x2;
2819  } else if (cut.getCutType() == esCutType::DeltaR) {
2820  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2821  corrParameter.minDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2822  corrParameter.maxDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2823  corrParameter.precDRCut = cut.getMinimum().index;
2824  cutType = cutType | 0x4;
2825  } else if (cut.getCutType() == esCutType::Mass) {
2826  //std::cout << "Mass Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2827  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2828  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2829  corrParameter.precMassCut = cut.getMinimum().index;
2830  cutType = cutType | 0x8;
2831  }
2832  if (cut.getCutType() == esCutType::OvRmDeltaEta) {
2833  //std::cout << "OverlapRemovalDeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2834  corrParameter.minOverlapRemovalEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2835  corrParameter.maxOverlapRemovalEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2836  corrParameter.precOverlapRemovalEtaCut = cut.getMinimum().index;
2837  cutType = cutType | 0x10;
2838  } else if (cut.getCutType() == esCutType::OvRmDeltaPhi) {
2839  //std::cout << "OverlapRemovalDeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2840  corrParameter.minOverlapRemovalPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2841  corrParameter.maxOverlapRemovalPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2842  corrParameter.precOverlapRemovalPhiCut = cut.getMinimum().index;
2843  cutType = cutType | 0x20;
2844  } else if (cut.getCutType() == esCutType::OvRmDeltaR) {
2845  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2846  corrParameter.minOverlapRemovalDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2847  corrParameter.maxOverlapRemovalDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2848  corrParameter.precOverlapRemovalDRCut = cut.getMinimum().index;
2849  cutType = cutType | 0x40;
2850  }
2851  }
2852  }
2853  corrParameter.corrCutType = cutType;
2854 
2855  // Get the two objects that form the legs
2856  const std::vector<esObject>& objects = corrCond.getObjects();
2857  if (objects.size() != 3) {
2858  edm::LogError("TriggerMenuParser")
2859  << "incorrect number of objects for the correlation condition with overlap removal " << name << " corrFlag "
2860  << corrFlag << std::endl;
2861  return false;
2862  }
2863 
2864  // loop over legs
2865  for (size_t jj = 0; jj < objects.size(); jj++) {
2866  const esObject& object = objects.at(jj);
2867  //std::cout << " obj name = " << object.getName() << "\n";
2868  //std::cout << " obj type = " << object.getType() << "\n";
2869  //std::cout << " obj op = " << object.getComparisonOperator() << "\n";
2870  //std::cout << " obj bx = " << object.getBxOffset() << "\n";
2871  //std::cout << "type = done" << std::endl;
2872 
2873  // check the leg type
2874  if (object.getType() == esObjectType::Muon) {
2875  // we have a muon
2876 
2877  /*
2878  //BLW Hold on to this code we may need to go back to it at some point.
2879  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
2880  // This is potentially a place to slim down the code. Note: We currently evaluate the
2881  // conditions every time, so even if we put the condition in the vector once, we would
2882  // still evaluate it multiple times. This is a place for optimization.
2883  {
2884 
2885  parseMuonCorr(&object,chipNr);
2886  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2887 
2888  } else {
2889  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
2890  bool found = false;
2891  int index = 0;
2892  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
2893  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
2894  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
2895  found = true;
2896  } else {
2897  index++;
2898  }
2899  }
2900  if(found) {
2901  corrIndexVal[jj] = index;
2902  } else {
2903  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
2904  }
2905 
2906  }
2907 */
2908  parseMuonCorr(&object, chipNr);
2909  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2910 
2911  //Now set some flags for this subCondition
2912  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2913  objType[jj] = gtMu;
2914  condCateg[jj] = CondMuon;
2915 
2916  } else if (object.getType() == esObjectType::Egamma || object.getType() == esObjectType::Jet ||
2917  object.getType() == esObjectType::Tau) {
2918  // we have an Calo object
2919  parseCaloCorr(&object, chipNr);
2920  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
2921 
2922  //Now set some flags for this subCondition
2923  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2924  switch (object.getType()) {
2925  case esObjectType::Egamma: {
2926  objType[jj] = gtEG;
2927  } break;
2928  case esObjectType::Jet: {
2929  objType[jj] = gtJet;
2930  } break;
2931  case esObjectType::Tau: {
2932  objType[jj] = gtTau;
2933  } break;
2934  default: {
2935  } break;
2936  }
2937  condCateg[jj] = CondCalo;
2938 
2939  } else if (object.getType() == esObjectType::ETM || object.getType() == esObjectType::ETMHF ||
2940  object.getType() == esObjectType::TOWERCOUNT || object.getType() == esObjectType::HTM) {
2941  // we have Energy Sum
2942  parseEnergySumCorr(&object, chipNr);
2943  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
2944 
2945  //Now set some flags for this subCondition
2946  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2947  switch (object.getType()) {
2948  case esObjectType::ETM: {
2950  } break;
2951  case esObjectType::HTM: {
2953  } break;
2954  case esObjectType::ETMHF: {
2956  } break;
2957  case esObjectType::TOWERCOUNT: {
2959  } break;
2960  default: {
2961  } break;
2962  }
2963  condCateg[jj] = CondEnergySum;
2964 
2965  } else {
2966  edm::LogError("TriggerMenuParser") << "Illegal Object Type " << object.getType()
2967  << " for the correlation condition " << name << std::endl;
2968  return false;
2969 
2970  } //if block on leg types
2971 
2972  } //loop over legs
2973 
2974  // get greater equal flag for the correlation condition
2975  bool gEq = true;
2976  if (intGEq[0] != intGEq[1]) {
2977  edm::LogError("TriggerMenuParser") << "Inconsistent GEq flags for sub-conditions "
2978  << " for the correlation condition " << name << std::endl;
2979  return false;
2980 
2981  } else {
2982  gEq = (intGEq[0] != 0);
2983  }
2984 
2985  // fill the correlation condition
2986  correlationWORCond.setCondType(cType);
2987  correlationWORCond.setObjectType(objType);
2988  correlationWORCond.setCondGEq(gEq);
2989  correlationWORCond.setCondChipNr(chipNr);
2990 
2991  correlationWORCond.setCond0Category(condCateg[0]);
2992  correlationWORCond.setCond1Category(condCateg[1]);
2993  correlationWORCond.setCond2Category(condCateg[2]);
2994 
2995  correlationWORCond.setCond0Index(corrIndexVal[0]);
2996  correlationWORCond.setCond1Index(corrIndexVal[1]);
2997  correlationWORCond.setCond2Index(corrIndexVal[2]);
2998 
2999  correlationWORCond.setCorrelationWithOverlapRemovalParameter(corrParameter);
3000 
3001  if (edm::isDebugEnabled()) {
3002  std::ostringstream myCoutStream;
3003  correlationWORCond.print(myCoutStream);
3004  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3005  }
3006 
3007  // insert condition into the map
3008  // condition is not duplicate, check was done at the beginning
3009 
3010  (m_vecCorrelationWithOverlapRemovalTemplate[chipNr]).push_back(correlationWORCond);
3011 
3012  //
3013  return true;
3014 }
#define LogDebug(id)
size
Write out results.
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
Definition: L1GtObject.h:38
Definition: L1GtObject.h:35
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
void TriggerMenuParser::parseDeltaEta_Cosh_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2,
unsigned int  prec1,
unsigned int  prec2 
)
private

Definition at line 853 of file TriggerMenuParser.cc.

References m_gtScales, dqmiodumpmetadata::n, l1t::GlobalScales::setLUT_Cosh(), l1t::GlobalScales::setLUT_DeltaEta(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseScales().

857  {
858  using namespace tmeventsetup;
859 
860  // First Delta Eta for this set
861  std::string scLabel1 = obj1;
862  scLabel1 += "-ETA";
863  std::string scLabel2 = obj2;
864  scLabel2 += "-ETA";
865 
866  //This LUT does not exist in L1 Menu file, don't fill it
867  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
868  return;
869 
870  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
871  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
872  std::vector<double> val_delta_eta;
873  std::vector<long long> lut_delta_eta;
874  size_t n = getDeltaVector(val_delta_eta, scale1, scale2);
875  setLut(lut_delta_eta, val_delta_eta, prec1);
876  std::string lutName = obj1;
877  lutName += "-";
878  lutName += obj2;
879  m_gtScales.setLUT_DeltaEta(lutName, lut_delta_eta, prec1);
880 
881  // Second Get the Cosh for this delta Eta Set
882  std::vector<long long> lut_cosh;
883  applyCosh(val_delta_eta, n);
884  setLut(lut_cosh, val_delta_eta, prec2);
885  m_gtScales.setLUT_Cosh(lutName, lut_cosh, prec2);
886 }
virtual void setLUT_DeltaEta(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:55
virtual void setLUT_Cosh(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
void TriggerMenuParser::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 
)
private

Definition at line 888 of file TriggerMenuParser.cc.

References m_gtScales, dqmiodumpmetadata::n, l1t::GlobalScales::setLUT_Cos(), l1t::GlobalScales::setLUT_DeltaPhi(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseScales().

892  {
893  using namespace tmeventsetup;
894 
895  // First Delta phi for this set
896  std::string scLabel1 = obj1;
897  scLabel1 += "-PHI";
898  std::string scLabel2 = obj2;
899  scLabel2 += "-PHI";
900 
901  //This LUT does not exist in L1 Menu file, don't fill it
902  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
903  return;
904 
905  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
906  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
907  std::vector<double> val_delta_phi;
908  std::vector<long long> lut_delta_phi;
909  size_t n = getDeltaVector(val_delta_phi, scale1, scale2);
910  setLut(lut_delta_phi, val_delta_phi, prec1);
911  std::string lutName = obj1;
912  lutName += "-";
913  lutName += obj2;
914  m_gtScales.setLUT_DeltaPhi(lutName, lut_delta_phi, prec1);
915 
916  // Second Get the Cosh for this delta phi Set
917  std::vector<long long> lut_cos;
918  applyCos(val_delta_phi, n);
919  setLut(lut_cos, val_delta_phi, prec2);
920  m_gtScales.setLUT_Cos(lutName, lut_cos, prec2);
921 }
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
virtual void setLUT_DeltaPhi(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:71
bool TriggerMenuParser::parseEnergySum ( tmeventsetup::esCondition  condEnergySum,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse an "energy sum" condition

parseEnergySum Parse an "energy sum" condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 1961 of file TriggerMenuParser.cc.

References goodZToMuMu_cfi::condition, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, TauDecayModes::dec, l1t::gtAsymmetryEt, l1t::gtAsymmetryEtHF, l1t::gtAsymmetryHt, l1t::gtAsymmetryHtHF, l1t::gtCentrality0, l1t::gtCentrality1, l1t::gtCentrality2, l1t::gtCentrality3, l1t::gtCentrality4, l1t::gtCentrality5, l1t::gtCentrality6, l1t::gtCentrality7, l1t::gtETM, l1t::gtETMHF, l1t::gtETT, l1t::gtETTem, l1t::gtHTM, l1t::gtHTT, l1t::gtMinBiasHFM0, l1t::gtMinBiasHFM1, l1t::gtMinBiasHFP0, l1t::gtMinBiasHFP1, l1t::gtTowerCount, insertConditionIntoMap(), edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), LogDebug, LogTrace, m_corEnergySumTemplate, m_vecEnergySumTemplate, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, EnergySumTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2018_cff::Threshold, l1t::TypeAsymEt, l1t::TypeAsymEtHF, l1t::TypeAsymHt, l1t::TypeAsymHtHF, l1t::TypeCent0, l1t::TypeCent1, l1t::TypeCent2, l1t::TypeCent3, l1t::TypeCent4, l1t::TypeCent5, l1t::TypeCent6, l1t::TypeCent7, l1t::TypeETM, l1t::TypeETMHF, l1t::TypeETT, l1t::TypeETTem, l1t::TypeHTM, l1t::TypeHTT, l1t::TypeMinBiasHFM0, l1t::TypeMinBiasHFM1, l1t::TypeMinBiasHFP0, l1t::TypeMinBiasHFP1, and l1t::TypeTowerCount.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

1963  {
1964  // XERCES_CPP_NAMESPACE_USE
1965  using namespace tmeventsetup;
1966 
1967  // get condition, particle name and type name
1968 
1969  std::string condition = "calo";
1970  std::string type = l1t2string(condEnergySum.getType());
1971  std::string name = l1t2string(condEnergySum.getName());
1972 
1973  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1974  << "\n (in parseEnergySum) "
1975  << "\n condition = " << condition << "\n type = " << type
1976  << "\n name = " << name << std::endl;
1977 
1978  // determine object type type
1979  GlobalObject energySumObjType;
1980  GtConditionType cType;
1981 
1982  if (condEnergySum.getType() == esConditionType::MissingEt) {
1983  energySumObjType = GlobalObject::gtETM;
1984  cType = TypeETM;
1985  } else if (condEnergySum.getType() == esConditionType::TotalEt) {
1986  energySumObjType = GlobalObject::gtETT;
1987  cType = TypeETT;
1988  } else if (condEnergySum.getType() == esConditionType::TotalEtEM) {
1989  energySumObjType = GlobalObject::gtETTem;
1990  cType = TypeETTem;
1991  } else if (condEnergySum.getType() == esConditionType::TotalHt) {
1992  energySumObjType = GlobalObject::gtHTT;
1993  cType = TypeHTT;
1994  } else if (condEnergySum.getType() == esConditionType::MissingHt) {
1995  energySumObjType = GlobalObject::gtHTM;
1996  cType = TypeHTM;
1997  } else if (condEnergySum.getType() == esConditionType::MissingEtHF) {
1998  energySumObjType = GlobalObject::gtETMHF;
1999  cType = TypeETMHF;
2000  } else if (condEnergySum.getType() == esConditionType::TowerCount) {
2001  energySumObjType = GlobalObject::gtTowerCount;
2002  cType = TypeTowerCount;
2003  } else if (condEnergySum.getType() == esConditionType::MinBiasHFP0) {
2004  energySumObjType = GlobalObject::gtMinBiasHFP0;
2005  cType = TypeMinBiasHFP0;
2006  } else if (condEnergySum.getType() == esConditionType::MinBiasHFM0) {
2007  energySumObjType = GlobalObject::gtMinBiasHFM0;
2008  cType = TypeMinBiasHFM0;
2009  } else if (condEnergySum.getType() == esConditionType::MinBiasHFP1) {
2010  energySumObjType = GlobalObject::gtMinBiasHFP1;
2011  cType = TypeMinBiasHFP1;
2012  } else if (condEnergySum.getType() == esConditionType::MinBiasHFM1) {
2013  energySumObjType = GlobalObject::gtMinBiasHFM1;
2014  cType = TypeMinBiasHFM1;
2015  } else if (condEnergySum.getType() == esConditionType::AsymmetryEt) {
2016  energySumObjType = GlobalObject::gtAsymmetryEt;
2017  cType = TypeAsymEt;
2018  } else if (condEnergySum.getType() == esConditionType::AsymmetryHt) {
2019  energySumObjType = GlobalObject::gtAsymmetryHt;
2020  cType = TypeAsymHt;
2021  } else if (condEnergySum.getType() == esConditionType::AsymmetryEtHF) {
2022  energySumObjType = GlobalObject::gtAsymmetryEtHF;
2023  cType = TypeAsymEtHF;
2024  } else if (condEnergySum.getType() == esConditionType::AsymmetryHtHF) {
2025  energySumObjType = GlobalObject::gtAsymmetryHtHF;
2026  cType = TypeAsymHtHF;
2027  } else if (condEnergySum.getType() == esConditionType::Centrality0) {
2028  energySumObjType = GlobalObject::gtCentrality0;
2029  cType = TypeCent0;
2030  } else if (condEnergySum.getType() == esConditionType::Centrality1) {
2031  energySumObjType = GlobalObject::gtCentrality1;
2032  cType = TypeCent1;
2033  } else if (condEnergySum.getType() == esConditionType::Centrality2) {
2034  energySumObjType = GlobalObject::gtCentrality2;
2035  cType = TypeCent2;
2036  } else if (condEnergySum.getType() == esConditionType::Centrality3) {
2037  energySumObjType = GlobalObject::gtCentrality3;
2038  cType = TypeCent3;
2039  } else if (condEnergySum.getType() == esConditionType::Centrality4) {
2040  energySumObjType = GlobalObject::gtCentrality4;
2041  cType = TypeCent4;
2042  } else if (condEnergySum.getType() == esConditionType::Centrality5) {
2043  energySumObjType = GlobalObject::gtCentrality5;
2044  cType = TypeCent5;
2045  } else if (condEnergySum.getType() == esConditionType::Centrality6) {
2046  energySumObjType = GlobalObject::gtCentrality6;
2047  cType = TypeCent6;
2048  } else if (condEnergySum.getType() == esConditionType::Centrality7) {
2049  energySumObjType = GlobalObject::gtCentrality7;
2050  cType = TypeCent7;
2051  } else {
2052  edm::LogError("TriggerMenuParser") << "Wrong type for energy-sum condition (" << type << ")" << std::endl;
2053  return false;
2054  }
2055 
2056  // global object
2057  int nrObj = 1;
2058 
2059  // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2060 
2061  // get values
2062 
2063  // temporary storage of the parameters
2064  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2065 
2066  int cnt = 0;
2067 
2068  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2069  int relativeBx = 0;
2070  bool gEq = false;
2071 
2072  // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2073 
2074  // Loop over objects and extract the cuts on the objects
2075  const std::vector<esObject>& objects = condEnergySum.getObjects();
2076  for (size_t jj = 0; jj < objects.size(); jj++) {
2077  const esObject object = objects.at(jj);
2078  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
2079 
2080  // BLW TO DO: This needs to be added to the Object Parameters
2081  relativeBx = object.getBxOffset();
2082 
2083  // Loop over the cuts for this object
2084  int lowerThresholdInd = 0;
2085  int upperThresholdInd = -1;
2086  int cntPhi = 0;
2087  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2088 
2089  const std::vector<esCut>& cuts = object.getCuts();
2090  for (size_t kk = 0; kk < cuts.size(); kk++) {
2091  const esCut cut = cuts.at(kk);
2092 
2093  switch (cut.getCutType()) {
2094  case esCutType::Threshold:
2095  lowerThresholdInd = cut.getMinimum().index;
2096  upperThresholdInd = cut.getMaximum().index;
2097  break;
2098 
2099  case esCutType::Eta:
2100  break;
2101 
2102  case esCutType::Phi: {
2103  if (cntPhi == 0) {
2104  phiWindow1Lower = cut.getMinimum().index;
2105  phiWindow1Upper = cut.getMaximum().index;
2106  } else if (cntPhi == 1) {
2107  phiWindow2Lower = cut.getMinimum().index;
2108  phiWindow2Upper = cut.getMaximum().index;
2109  } else {
2110  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition (" << type << ")" << std::endl;
2111  return false;
2112  }
2113  cntPhi++;
2114 
2115  } break;
2116 
2117  case esCutType::Count:
2118  lowerThresholdInd = cut.getMinimum().index;
2119  upperThresholdInd = 0xffffff;
2120  break;
2121 
2122  default:
2123  break;
2124  } //end switch
2125 
2126  } //end loop over cuts
2127 
2128  // Fill the object parameters
2129  objParameter[cnt].etLowThreshold = lowerThresholdInd;
2130  objParameter[cnt].etHighThreshold = upperThresholdInd;
2131  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
2132  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
2133  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
2134  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
2135 
2136  // Output for debugging
2137  LogDebug("TriggerMenuParser") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2138  << std::hex << objParameter[cnt].etLowThreshold << " - "
2139  << objParameter[cnt].etHighThreshold
2140  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2141  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
2142  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2143  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
2144  << std::dec << std::endl;
2145 
2146  cnt++;
2147  } //end loop over objects
2148 
2149  // object types - all same energySumObjType
2150  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2151 
2152  // now create a new energySum condition
2153 
2154  EnergySumTemplate energySumCond(name);
2155 
2156  energySumCond.setCondType(cType);
2157  energySumCond.setObjectType(objType);
2158  energySumCond.setCondGEq(gEq);
2159  energySumCond.setCondChipNr(chipNr);
2160  energySumCond.setCondRelativeBx(relativeBx);
2161 
2162  energySumCond.setConditionParameter(objParameter);
2163 
2164  if (edm::isDebugEnabled()) {
2165  std::ostringstream myCoutStream;
2166  energySumCond.print(myCoutStream);
2167  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2168  }
2169 
2170  // insert condition into the map
2171  if (!insertConditionIntoMap(energySumCond, chipNr)) {
2172  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2173 
2174  return false;
2175  } else {
2176  if (corrFlag) {
2177  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2178 
2179  } else {
2180  (m_vecEnergySumTemplate[chipNr]).push_back(energySumCond);
2181  }
2182  }
2183 
2184  //
2185  return true;
2186 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
bool TriggerMenuParser::parseEnergySumCorr ( const tmeventsetup::esObject *  corrESum,
unsigned int  chipNr = 0 
)
private

parseEnergySum Parse an "energy sum" condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 2199 of file TriggerMenuParser.cc.

References goodZToMuMu_cfi::condition, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, TauDecayModes::dec, ETM, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtTowerCount, HTM, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), LogDebug, LogTrace, m_corEnergySumTemplate, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, EnergySumTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2018_cff::Threshold, l1t::TypeETM, l1t::TypeETMHF, l1t::TypeHTM, and l1t::TypeTowerCount.

Referenced by gtAlgorithmImplementation(), parseCorrelation(), and parseCorrelationWithOverlapRemoval().

2199  {
2200  // XERCES_CPP_NAMESPACE_USE
2201  using namespace tmeventsetup;
2202 
2203  // get condition, particle name and type name
2204 
2205  std::string condition = "calo";
2206  std::string type = l1t2string(corrESum->getType());
2207  std::string name = l1t2string(corrESum->getName());
2208 
2209  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2210  << "\n (in parseEnergySum) "
2211  << "\n condition = " << condition << "\n type = " << type
2212  << "\n name = " << name << std::endl;
2213 
2214  // determine object type type
2215  GlobalObject energySumObjType;
2216  GtConditionType cType;
2217 
2218  if (corrESum->getType() == esObjectType::ETM) {
2219  energySumObjType = GlobalObject::gtETM;
2220  cType = TypeETM;
2221  } else if (corrESum->getType() == esObjectType::HTM) {
2222  energySumObjType = GlobalObject::gtHTM;
2223  cType = TypeHTM;
2224  } else if (corrESum->getType() == esObjectType::ETMHF) {
2225  energySumObjType = GlobalObject::gtETMHF;
2226  cType = TypeETMHF;
2227  } else if (corrESum->getType() == esObjectType::TOWERCOUNT) {
2228  energySumObjType = GlobalObject::gtTowerCount;
2229  cType = TypeTowerCount;
2230  } else {
2231  edm::LogError("TriggerMenuParser") << "Wrong type for energy-sum correclation condition (" << type << ")"
2232  << std::endl;
2233  return false;
2234  }
2235 
2236  // global object
2237  int nrObj = 1;
2238 
2239  // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2240 
2241  // get values
2242 
2243  // temporary storage of the parameters
2244  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2245 
2246  int cnt = 0;
2247 
2248  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2249  int relativeBx = 0;
2250  bool gEq = false;
2251 
2252  // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2253 
2254  gEq = (corrESum->getComparisonOperator() == esComparisonOperator::GE);
2255 
2256  // BLW TO DO: This needs to be added to the Object Parameters
2257  relativeBx = corrESum->getBxOffset();
2258 
2259  // Loop over the cuts for this object
2260  int lowerThresholdInd = 0;
2261  int upperThresholdInd = -1;
2262  int cntPhi = 0;
2263  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2264 
2265  const std::vector<esCut>& cuts = corrESum->getCuts();
2266  for (size_t kk = 0; kk < cuts.size(); kk++) {
2267  const esCut cut = cuts.at(kk);
2268 
2269  switch (cut.getCutType()) {
2270  case esCutType::Threshold:
2271  lowerThresholdInd = cut.getMinimum().index;
2272  upperThresholdInd = cut.getMaximum().index;
2273  break;
2274 
2275  case esCutType::Eta:
2276  break;
2277 
2278  case esCutType::Phi: {
2279  if (cntPhi == 0) {
2280  phiWindow1Lower = cut.getMinimum().index;
2281  phiWindow1Upper = cut.getMaximum().index;
2282  } else if (cntPhi == 1) {
2283  phiWindow2Lower = cut.getMinimum().index;
2284  phiWindow2Upper = cut.getMaximum().index;
2285  } else {
2286  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition (" << type << ")" << std::endl;
2287  return false;
2288  }
2289  cntPhi++;
2290 
2291  } break;
2292 
2293  default:
2294  break;
2295  } //end switch
2296 
2297  } //end loop over cuts
2298 
2299  // Fill the object parameters
2300  objParameter[0].etLowThreshold = lowerThresholdInd;
2301  objParameter[0].etHighThreshold = upperThresholdInd;
2302  objParameter[0].phiWindow1Lower = phiWindow1Lower;
2303  objParameter[0].phiWindow1Upper = phiWindow1Upper;
2304  objParameter[0].phiWindow2Lower = phiWindow2Lower;
2305  objParameter[0].phiWindow2Upper = phiWindow2Upper;
2306 
2307  // Output for debugging
2308  LogDebug("TriggerMenuParser") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2309  << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etLowThreshold
2310  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2311  << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
2312  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2313  << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper
2314  << std::dec << std::endl;
2315 
2316  // object types - all same energySumObjType
2317  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2318 
2319  // now create a new energySum condition
2320 
2321  EnergySumTemplate energySumCond(name);
2322 
2323  energySumCond.setCondType(cType);
2324  energySumCond.setObjectType(objType);
2325  energySumCond.setCondGEq(gEq);
2326  energySumCond.setCondChipNr(chipNr);
2327  energySumCond.setCondRelativeBx(relativeBx);
2328 
2329  energySumCond.setConditionParameter(objParameter);
2330 
2331  if (edm::isDebugEnabled()) {
2332  std::ostringstream myCoutStream;
2333  energySumCond.print(myCoutStream);
2334  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2335  }
2336  /*
2337  // insert condition into the map
2338  if ( !insertConditionIntoMap(energySumCond, chipNr)) {
2339 
2340  edm::LogError("TriggerMenuParser")
2341  << " Error: duplicate condition (" << name << ")"
2342  << std::endl;
2343 
2344  return false;
2345  }
2346  else {
2347 
2348  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2349 
2350  }
2351 */
2352  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2353 
2354  //
2355  return true;
2356 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
Definition: L1GtObject.h:38
Definition: L1GtObject.h:35
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
#define LogTrace(id)
bool TriggerMenuParser::parseExternal ( tmeventsetup::esCondition  condExt,
unsigned int  chipNr = 0 
)
private

parseExternal Parse an External condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 2370 of file TriggerMenuParser.cc.

References goodZToMuMu_cfi::condition, l1t::gtExternal, insertConditionIntoMap(), findQualityFiles::jj, l1t2string(), LogDebug, LogTrace, m_vecExternalTemplate, Skims_PA_cff::name, electrons_cff::objType, GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), ExternalTemplate::setExternalChannel(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::TypeExternal.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

2370  {
2371  using namespace tmeventsetup;
2372 
2373  // get condition, particle name and type name
2374  std::string condition = "ext";
2375  std::string particle = "test-fix";
2376  std::string type = l1t2string(condExt.getType());
2377  std::string name = l1t2string(condExt.getName());
2378 
2379  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2380  << "\n (in parseExternal) "
2381  << "\n condition = " << condition << "\n particle = " << particle
2382  << "\n type = " << type << "\n name = " << name << std::endl;
2383 
2384  // object type and condition type
2385  // object type - irrelevant for External conditions
2386  GtConditionType cType = TypeExternal;
2387  GlobalObject extSignalType = GlobalObject::gtExternal;
2388  int nrObj = 1; //only one object for these conditions
2389 
2390  int relativeBx = 0;
2391  unsigned int channelID = 0;
2392 
2393  // Get object for External conditions
2394  const std::vector<esObject>& objects = condExt.getObjects();
2395  for (size_t jj = 0; jj < objects.size(); jj++) {
2396  const esObject object = objects.at(jj);
2397  if (object.getType() == esObjectType::EXT) {
2398  relativeBx = object.getBxOffset();
2399  channelID = object.getExternalChannelId();
2400  }
2401  }
2402 
2403  // set the boolean value for the ge_eq mode - irrelevant for External conditions
2404  bool gEq = false;
2405 
2406  //object types - all same for external conditions
2407  std::vector<GlobalObject> objType(nrObj, extSignalType);
2408 
2409  // now create a new External condition
2410  ExternalTemplate externalCond(name);
2411 
2412  externalCond.setCondType(cType);
2413  externalCond.setObjectType(objType);
2414  externalCond.setCondGEq(gEq);
2415  externalCond.setCondChipNr(chipNr);
2416  externalCond.setCondRelativeBx(relativeBx);
2417  externalCond.setExternalChannel(channelID);
2418 
2419  LogTrace("TriggerMenuParser") << externalCond << "\n" << std::endl;
2420 
2421  // insert condition into the map
2422  if (!insertConditionIntoMap(externalCond, chipNr)) {
2423  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2424 
2425  return false;
2426  } else {
2427  (m_vecExternalTemplate[chipNr]).push_back(externalCond);
2428  }
2429 
2430  return true;
2431 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
bool TriggerMenuParser::parseMuon ( tmeventsetup::esCondition  condMu,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse a muon condition

parseMuon Parse a muon condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 975 of file TriggerMenuParser.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, MuonTemplate::CorrelationParameter::chargeCorrelation, goodZToMuMu_cfi::condition, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, HLT_2018_cff::DoubleMuon, l1t::gtMu, insertConditionIntoMap(), createfilelist::int, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), l1tstr2int(), LogDebug, LogTrace, m_corMuonTemplate, m_vecMuonTemplate, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, MuonTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), HLT_2018_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, HLT_2018_cff::Threshold, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

975  {
976  using namespace tmeventsetup;
977 
978  // get condition, particle name (must be muon) and type name
979  std::string condition = "muon";
980  std::string particle = "muon"; //l1t2string( condMu.objectType() );
981  std::string type = l1t2string(condMu.getType());
982  std::string name = l1t2string(condMu.getName());
983  int nrObj = -1;
984 
986 
987  if (condMu.getType() == esConditionType::SingleMuon) {
988  type = "1_s";
989  cType = l1t::Type1s;
990  nrObj = 1;
991  } else if (condMu.getType() == esConditionType::DoubleMuon) {
992  type = "2_s";
993  cType = l1t::Type2s;
994  nrObj = 2;
995  } else if (condMu.getType() == esConditionType::TripleMuon) {
996  type = "3";
997  cType = l1t::Type3s;
998  nrObj = 3;
999  } else if (condMu.getType() == esConditionType::QuadMuon) {
1000  type = "4";
1001  cType = l1t::Type4s;
1002  nrObj = 4;
1003  } else {
1004  edm::LogError("TriggerMenuParser") << "Wrong type for muon-condition (" << type << ")" << std::endl;
1005  return false;
1006  }
1007 
1008  if (nrObj < 0) {
1009  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type << ")"
1010  << "\nCan not determine number of trigger objects. " << std::endl;
1011  return false;
1012  }
1013 
1014  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1015  << "\n parseMuon "
1016  << "\n condition = " << condition << "\n particle = " << particle
1017  << "\n type = " << type << "\n name = " << name << std::endl;
1018 
1019  // // get values
1020 
1021  // temporary storage of the parameters
1022  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1023 
1024  // Do we need this?
1025  MuonTemplate::CorrelationParameter corrParameter;
1026 
1027  // need at least two values for deltaPhi
1028  std::vector<uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1029  tmpValues.reserve(nrObj);
1030 
1031  if (int(condMu.getObjects().size()) != nrObj) {
1032  edm::LogError("TriggerMenuParser") << " condMu objects: nrObj = " << nrObj
1033  << "condMu.getObjects().size() = " << condMu.getObjects().size() << std::endl;
1034  return false;
1035  }
1036 
1037  // Look for cuts on the objects in the condition
1038  unsigned int chargeCorrelation = 1;
1039  const std::vector<esCut>& cuts = condMu.getCuts();
1040  for (size_t jj = 0; jj < cuts.size(); jj++) {
1041  const esCut cut = cuts.at(jj);
1042  if (cut.getCutType() == esCutType::ChargeCorrelation) {
1043  if (cut.getData() == "ls")
1044  chargeCorrelation = 2;
1045  else if (cut.getData() == "os")
1046  chargeCorrelation = 4;
1047  else
1048  chargeCorrelation = 1; //ignore correlation
1049  }
1050  }
1051 
1052  //set charge correlation parameter
1053  corrParameter.chargeCorrelation = chargeCorrelation; //tmpValues[0];
1054 
1055  int cnt = 0;
1056 
1057  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1058  int relativeBx = 0;
1059  bool gEq = false;
1060 
1061  // Loop over objects and extract the cuts on the objects
1062  const std::vector<esObject>& objects = condMu.getObjects();
1063  for (size_t jj = 0; jj < objects.size(); jj++) {
1064  const esObject object = objects.at(jj);
1065  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1066 
1067  // BLW TO DO: This needs to be added to the Object Parameters
1068  relativeBx = object.getBxOffset();
1069 
1070  // Loop over the cuts for this object
1071  int upperThresholdInd = -1;
1072  int lowerThresholdInd = 0;
1073  int upperIndexInd = -1;
1074  int lowerIndexInd = 0;
1075  int cntEta = 0;
1076  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1077  int cntPhi = 0;
1078  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1079  int isolationLUT = 0xF; //default is to ignore unless specified.
1080  int charge = -1; //default value is to ignore unless specified
1081  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1082 
1083  const std::vector<esCut>& cuts = object.getCuts();
1084  for (size_t kk = 0; kk < cuts.size(); kk++) {
1085  const esCut cut = cuts.at(kk);
1086 
1087  switch (cut.getCutType()) {
1088  case esCutType::Threshold:
1089  lowerThresholdInd = cut.getMinimum().index;
1090  upperThresholdInd = cut.getMaximum().index;
1091  break;
1092 
1093  case esCutType::Slice:
1094  lowerIndexInd = int(cut.getMinimum().value);
1095  upperIndexInd = int(cut.getMaximum().value);
1096  break;
1097 
1098  case esCutType::Eta: {
1099  if (cntEta == 0) {
1100  etaWindow1Lower = cut.getMinimum().index;
1101  etaWindow1Upper = cut.getMaximum().index;
1102  } else if (cntEta == 1) {
1103  etaWindow2Lower = cut.getMinimum().index;
1104  etaWindow2Upper = cut.getMaximum().index;
1105  } else {
1106  edm::LogError("TriggerMenuParser")
1107  << "Too Many Eta Cuts for muon-condition (" << particle << ")" << std::endl;
1108  return false;
1109  }
1110  cntEta++;
1111 
1112  } break;
1113 
1114  case esCutType::Phi: {
1115  if (cntPhi == 0) {
1116  phiWindow1Lower = cut.getMinimum().index;
1117  phiWindow1Upper = cut.getMaximum().index;
1118  } else if (cntPhi == 1) {
1119  phiWindow2Lower = cut.getMinimum().index;
1120  phiWindow2Upper = cut.getMaximum().index;
1121  } else {
1122  edm::LogError("TriggerMenuParser")
1123  << "Too Many Phi Cuts for muon-condition (" << particle << ")" << std::endl;
1124  return false;
1125  }
1126  cntPhi++;
1127 
1128  } break;
1129 
1130  case esCutType::Charge:
1131  if (cut.getData() == "positive")
1132  charge = 0;
1133  else if (cut.getData() == "negative")
1134  charge = 1;
1135  else
1136  charge = -1;
1137  break;
1138  case esCutType::Quality:
1139 
1140  qualityLUT = l1tstr2int(cut.getData());
1141 
1142  break;
1143  case esCutType::Isolation: {
1144  isolationLUT = l1tstr2int(cut.getData());
1145 
1146  } break;
1147  default:
1148  break;
1149  } //end switch
1150 
1151  } //end loop over cuts
1152 
1153  // Set the parameter cuts
1154  objParameter[cnt].ptHighThreshold = upperThresholdInd;
1155  objParameter[cnt].ptLowThreshold = lowerThresholdInd;
1156 
1157  objParameter[cnt].indexHigh = upperIndexInd;
1158  objParameter[cnt].indexLow = lowerIndexInd;
1159 
1160  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1161  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1162  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1163  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1164 
1165  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1166  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1167  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1168  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1169 
1170  // BLW TO DO: Do we need these anymore? Drop them?
1171  objParameter[cnt].enableMip = false; //tmpMip[i];
1172  objParameter[cnt].enableIso = false; //tmpEnableIso[i];
1173  objParameter[cnt].requestIso = false; //tmpRequestIso[i];
1174 
1175  objParameter[cnt].charge = charge;
1176  objParameter[cnt].qualityLUT = qualityLUT;
1177  objParameter[cnt].isolationLUT = isolationLUT;
1178 
1179  cnt++;
1180  } //end loop over objects
1181 
1182  // object types - all muons
1183  std::vector<GlobalObject> objType(nrObj, gtMu);
1184 
1185  // now create a new CondMuonition
1186  MuonTemplate muonCond(name);
1187 
1188  muonCond.setCondType(cType);
1189  muonCond.setObjectType(objType);
1190  muonCond.setCondGEq(gEq);
1191  muonCond.setCondChipNr(chipNr);
1192  muonCond.setCondRelativeBx(relativeBx);
1193 
1194  muonCond.setConditionParameter(objParameter, corrParameter);
1195 
1196  if (edm::isDebugEnabled()) {
1197  std::ostringstream myCoutStream;
1198  muonCond.print(myCoutStream);
1199  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1200  }
1201 
1202  // insert condition into the map and into muon template vector
1203  if (!insertConditionIntoMap(muonCond, chipNr)) {
1204  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
1205  return false;
1206  } else {
1207  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1208  if (corrFlag) {
1209  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1210  } else {
1211  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the vecMuonTemplate vector" << std::endl;
1212  (m_vecMuonTemplate[chipNr]).push_back(muonCond);
1213  }
1214  }
1215 
1216  //
1217  return true;
1218 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
int l1tstr2int(const std::string data)
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
bool TriggerMenuParser::parseMuonCorr ( const tmeventsetup::esObject *  condMu,
unsigned int  chipNr = 0 
)
private

Definition at line 1220 of file TriggerMenuParser.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, MuonTemplate::CorrelationParameter::chargeCorrelation, goodZToMuMu_cfi::condition, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, l1t::gtMu, createfilelist::int, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), l1tstr2int(), LogDebug, LogTrace, m_corMuonTemplate, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, MuonTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2018_cff::Threshold, and l1t::Type1s.

Referenced by gtAlgorithmImplementation(), parseCorrelation(), and parseCorrelationWithOverlapRemoval().

1220  {
1221  // XERCES_CPP_NAMESPACE_USE
1222  using namespace tmeventsetup;
1223 
1224  // get condition, particle name (must be muon) and type name
1225  std::string condition = "muon";
1226  std::string particle = "muon"; //l1t2string( condMu.objectType() );
1227  std::string type = l1t2string(corrMu->getType());
1228  std::string name = l1t2string(corrMu->getName());
1229  int nrObj = 1;
1230  type = "1_s";
1231  GtConditionType cType = l1t::Type1s;
1232 
1233  if (nrObj < 0) {
1234  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type << ")"
1235  << "\nCan not determine number of trigger objects. " << std::endl;
1236  return false;
1237  }
1238 
1239  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1240  << "\n parseMuon "
1241  << "\n condition = " << condition << "\n particle = " << particle
1242  << "\n type = " << type << "\n name = " << name << std::endl;
1243 
1244  // // get values
1245 
1246  // temporary storage of the parameters
1247  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1248 
1249  // Do we need this?
1250  MuonTemplate::CorrelationParameter corrParameter;
1251 
1252  // need at least two values for deltaPhi
1253  std::vector<uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1254  tmpValues.reserve(nrObj);
1255 
1256  // BLW TO DO: How do we deal with these in the new format
1257  // std::string str_chargeCorrelation = l1t2string( condMu.requestedChargeCorr() );
1258  std::string str_chargeCorrelation = "ig";
1259  unsigned int chargeCorrelation = 0;
1260  if (str_chargeCorrelation == "ig")
1261  chargeCorrelation = 1;
1262  else if (str_chargeCorrelation == "ls")
1263  chargeCorrelation = 2;
1264  else if (str_chargeCorrelation == "os")
1265  chargeCorrelation = 4;
1266 
1267  //getXMLHexTextValue("1", dst);
1268  corrParameter.chargeCorrelation = chargeCorrelation; //tmpValues[0];
1269 
1270  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1271  int relativeBx = 0;
1272  bool gEq = false;
1273 
1274  //const esObject* object = condMu;
1275  gEq = (corrMu->getComparisonOperator() == esComparisonOperator::GE);
1276 
1277  // BLW TO DO: This needs to be added to the Object Parameters
1278  relativeBx = corrMu->getBxOffset();
1279 
1280  // Loop over the cuts for this object
1281  int upperThresholdInd = -1;
1282  int lowerThresholdInd = 0;
1283  int upperIndexInd = -1;
1284  int lowerIndexInd = 0;
1285  int cntEta = 0;
1286  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1287  int cntPhi = 0;
1288  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1289  int isolationLUT = 0xF; //default is to ignore unless specified.
1290  int charge = -1; //defaut is to ignore unless specified
1291  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1292 
1293  const std::vector<esCut>& cuts = corrMu->getCuts();
1294  for (size_t kk = 0; kk < cuts.size(); kk++) {
1295  const esCut cut = cuts.at(kk);
1296 
1297  switch (cut.getCutType()) {
1298  case esCutType::Threshold:
1299  lowerThresholdInd = cut.getMinimum().index;
1300  upperThresholdInd = cut.getMaximum().index;
1301  break;
1302 
1303  case esCutType::Slice:
1304  lowerIndexInd = int(cut.getMinimum().value);
1305  upperIndexInd = int(cut.getMaximum().value);
1306  break;
1307 
1308  case esCutType::Eta: {
1309  if (cntEta == 0) {
1310  etaWindow1Lower = cut.getMinimum().index;
1311  etaWindow1Upper = cut.getMaximum().index;
1312  } else if (cntEta == 1) {
1313  etaWindow2Lower = cut.getMinimum().index;
1314  etaWindow2Upper = cut.getMaximum().index;
1315  } else {
1316  edm::LogError("TriggerMenuParser")
1317  << "Too Many Eta Cuts for muon-condition (" << particle << ")" << std::endl;
1318  return false;
1319  }
1320  cntEta++;
1321 
1322  } break;
1323 
1324  case esCutType::Phi: {
1325  if (cntPhi == 0) {
1326  phiWindow1Lower = cut.getMinimum().index;
1327  phiWindow1Upper = cut.getMaximum().index;
1328  } else if (cntPhi == 1) {
1329  phiWindow2Lower = cut.getMinimum().index;
1330  phiWindow2Upper = cut.getMaximum().index;
1331  } else {
1332  edm::LogError("TriggerMenuParser")
1333  << "Too Many Phi Cuts for muon-condition (" << particle << ")" << std::endl;
1334  return false;
1335  }
1336  cntPhi++;
1337 
1338  } break;
1339 
1340  case esCutType::Charge:
1341  if (cut.getData() == "positive")
1342  charge = 0;
1343  else if (cut.getData() == "negative")
1344  charge = 1;
1345  else
1346  charge = -1;
1347  break;
1348  case esCutType::Quality:
1349 
1350  qualityLUT = l1tstr2int(cut.getData());
1351 
1352  break;
1353  case esCutType::Isolation: {
1354  isolationLUT = l1tstr2int(cut.getData());
1355 
1356  } break;
1357  default:
1358  break;
1359  } //end switch
1360 
1361  } //end loop over cuts
1362 
1363  // Set the parameter cuts
1364  objParameter[0].ptHighThreshold = upperThresholdInd;
1365  objParameter[0].ptLowThreshold = lowerThresholdInd;
1366 
1367  objParameter[0].indexHigh = upperIndexInd;
1368  objParameter[0].indexLow = lowerIndexInd;
1369 
1370  objParameter[0].etaWindow1Lower = etaWindow1Lower;
1371  objParameter[0].etaWindow1Upper = etaWindow1Upper;
1372  objParameter[0].etaWindow2Lower = etaWindow2Lower;
1373  objParameter[0].etaWindow2Upper = etaWindow2Upper;
1374 
1375  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1376  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1377  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1378  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1379 
1380  // BLW TO DO: Do we need these anymore? Drop them?
1381  objParameter[0].enableMip = false; //tmpMip[i];
1382  objParameter[0].enableIso = false; //tmpEnableIso[i];
1383  objParameter[0].requestIso = false; //tmpRequestIso[i];
1384 
1385  objParameter[0].charge = charge;
1386  objParameter[0].qualityLUT = qualityLUT;
1387  objParameter[0].isolationLUT = isolationLUT;
1388 
1389  // object types - all muons
1390  std::vector<GlobalObject> objType(nrObj, gtMu);
1391 
1392  // now create a new CondMuonition
1393  MuonTemplate muonCond(name);
1394 
1395  muonCond.setCondType(cType);
1396  muonCond.setObjectType(objType);
1397  muonCond.setCondGEq(gEq);
1398  muonCond.setCondChipNr(chipNr);
1399  muonCond.setCondRelativeBx(relativeBx);
1400  muonCond.setConditionParameter(objParameter, corrParameter);
1401 
1402  if (edm::isDebugEnabled()) {
1403  std::ostringstream myCoutStream;
1404  muonCond.print(myCoutStream);
1405  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1406  }
1407 
1408  /*
1409  // insert condition into the map and into muon template vector
1410  if ( !insertConditionIntoMap(muonCond, chipNr)) {
1411  edm::LogError("TriggerMenuParser")
1412  << " Error: duplicate condition (" << name << ")"
1413  << std::endl;
1414  return false;
1415  }
1416  else {
1417  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1418  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1419  }
1420 */
1421  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1422 
1423  //
1424  return true;
1425 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
#define LogTrace(id)
int l1tstr2int(const std::string data)
void TriggerMenuParser::parsePhi_Trig_LUTS ( const std::map< std::string, tmeventsetup::esScale > &  scaleMap,
const std::string &  obj,
l1t::TrigFunc_t  func,
unsigned int  prec 
)
private

Definition at line 923 of file TriggerMenuParser.cc.

References mps_check::array, hgcaltilesconstants::ceil(), l1t::COS, cuy::ii, m_gtScales, dqmiodumpmetadata::n, getGTfromDQMFile::obj, funct::pow(), FastTimerService_cff::range, Scenarios_cff::scale, l1t::GlobalScales::setLUT_Cos(), l1t::GlobalScales::setLUT_Sin(), l1t::SIN, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseScales().

926  {
927  using namespace tmeventsetup;
928 
929  std::string scLabel = obj;
930  scLabel += "-PHI";
931 
932  //This LUT does not exist in L1 Menu file, don't fill it
933  if (scaleMap.find(scLabel) == scaleMap.end())
934  return;
935  if (func != l1t::SIN and func != l1t::COS)
936  return;
937 
938  const esScale* scale = &scaleMap.find(scLabel)->second;
939 
940  const double step = scale->getStep();
941  const double range = scale->getMaximum() - scale->getMinimum();
942  const size_t n = std::ceil(range / step);
943  const size_t bitwidth = std::ceil(std::log10(n) / std::log10(2));
944 
945  std::vector<double> array(std::pow(2, bitwidth), 0);
946 
947  for (size_t ii = 0; ii < n; ii++) {
948  array.at(ii) = step * ii;
949  }
950 
951  const std::string& lutName = obj;
952  std::vector<long long> lut;
953  if (func == l1t::SIN) {
954  applySin(array, n);
955  setLut(lut, array, prec);
956  m_gtScales.setLUT_Sin(lutName, lut, prec);
957  } else if (func == l1t::COS) {
958  applyCos(array, n);
959  setLut(lut, array, prec);
960  m_gtScales.setLUT_Cos(lutName, lut, prec);
961  }
962 }
constexpr int32_t ceil(float num)
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
ii
Definition: cuy.py:590
step
Definition: StallMonitor.cc:94
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
void TriggerMenuParser::parsePt_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  lutpfx,
std::string  obj1,
unsigned int  prec 
)
private

Definition at line 831 of file TriggerMenuParser.cc.

References m_gtScales, l1t::GlobalScales::setLUT_Pt(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseScales().

834  {
835  using namespace tmeventsetup;
836 
837  // First Delta Eta for this set
838  std::string scLabel1 = obj1;
839  scLabel1 += "-ET";
840 
841  //This LUT does not exist in L1 Menu file, don't fill it
842  if (scaleMap.find(scLabel1) == scaleMap.end())
843  return;
844 
845  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
846 
847  std::vector<long long> lut_pt;
848  getLut(lut_pt, scale1, prec);
849 
850  m_gtScales.setLUT_Pt(lutpfx + "_" + scLabel1, lut_pt, prec);
851 }
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:87
bool TriggerMenuParser::parseScales ( std::map< std::string, tmeventsetup::esScale >  scaleMap)
private

parse scales

parseScales Parse Et, Eta, and Phi Scales

Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 516 of file TriggerMenuParser.cc.

References newFWLiteAna::bin, l1t::COS, l1t::GlobalScales::ScaleParameters::etaBins, l1t::GlobalScales::ScaleParameters::etaMax, l1t::GlobalScales::ScaleParameters::etaMin, l1t::GlobalScales::ScaleParameters::etaStep, l1t::GlobalScales::ScaleParameters::etBins, ETM, l1t::GlobalScales::ScaleParameters::etMax, l1t::GlobalScales::ScaleParameters::etMin, l1t::GlobalScales::ScaleParameters::etStep, ETT, HTM, HTT, mps_fire::i, L1TRate_cfi::Jet, m_gtScales, dumpRecoGeometry_cfg::Muon, parseCalMuEta_LUTS(), parseCalMuPhi_LUTS(), parseDeltaEta_Cosh_LUTS(), parseDeltaPhi_Cos_LUTS(), parsePhi_Trig_LUTS(), parsePt_LUTS(), l1t::GlobalScales::ScaleParameters::phiBins, l1t::GlobalScales::ScaleParameters::phiMax, l1t::GlobalScales::ScaleParameters::phiMin, l1t::GlobalScales::ScaleParameters::phiStep, funct::pow(), Scenarios_cff::scale, l1t::GlobalScales::setEGScales(), l1t::GlobalScales::setETMHfScales(), l1t::GlobalScales::setETMScales(), l1t::GlobalScales::setETTEmScales(), l1t::GlobalScales::setETTScales(), l1t::GlobalScales::setHTMScales(), l1t::GlobalScales::setHTTScales(), l1t::GlobalScales::setJetScales(), l1t::GlobalScales::setMuonScales(), l1t::GlobalScales::setTauScales(), l1t::SIN, and L1TRate_Offline_cfi::Tau.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

516  {
517  using namespace tmeventsetup;
518 
519  // Setup ScaleParameter to hold information from parsing
520  GlobalScales::ScaleParameters muScales;
521  GlobalScales::ScaleParameters egScales;
522  GlobalScales::ScaleParameters tauScales;
523  GlobalScales::ScaleParameters jetScales;
524  GlobalScales::ScaleParameters ettScales;
525  GlobalScales::ScaleParameters ettEmScales;
526  GlobalScales::ScaleParameters etmScales;
527  GlobalScales::ScaleParameters etmHfScales;
528  GlobalScales::ScaleParameters httScales;
529  GlobalScales::ScaleParameters htmScales;
530 
531  // Start by parsing the Scale Map
532  for (std::map<std::string, esScale>::const_iterator cit = scaleMap.begin(); cit != scaleMap.end(); cit++) {
533  const esScale& scale = cit->second;
534 
535  GlobalScales::ScaleParameters* scaleParam;
536  if (scale.getObjectType() == esObjectType::Muon)
537  scaleParam = &muScales;
538  else if (scale.getObjectType() == esObjectType::Egamma)
539  scaleParam = &egScales;
540  else if (scale.getObjectType() == esObjectType::Tau)
541  scaleParam = &tauScales;
542  else if (scale.getObjectType() == esObjectType::Jet)
543  scaleParam = &jetScales;
544  else if (scale.getObjectType() == esObjectType::ETT)
545  scaleParam = &ettScales;
546  else if (scale.getObjectType() == esObjectType::ETTEM)
547  scaleParam = &ettEmScales;
548  else if (scale.getObjectType() == esObjectType::ETM)
549  scaleParam = &etmScales;
550  else if (scale.getObjectType() == esObjectType::ETMHF)
551  scaleParam = &etmHfScales;
552  else if (scale.getObjectType() == esObjectType::HTT)
553  scaleParam = &httScales;
554  else if (scale.getObjectType() == esObjectType::HTM)
555  scaleParam = &htmScales;
556  else
557  scaleParam = nullptr;
558 
559  if (scaleParam != nullptr) {
560  switch (scale.getScaleType()) {
561  case esScaleType::EtScale: {
562  scaleParam->etMin = scale.getMinimum();
563  scaleParam->etMax = scale.getMaximum();
564  scaleParam->etStep = scale.getStep();
565 
566  //Get bin edges
567  const std::vector<esBin>& binsV = scale.getBins();
568  for (unsigned int i = 0; i < binsV.size(); i++) {
569  const esBin& bin = binsV.at(i);
570  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
571  scaleParam->etBins.push_back(binLimits);
572  }
573 
574  // If this is an energy sum fill dummy values for eta and phi
575  // There are no scales for these in the XML so the other case statements will not be seen....do it here.
576  if (scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
577  scale.getObjectType() == esObjectType::ETM || scale.getObjectType() == esObjectType::HTM ||
578  scale.getObjectType() == esObjectType::ETTEM || scale.getObjectType() == esObjectType::ETMHF) {
579  scaleParam->etaMin = -1.;
580  scaleParam->etaMax = -1.;
581  scaleParam->etaStep = -1.;
582  if (scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
583  scale.getObjectType() == esObjectType::ETTEM) {
584  // if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT) {
585  scaleParam->phiMin = -1.;
586  scaleParam->phiMax = -1.;
587  scaleParam->phiStep = -1.;
588  }
589  }
590  } break;
591  case esScaleType::EtaScale: {
592  scaleParam->etaMin = scale.getMinimum();
593  scaleParam->etaMax = scale.getMaximum();
594  scaleParam->etaStep = scale.getStep();
595 
596  //Get bin edges
597  const std::vector<esBin>& binsV = scale.getBins();
598  scaleParam->etaBins.resize(pow(2, scale.getNbits()));
599  for (unsigned int i = 0; i < binsV.size(); i++) {
600  const esBin& bin = binsV.at(i);
601  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
602  scaleParam->etaBins.at(bin.hw_index) = binLimits;
603  }
604  } break;
605  case esScaleType::PhiScale: {
606  scaleParam->phiMin = scale.getMinimum();
607  scaleParam->phiMax = scale.getMaximum();
608  scaleParam->phiStep = scale.getStep();
609 
610  //Get bin edges
611  const std::vector<esBin>& binsV = scale.getBins();
612  scaleParam->phiBins.resize(pow(2, scale.getNbits()));
613  for (unsigned int i = 0; i < binsV.size(); i++) {
614  const esBin& bin = binsV.at(i);
615  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
616  scaleParam->phiBins.at(bin.hw_index) = binLimits;
617  }
618  } break;
619  default:
620 
621  break;
622  } //end switch
623  } //end valid scale
624  } //end loop over scaleMap
625 
626  // put the ScaleParameters into the class
627  m_gtScales.setMuonScales(muScales);
628  m_gtScales.setEGScales(egScales);
629  m_gtScales.setTauScales(tauScales);
630  m_gtScales.setJetScales(jetScales);
631  m_gtScales.setETTScales(ettScales);
632  m_gtScales.setETTEmScales(ettEmScales);
633  m_gtScales.setETMScales(etmScales);
634  m_gtScales.setETMHfScales(etmHfScales);
635  m_gtScales.setHTTScales(httScales);
636  m_gtScales.setHTMScales(htmScales);
637 
638  // Setup the LUT for the Scale Conversions
639  bool hasPrecision = false;
640  std::map<std::string, unsigned int> precisions;
641  getPrecisions(precisions, scaleMap);
642  for (std::map<std::string, unsigned int>::const_iterator cit = precisions.begin(); cit != precisions.end(); cit++) {
643  //std::cout << cit->first << " = " << cit->second << "\n";
644  hasPrecision = true;
645  }
646 
647  if (hasPrecision) {
648  //Start with the Cal - Muon Eta LUTS
649  //----------------------------------
650  parseCalMuEta_LUTS(scaleMap, "EG", "MU");
651  parseCalMuEta_LUTS(scaleMap, "JET", "MU");
652  parseCalMuEta_LUTS(scaleMap, "TAU", "MU");
653 
654  //Now the Cal - Muon Phi LUTS
655  //-------------------------------------
656  parseCalMuPhi_LUTS(scaleMap, "EG", "MU");
657  parseCalMuPhi_LUTS(scaleMap, "JET", "MU");
658  parseCalMuPhi_LUTS(scaleMap, "TAU", "MU");
659  parseCalMuPhi_LUTS(scaleMap, "HTM", "MU");
660  parseCalMuPhi_LUTS(scaleMap, "ETM", "MU");
661  parseCalMuPhi_LUTS(scaleMap, "ETMHF", "MU");
662 
663  // Now the Pt LUTs (??? more combinations needed ??)
664  // ---------------
665  parsePt_LUTS(scaleMap, "Mass", "EG", precisions["PRECISION-EG-MU-MassPt"]);
666  parsePt_LUTS(scaleMap, "Mass", "MU", precisions["PRECISION-EG-MU-MassPt"]);
667  parsePt_LUTS(scaleMap, "Mass", "JET", precisions["PRECISION-EG-JET-MassPt"]);
668  parsePt_LUTS(scaleMap, "Mass", "TAU", precisions["PRECISION-EG-TAU-MassPt"]);
669  parsePt_LUTS(scaleMap, "Mass", "ETM", precisions["PRECISION-EG-ETM-MassPt"]);
670  parsePt_LUTS(scaleMap, "Mass", "ETMHF", precisions["PRECISION-EG-ETMHF-MassPt"]);
671  parsePt_LUTS(scaleMap, "Mass", "HTM", precisions["PRECISION-EG-HTM-MassPt"]);
672 
673  // Now the Pt LUTs for TBPT calculation (??? CCLA following what was done for MASS pt LUTs for now ??)
674  // ---------------
675  parsePt_LUTS(scaleMap, "TwoBody", "EG", precisions["PRECISION-EG-MU-TwoBodyPt"]);
676  parsePt_LUTS(scaleMap, "TwoBody", "MU", precisions["PRECISION-EG-MU-TwoBodyPt"]);
677  parsePt_LUTS(scaleMap, "TwoBody", "JET", precisions["PRECISION-EG-JET-TwoBodyPt"]);
678  parsePt_LUTS(scaleMap, "TwoBody", "TAU", precisions["PRECISION-EG-TAU-TwoBodyPt"]);
679  parsePt_LUTS(scaleMap, "TwoBody", "ETM", precisions["PRECISION-EG-ETM-TwoBodyPt"]);
680  parsePt_LUTS(scaleMap, "TwoBody", "ETMHF", precisions["PRECISION-EG-ETMHF-TwoBodyPt"]);
681  parsePt_LUTS(scaleMap, "TwoBody", "HTM", precisions["PRECISION-EG-HTM-TwoBodyPt"]);
682 
683  // Now the Delta Eta/Cosh LUTs (must be done in groups)
684  // ----------------------------------------------------
686  scaleMap, "EG", "EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
688  scaleMap, "EG", "JET", precisions["PRECISION-EG-JET-Delta"], precisions["PRECISION-EG-JET-Math"]);
690  scaleMap, "EG", "TAU", precisions["PRECISION-EG-TAU-Delta"], precisions["PRECISION-EG-TAU-Math"]);
692  scaleMap, "EG", "MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
693 
695  scaleMap, "JET", "JET", precisions["PRECISION-JET-JET-Delta"], precisions["PRECISION-JET-JET-Math"]);
697  scaleMap, "JET", "TAU", precisions["PRECISION-JET-TAU-Delta"], precisions["PRECISION-JET-TAU-Math"]);
699  scaleMap, "JET", "MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
700 
702  scaleMap, "TAU", "TAU", precisions["PRECISION-TAU-TAU-Delta"], precisions["PRECISION-TAU-TAU-Math"]);
704  scaleMap, "TAU", "MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
705 
707  scaleMap, "MU", "MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
708 
709  // Now the Delta Phi/Cos LUTs (must be done in groups)
710  // ----------------------------------------------------
712  scaleMap, "EG", "EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
714  scaleMap, "EG", "JET", precisions["PRECISION-EG-JET-Delta"], precisions["PRECISION-EG-JET-Math"]);
716  scaleMap, "EG", "TAU", precisions["PRECISION-EG-TAU-Delta"], precisions["PRECISION-EG-TAU-Math"]);
718  scaleMap, "EG", "ETM", precisions["PRECISION-EG-ETM-Delta"], precisions["PRECISION-EG-ETM-Math"]);
720  scaleMap, "EG", "ETMHF", precisions["PRECISION-EG-ETMHF-Delta"], precisions["PRECISION-EG-ETMHF-Math"]);
722  scaleMap, "EG", "HTM", precisions["PRECISION-EG-HTM-Delta"], precisions["PRECISION-EG-HTM-Math"]);
724  scaleMap, "EG", "MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
725 
727  scaleMap, "JET", "JET", precisions["PRECISION-JET-JET-Delta"], precisions["PRECISION-JET-JET-Math"]);
729  scaleMap, "JET", "TAU", precisions["PRECISION-JET-TAU-Delta"], precisions["PRECISION-JET-TAU-Math"]);
731  scaleMap, "JET", "ETM", precisions["PRECISION-JET-ETM-Delta"], precisions["PRECISION-JET-ETM-Math"]);
733  scaleMap, "JET", "ETMHF", precisions["PRECISION-JET-ETMHF-Delta"], precisions["PRECISION-JET-ETMHF-Math"]);
735  scaleMap, "JET", "HTM", precisions["PRECISION-JET-HTM-Delta"], precisions["PRECISION-JET-HTM-Math"]);
737  scaleMap, "JET", "MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
738 
740  scaleMap, "TAU", "TAU", precisions["PRECISION-TAU-TAU-Delta"], precisions["PRECISION-TAU-TAU-Math"]);
742  scaleMap, "TAU", "ETM", precisions["PRECISION-TAU-ETM-Delta"], precisions["PRECISION-TAU-ETM-Math"]);
744  scaleMap, "TAU", "ETMHF", precisions["PRECISION-TAU-ETMHF-Delta"], precisions["PRECISION-TAU-ETMHF-Math"]);
746  scaleMap, "TAU", "HTM", precisions["PRECISION-TAU-HTM-Delta"], precisions["PRECISION-TAU-HTM-Math"]);
748  scaleMap, "TAU", "MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
749 
751  scaleMap, "MU", "ETM", precisions["PRECISION-MU-ETM-Delta"], precisions["PRECISION-MU-ETM-Math"]);
753  scaleMap, "MU", "ETMHF", precisions["PRECISION-MU-ETMHF-Delta"], precisions["PRECISION-MU-ETMHF-Math"]);
755  scaleMap, "MU", "HTM", precisions["PRECISION-MU-HTM-Delta"], precisions["PRECISION-MU-HTM-Math"]);
757  scaleMap, "MU", "MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
758 
759  parsePhi_Trig_LUTS(scaleMap, "EG", l1t::COS, precisions["PRECISION-EG-EG-Math"]);
760  parsePhi_Trig_LUTS(scaleMap, "JET", l1t::COS, precisions["PRECISION-JET-JET-Math"]);
761  parsePhi_Trig_LUTS(scaleMap, "TAU", l1t::COS, precisions["PRECISION-TAU-TAU-Math"]);
762  parsePhi_Trig_LUTS(scaleMap, "MU", l1t::COS, precisions["PRECISION-MU-MU-Math"]);
763 
764  parsePhi_Trig_LUTS(scaleMap, "EG", l1t::SIN, precisions["PRECISION-EG-EG-Math"]);
765  parsePhi_Trig_LUTS(scaleMap, "JET", l1t::SIN, precisions["PRECISION-JET-JET-Math"]);
766  parsePhi_Trig_LUTS(scaleMap, "TAU", l1t::SIN, precisions["PRECISION-TAU-TAU-Math"]);
767  parsePhi_Trig_LUTS(scaleMap, "MU", l1t::SIN, precisions["PRECISION-MU-MU-Math"]);
768 
769  //CCLA
770  //m_gtScales.dumpAllLUTs(std::cout);
771  //m_gtScales.print(std::cout);
772  }
773 
774  return true;
775 }
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:61
void setJetScales(ScaleParameters &scales)
Definition: GlobalScales.h:56
void parseCalMuEta_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2)
void parseCalMuPhi_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2)
Definition: L1GtObject.h:38
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: L1GtObject.h:35
void setETMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:62
Definition: L1GtObject.h:37
void parseDeltaEta_Cosh_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2, unsigned int prec1, unsigned int prec2)
void setEGScales(ScaleParameters &scales)
Definition: GlobalScales.h:52
void setTauScales(ScaleParameters &scales)
Definition: GlobalScales.h:53
void setETTEmScales(ScaleParameters &scales)
Definition: GlobalScales.h:59
void setMuonScales(ScaleParameters &scales)
Definition: GlobalScales.h:54
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:60
void setHTMScales(ScaleParameters &scales)
Definition: GlobalScales.h:63
Definition: L1GtObject.h:36
void setETTScales(ScaleParameters &scales)
Definition: GlobalScales.h:58
void parsePhi_Trig_LUTS(const std::map< std::string, tmeventsetup::esScale > &scaleMap, const std::string &obj, TrigFunc_t func, unsigned int prec)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
void parsePt_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string lutpfx, std::string obj1, unsigned int prec)
void TriggerMenuParser::setCorCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  corCaloTempl)

Definition at line 140 of file TriggerMenuParser.cc.

References m_corCaloTemplate.

Referenced by corCaloTemplate().

140  {
141  m_corCaloTemplate = corCaloTempl;
142 }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
void TriggerMenuParser::setCorEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  corEnergySumTempl)

Definition at line 144 of file TriggerMenuParser.cc.

References m_corEnergySumTemplate.

Referenced by corEnergySumTemplate().

145  {
146  m_corEnergySumTemplate = corEnergySumTempl;
147 }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
void TriggerMenuParser::setCorMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  corMuonTempl)

Definition at line 136 of file TriggerMenuParser.cc.

References m_corMuonTemplate.

Referenced by corMuonTemplate().

136  {
137  m_corMuonTemplate = corMuonTempl;
138 }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
void TriggerMenuParser::setGtAlgorithmAliasMap ( const AlgorithmMap algoMap)

Definition at line 153 of file TriggerMenuParser.cc.

References m_algorithmAliasMap.

Referenced by gtAlgorithmAliasMap().

153 { m_algorithmAliasMap = algoMap; }
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
void TriggerMenuParser::setGtAlgorithmImplementation ( const std::string &  val)
void TriggerMenuParser::setGtAlgorithmMap ( const AlgorithmMap algoMap)

Definition at line 150 of file TriggerMenuParser.cc.

References m_algorithmMap.

Referenced by gtAlgorithmMap().

150 { m_algorithmMap = algoMap; }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
void TriggerMenuParser::setGtConditionMap ( const std::vector< ConditionMap > &  condMap)

Definition at line 86 of file TriggerMenuParser.cc.

References m_conditionMap.

Referenced by gtConditionMap().

86 { m_conditionMap = condMap; }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
void TriggerMenuParser::setGtNumberConditionChips ( const unsigned int &  numberConditionChipsValue)

Definition at line 65 of file TriggerMenuParser.cc.

References m_numberConditionChips.

Referenced by gtNumberConditionChips(), and L1TGlobalProducer::produce().

65  {
66  m_numberConditionChips = numberConditionChipsValue;
67 }
unsigned int m_numberConditionChips
hardware limits
void TriggerMenuParser::setGtNumberPhysTriggers ( const unsigned int &  numberPhysTriggersValue)

Definition at line 81 of file TriggerMenuParser.cc.

References m_numberPhysTriggers.

Referenced by gtNumberPhysTriggers(), and L1TGlobalProducer::produce().

81  {
82  m_numberPhysTriggers = numberPhysTriggersValue;
83 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
void TriggerMenuParser::setGtOrderConditionChip ( const std::vector< int > &  orderConditionChipValue)

Definition at line 76 of file TriggerMenuParser.cc.

References m_orderConditionChip.

Referenced by gtOrderConditionChip(), and L1TGlobalProducer::produce().

76  {
77  m_orderConditionChip = orderConditionChipValue;
78 }
std::vector< int > m_orderConditionChip
void TriggerMenuParser::setGtPinsOnConditionChip ( const unsigned int &  pinsOnConditionChipValue)

Definition at line 70 of file TriggerMenuParser.cc.

References m_pinsOnConditionChip.

Referenced by gtPinsOnConditionChip(), and L1TGlobalProducer::produce().

70  {
71  m_pinsOnConditionChip = pinsOnConditionChipValue;
72 }
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
void TriggerMenuParser::setGtScaleDbKey ( const std::string &  scaleKey)

Definition at line 103 of file TriggerMenuParser.cc.

References m_scaleDbKey.

Referenced by gtScales().

103 { m_scaleDbKey = scaleKey; }
std::string m_scaleDbKey
menu associated scale key
void TriggerMenuParser::setGtTriggerMenuAuthor ( const std::string &  val)

Definition at line 366 of file TriggerMenuParser.cc.

References m_triggerMenuAuthor, and heppy_batch::val.

Referenced by gtTriggerMenuAuthor().

void TriggerMenuParser::setGtTriggerMenuDate ( const std::string &  val)

Definition at line 364 of file TriggerMenuParser.cc.

References m_triggerMenuDate, and heppy_batch::val.

Referenced by gtTriggerMenuDate().

void TriggerMenuParser::setGtTriggerMenuDescription ( const std::string &  val)
void TriggerMenuParser::setGtTriggerMenuImplementation ( const unsigned long &  menuImplementation)

Definition at line 98 of file TriggerMenuParser.cc.

References m_triggerMenuImplementation.

Referenced by gtTriggerMenuImplementation().

98  {
99  m_triggerMenuImplementation = menuImplementation;
100 }
unsigned long m_triggerMenuImplementation
void TriggerMenuParser::setGtTriggerMenuInterface ( const std::string &  menuInterface)

Definition at line 89 of file TriggerMenuParser.cc.

References m_triggerMenuInterface.

Referenced by gtTriggerMenuInterface().

89  {
90  m_triggerMenuInterface = menuInterface;
91 }
std::string m_triggerMenuInterface
menu names
void TriggerMenuParser::setGtTriggerMenuInterfaceAuthor ( const std::string &  val)

Definition at line 356 of file TriggerMenuParser.cc.

References m_triggerMenuInterfaceAuthor, and heppy_batch::val.

Referenced by gtTriggerMenuInterfaceAuthor().

356  {
358 }
std::string m_triggerMenuInterfaceAuthor
void TriggerMenuParser::setGtTriggerMenuInterfaceDate ( const std::string &  val)

Definition at line 354 of file TriggerMenuParser.cc.

References m_triggerMenuInterfaceDate, and heppy_batch::val.

Referenced by gtTriggerMenuInterfaceDate().

std::string m_triggerMenuInterfaceDate
number of technical triggers
void TriggerMenuParser::setGtTriggerMenuInterfaceDescription ( const std::string &  val)
void TriggerMenuParser::setGtTriggerMenuName ( const std::string &  menuName)

Definition at line 96 of file TriggerMenuParser.cc.

References m_triggerMenuName.

Referenced by gtTriggerMenuName().

96 { m_triggerMenuName = menuName; }
void TriggerMenuParser::setGtTriggerMenuUUID ( const int  uuid)

Definition at line 94 of file TriggerMenuParser.cc.

References m_triggerMenuUUID, and createPayload::uuid.

Referenced by gtTriggerMenuUUID().

void TriggerMenuParser::setVecCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  vecCaloTempl)

Definition at line 110 of file TriggerMenuParser.cc.

References m_vecCaloTemplate.

Referenced by vecCaloTemplate().

110  {
111  m_vecCaloTemplate = vecCaloTempl;
112 }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
void TriggerMenuParser::setVecCorrelationTemplate ( const std::vector< std::vector< CorrelationTemplate > > &  vecCorrelationTempl)

Definition at line 124 of file TriggerMenuParser.cc.

References m_vecCorrelationTemplate.

Referenced by vecCorrelationTemplate().

125  {
126  m_vecCorrelationTemplate = vecCorrelationTempl;
127 }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
void TriggerMenuParser::setVecCorrelationWithOverlapRemovalTemplate ( const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &  vecCorrelationWithOverlapRemovalTempl)

Definition at line 129 of file TriggerMenuParser.cc.

References m_vecCorrelationWithOverlapRemovalTemplate.

Referenced by vecCorrelationWithOverlapRemovalTemplate().

130  {
131  m_vecCorrelationWithOverlapRemovalTemplate = vecCorrelationWithOverlapRemovalTempl;
132 }
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
void TriggerMenuParser::setVecEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  vecEnergySumTempl)

Definition at line 114 of file TriggerMenuParser.cc.

References m_vecEnergySumTemplate.

Referenced by vecEnergySumTemplate().

115  {
116  m_vecEnergySumTemplate = vecEnergySumTempl;
117 }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
void TriggerMenuParser::setVecExternalTemplate ( const std::vector< std::vector< ExternalTemplate > > &  vecExternalTempl)

Definition at line 119 of file TriggerMenuParser.cc.

References m_vecExternalTemplate.

Referenced by vecExternalTemplate().

120  {
121  m_vecExternalTemplate = vecExternalTempl;
122 }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
void TriggerMenuParser::setVecMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  vecMuonTempl)

Definition at line 106 of file TriggerMenuParser.cc.

References m_vecMuonTemplate.

Referenced by vecMuonTemplate().

106  {
107  m_vecMuonTemplate = vecMuonTempl;
108 }
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::vecCaloTemplate ( ) const
inline

Definition at line 122 of file TriggerMenuParser.h.

References m_vecCaloTemplate, and setVecCaloTemplate().

Referenced by L1TGlobalProducer::produce().

122 { return m_vecCaloTemplate; }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
const std::vector<std::vector<CorrelationTemplate> >& l1t::TriggerMenuParser::vecCorrelationTemplate ( ) const
inline

Definition at line 142 of file TriggerMenuParser.h.

References m_vecCorrelationTemplate, and setVecCorrelationTemplate().

Referenced by L1TGlobalProducer::produce().

142  {
144  }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& l1t::TriggerMenuParser::vecCorrelationWithOverlapRemovalTemplate ( ) const
inline

Definition at line 149 of file TriggerMenuParser.h.

References m_vecCorrelationWithOverlapRemovalTemplate, and setVecCorrelationWithOverlapRemovalTemplate().

Referenced by L1TGlobalProducer::produce().

149  {
151  }
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
const std::vector<std::vector<EnergySumTemplate> >& l1t::TriggerMenuParser::vecEnergySumTemplate ( ) const
inline

Definition at line 127 of file TriggerMenuParser.h.

References m_vecEnergySumTemplate, and setVecEnergySumTemplate().

Referenced by L1TGlobalProducer::produce().

127  {
128  return m_vecEnergySumTemplate;
129  }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
const std::vector<std::vector<ExternalTemplate> >& l1t::TriggerMenuParser::vecExternalTemplate ( ) const
inline

Definition at line 135 of file TriggerMenuParser.h.

References m_vecExternalTemplate, and setVecExternalTemplate().

Referenced by L1TGlobalProducer::produce().

135  {
136  return m_vecExternalTemplate;
137  }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::vecMuonTemplate ( ) const
inline

get / set the vectors containing the conditions

Definition at line 118 of file TriggerMenuParser.h.

References m_vecMuonTemplate, and setVecMuonTemplate().

Referenced by L1TGlobalProducer::produce().

118 { return m_vecMuonTemplate; }
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate

Member Data Documentation

AlgorithmMap l1t::TriggerMenuParser::m_algorithmAliasMap
private

map containing the physics algorithms (by alias)

Definition at line 378 of file TriggerMenuParser.h.

Referenced by gtAlgorithmAliasMap(), insertAlgorithmIntoMap(), and setGtAlgorithmAliasMap().

std::string l1t::TriggerMenuParser::m_algorithmImplementation
private

Definition at line 345 of file TriggerMenuParser.h.

Referenced by gtAlgorithmImplementation(), and setGtAlgorithmImplementation().

AlgorithmMap l1t::TriggerMenuParser::m_algorithmMap
private

map containing the physics algorithms (by name)

Definition at line 375 of file TriggerMenuParser.h.

Referenced by clearMaps(), gtAlgorithmMap(), insertAlgorithmIntoMap(), and setGtAlgorithmMap().

std::vector<ConditionMap> l1t::TriggerMenuParser::m_conditionMap
private

map containing the conditions (per condition chip) - transient

Definition at line 349 of file TriggerMenuParser.h.

Referenced by clearMaps(), gtConditionMap(), insertConditionIntoMap(), parseCondFormats(), and setGtConditionMap().

std::vector<std::vector<CaloTemplate> > l1t::TriggerMenuParser::m_corCaloTemplate
private
std::vector<std::vector<EnergySumTemplate> > l1t::TriggerMenuParser::m_corEnergySumTemplate
private
std::vector<std::vector<MuonTemplate> > l1t::TriggerMenuParser::m_corMuonTemplate
private
GlobalScales l1t::TriggerMenuParser::m_gtScales
private
unsigned int l1t::TriggerMenuParser::m_numberConditionChips
private

hardware limits

number of condition chips

Definition at line 321 of file TriggerMenuParser.h.

Referenced by gtNumberConditionChips(), insertAlgorithmIntoMap(), parseCondFormats(), and setGtNumberConditionChips().

unsigned int l1t::TriggerMenuParser::m_numberPhysTriggers
private

number of physics trigger algorithms

Definition at line 331 of file TriggerMenuParser.h.

Referenced by gtNumberPhysTriggers(), insertAlgorithmIntoMap(), and setGtNumberPhysTriggers().

std::vector<int> l1t::TriggerMenuParser::m_orderConditionChip
private

correspondence "condition chip - GTL algorithm word" in the hardware chip 2: 0 - 95; chip 1: 96 - 128 (191)

Definition at line 328 of file TriggerMenuParser.h.

Referenced by gtOrderConditionChip(), insertAlgorithmIntoMap(), and setGtOrderConditionChip().

unsigned int l1t::TriggerMenuParser::m_pinsOnConditionChip
private

number of pins on the GTL condition chips

Definition at line 324 of file TriggerMenuParser.h.

Referenced by gtPinsOnConditionChip(), insertAlgorithmIntoMap(), and setGtPinsOnConditionChip().

std::string l1t::TriggerMenuParser::m_scaleDbKey
private

menu associated scale key

Definition at line 359 of file TriggerMenuParser.h.

Referenced by gtScaleDbKey(), and setGtScaleDbKey().

std::string l1t::TriggerMenuParser::m_triggerMenuAuthor
private

Definition at line 342 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuAuthor(), and setGtTriggerMenuAuthor().

std::string l1t::TriggerMenuParser::m_triggerMenuDate
private

Definition at line 341 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDate(), parseCondFormats(), and setGtTriggerMenuDate().

std::string l1t::TriggerMenuParser::m_triggerMenuDescription
private
unsigned long l1t::TriggerMenuParser::m_triggerMenuImplementation
private
std::string l1t::TriggerMenuParser::m_triggerMenuInterface
private

menu names

Definition at line 353 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterface(), parseCondFormats(), and setGtTriggerMenuInterface().

std::string l1t::TriggerMenuParser::m_triggerMenuInterfaceAuthor
private
std::string l1t::TriggerMenuParser::m_triggerMenuInterfaceDate
private

number of technical triggers

Definition at line 337 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDate(), and setGtTriggerMenuInterfaceDate().

std::string l1t::TriggerMenuParser::m_triggerMenuInterfaceDescription
private
std::string l1t::TriggerMenuParser::m_triggerMenuName
private

Definition at line 354 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuName(), parseCondFormats(), and setGtTriggerMenuName().

unsigned long l1t::TriggerMenuParser::m_triggerMenuUUID
private

Definition at line 356 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuUUID(), parseCondFormats(), and setGtTriggerMenuUUID().

std::vector<std::vector<CaloTemplate> > l1t::TriggerMenuParser::m_vecCaloTemplate
private
std::vector<std::vector<CorrelationTemplate> > l1t::TriggerMenuParser::m_vecCorrelationTemplate
private
std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> > l1t::TriggerMenuParser::m_vecCorrelationWithOverlapRemovalTemplate
private
std::vector<std::vector<EnergySumTemplate> > l1t::TriggerMenuParser::m_vecEnergySumTemplate
private
std::vector<std::vector<ExternalTemplate> > l1t::TriggerMenuParser::m_vecExternalTemplate
private
std::vector<std::vector<MuonTemplate> > l1t::TriggerMenuParser::m_vecMuonTemplate
private

vectors containing the conditions explicit, due to persistency...

Definition at line 363 of file TriggerMenuParser.h.

Referenced by parseCondFormats(), parseMuon(), setVecMuonTemplate(), and vecMuonTemplate().