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 setVecAXOL1TLTemplate (const std::vector< std::vector< AXOL1TLTemplate > > &)
 
void setVecCaloTemplate (const std::vector< std::vector< CaloTemplate > > &)
 
void setVecCorrelationTemplate (const std::vector< std::vector< CorrelationTemplate > > &)
 
void setVecCorrelationThreeBodyTemplate (const std::vector< std::vector< CorrelationThreeBodyTemplate > > &)
 
void setVecCorrelationWithOverlapRemovalTemplate (const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &)
 
void setVecEnergySumTemplate (const std::vector< std::vector< EnergySumTemplate > > &)
 
void setVecEnergySumZdcTemplate (const std::vector< std::vector< EnergySumZdcTemplate > > &)
 
void setVecExternalTemplate (const std::vector< std::vector< ExternalTemplate > > &)
 
void setVecMuonShowerTemplate (const std::vector< std::vector< MuonShowerTemplate > > &)
 
void setVecMuonTemplate (const std::vector< std::vector< MuonTemplate > > &)
 
 TriggerMenuParser ()
 
const std::vector< std::vector< AXOL1TLTemplate > > & vecAXOL1TLTemplate () const
 
const std::vector< std::vector< CaloTemplate > > & vecCaloTemplate () const
 
const std::vector< std::vector< CorrelationTemplate > > & vecCorrelationTemplate () const
 
const std::vector< std::vector< CorrelationThreeBodyTemplate > > & vecCorrelationThreeBodyTemplate () const
 
const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > & vecCorrelationWithOverlapRemovalTemplate () const
 
const std::vector< std::vector< EnergySumTemplate > > & vecEnergySumTemplate () const
 
const std::vector< std::vector< EnergySumZdcTemplate > > & vecEnergySumZdcTemplate () const
 
const std::vector< std::vector< ExternalTemplate > > & vecExternalTemplate () const
 
const std::vector< std::vector< MuonShowerTemplate > > & vecMuonShowerTemplate () 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 (L1TUtmAlgorithm algorithm, unsigned int chipNr=0)
 parse all algorithms More...
 
bool parseAXOL1TL (L1TUtmCondition condAXOL1TL, unsigned int chipNr=0)
 
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 (L1TUtmCondition condCalo, unsigned int chipNr=0, const bool corrFlag=false)
 parse a calorimeter condition More...
 
bool parseCaloCorr (const L1TUtmObject *corrCalo, unsigned int chipNr=0)
 
bool parseCorrelation (L1TUtmCondition corrCond, unsigned int chipNr=0)
 parse a correlation condition More...
 
bool parseCorrelationThreeBody (L1TUtmCondition corrCond, unsigned int chipNr=0)
 parse a three-body correlation condition More...
 
bool parseCorrelationWithOverlapRemoval (const L1TUtmCondition &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 (L1TUtmCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
 parse an "energy sum" condition More...
 
bool parseEnergySumCorr (const L1TUtmObject *corrESum, unsigned int chipNr=0)
 
bool parseEnergySumZdc (L1TUtmCondition condEnergySumZdcs, unsigned int chipNr=0, const bool corrFlag=false)
 
bool parseExternal (L1TUtmCondition condExt, unsigned int chipNr=0)
 
bool parseMuon (L1TUtmCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
 parse a muon condition More...
 
bool parseMuonCorr (const L1TUtmObject *condMu, unsigned int chipNr=0)
 
bool parseMuonShower (L1TUtmCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
 parse a muon shower condition More...
 
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...
 
void parseUpt_LUTS (std::map< std::string, tmeventsetup::esScale > scaleMap, std::string lutpfx, std::string obj1, unsigned int prec)
 

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< AXOL1TLTemplate > > m_vecAXOL1TLTemplate
 
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
 
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
 
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate
 
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
 
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
 
std::vector< std::vector< EnergySumZdcTemplate > > m_vecEnergySumZdcTemplate
 
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
 
std::vector< std::vector< MuonShowerTemplate > > m_vecMuonShowerTemplate
 
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
 

Detailed Description

Definition at line 67 of file TriggerMenuParser.h.

Constructor & Destructor Documentation

◆ TriggerMenuParser()

TriggerMenuParser::TriggerMenuParser ( )

constructor empty

Definition at line 66 of file TriggerMenuParser.cc.

67  : m_triggerMenuInterface("NULL"),
68  m_triggerMenuName("NULL"),
70  m_scaleDbKey("NULL")
71 
72 {
73  // menu names, scale key initialized to NULL due to ORACLE treatment of strings
74 
75  // empty
76 }
std::string m_triggerMenuInterface
menu names
std::string m_scaleDbKey
menu associated scale key
unsigned long m_triggerMenuImplementation

◆ ~TriggerMenuParser()

TriggerMenuParser::~TriggerMenuParser ( )
virtual

destructor

Definition at line 79 of file TriggerMenuParser.cc.

Member Function Documentation

◆ clearMaps()

void TriggerMenuParser::clearMaps ( )
private

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

Definition at line 428 of file TriggerMenuParser.cc.

428  {
429  // loop over condition maps (one map per condition chip)
430  // then loop over conditions in the map
431  for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip != m_conditionMap.end();
432  itCondOnChip++) {
433  // the conditions in the maps are deleted in L1uGtTriggerMenu, not here
434 
435  itCondOnChip->clear();
436  }
437 
438  // the algorithms in the maps are deleted in L1uGtTriggerMenu, not here
439  m_algorithmMap.clear();
440 }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient

◆ corCaloTemplate()

const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::corCaloTemplate ( ) const
inline

Definition at line 197 of file TriggerMenuParser.h.

References m_corCaloTemplate.

Referenced by L1TGlobalProducer::produce().

197 { return m_corCaloTemplate; }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate

◆ corEnergySumTemplate()

const std::vector<std::vector<EnergySumTemplate> >& l1t::TriggerMenuParser::corEnergySumTemplate ( ) const
inline

Definition at line 202 of file TriggerMenuParser.h.

References m_corEnergySumTemplate.

Referenced by L1TGlobalProducer::produce().

202  {
203  return m_corEnergySumTemplate;
204  }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate

◆ corMuonTemplate()

const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::corMuonTemplate ( ) const
inline

Definition at line 192 of file TriggerMenuParser.h.

References m_corMuonTemplate.

Referenced by L1TGlobalProducer::produce().

192 { return m_corMuonTemplate; }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate

◆ getExternalSignals()

std::map< std::string, unsigned int > TriggerMenuParser::getExternalSignals ( const L1TUtmTriggerMenu utmMenu)

Definition at line 191 of file TriggerMenuParser.cc.

References L1TUtmTriggerMenu::getConditionMap(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

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

191  {
192  using namespace tmeventsetup;
193  const std::map<std::string, L1TUtmCondition>& condMap = utmMenu->getConditionMap();
194 
195  std::map<std::string, unsigned int> extBitMap;
196 
197  //loop over the algorithms
198  for (const auto& cit : condMap) {
199  const L1TUtmCondition& condition = cit.second;
200  if (condition.getType() == esConditionType::Externals) {
201  // Get object for External conditions
202  const std::vector<L1TUtmObject>& objects = condition.getObjects();
203  for (const auto& object : objects) {
204  if (object.getType() == esObjectType::EXT) {
205  unsigned int channelID = object.getExternalChannelId();
206  std::string name = object.getExternalSignalName();
207 
208  if (extBitMap.count(name) == 0)
209  extBitMap.insert(std::map<std::string, unsigned int>::value_type(name, channelID));
210  }
211  }
212  }
213  }
214 
215  return extBitMap;
216 }
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
const std::map< std::string, L1TUtmCondition > & getConditionMap() const

◆ gtAlgorithmAliasMap()

const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmAliasMap ( ) const
inline

get / set the algorithm map (by alias)

Definition at line 214 of file TriggerMenuParser.h.

References m_algorithmAliasMap.

Referenced by L1TGlobalProducer::produce().

214 { return m_algorithmAliasMap; }
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)

◆ gtAlgorithmImplementation()

const std::string& l1t::TriggerMenuParser::gtAlgorithmImplementation ( ) const
inline

Definition at line 255 of file TriggerMenuParser.h.

References m_algorithmImplementation.

255 { return m_algorithmImplementation; }
std::string m_algorithmImplementation

◆ gtAlgorithmMap()

const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmMap ( ) const
inline

get / set the algorithm map (by name)

Definition at line 209 of file TriggerMenuParser.h.

References m_algorithmMap.

Referenced by L1TGlobalProducer::produce().

209 { return m_algorithmMap; }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)

◆ gtConditionMap()

const std::vector<ConditionMap>& l1t::TriggerMenuParser::gtConditionMap ( ) const
inline

get / set / build the condition maps

Definition at line 100 of file TriggerMenuParser.h.

References m_conditionMap.

100 { return m_conditionMap; }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient

◆ gtNumberConditionChips()

const unsigned int l1t::TriggerMenuParser::gtNumberConditionChips ( ) const
inline

get / set the number of condition chips in GTL

Definition at line 78 of file TriggerMenuParser.h.

References m_numberConditionChips.

78 { return m_numberConditionChips; }
unsigned int m_numberConditionChips
hardware limits

◆ gtNumberPhysTriggers()

const unsigned int l1t::TriggerMenuParser::gtNumberPhysTriggers ( ) const
inline

get / set the number of physics trigger algorithms

Definition at line 94 of file TriggerMenuParser.h.

References m_numberPhysTriggers.

94 { return m_numberPhysTriggers; }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms

◆ gtOrderConditionChip()

std::vector<int> l1t::TriggerMenuParser::gtOrderConditionChip ( ) const
inline

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

Definition at line 89 of file TriggerMenuParser.h.

References m_orderConditionChip.

89 { return m_orderConditionChip; }
std::vector< int > m_orderConditionChip

◆ gtPinsOnConditionChip()

const unsigned int l1t::TriggerMenuParser::gtPinsOnConditionChip ( ) const
inline

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

Definition at line 83 of file TriggerMenuParser.h.

References m_pinsOnConditionChip.

83 { return m_pinsOnConditionChip; }
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips

◆ gtScaleDbKey()

const std::string& l1t::TriggerMenuParser::gtScaleDbKey ( ) const
inline

menu associated scale key

Definition at line 120 of file TriggerMenuParser.h.

References m_scaleDbKey.

Referenced by L1TGlobalProducer::produce().

120 { return m_scaleDbKey; }
std::string m_scaleDbKey
menu associated scale key

◆ gtScales()

const GlobalScales& l1t::TriggerMenuParser::gtScales ( ) const
inline

menu associated scales

Definition at line 123 of file TriggerMenuParser.h.

References m_gtScales.

Referenced by L1TGlobalProducer::produce().

123 { return m_gtScales; }

◆ gtTriggerMenuAuthor()

const std::string& l1t::TriggerMenuParser::gtTriggerMenuAuthor ( ) const
inline

Definition at line 247 of file TriggerMenuParser.h.

References m_triggerMenuAuthor.

247 { return m_triggerMenuAuthor; }

◆ gtTriggerMenuDate()

const std::string& l1t::TriggerMenuParser::gtTriggerMenuDate ( ) const
inline

Definition at line 243 of file TriggerMenuParser.h.

References m_triggerMenuDate.

243 { return m_triggerMenuDate; }

◆ gtTriggerMenuDescription()

const std::string& l1t::TriggerMenuParser::gtTriggerMenuDescription ( ) const
inline

Definition at line 251 of file TriggerMenuParser.h.

References m_triggerMenuDescription.

251 { return m_triggerMenuDescription; }
std::string m_triggerMenuDescription

◆ gtTriggerMenuImplementation()

const unsigned long l1t::TriggerMenuParser::gtTriggerMenuImplementation ( ) const
inline

Definition at line 115 of file TriggerMenuParser.h.

References m_triggerMenuImplementation.

Referenced by L1TGlobalProducer::produce().

115 { return m_triggerMenuImplementation; }
unsigned long m_triggerMenuImplementation

◆ gtTriggerMenuInterface()

const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterface ( ) const
inline

get / set the trigger menu names

Definition at line 105 of file TriggerMenuParser.h.

References m_triggerMenuInterface.

Referenced by L1TGlobalProducer::produce().

105 { return m_triggerMenuInterface; }
std::string m_triggerMenuInterface
menu names

◆ gtTriggerMenuInterfaceAuthor()

const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceAuthor ( ) const
inline

Definition at line 229 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceAuthor.

std::string m_triggerMenuInterfaceAuthor

◆ gtTriggerMenuInterfaceDate()

const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDate ( ) const
inline

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

Definition at line 225 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDate.

225 { return m_triggerMenuInterfaceDate; }
std::string m_triggerMenuInterfaceDate
number of technical triggers

◆ gtTriggerMenuInterfaceDescription()

const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDescription ( ) const
inline

Definition at line 233 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDescription.

std::string m_triggerMenuInterfaceDescription

◆ gtTriggerMenuName()

const std::string& l1t::TriggerMenuParser::gtTriggerMenuName ( ) const
inline

Definition at line 110 of file TriggerMenuParser.h.

References m_triggerMenuName.

Referenced by L1TGlobalProducer::produce().

110 { return m_triggerMenuName; }

◆ gtTriggerMenuUUID()

const int l1t::TriggerMenuParser::gtTriggerMenuUUID ( ) const
inline

Definition at line 239 of file TriggerMenuParser.h.

References m_triggerMenuUUID.

Referenced by L1TGlobalProducer::produce().

239 { return m_triggerMenuUUID; }
unsigned long m_triggerMenuUUID

◆ insertAlgorithmIntoMap()

bool TriggerMenuParser::insertAlgorithmIntoMap ( const GlobalAlgorithm alg)
private

insert an algorithm into algorithm map

Definition at line 462 of file TriggerMenuParser.cc.

References GlobalAlgorithm::algoAlias(), GlobalAlgorithm::algoBitNumber(), GlobalAlgorithm::algoChipNumber(), GlobalAlgorithm::algoName(), GlobalAlgorithm::algoOutputPin(), L1TBPTX_cfi::bitNumber, LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

462  {
463  std::string algName = alg.algoName();
464  const std::string& algAlias = alg.algoAlias();
465  //LogTrace("TriggerMenuParser")
466  //<< " Trying to insert algorithm \"" << algName << "\" in the algorithm map." ;
467 
468  // no algorithm name has to appear twice!
469  if (m_algorithmMap.count(algName) != 0) {
470  LogTrace("TriggerMenuParser") << " Algorithm \"" << algName
471  << "\"already exists in the algorithm map- not inserted!" << std::endl;
472  return false;
473  }
474 
475  if (m_algorithmAliasMap.count(algAlias) != 0) {
476  LogTrace("TriggerMenuParser") << " Algorithm alias \"" << algAlias
477  << "\"already exists in the algorithm alias map- not inserted!" << std::endl;
478  return false;
479  }
480 
481  // bit number less than zero or greater than maximum number of algorithms
482  int bitNumber = alg.algoBitNumber();
483  if ((bitNumber < 0) || (bitNumber >= static_cast<int>(m_numberPhysTriggers))) {
484  LogTrace("TriggerMenuParser") << " Bit number " << bitNumber << " outside allowed range [0, "
485  << m_numberPhysTriggers << ") - algorithm not inserted!" << std::endl;
486  return false;
487  }
488 
489  // maximum number of algorithms
490  if (m_algorithmMap.size() >= m_numberPhysTriggers) {
491  LogTrace("TriggerMenuParser") << " More than maximum allowed " << m_numberPhysTriggers
492  << " algorithms in the algorithm map - not inserted!" << std::endl;
493  return false;
494  }
495 
496  // chip number outside allowed values
497  int chipNr = alg.algoChipNumber(
498  static_cast<int>(m_numberConditionChips), static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
499 
500  if ((chipNr < 0) || (chipNr > static_cast<int>(m_numberConditionChips))) {
501  LogTrace("TriggerMenuParser") << " Chip number " << chipNr << " outside allowed range [0, "
502  << m_numberConditionChips << ") - algorithm not inserted!" << std::endl;
503  return false;
504  }
505 
506  // output pin outside allowed values
507  int outputPin = alg.algoOutputPin(
508  static_cast<int>(m_numberConditionChips), static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
509 
510  if ((outputPin < 0) || (outputPin > static_cast<int>(m_pinsOnConditionChip))) {
511  LogTrace("TriggerMenuParser") << " Output pin " << outputPin << " outside allowed range [0, "
512  << m_pinsOnConditionChip << "] - algorithm not inserted!" << std::endl;
513  return false;
514  }
515 
516  // no two algorithms on the same chip can have the same output pin
517  for (CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
518  int iPin = (itAlgo->second)
519  .algoOutputPin(static_cast<int>(m_numberConditionChips),
520  static_cast<int>(m_pinsOnConditionChip),
522  std::string iName = itAlgo->first;
523  int iChip = (itAlgo->second)
524  .algoChipNumber(static_cast<int>(m_numberConditionChips),
525  static_cast<int>(m_pinsOnConditionChip),
527 
528  if ((outputPin == iPin) && (chipNr == iChip)) {
529  LogTrace("TriggerMenuParser") << " Output pin " << outputPin << " is the same as for algorithm " << iName
530  << "\n from the same chip number " << chipNr << " - algorithm not inserted!"
531  << std::endl;
532  return false;
533  }
534  }
535 
536  // insert algorithm
537  m_algorithmMap[algName] = alg;
538  m_algorithmAliasMap[algAlias] = alg;
539 
540  //LogTrace("TriggerMenuParser")
541  //<< " OK - algorithm inserted!"
542  //<< std::endl;
543 
544  return true;
545 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
int algoBitNumber() const
get / set algorithm bit number
unsigned int m_numberConditionChips
hardware limits
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
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
#define LogTrace(id)
const int algoChipNumber() const
get / set algorithm bit number
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
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 std::string algoName() const
get / set algorithm name

◆ insertConditionIntoMap()

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 444 of file TriggerMenuParser.cc.

References submitPVResolutionJobs::count, LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

444  {
445  std::string cName = cond.condName();
446  LogTrace("TriggerMenuParser") << " Trying to insert condition \"" << cName << "\" in the condition map."
447  << std::endl;
448 
449  // no condition name has to appear twice!
450  if ((m_conditionMap[chipNr]).count(cName) != 0) {
451  LogTrace("TriggerMenuParser") << " Condition " << cName << " already exists - not inserted!" << std::endl;
452  return false;
453  }
454 
455  (m_conditionMap[chipNr])[cName] = &cond;
456  LogTrace("TriggerMenuParser") << " OK - condition inserted!" << std::endl;
457 
458  return true;
459 }
#define LogTrace(id)
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient

◆ l1t2string()

template<typename T >
std::string TriggerMenuParser::l1t2string ( T  data)
private

Definition at line 548 of file TriggerMenuParser.cc.

References data, and contentValuesCheck::ss.

548  {
549  std::stringstream ss;
550  ss << data;
551  return ss.str();
552 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ l1tstr2int()

int TriggerMenuParser::l1tstr2int ( const std::string  data)
private

Definition at line 553 of file TriggerMenuParser.cc.

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

553  {
554  std::stringstream ss;
555  ss << data;
556  int value;
557  ss >> value;
558  return value;
559 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ parseAlgorithm()

bool TriggerMenuParser::parseAlgorithm ( L1TUtmAlgorithm  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 3637 of file TriggerMenuParser.cc.

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

3637  {
3638  // get alias
3639  std::string algAlias = algorithm.getName();
3640  const std::string& algName = algorithm.getName();
3641 
3642  if (algAlias.empty()) {
3643  algAlias = algName;
3644  LogDebug("TriggerMenuParser") << "\n No alias defined for algorithm. Alias set to algorithm name."
3645  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3646  << std::endl;
3647  } else {
3648  //LogDebug("TriggerMenuParser")
3649  LogDebug("TriggerMenuParser") << "\n Alias defined for algorithm."
3650  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3651  << std::endl;
3652  }
3653 
3654  // get the logical expression
3655  const std::string& logExpression = algorithm.getExpressionInCondition();
3656 
3657  LogDebug("TriggerMenuParser") << " Logical expression: " << logExpression
3658  << " Chip number: " << chipNr << std::endl;
3659 
3660  // determine output pin
3661  int outputPin = algorithm.getIndex();
3662 
3663  //LogTrace("TriggerMenuParser")
3664  LogDebug("TriggerMenuParser") << " Output pin: " << outputPin << std::endl;
3665 
3666  // compute the bit number from chip number, output pin and order of the chips
3667  // pin numbering start with 1, bit numbers with 0
3668  int bitNumber = outputPin; // + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1;
3669 
3670  //LogTrace("TriggerMenuParser")
3671  LogDebug("TriggerMenuParser") << " Bit number: " << bitNumber << std::endl;
3672 
3673  // create a new algorithm and insert it into algorithm map
3674  GlobalAlgorithm alg(algName, logExpression, bitNumber);
3675  alg.setAlgoChipNumber(static_cast<int>(chipNr));
3676  alg.setAlgoAlias(algAlias);
3677 
3678  if (edm::isDebugEnabled()) {
3679  std::ostringstream myCoutStream;
3680  alg.print(myCoutStream);
3681  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3682  }
3683 
3684  // insert algorithm into the map
3685  if (!insertAlgorithmIntoMap(alg)) {
3686  return false;
3687  }
3688 
3689  return true;
3690 }
bool isDebugEnabled()
#define LogTrace(id)
bool insertAlgorithmIntoMap(const GlobalAlgorithm &alg)
insert an algorithm into algorithm map
#define LogDebug(id)

◆ parseAXOL1TL()

bool TriggerMenuParser::parseAXOL1TL ( L1TUtmCondition  condAXOL1TL,
unsigned int  chipNr = 0 
)
private

parseEnergySumCorr Parse an "energy sum" 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 2720 of file TriggerMenuParser.cc.

References DMR_cfg::cut, L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Skims_PA_cff::name, AXOL1TLTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), AXOL1TLTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::TypeAXOL1TL.

2720  {
2721  using namespace tmeventsetup;
2722 
2723  // get condition, particle name and particle type
2724  std::string condition = "axol1tl";
2725  std::string type = l1t2string(condAXOL1TL.getType());
2726  std::string name = l1t2string(condAXOL1TL.getName());
2727 
2728  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2729  << " (in parseAXOL1TL) " << std::endl
2730  << " condition = " << condition << std::endl
2731  << " type = " << type << std::endl
2732  << " name = " << name << std::endl;
2733 
2734  const int nrObj = 1;
2735  GtConditionType cType = TypeAXOL1TL;
2736 
2737  std::vector<AXOL1TLTemplate::ObjectParameter> objParameter(nrObj);
2738 
2739  if (int(condAXOL1TL.getObjects().size()) != nrObj) {
2740  edm::LogError("TriggerMenuParser") << " condAXOL1TL objects: nrObj = " << nrObj
2741  << "condAXOL1TL.getObjects().size() = " << condAXOL1TL.getObjects().size()
2742  << std::endl;
2743  return false;
2744  }
2745 
2746  // Get the axol1tl object
2747  L1TUtmObject object = condAXOL1TL.getObjects().at(0);
2748  int relativeBx = object.getBxOffset();
2749  bool gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
2750 
2751  //Loop over cuts for this object
2752  int lowerThresholdInd = 0;
2753  int upperThresholdInd = -1;
2754 
2755  const std::vector<L1TUtmCut>& cuts = object.getCuts();
2756  for (size_t kk = 0; kk < cuts.size(); kk++) {
2757  const L1TUtmCut& cut = cuts.at(kk);
2758 
2759  switch (cut.getCutType()) {
2760  case esCutType::AnomalyScore:
2761  lowerThresholdInd = cut.getMinimum().value;
2762  upperThresholdInd = cut.getMaximum().value;
2763  break;
2764  default:
2765  break;
2766  } //end switch
2767  } //end cut loop
2768 
2769  //fill object params
2770  objParameter[0].minAXOL1TLThreshold = lowerThresholdInd;
2771  objParameter[0].maxAXOL1TLThreshold = upperThresholdInd;
2772 
2773  // create a new AXOL1TL condition
2774  AXOL1TLTemplate axol1tlCond(name);
2775  axol1tlCond.setCondType(cType);
2776  axol1tlCond.setCondGEq(gEq);
2777  axol1tlCond.setCondChipNr(chipNr);
2778  axol1tlCond.setCondRelativeBx(relativeBx);
2779  axol1tlCond.setConditionParameter(objParameter);
2780 
2781  if (edm::isDebugEnabled()) {
2782  std::ostringstream myCoutStream;
2783  axol1tlCond.print(myCoutStream);
2784  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2785  }
2786 
2787  // check that the condition does not exist already in the map
2788  if (!insertConditionIntoMap(axol1tlCond, chipNr)) {
2789  edm::LogError("TriggerMenuParser") << " Error: duplicate AXOL1TL condition (" << name << ")" << std::endl;
2790  return false;
2791  }
2792 
2793  (m_vecAXOL1TLTemplate[chipNr]).push_back(axol1tlCond);
2794 
2795  return true;
2796 }
bool isDebugEnabled()
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
std::vector< std::vector< AXOL1TLTemplate > > m_vecAXOL1TLTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
#define LogDebug(id)

◆ parseCalMuEta_LUTS()

void TriggerMenuParser::parseCalMuEta_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2 
)
private

Definition at line 847 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

849  {
850  using namespace tmeventsetup;
851 
852  // First Delta Eta for this set
853  std::string scLabel1 = obj1;
854  scLabel1 += "-ETA";
855  std::string scLabel2 = obj2;
856  scLabel2 += "-ETA";
857 
858  //This LUT does not exist in L1 Menu file, don't fill it
859  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
860  return;
861 
862  const tmeventsetup::esScale* scale1 = &scaleMap.find(scLabel1)->second;
863  const tmeventsetup::esScale* scale2 = &scaleMap.find(scLabel2)->second;
864 
865  std::vector<long long> lut_cal_2_mu_eta;
866  getCaloMuonEtaConversionLut(lut_cal_2_mu_eta, scale1, scale2);
867 
868  std::string lutName = obj1;
869  lutName += "-";
870  lutName += obj2;
871  m_gtScales.setLUT_CalMuEta(lutName, lut_cal_2_mu_eta);
872 }
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:29

◆ parseCalMuPhi_LUTS()

void TriggerMenuParser::parseCalMuPhi_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2 
)
private

Definition at line 874 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

876  {
877  using namespace tmeventsetup;
878 
879  // First Delta Eta for this set
880  std::string scLabel1 = obj1;
881  scLabel1 += "-PHI";
882  std::string scLabel2 = obj2;
883  scLabel2 += "-PHI";
884 
885  //This LUT does not exist in L1 Menu file, don't fill it
886  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
887  return;
888 
889  const tmeventsetup::esScale* scale1 = &scaleMap.find(scLabel1)->second;
890  const tmeventsetup::esScale* scale2 = &scaleMap.find(scLabel2)->second;
891 
892  std::vector<long long> lut_cal_2_mu_phi;
893  getCaloMuonPhiConversionLut(lut_cal_2_mu_phi, scale1, scale2);
894 
895  std::string lutName = obj1;
896  lutName += "-";
897  lutName += obj2;
898  m_gtScales.setLUT_CalMuPhi(lutName, lut_cal_2_mu_phi);
899 }
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:42

◆ parseCalo()

bool TriggerMenuParser::parseCalo ( L1TUtmCondition  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 1650 of file TriggerMenuParser.cc.

References PixelTestBeamValidation_cfi::Charge, DMR_cfg::cut, L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), l1t::gtEG, l1t::gtJet, l1t::gtTau, createfilelist::int, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, CaloTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2023v12_cff::Threshold, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, l1t::TypeNull, and svgfig::window().

1650  {
1651  // XERCES_CPP_NAMESPACE_USE
1652  using namespace tmeventsetup;
1653 
1654  // get condition, particle name and type name
1655 
1656  std::string condition = "calo";
1657  std::string particle = "test-fix";
1658  std::string type = l1t2string(condCalo.getType());
1659  std::string name = l1t2string(condCalo.getName());
1660 
1661  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1662  << "\n (in parseCalo) "
1663  << "\n condition = " << condition << "\n particle = " << particle
1664  << "\n type = " << type << "\n name = " << name << std::endl;
1665 
1667 
1668  // determine object type type
1669  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1670  GlobalObject caloObjType;
1671  int nrObj = -1;
1672 
1673  if (condCalo.getType() == esConditionType::SingleEgamma) {
1674  caloObjType = gtEG;
1675  type = "1_s";
1676  cType = l1t::Type1s;
1677  nrObj = 1;
1678  } else if (condCalo.getType() == esConditionType::DoubleEgamma) {
1679  caloObjType = gtEG;
1680  type = "2_s";
1681  cType = l1t::Type2s;
1682  nrObj = 2;
1683  } else if (condCalo.getType() == esConditionType::TripleEgamma) {
1684  caloObjType = gtEG;
1685  cType = l1t::Type3s;
1686  type = "3";
1687  nrObj = 3;
1688  } else if (condCalo.getType() == esConditionType::QuadEgamma) {
1689  caloObjType = gtEG;
1690  cType = l1t::Type4s;
1691  type = "4";
1692  nrObj = 4;
1693  } else if (condCalo.getType() == esConditionType::SingleJet) {
1694  caloObjType = gtJet;
1695  cType = l1t::Type1s;
1696  type = "1_s";
1697  nrObj = 1;
1698  } else if (condCalo.getType() == esConditionType::DoubleJet) {
1699  caloObjType = gtJet;
1700  cType = l1t::Type2s;
1701  type = "2_s";
1702  nrObj = 2;
1703  } else if (condCalo.getType() == esConditionType::TripleJet) {
1704  caloObjType = gtJet;
1705  cType = l1t::Type3s;
1706  type = "3";
1707  nrObj = 3;
1708  } else if (condCalo.getType() == esConditionType::QuadJet) {
1709  caloObjType = gtJet;
1710  cType = l1t::Type4s;
1711  type = "4";
1712  nrObj = 4;
1713  } else if (condCalo.getType() == esConditionType::SingleTau) {
1714  caloObjType = gtTau;
1715  cType = l1t::Type1s;
1716  type = "1_s";
1717  nrObj = 1;
1718  } else if (condCalo.getType() == esConditionType::DoubleTau) {
1719  caloObjType = gtTau;
1720  cType = l1t::Type2s;
1721  type = "2_s";
1722  nrObj = 2;
1723  } else if (condCalo.getType() == esConditionType::TripleTau) {
1724  caloObjType = gtTau;
1725  cType = l1t::Type3s;
1726  type = "3";
1727  nrObj = 3;
1728  } else if (condCalo.getType() == esConditionType::QuadTau) {
1729  caloObjType = gtTau;
1730  cType = l1t::Type4s;
1731  type = "4";
1732  nrObj = 4;
1733  } else {
1734  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition (" << particle << ")" << std::endl;
1735  return false;
1736  }
1737 
1738  // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1739 
1740  if (nrObj < 0) {
1741  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type << ")"
1742  << "\nCan not determine number of trigger objects. " << std::endl;
1743  return false;
1744  }
1745 
1746  // get values
1747 
1748  // temporary storage of the parameters
1749  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1750 
1751  //BLW TO DO: Can this be dropped?
1752  CaloTemplate::CorrelationParameter corrParameter;
1753 
1754  // need at least one value for deltaPhiRange
1755  std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1756  tmpValues.reserve(nrObj);
1757 
1758  if (int(condCalo.getObjects().size()) != nrObj) {
1759  edm::LogError("TriggerMenuParser") << " condCalo objects: nrObj = " << nrObj
1760  << "condCalo.getObjects().size() = " << condCalo.getObjects().size()
1761  << std::endl;
1762  return false;
1763  }
1764 
1765  // std::string str_condCalo = "";
1766  // uint64_t tempUIntH, tempUIntL;
1767  // uint64_t dst;
1768  int cnt = 0;
1769 
1770  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1771  int relativeBx = 0;
1772  bool gEq = false;
1773 
1774  // Loop over objects and extract the cuts on the objects
1775  const std::vector<L1TUtmObject>& objects = condCalo.getObjects();
1776  for (size_t jj = 0; jj < objects.size(); jj++) {
1777  const L1TUtmObject& object = objects.at(jj);
1778  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1779 
1780  // BLW TO DO: This needs to be added to the Object Parameters
1781  relativeBx = object.getBxOffset();
1782 
1783  // Loop over the cuts for this object
1784  int upperThresholdInd = -1;
1785  int lowerThresholdInd = 0;
1786  int upperIndexInd = -1;
1787  int lowerIndexInd = 0;
1788  int cntPhi = 0;
1789  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1790  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1791  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1792  int displacedLUT = 0x0; // Added for LLP Jets: single bit LUT: { 0 = noLLP default, 1 = LLP }
1793  // Note: Currently assumes that the LSB from hwQual() getter in L1Candidate provides the
1794  // (single bit) information for the displacedLUT
1795 
1796  std::vector<CaloTemplate::Window> etaWindows;
1797 
1798  const std::vector<L1TUtmCut>& cuts = object.getCuts();
1799  for (size_t kk = 0; kk < cuts.size(); kk++) {
1800  const L1TUtmCut& cut = cuts.at(kk);
1801 
1802  switch (cut.getCutType()) {
1803  case esCutType::Threshold:
1804  lowerThresholdInd = cut.getMinimum().index;
1805  upperThresholdInd = cut.getMaximum().index;
1806  break;
1807  case esCutType::Slice:
1808  lowerIndexInd = int(cut.getMinimum().value);
1809  upperIndexInd = int(cut.getMaximum().value);
1810  break;
1811  case esCutType::Eta: {
1812  if (etaWindows.size() < 5) {
1813  etaWindows.push_back({cut.getMinimum().index, cut.getMaximum().index});
1814  } else {
1815  edm::LogError("TriggerMenuParser")
1816  << "Too Many Eta Cuts for calo-condition (" << particle << ")" << std::endl;
1817  return false;
1818  }
1819  } break;
1820 
1821  case esCutType::Phi: {
1822  if (cntPhi == 0) {
1823  phiWindow1Lower = cut.getMinimum().index;
1824  phiWindow1Upper = cut.getMaximum().index;
1825  } else if (cntPhi == 1) {
1826  phiWindow2Lower = cut.getMinimum().index;
1827  phiWindow2Upper = cut.getMaximum().index;
1828  } else {
1829  edm::LogError("TriggerMenuParser")
1830  << "Too Many Phi Cuts for calo-condition (" << particle << ")" << std::endl;
1831  return false;
1832  }
1833  cntPhi++;
1834 
1835  } break;
1836 
1837  case esCutType::Charge: {
1838  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition (" << particle << ")" << std::endl;
1839  return false;
1840 
1841  } break;
1842  case esCutType::Quality: {
1843  qualityLUT = l1tstr2int(cut.getData());
1844 
1845  } break;
1846  case esCutType::Displaced: { // Added for LLP Jets
1847  displacedLUT = l1tstr2int(cut.getData());
1848 
1849  } break;
1850  case esCutType::Isolation: {
1851  isolationLUT = l1tstr2int(cut.getData());
1852 
1853  } break;
1854  default:
1855  break;
1856  } //end switch
1857 
1858  } //end loop over cuts
1859 
1860  // Fill the object parameters
1861  objParameter[cnt].etHighThreshold = upperThresholdInd;
1862  objParameter[cnt].etLowThreshold = lowerThresholdInd;
1863  objParameter[cnt].indexHigh = upperIndexInd;
1864  objParameter[cnt].indexLow = lowerIndexInd;
1865  objParameter[cnt].etaWindows = etaWindows;
1866  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1867  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1868  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1869  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1870  objParameter[cnt].isolationLUT = isolationLUT;
1871  objParameter[cnt].qualityLUT = qualityLUT; //TO DO: Must add
1872  objParameter[cnt].displacedLUT = displacedLUT; // Added for LLP Jets
1873 
1874  // Output for debugging
1875  {
1876  std::ostringstream oss;
1877  oss << "\n Calo ET high thresholds (hex) for calo object " << caloObjType << " " << cnt << " = " << std::hex
1878  << objParameter[cnt].etLowThreshold << " - " << objParameter[cnt].etHighThreshold;
1879  for (const auto& window : objParameter[cnt].etaWindows) {
1880  oss << "\n etaWindow Lower / Upper for calo object " << cnt << " = 0x" << window.lower << " / 0x"
1881  << window.upper;
1882  }
1883  oss << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x" << objParameter[cnt].phiWindow1Lower
1884  << " / 0x" << objParameter[cnt].phiWindow1Upper << "\n phiWindowVeto Lower / Upper for calo object "
1885  << cnt << " = 0x" << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
1886  << "\n Isolation LUT for calo object " << cnt << " = 0x" << objParameter[cnt].isolationLUT
1887  << "\n Quality LUT for calo object " << cnt << " = 0x" << objParameter[cnt].qualityLUT
1888  << "\n LLP DISP LUT for calo object " << cnt << " = 0x" << objParameter[cnt].displacedLUT;
1889  LogDebug("TriggerMenuParser") << oss.str() << std::endl;
1890  }
1891 
1892  cnt++;
1893  } //end loop over objects
1894 
1895  // object types - all same caloObjType
1896  std::vector<GlobalObject> objType(nrObj, caloObjType);
1897 
1898  // now create a new calo condition
1899  CaloTemplate caloCond(name);
1900 
1901  caloCond.setCondType(cType);
1902  caloCond.setObjectType(objType);
1903 
1904  //BLW TO DO: This needs to be added to the object rather than the whole condition
1905  caloCond.setCondGEq(gEq);
1906  caloCond.setCondChipNr(chipNr);
1907 
1908  //BLW TO DO: This needs to be added to the object rather than the whole condition
1909  caloCond.setCondRelativeBx(relativeBx);
1910 
1911  caloCond.setConditionParameter(objParameter, corrParameter);
1912 
1913  if (edm::isDebugEnabled()) {
1914  std::ostringstream myCoutStream;
1915  caloCond.print(myCoutStream);
1916  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1917  }
1918 
1919  // insert condition into the map
1920  if (!insertConditionIntoMap(caloCond, chipNr)) {
1921  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
1922 
1923  return false;
1924  } else {
1925  if (corrFlag) {
1926  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1927  } else {
1928  (m_vecCaloTemplate[chipNr]).push_back(caloCond);
1929  }
1930  }
1931 
1932  //
1933  return true;
1934 }
bool isDebugEnabled()
const int getType() const
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
const std::vector< L1TUtmObject > & getObjects() const
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
int l1tstr2int(const std::string data)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
typedef for correlation parameters
Definition: CaloTemplate.h:88
#define LogDebug(id)

◆ parseCaloCorr()

bool TriggerMenuParser::parseCaloCorr ( const L1TUtmObject 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 1947 of file TriggerMenuParser.cc.

References PixelTestBeamValidation_cfi::Charge, DMR_cfg::cut, L1TUtmObject::getBxOffset(), L1TUtmObject::getComparisonOperator(), L1TUtmObject::getCuts(), L1TUtmObject::getName(), L1TUtmObject::getType(), l1t::gtEG, l1t::gtJet, l1t::gtTau, createfilelist::int, edm::isDebugEnabled(), L1TRate_cfi::Jet, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, CaloTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, L1TRate_Offline_cfi::Tau, HLT_2023v12_cff::Threshold, l1t::Type1s, and svgfig::window().

1947  {
1948  // XERCES_CPP_NAMESPACE_USE
1949  using namespace tmeventsetup;
1950 
1951  // get condition, particle name and type name
1952 
1953  std::string condition = "calo";
1954  std::string particle = "test-fix";
1955  std::string type = l1t2string(corrCalo->getType());
1956  std::string name = l1t2string(corrCalo->getName());
1957 
1958  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1959  << "\n (in parseCalo) "
1960  << "\n condition = " << condition << "\n particle = " << particle
1961  << "\n type = " << type << "\n name = " << name << std::endl;
1962 
1963  // determine object type type
1964  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1965  GlobalObject caloObjType;
1966  int nrObj = 1;
1967  type = "1_s";
1968  GtConditionType cType = l1t::Type1s;
1969 
1970  if (corrCalo->getType() == esObjectType::Egamma) {
1971  caloObjType = gtEG;
1972  } else if (corrCalo->getType() == esObjectType::Jet) {
1973  caloObjType = gtJet;
1974  } else if (corrCalo->getType() == esObjectType::Tau) {
1975  caloObjType = gtTau;
1976  } else {
1977  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition (" << particle << ")" << std::endl;
1978  return false;
1979  }
1980 
1981  // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1982 
1983  if (nrObj < 0) {
1984  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type << ")"
1985  << "\nCan not determine number of trigger objects. " << std::endl;
1986  return false;
1987  }
1988 
1989  // get values
1990 
1991  // temporary storage of the parameters
1992  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1993 
1994  //BLW TO DO: Can this be dropped?
1995  CaloTemplate::CorrelationParameter corrParameter;
1996 
1997  // need at least one value for deltaPhiRange
1998  std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1999  tmpValues.reserve(nrObj);
2000 
2001  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2002  int relativeBx = 0;
2003  bool gEq = false;
2004 
2005  gEq = (corrCalo->getComparisonOperator() == esComparisonOperator::GE);
2006 
2007  // BLW TO DO: This needs to be added to the Object Parameters
2008  relativeBx = corrCalo->getBxOffset();
2009 
2010  // Loop over the cuts for this object
2011  int upperThresholdInd = -1;
2012  int lowerThresholdInd = 0;
2013  int upperIndexInd = -1;
2014  int lowerIndexInd = 0;
2015  int cntPhi = 0;
2016  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2017  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
2018  int qualityLUT = 0xF; //default is to ignore quality unless specified.
2019  int displacedLUT = 0x0; // Added for LLP Jets: single bit LUT: { 0 = noLLP default, 1 = LLP }
2020  // Note: Currently assume that the hwQual() getter in L1Candidate provides the
2021  // (single bit) information for the displacedLUT
2022 
2023  std::vector<CaloTemplate::Window> etaWindows;
2024 
2025  const std::vector<L1TUtmCut>& cuts = corrCalo->getCuts();
2026  for (size_t kk = 0; kk < cuts.size(); kk++) {
2027  const L1TUtmCut& cut = cuts.at(kk);
2028 
2029  switch (cut.getCutType()) {
2030  case esCutType::Threshold:
2031  lowerThresholdInd = cut.getMinimum().index;
2032  upperThresholdInd = cut.getMaximum().index;
2033  break;
2034  case esCutType::Slice:
2035  lowerIndexInd = int(cut.getMinimum().value);
2036  upperIndexInd = int(cut.getMaximum().value);
2037  break;
2038  case esCutType::Eta: {
2039  if (etaWindows.size() < 5) {
2040  etaWindows.push_back({cut.getMinimum().index, cut.getMaximum().index});
2041  } else {
2042  edm::LogError("TriggerMenuParser")
2043  << "Too Many Eta Cuts for calo-condition (" << particle << ")" << std::endl;
2044  return false;
2045  }
2046  } break;
2047 
2048  case esCutType::Phi: {
2049  if (cntPhi == 0) {
2050  phiWindow1Lower = cut.getMinimum().index;
2051  phiWindow1Upper = cut.getMaximum().index;
2052  } else if (cntPhi == 1) {
2053  phiWindow2Lower = cut.getMinimum().index;
2054  phiWindow2Upper = cut.getMaximum().index;
2055  } else {
2056  edm::LogError("TriggerMenuParser")
2057  << "Too Many Phi Cuts for calo-condition (" << particle << ")" << std::endl;
2058  return false;
2059  }
2060  cntPhi++;
2061 
2062  } break;
2063 
2064  case esCutType::Charge: {
2065  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition (" << particle << ")" << std::endl;
2066  return false;
2067 
2068  } break;
2069  case esCutType::Quality: {
2070  qualityLUT = l1tstr2int(cut.getData());
2071 
2072  } break;
2073  case esCutType::Displaced: { // Added for LLP Jets
2074  displacedLUT = l1tstr2int(cut.getData());
2075 
2076  } break;
2077  case esCutType::Isolation: {
2078  isolationLUT = l1tstr2int(cut.getData());
2079 
2080  } break;
2081  default:
2082  break;
2083  } //end switch
2084 
2085  } //end loop over cuts
2086 
2087  // Fill the object parameters
2088  objParameter[0].etLowThreshold = lowerThresholdInd;
2089  objParameter[0].etHighThreshold = upperThresholdInd;
2090  objParameter[0].indexHigh = upperIndexInd;
2091  objParameter[0].indexLow = lowerIndexInd;
2092  objParameter[0].etaWindows = etaWindows;
2093  objParameter[0].phiWindow1Lower = phiWindow1Lower;
2094  objParameter[0].phiWindow1Upper = phiWindow1Upper;
2095  objParameter[0].phiWindow2Lower = phiWindow2Lower;
2096  objParameter[0].phiWindow2Upper = phiWindow2Upper;
2097  objParameter[0].isolationLUT = isolationLUT;
2098  objParameter[0].qualityLUT = qualityLUT; //TO DO: Must add
2099  objParameter[0].displacedLUT = displacedLUT; // Added for LLP Jets
2100 
2101  // Output for debugging
2102  {
2103  std::ostringstream oss;
2104  oss << "\n Calo ET high threshold (hex) for calo object " << caloObjType << " "
2105  << " = " << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etHighThreshold;
2106  for (const auto& window : objParameter[0].etaWindows) {
2107  oss << "\n etaWindow Lower / Upper for calo object "
2108  << " = 0x" << window.lower << " / 0x" << window.upper;
2109  }
2110  oss << "\n phiWindow Lower / Upper for calo object "
2111  << " = 0x" << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
2112  << "\n phiWindowVeto Lower / Upper for calo object "
2113  << " = 0x" << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper
2114  << "\n Isolation LUT for calo object "
2115  << " = 0x" << objParameter[0].isolationLUT << "\n Quality LUT for calo object "
2116  << " = 0x" << objParameter[0].qualityLUT << "\n LLP DISP LUT for calo object "
2117  << " = 0x" << objParameter[0].displacedLUT;
2118  LogDebug("TriggerMenuParser") << oss.str() << std::endl;
2119  }
2120 
2121  // object types - all same caloObjType
2122  std::vector<GlobalObject> objType(nrObj, caloObjType);
2123 
2124  // now create a new calo condition
2125  CaloTemplate caloCond(name);
2126 
2127  caloCond.setCondType(cType);
2128  caloCond.setObjectType(objType);
2129 
2130  //BLW TO DO: This needs to be added to the object rather than the whole condition
2131  caloCond.setCondGEq(gEq);
2132  caloCond.setCondChipNr(chipNr);
2133 
2134  //BLW TO DO: This needs to be added to the object rather than the whole condition
2135  caloCond.setCondRelativeBx(relativeBx);
2136 
2137  caloCond.setConditionParameter(objParameter, corrParameter);
2138 
2139  if (edm::isDebugEnabled()) {
2140  std::ostringstream myCoutStream;
2141  caloCond.print(myCoutStream);
2142  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2143  }
2144 
2145  /*
2146  // insert condition into the map
2147  if ( !insertConditionIntoMap(caloCond, chipNr)) {
2148 
2149  edm::LogError("TriggerMenuParser")
2150  << " Error: duplicate condition (" << name << ")"
2151  << std::endl;
2152 
2153  return false;
2154  }
2155  else {
2156  (m_corCaloTemplate[chipNr]).push_back(caloCond);
2157  }
2158 */
2159  (m_corCaloTemplate[chipNr]).push_back(caloCond);
2160 
2161  //
2162  return true;
2163 }
bool isDebugEnabled()
const std::vector< L1TUtmCut > & getCuts() const
Definition: L1TUtmObject.h:118
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Log< level::Error, false > LogError
const int getComparisonOperator() const
Definition: L1TUtmObject.h:103
const std::string & getName() const
Definition: L1TUtmObject.h:97
#define LogTrace(id)
const int getBxOffset() const
Definition: L1TUtmObject.h:106
const int getType() const
Definition: L1TUtmObject.h:100
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
int l1tstr2int(const std::string data)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
typedef for correlation parameters
Definition: CaloTemplate.h:88
#define LogDebug(id)

◆ parseCondFormats()

void TriggerMenuParser::parseCondFormats ( const L1TUtmTriggerMenu utmMenu)

Definition at line 219 of file TriggerMenuParser.cc.

References submitPVResolutionJobs::count, L1TUtmTriggerMenu::getAlgorithmMap(), L1TUtmTriggerMenu::getComment(), L1TUtmTriggerMenu::getConditionMap(), L1TUtmTriggerMenu::getDatetime(), L1TUtmTriggerMenu::getFirmwareUuid(), L1TUtmCondition::getName(), L1TUtmTriggerMenu::getName(), L1TUtmTriggerMenu::getScaleMap(), L1TUtmTriggerMenu::getScaleSetName(), L1TUtmCondition::getType(), L1TUtmTriggerMenu::getVersion(), cuy::ii, hltExoticaValidator_cfi::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

Referenced by L1TGlobalProducer::produce().

219  {
220  // resize the vector of condition maps
221  // the number of condition chips should be correctly set before calling parseXmlFile
223 
231 
238 
239  using namespace tmeventsetup;
240  using namespace Algorithm;
241 
242  //get the meta data
244  m_triggerMenuDate = utmMenu->getDatetime();
245  m_triggerMenuImplementation = (getMmHashN(utmMenu->getFirmwareUuid()) & 0xFFFFFFFF); //make sure we only have 32 bits
246  m_triggerMenuName = utmMenu->getName();
247  m_triggerMenuInterface = utmMenu->getVersion(); //BLW: correct descriptor?
248  m_triggerMenuUUID = (getMmHashN(utmMenu->getName()) & 0xFFFFFFFF); //make sure we only have 32 bits
249 
250  const std::map<std::string, L1TUtmAlgorithm>& algoMap = utmMenu->getAlgorithmMap();
251  const std::map<std::string, L1TUtmCondition>& condMap = utmMenu->getConditionMap();
252  //We use es types for scale map to use auxiliary functions without having to duplicate code
253  const std::map<std::string, tmeventsetup::esScale> scaleMap(std::begin(utmMenu->getScaleMap()),
254  std::end(utmMenu->getScaleMap()));
255 
256  // parse the scales
258  parseScales(scaleMap);
259 
260  //loop over the algorithms
261  for (const auto& cit : algoMap) {
262  //condition chip (artifact) TO DO: Update
263  int chipNr = 0;
264 
265  //get algorithm
266  const L1TUtmAlgorithm& algo = cit.second;
267 
268  //parse the algorithm
269  parseAlgorithm(algo, chipNr); //blw
270 
271  //get conditions for this algorithm
272  const std::vector<std::string>& rpn_vec = algo.getRpnVector();
273  for (size_t ii = 0; ii < rpn_vec.size(); ii++) {
274  const std::string& token = rpn_vec.at(ii);
275  if (isGate(token))
276  continue;
277  // long hash = getHash(token);
278  const L1TUtmCondition& condition = condMap.find(token)->second;
279 
280  //check to see if this condtion already exists
281  if ((m_conditionMap[chipNr]).count(condition.getName()) == 0) {
282  // parse Calo Conditions (EG, Jets, Taus)
283  if (condition.getType() == esConditionType::SingleEgamma ||
284  condition.getType() == esConditionType::DoubleEgamma ||
285  condition.getType() == esConditionType::TripleEgamma ||
286  condition.getType() == esConditionType::QuadEgamma || condition.getType() == esConditionType::SingleTau ||
287  condition.getType() == esConditionType::DoubleTau || condition.getType() == esConditionType::TripleTau ||
288  condition.getType() == esConditionType::QuadTau || condition.getType() == esConditionType::SingleJet ||
289  condition.getType() == esConditionType::DoubleJet || condition.getType() == esConditionType::TripleJet ||
290  condition.getType() == esConditionType::QuadJet) {
291  parseCalo(condition, chipNr, false);
292 
293  // parse Energy Sums (and HI trigger objects, treated as energy sums or counters)
294  } else if (condition.getType() == esConditionType::TotalEt ||
295  condition.getType() == esConditionType::TotalEtEM ||
296  condition.getType() == esConditionType::TotalHt ||
297  condition.getType() == esConditionType::MissingEt ||
298  condition.getType() == esConditionType::MissingHt ||
299  condition.getType() == esConditionType::MissingEtHF ||
300  condition.getType() == esConditionType::TowerCount ||
301  condition.getType() == esConditionType::MinBiasHFP0 ||
302  condition.getType() == esConditionType::MinBiasHFM0 ||
303  condition.getType() == esConditionType::MinBiasHFP1 ||
304  condition.getType() == esConditionType::MinBiasHFM1 ||
305  condition.getType() == esConditionType::AsymmetryEt ||
306  condition.getType() == esConditionType::AsymmetryHt ||
307  condition.getType() == esConditionType::AsymmetryEtHF ||
308  condition.getType() == esConditionType::AsymmetryHtHF ||
309  condition.getType() == esConditionType::Centrality0 ||
310  condition.getType() == esConditionType::Centrality1 ||
311  condition.getType() == esConditionType::Centrality2 ||
312  condition.getType() == esConditionType::Centrality3 ||
313  condition.getType() == esConditionType::Centrality4 ||
314  condition.getType() == esConditionType::Centrality5 ||
315  condition.getType() == esConditionType::Centrality6 ||
316  condition.getType() == esConditionType::Centrality7) {
317  parseEnergySum(condition, chipNr, false);
318 
319  // parse ZDC Energy Sums (NOTE: HI trigger objects are treated as energy sums or counters)
320  } else if (condition.getType() == esConditionType::ZDCPlus ||
321  condition.getType() == esConditionType::ZDCMinus) {
322  parseEnergySumZdc(condition, chipNr, false);
323 
324  //parse AXOL1TL
325  } else if (condition.getType() == esConditionType::AnomalyDetectionTrigger) {
326  parseAXOL1TL(condition, chipNr);
327 
328  //parse Muons
329  } else if (condition.getType() == esConditionType::SingleMuon ||
330  condition.getType() == esConditionType::DoubleMuon ||
331  condition.getType() == esConditionType::TripleMuon ||
332  condition.getType() == esConditionType::QuadMuon) {
333  parseMuon(condition, chipNr, false);
334 
335  } else if (condition.getType() == esConditionType::MuonShower0 ||
336  condition.getType() == esConditionType::MuonShower1 ||
337  condition.getType() == esConditionType::MuonShower2 ||
338  condition.getType() == esConditionType::MuonShowerOutOfTime0 ||
339  condition.getType() == esConditionType::MuonShowerOutOfTime1) {
340  parseMuonShower(condition, chipNr, false);
341 
342  //parse Correlation Conditions
343  } else if (condition.getType() == esConditionType::MuonMuonCorrelation ||
344  condition.getType() == esConditionType::MuonEsumCorrelation ||
345  condition.getType() == esConditionType::CaloMuonCorrelation ||
346  condition.getType() == esConditionType::CaloCaloCorrelation ||
347  condition.getType() == esConditionType::CaloEsumCorrelation ||
348  condition.getType() == esConditionType::InvariantMass ||
349  condition.getType() == esConditionType::InvariantMassDeltaR ||
350  condition.getType() == esConditionType::TransverseMass ||
351  condition.getType() == esConditionType::InvariantMassUpt) { // Added for displaced muons
352  parseCorrelation(condition, chipNr);
353 
354  //parse three-body Correlation Conditions
355  } else if (condition.getType() == esConditionType::InvariantMass3) {
356  parseCorrelationThreeBody(condition, chipNr);
357 
358  //parse Externals
359  } else if (condition.getType() == esConditionType::Externals) {
360  parseExternal(condition, chipNr);
361 
362  //parse CorrelationWithOverlapRemoval
363  } else if (condition.getType() == esConditionType::CaloCaloCorrelationOvRm ||
364  condition.getType() == esConditionType::InvariantMassOvRm ||
365  condition.getType() == esConditionType::TransverseMassOvRm ||
366  condition.getType() == esConditionType::DoubleJetOvRm ||
367  condition.getType() == esConditionType::DoubleTauOvRm) {
368  parseCorrelationWithOverlapRemoval(condition, chipNr);
369 
370  } else if (condition.getType() == esConditionType::SingleEgammaOvRm ||
371  condition.getType() == esConditionType::DoubleEgammaOvRm ||
372  condition.getType() == esConditionType::TripleEgammaOvRm ||
373  condition.getType() == esConditionType::QuadEgammaOvRm ||
374  condition.getType() == esConditionType::SingleTauOvRm ||
375  condition.getType() == esConditionType::TripleTauOvRm ||
376  condition.getType() == esConditionType::QuadTauOvRm ||
377  condition.getType() == esConditionType::SingleJetOvRm ||
378  condition.getType() == esConditionType::TripleJetOvRm ||
379  condition.getType() == esConditionType::QuadJetOvRm) {
380  edm::LogError("TriggerMenuParser") << std::endl
381  << "\n SingleEgammaOvRm"
382  << "\n DoubleEgammaOvRm"
383  << "\n TripleEgammaOvRm"
384  << "\n QuadEgammaOvRm"
385  << "\n SingleTauOvRm"
386  << "\n TripleTauOvRm"
387  << "\n QuadTauOvRm"
388  << "\n SingleJetOvRm"
389  << "\n TripleJetOvRm"
390  << "\n QuadJetOvRm"
391  << "\n The above conditions types OvRm are not implemented yet in the "
392  "parser. Please remove alogrithms that "
393  "use this type of condtion from L1T Menu!"
394  << std::endl;
395  }
396 
397  } //if condition is a new one
398  } //loop over conditions
399  } //loop over algorithms
400 
401  return;
402 }
std::vector< std::vector< MuonShowerTemplate > > m_vecMuonShowerTemplate
const std::string & getName() const
bool parseAlgorithm(L1TUtmAlgorithm algorithm, unsigned int chipNr=0)
parse all algorithms
const std::string & getComment() const
const int getType() const
bool parseExternal(L1TUtmCondition condExt, unsigned int chipNr=0)
unsigned int m_numberConditionChips
hardware limits
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
bool parseEnergySumZdc(L1TUtmCondition condEnergySumZdcs, unsigned int chipNr=0, const bool corrFlag=false)
void setScalesName(const std::string &name)
Definition: GlobalScales.h:83
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
std::vector< std::vector< AXOL1TLTemplate > > m_vecAXOL1TLTemplate
const std::string & getScaleSetName() const
Log< level::Error, false > LogError
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
const std::map< std::string, L1TUtmScale > & getScaleMap() const
std::string m_triggerMenuInterface
menu names
bool parseMuonShower(L1TUtmCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon shower condition
bool parseCorrelationWithOverlapRemoval(const L1TUtmCondition &corrCond, unsigned int chipNr=0)
parse a correlation condition with overlap removal
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::string m_triggerMenuDescription
bool parseAXOL1TL(L1TUtmCondition condAXOL1TL, unsigned int chipNr=0)
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate
const std::map< std::string, L1TUtmCondition > & getConditionMap() const
const std::string & getName() const
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
ii
Definition: cuy.py:589
bool parseMuon(L1TUtmCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon condition
bool parseScales(std::map< std::string, tmeventsetup::esScale > scaleMap)
parse scales
const std::string & getFirmwareUuid() const
unsigned long m_triggerMenuUUID
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
bool parseCalo(L1TUtmCondition condCalo, unsigned int chipNr=0, const bool corrFlag=false)
parse a calorimeter condition
bool parseCorrelation(L1TUtmCondition corrCond, unsigned int chipNr=0)
parse a correlation condition
unsigned long m_triggerMenuImplementation
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
const std::map< std::string, L1TUtmAlgorithm > & getAlgorithmMap() const
const std::string & getVersion() const
bool parseEnergySum(L1TUtmCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
parse an "energy sum" condition
bool parseCorrelationThreeBody(L1TUtmCondition corrCond, unsigned int chipNr=0)
parse a three-body correlation condition
std::vector< std::vector< EnergySumZdcTemplate > > m_vecEnergySumZdcTemplate
const std::string & getDatetime() const
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate

◆ parseCorrelation()

bool TriggerMenuParser::parseCorrelation ( L1TUtmCondition  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 2884 of file TriggerMenuParser.cc.

References CorrelationTemplate::CorrelationParameter::chargeCorrelation, l1t::CondCalo, l1t::CondEnergySum, l1t::CondMuon, CorrelationTemplate::CorrelationParameter::corrCutType, DMR_cfg::cut, HLT_2023v12_cff::DeltaEta, HLT_2023v12_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, ETM, L1TUtmCondition::getCuts(), L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), l1t::gtEG, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtJet, l1t::gtMu, l1t::gtTau, l1t::gtTowerCount, HTM, caHitNtupletGeneratorKernels::if(), edm::isDebugEnabled(), L1TRate_cfi::Jet, findQualityFiles::jj, LogDebug, LogTrace, 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, conifer::pow(), CorrelationTemplate::CorrelationParameter::precDRCut, CorrelationTemplate::CorrelationParameter::precEtaCut, CorrelationTemplate::CorrelationParameter::precMassCut, CorrelationTemplate::CorrelationParameter::precPhiCut, CorrelationTemplate::CorrelationParameter::precTBPTCut, CorrelationTemplate::print(), push_back(), CorrelationTemplate::setCond0Category(), CorrelationTemplate::setCond0Index(), CorrelationTemplate::setCond1Category(), CorrelationTemplate::setCond1Index(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondType(), CorrelationTemplate::setCorrelationParameter(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, L1TRate_Offline_cfi::Tau, and l1t::Type2cor.

2884  {
2885  using namespace tmeventsetup;
2886  std::string condition = "corr";
2887  std::string particle = "test-fix";
2888  std::string type = l1t2string(corrCond.getType());
2889  std::string name = l1t2string(corrCond.getName());
2890 
2891  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2892  << " (in parseCorrelation) " << std::endl
2893  << " condition = " << condition << std::endl
2894  << " particle = " << particle << std::endl
2895  << " type = " << type << std::endl
2896  << " name = " << name << std::endl;
2897 
2898  // create a new correlation condition
2899  CorrelationTemplate correlationCond(name);
2900 
2901  // check that the condition does not exist already in the map
2902  if (!insertConditionIntoMap(correlationCond, chipNr)) {
2903  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
2904 
2905  return false;
2906  }
2907 
2908  // Define some of the quantities to store the parased information
2909 
2910  // condition type BLW (Do we change this to the type of correlation condition?)
2912 
2913  // two objects (for sure)
2914  const int nrObj = 2;
2915 
2916  // object types and greater equal flag - filled in the loop
2917  int intGEq[nrObj] = {-1, -1};
2918  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
2919  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2920 
2921  // correlation flag and index in the cor*vector
2922  const bool corrFlag = true;
2923  int corrIndexVal[nrObj] = {-1, -1};
2924 
2925  // Storage of the correlation selection
2927  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2928 
2929  // Get the correlation Cuts on the legs
2930  int cutType = 0;
2931  const std::vector<L1TUtmCut>& cuts = corrCond.getCuts();
2932  for (size_t jj = 0; jj < cuts.size(); jj++) {
2933  const L1TUtmCut& cut = cuts.at(jj);
2934 
2935  if (cut.getCutType() == esCutType::ChargeCorrelation) {
2936  if (cut.getData() == "ls")
2937  corrParameter.chargeCorrelation = 2;
2938  else if (cut.getData() == "os")
2939  corrParameter.chargeCorrelation = 4;
2940  else
2941  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2942  } else {
2943  //
2944  // Until utm has method to calculate these, do the integer value calculation with precision.
2945  //
2946  double minV = cut.getMinimum().value;
2947  double maxV = cut.getMaximum().value;
2948 
2949  //Scale down very large numbers out of xml
2950  if (maxV > 1.0e8)
2951  maxV = 1.0e8;
2952 
2953  if (cut.getCutType() == esCutType::DeltaEta) {
2954  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaEta Cut minV = " << minV
2955  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2956  << " precMax = " << cut.getMaximum().index << std::endl;
2957  corrParameter.minEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2958  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2959  corrParameter.precEtaCut = cut.getMinimum().index;
2960  cutType = cutType | 0x1;
2961  } else if (cut.getCutType() == esCutType::DeltaPhi) {
2962  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaPhi Cut minV = " << minV
2963  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2964  << " precMax = " << cut.getMaximum().index << std::endl;
2965  corrParameter.minPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2966  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2967  corrParameter.precPhiCut = cut.getMinimum().index;
2968  cutType = cutType | 0x2;
2969  } else if (cut.getCutType() == esCutType::DeltaR) {
2970  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaR Cut minV = " << minV
2971  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2972  << " precMax = " << cut.getMaximum().index << std::endl;
2973  corrParameter.minDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2974  corrParameter.maxDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2975  corrParameter.precDRCut = cut.getMinimum().index;
2976  cutType = cutType | 0x4;
2977  } else if (cut.getCutType() == esCutType::TwoBodyPt) {
2978  corrParameter.minTBPTCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2979  corrParameter.maxTBPTCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2980  corrParameter.precTBPTCut = cut.getMinimum().index;
2981  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tTPBT Cut minV = " << minV
2982  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2983  << " precMax = " << cut.getMaximum().index << std::endl;
2984  cutType = cutType | 0x20;
2985  } else if ((cut.getCutType() == esCutType::Mass) ||
2986  (cut.getCutType() == esCutType::MassDeltaR)) { //Invariant Mass, MassOverDeltaR
2987  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV
2988  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2989  << " precMax = " << cut.getMaximum().index << std::endl;
2990  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2991  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2992  corrParameter.precMassCut = cut.getMinimum().index;
2993  // cutType = cutType | 0x8;
2994  if (corrCond.getType() == esConditionType::TransverseMass) {
2995  cutType = cutType | 0x10;
2996  } else if (corrCond.getType() == esConditionType::InvariantMassDeltaR) {
2997  cutType = cutType | 0x80;
2998  } else {
2999  cutType = cutType | 0x8;
3000  }
3001  } else if (cut.getCutType() == esCutType::MassUpt) { // Added for displaced muons
3002  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV
3003  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
3004  << " precMax = " << cut.getMaximum().index << std::endl;
3005  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3006  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3007  corrParameter.precMassCut = cut.getMinimum().index;
3008  cutType = cutType | 0x40; // Note: 0x40 (MassUpt) is next available bit after 0x20 (TwoBodyPt)
3009  } // Careful: cutType carries same info as esCutType, but is hard coded!!
3010  } // This seems like a historical hack, which may be error prone.
3011  } // cutType is defined here, for use later in CorrCondition.cc
3012  corrParameter.corrCutType = cutType;
3013 
3014  // Get the two objects that form the legs
3015  const std::vector<L1TUtmObject>& objects = corrCond.getObjects();
3016  if (objects.size() != 2) {
3017  edm::LogError("TriggerMenuParser") << "incorrect number of objects for the correlation condition " << name
3018  << " corrFlag " << corrFlag << std::endl;
3019  return false;
3020  }
3021 
3022  // loop over legs
3023  for (size_t jj = 0; jj < objects.size(); jj++) {
3024  const L1TUtmObject& object = objects.at(jj);
3025  LogDebug("TriggerMenuParser") << " obj name = " << object.getName() << "\n";
3026  LogDebug("TriggerMenuParser") << " obj type = " << object.getType() << "\n";
3027  LogDebug("TriggerMenuParser") << " obj op = " << object.getComparisonOperator() << "\n";
3028  LogDebug("TriggerMenuParser") << " obj bx = " << object.getBxOffset() << "\n";
3029 
3030  // check the leg type
3031  if (object.getType() == esObjectType::Muon) {
3032  // we have a muon
3033 
3034  /*
3035  //BLW Hold on to this code we may need to go back to it at some point.
3036  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
3037  // This is potentially a place to slim down the code. Note: We currently evaluate the
3038  // conditions every time, so even if we put the condition in the vector once, we would
3039  // still evaluate it multiple times. This is a place for optimization.
3040  {
3041 
3042  parseMuonCorr(&object,chipNr);
3043  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
3044 
3045  } else {
3046  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
3047  bool found = false;
3048  int index = 0;
3049  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
3050  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
3051  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
3052  found = true;
3053  } else {
3054  index++;
3055  }
3056  }
3057  if(found) {
3058  corrIndexVal[jj] = index;
3059  } else {
3060  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
3061  }
3062 
3063  }
3064 */
3065  parseMuonCorr(&object, chipNr);
3066  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
3067 
3068  //Now set some flags for this subCondition
3069  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3070  objType[jj] = gtMu;
3071  condCateg[jj] = CondMuon;
3072 
3073  } else if (object.getType() == esObjectType::Egamma || object.getType() == esObjectType::Jet ||
3074  object.getType() == esObjectType::Tau) {
3075  // we have an Calo object
3076  parseCaloCorr(&object, chipNr);
3077  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
3078 
3079  //Now set some flags for this subCondition
3080  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3081  switch (object.getType()) {
3082  case esObjectType::Egamma: {
3083  objType[jj] = gtEG;
3084  } break;
3085  case esObjectType::Jet: {
3086  objType[jj] = gtJet;
3087  } break;
3088  case esObjectType::Tau: {
3089  objType[jj] = gtTau;
3090  } break;
3091  default: {
3092  } break;
3093  }
3094  condCateg[jj] = CondCalo;
3095 
3096  } else if (object.getType() == esObjectType::ETM || object.getType() == esObjectType::ETMHF ||
3097  object.getType() == esObjectType::TOWERCOUNT || object.getType() == esObjectType::HTM) {
3098  // we have Energy Sum
3099  parseEnergySumCorr(&object, chipNr);
3100  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
3101 
3102  //Now set some flags for this subCondition
3103  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3104  switch (object.getType()) {
3105  case esObjectType::ETM: {
3107  } break;
3108  case esObjectType::HTM: {
3110  } break;
3111  case esObjectType::ETMHF: {
3113  } break;
3114  case esObjectType::TOWERCOUNT: {
3116  } break;
3117  default: {
3118  } break;
3119  }
3120  condCateg[jj] = CondEnergySum;
3121 
3122  } else {
3123  edm::LogError("TriggerMenuParser") << "Illegal Object Type " << object.getType()
3124  << " for the correlation condition " << name << std::endl;
3125  return false;
3126 
3127  } //if block on leg types
3128 
3129  } //loop over legs
3130 
3131  // get greater equal flag for the correlation condition
3132  bool gEq = true;
3133  if (intGEq[0] != intGEq[1]) {
3134  edm::LogError("TriggerMenuParser") << "Inconsistent GEq flags for sub-conditions "
3135  << " for the correlation condition " << name << std::endl;
3136  return false;
3137 
3138  } else {
3139  gEq = (intGEq[0] != 0);
3140  }
3141 
3142  // fill the correlation condition
3143  correlationCond.setCondType(cType);
3144  correlationCond.setObjectType(objType);
3145  correlationCond.setCondGEq(gEq);
3146  correlationCond.setCondChipNr(chipNr);
3147 
3148  correlationCond.setCond0Category(condCateg[0]);
3149  correlationCond.setCond1Category(condCateg[1]);
3150 
3151  correlationCond.setCond0Index(corrIndexVal[0]);
3152  correlationCond.setCond1Index(corrIndexVal[1]);
3153 
3154  correlationCond.setCorrelationParameter(corrParameter);
3155 
3156  if (edm::isDebugEnabled()) {
3157  std::ostringstream myCoutStream;
3158  correlationCond.print(myCoutStream);
3159  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3160  }
3161 
3162  // insert condition into the map
3163  // condition is not duplicate, check was done at the beginning
3164 
3165  (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond);
3166 
3167  //
3168  return true;
3169 }
size
Write out results.
Definition: L1GtObject.h:38
bool isDebugEnabled()
const int getType() const
bool parseEnergySumCorr(const L1TUtmObject *corrESum, unsigned int chipNr=0)
const std::vector< L1TUtmObject > & getObjects() const
constexpr int pow(int x)
Definition: conifer.h:24
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
Definition: L1GtObject.h:35
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
const std::string & getName() const
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
bool parseMuonCorr(const L1TUtmObject *condMu, unsigned int chipNr=0)
bool parseCaloCorr(const L1TUtmObject *corrCalo, unsigned int chipNr=0)
const std::vector< L1TUtmCut > & getCuts() const
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
typedef for correlation parameters
#define LogDebug(id)

◆ parseCorrelationThreeBody()

bool TriggerMenuParser::parseCorrelationThreeBody ( L1TUtmCondition  corrCond,
unsigned int  chipNr = 0 
)
private

parse a three-body correlation condition

parseCorrelationThreeBody Parse a correlation condition between three objects 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 3184 of file TriggerMenuParser.cc.

References CorrelationThreeBodyTemplate::CorrelationThreeBodyParameter::chargeCorrelation, l1t::CondMuon, CorrelationThreeBodyTemplate::CorrelationThreeBodyParameter::corrCutType, DMR_cfg::cut, L1TUtmCondition::getCuts(), L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), l1t::gtMu, caHitNtupletGeneratorKernels::if(), edm::isDebugEnabled(), LogDebug, LogTrace, HLTSiStripMonitoring_cff::Mass, CorrelationThreeBodyTemplate::CorrelationThreeBodyParameter::maxMassCutValue, CorrelationThreeBodyTemplate::CorrelationThreeBodyParameter::minMassCutValue, dumpRecoGeometry_cfg::Muon, Skims_PA_cff::name, electrons_cff::objType, conifer::pow(), CorrelationThreeBodyTemplate::CorrelationThreeBodyParameter::precMassCut, CorrelationThreeBodyTemplate::print(), push_back(), CorrelationThreeBodyTemplate::setCond0Category(), CorrelationThreeBodyTemplate::setCond0Index(), CorrelationThreeBodyTemplate::setCond1Category(), CorrelationThreeBodyTemplate::setCond1Index(), CorrelationThreeBodyTemplate::setCond2Category(), CorrelationThreeBodyTemplate::setCond2Index(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondType(), CorrelationThreeBodyTemplate::setCorrelationThreeBodyParameter(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::Type3s.

3184  {
3185  using namespace tmeventsetup;
3186  std::string condition = "corrThreeBody";
3187  std::string particle = "muon";
3188  std::string type = l1t2string(corrCond.getType());
3189  std::string name = l1t2string(corrCond.getName());
3190 
3191  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
3192  << " (in parseCorrelationThreeBody) " << std::endl
3193  << " condition = " << condition << std::endl
3194  << " particle = " << particle << std::endl
3195  << " type = " << type << std::endl
3196  << " name = " << name << std::endl;
3197 
3198  // create a new correlation condition
3199  CorrelationThreeBodyTemplate correlationThreeBodyCond(name);
3200 
3201  // check that the condition does not exist already in the map
3202  if (!insertConditionIntoMap(correlationThreeBodyCond, chipNr)) {
3203  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
3204  return false;
3205  }
3206 
3207  // Define some of the quantities to store the parsed information
3208  GtConditionType cType = l1t::Type3s;
3209 
3210  // three objects (for sure)
3211  const int nrObj = 3;
3212 
3213  // object types and greater equal flag - filled in the loop
3214  std::vector<GlobalObject> objType(nrObj);
3215  std::vector<GtConditionCategory> condCateg(nrObj);
3216 
3217  // correlation flag and index in the cor*vector
3218  const bool corrFlag = true;
3219  int corrIndexVal[nrObj] = {-1, -1, -1};
3220 
3221  // Storage of the correlation selection
3223  // Set charge correlation parameter
3224  //corrThreeBodyParameter.chargeCorrelation = chargeCorrelation; //tmpValues[0];
3225  //corrThreeBodyParameter.chargeCorrelation = 1; //ignore charge correlation for corr-legs
3226 
3227  // Get the correlation cuts on the legs
3228  int cutType = 0;
3229  const std::vector<L1TUtmCut>& cuts = corrCond.getCuts();
3230  for (size_t lll = 0; lll < cuts.size(); lll++) { // START esCut lll
3231  const L1TUtmCut& cut = cuts.at(lll);
3232 
3233  if (cut.getCutType() == esCutType::ChargeCorrelation) {
3234  if (cut.getData() == "ls")
3235  corrThreeBodyParameter.chargeCorrelation = 2;
3236  else if (cut.getData() == "os")
3237  corrThreeBodyParameter.chargeCorrelation = 4;
3238  else
3239  corrThreeBodyParameter.chargeCorrelation = 1; //ignore charge correlation
3240  }
3241 
3242  //
3243  // Until utm has method to calculate these, do the integer value calculation with precision.
3244  //
3245  double minV = cut.getMinimum().value;
3246  double maxV = cut.getMaximum().value;
3247  //Scale down very large numbers out of xml
3248  if (maxV > 1.0e8)
3249  maxV = 1.0e8;
3250 
3251  if (cut.getCutType() == esCutType::Mass) {
3252  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV
3253  << "\tMass Cut maxV = " << maxV << " precMin = " << cut.getMinimum().index
3254  << " precMax = " << cut.getMaximum().index << std::endl;
3255  corrThreeBodyParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3256  corrThreeBodyParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3257  corrThreeBodyParameter.precMassCut = cut.getMinimum().index;
3258  cutType = cutType | 0x8;
3259  } else if (cut.getCutType() == esCutType::MassDeltaR) {
3260  corrThreeBodyParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3261  corrThreeBodyParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3262  corrThreeBodyParameter.precMassCut = cut.getMinimum().index;
3263  cutType = cutType | 0x80;
3264  }
3265  } // END esCut lll
3266  corrThreeBodyParameter.corrCutType = cutType;
3267 
3268  // Get the three objects that form the legs
3269  const std::vector<L1TUtmObject>& objects = corrCond.getObjects();
3270  if (objects.size() != 3) {
3271  edm::LogError("TriggerMenuParser") << "incorrect number of objects for the correlation condition " << name
3272  << " corrFlag " << corrFlag << std::endl;
3273  return false;
3274  }
3275 
3276  // Loop over legs
3277  for (size_t lll = 0; lll < objects.size(); lll++) {
3278  const L1TUtmObject& object = objects.at(lll);
3279  LogDebug("TriggerMenuParser") << " obj name = " << object.getName() << "\n";
3280  LogDebug("TriggerMenuParser") << " obj type = " << object.getType() << "\n";
3281  LogDebug("TriggerMenuParser") << " obj bx = " << object.getBxOffset() << "\n";
3282 
3283  // check the leg type
3284  if (object.getType() == esObjectType::Muon) {
3285  // we have a muon
3286  parseMuonCorr(&object, chipNr);
3287  corrIndexVal[lll] = (m_corMuonTemplate[chipNr]).size() - 1;
3288 
3289  //Now set some flags for this subCondition
3290  objType[lll] = gtMu;
3291  condCateg[lll] = CondMuon;
3292 
3293  } else {
3294  edm::LogError("TriggerMenuParser") << "Checked the object Type " << object.getType()
3295  << " for the correlation condition " << name
3296  << ": no three muons in the event!" << std::endl;
3297  }
3298  } // End loop over legs
3299 
3300  // fill the three-body correlation condition
3301  correlationThreeBodyCond.setCondType(cType);
3302  correlationThreeBodyCond.setObjectType(objType);
3303  correlationThreeBodyCond.setCondChipNr(chipNr);
3304 
3305  correlationThreeBodyCond.setCond0Category(condCateg[0]);
3306  correlationThreeBodyCond.setCond1Category(condCateg[1]);
3307  correlationThreeBodyCond.setCond2Category(condCateg[2]);
3308 
3309  correlationThreeBodyCond.setCond0Index(corrIndexVal[0]);
3310  correlationThreeBodyCond.setCond1Index(corrIndexVal[1]);
3311  correlationThreeBodyCond.setCond2Index(corrIndexVal[2]);
3312 
3313  correlationThreeBodyCond.setCorrelationThreeBodyParameter(corrThreeBodyParameter);
3314 
3315  if (edm::isDebugEnabled()) {
3316  std::ostringstream myCoutStream;
3317  correlationThreeBodyCond.print(myCoutStream);
3318  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3319  }
3320 
3321  // insert condition into the map
3322  // condition is not duplicate, check was done at the beginning
3323 
3324  (m_vecCorrelationThreeBodyTemplate[chipNr]).push_back(correlationThreeBodyCond);
3325 
3326  //
3327  return true;
3328 }
size
Write out results.
bool isDebugEnabled()
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
constexpr int pow(int x)
Definition: conifer.h:24
Log< level::Error, false > LogError
#define LogTrace(id)
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
bool parseMuonCorr(const L1TUtmObject *condMu, unsigned int chipNr=0)
const std::vector< L1TUtmCut > & getCuts() const
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
#define LogDebug(id)

◆ parseCorrelationWithOverlapRemoval()

bool TriggerMenuParser::parseCorrelationWithOverlapRemoval ( const L1TUtmCondition 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 3343 of file TriggerMenuParser.cc.

References CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::chargeCorrelation, l1t::CondCalo, l1t::CondEnergySum, l1t::CondMuon, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::corrCutType, DMR_cfg::cut, HLT_2023v12_cff::DeltaEta, HLT_2023v12_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, ETM, L1TUtmCondition::getCuts(), L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), l1t::gtEG, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtJet, l1t::gtMu, l1t::gtTau, l1t::gtTowerCount, HTM, caHitNtupletGeneratorKernels::if(), edm::isDebugEnabled(), L1TRate_cfi::Jet, findQualityFiles::jj, LogDebug, LogTrace, 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, conifer::pow(), CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precDRCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precEtaCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precMassCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalDRCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalEtaCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precOverlapRemovalPhiCut, CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::precPhiCut, CorrelationWithOverlapRemovalTemplate::print(), push_back(), CorrelationWithOverlapRemovalTemplate::setCond0Category(), CorrelationWithOverlapRemovalTemplate::setCond0Index(), CorrelationWithOverlapRemovalTemplate::setCond1Category(), CorrelationWithOverlapRemovalTemplate::setCond1Index(), CorrelationWithOverlapRemovalTemplate::setCond2Category(), CorrelationWithOverlapRemovalTemplate::setCond2Index(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondType(), CorrelationWithOverlapRemovalTemplate::setCorrelationWithOverlapRemovalParameter(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, L1TRate_Offline_cfi::Tau, and l1t::Type2corWithOverlapRemoval.

3343  {
3344  using namespace tmeventsetup;
3345  std::string condition = "corrWithOverlapRemoval";
3346  std::string particle = "test-fix";
3347  std::string type = l1t2string(corrCond.getType());
3348  std::string name = l1t2string(corrCond.getName());
3349 
3350  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
3351  << " (in parseCorrelationWithOverlapRemoval) " << std::endl
3352  << " condition = " << condition << std::endl
3353  << " particle = " << particle << std::endl
3354  << " type = " << type << std::endl
3355  << " name = " << name << std::endl;
3356 
3357  // create a new correlation condition
3358  CorrelationWithOverlapRemovalTemplate correlationWORCond(name);
3359 
3360  // check that the condition does not exist already in the map
3361  if (!insertConditionIntoMap(correlationWORCond, chipNr)) {
3362  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
3363 
3364  return false;
3365  }
3366 
3367  // Define some of the quantities to store the parased information
3368 
3369  // condition type BLW (Do we change this to the type of correlation condition?)
3371 
3372  // three objects (for sure)
3373  const int nrObj = 3;
3374 
3375  // object types and greater equal flag - filled in the loop
3376  int intGEq[nrObj] = {-1, -1, -1};
3377  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
3378  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
3379 
3380  // correlation flag and index in the cor*vector
3381  const bool corrFlag = true;
3382  int corrIndexVal[nrObj] = {-1, -1, -1};
3383 
3384  // Storage of the correlation selection
3386  corrParameter.chargeCorrelation = 1; //ignore charge correlation for corr-legs
3387 
3388  // Get the correlation Cuts on the legs
3389  int cutType = 0;
3390  const std::vector<L1TUtmCut>& cuts = corrCond.getCuts();
3391  for (size_t jj = 0; jj < cuts.size(); jj++) {
3392  const L1TUtmCut& cut = cuts.at(jj);
3393 
3394  if (cut.getCutType() == esCutType::ChargeCorrelation) {
3395  if (cut.getData() == "ls")
3396  corrParameter.chargeCorrelation = 2;
3397  else if (cut.getData() == "os")
3398  corrParameter.chargeCorrelation = 4;
3399  else
3400  corrParameter.chargeCorrelation = 1; //ignore charge correlation
3401  } else {
3402  //
3403  // Unitl utm has method to calculate these, do the integer value calculation with precision.
3404  //
3405  double minV = cut.getMinimum().value;
3406  double maxV = cut.getMaximum().value;
3407 
3408  //Scale down very large numbers out of xml
3409  if (maxV > 1.0e8)
3410  maxV = 1.0e8;
3411 
3412  if (cut.getCutType() == esCutType::DeltaEta) {
3413  //std::cout << "DeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3414  corrParameter.minEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3415  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3416  corrParameter.precEtaCut = cut.getMinimum().index;
3417  cutType = cutType | 0x1;
3418  } else if (cut.getCutType() == esCutType::DeltaPhi) {
3419  //std::cout << "DeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3420  corrParameter.minPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3421  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3422  corrParameter.precPhiCut = cut.getMinimum().index;
3423  cutType = cutType | 0x2;
3424  } else if (cut.getCutType() == esCutType::DeltaR) {
3425  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3426  corrParameter.minDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3427  corrParameter.maxDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3428  corrParameter.precDRCut = cut.getMinimum().index;
3429  cutType = cutType | 0x4;
3430  } else if (cut.getCutType() == esCutType::Mass) {
3431  //std::cout << "Mass Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3432  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3433  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3434  corrParameter.precMassCut = cut.getMinimum().index;
3435  cutType = cutType | 0x8;
3436  } else if (cut.getCutType() == esCutType::MassDeltaR) {
3437  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3438  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3439  corrParameter.precMassCut = cut.getMinimum().index;
3440  cutType = cutType | 0x80;
3441  }
3442  if (cut.getCutType() == esCutType::OvRmDeltaEta) {
3443  //std::cout << "OverlapRemovalDeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3444  corrParameter.minOverlapRemovalEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3445  corrParameter.maxOverlapRemovalEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3446  corrParameter.precOverlapRemovalEtaCut = cut.getMinimum().index;
3447  cutType = cutType | 0x10;
3448  } else if (cut.getCutType() == esCutType::OvRmDeltaPhi) {
3449  //std::cout << "OverlapRemovalDeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3450  corrParameter.minOverlapRemovalPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3451  corrParameter.maxOverlapRemovalPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3452  corrParameter.precOverlapRemovalPhiCut = cut.getMinimum().index;
3453  cutType = cutType | 0x20;
3454  } else if (cut.getCutType() == esCutType::OvRmDeltaR) {
3455  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3456  corrParameter.minOverlapRemovalDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3457  corrParameter.maxOverlapRemovalDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3458  corrParameter.precOverlapRemovalDRCut = cut.getMinimum().index;
3459  cutType = cutType | 0x40;
3460  }
3461  }
3462  }
3463  corrParameter.corrCutType = cutType;
3464 
3465  // Get the two objects that form the legs
3466  const std::vector<L1TUtmObject>& objects = corrCond.getObjects();
3467  if (objects.size() != 3) {
3468  edm::LogError("TriggerMenuParser")
3469  << "incorrect number of objects for the correlation condition with overlap removal " << name << " corrFlag "
3470  << corrFlag << std::endl;
3471  return false;
3472  }
3473 
3474  // Loop over legs
3475  for (size_t jj = 0; jj < objects.size(); jj++) {
3476  const L1TUtmObject& object = objects.at(jj);
3477  LogDebug("TriggerMenuParser") << " obj name = " << object.getName() << "\n";
3478  LogDebug("TriggerMenuParser") << " obj type = " << object.getType() << "\n";
3479  LogDebug("TriggerMenuParser") << " obj op = " << object.getComparisonOperator() << "\n";
3480  LogDebug("TriggerMenuParser") << " obj bx = " << object.getBxOffset() << "\n";
3481  LogDebug("TriggerMenuParser") << "type = done" << std::endl;
3482 
3483  // check the leg type
3484  if (object.getType() == esObjectType::Muon) {
3485  // we have a muon
3486 
3487  /*
3488  //BLW Hold on to this code we may need to go back to it at some point.
3489  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
3490  // This is potentially a place to slim down the code. Note: We currently evaluate the
3491  // conditions every time, so even if we put the condition in the vector once, we would
3492  // still evaluate it multiple times. This is a place for optimization.
3493  {
3494 
3495  parseMuonCorr(&object,chipNr);
3496  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
3497 
3498  } else {
3499  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
3500  bool found = false;
3501  int index = 0;
3502  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
3503  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
3504  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
3505  found = true;
3506  } else {
3507  index++;
3508  }
3509  }
3510  if(found) {
3511  corrIndexVal[jj] = index;
3512  } else {
3513  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
3514  }
3515 
3516  }
3517 */
3518  parseMuonCorr(&object, chipNr);
3519  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
3520 
3521  //Now set some flags for this subCondition
3522  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3523  objType[jj] = gtMu;
3524  condCateg[jj] = CondMuon;
3525 
3526  } else if (object.getType() == esObjectType::Egamma || object.getType() == esObjectType::Jet ||
3527  object.getType() == esObjectType::Tau) {
3528  // we have an Calo object
3529  parseCaloCorr(&object, chipNr);
3530  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
3531 
3532  //Now set some flags for this subCondition
3533  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3534  switch (object.getType()) {
3535  case esObjectType::Egamma: {
3536  objType[jj] = gtEG;
3537  } break;
3538  case esObjectType::Jet: {
3539  objType[jj] = gtJet;
3540  } break;
3541  case esObjectType::Tau: {
3542  objType[jj] = gtTau;
3543  } break;
3544  default: {
3545  } break;
3546  }
3547  condCateg[jj] = CondCalo;
3548 
3549  } else if (object.getType() == esObjectType::ETM || object.getType() == esObjectType::ETMHF ||
3550  object.getType() == esObjectType::TOWERCOUNT || object.getType() == esObjectType::HTM) {
3551  // we have Energy Sum
3552  parseEnergySumCorr(&object, chipNr);
3553  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
3554 
3555  //Now set some flags for this subCondition
3556  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3557  switch (object.getType()) {
3558  case esObjectType::ETM: {
3560  } break;
3561  case esObjectType::HTM: {
3563  } break;
3564  case esObjectType::ETMHF: {
3566  } break;
3567  case esObjectType::TOWERCOUNT: {
3569  } break;
3570  default: {
3571  } break;
3572  }
3573  condCateg[jj] = CondEnergySum;
3574 
3575  } else {
3576  edm::LogError("TriggerMenuParser") << "Illegal Object Type " << object.getType()
3577  << " for the correlation condition " << name << std::endl;
3578  return false;
3579 
3580  } //if block on leg types
3581 
3582  } //loop over legs
3583 
3584  // get greater equal flag for the correlation condition
3585  bool gEq = true;
3586  if (intGEq[0] != intGEq[1]) {
3587  edm::LogError("TriggerMenuParser") << "Inconsistent GEq flags for sub-conditions "
3588  << " for the correlation condition " << name << std::endl;
3589  return false;
3590 
3591  } else {
3592  gEq = (intGEq[0] != 0);
3593  }
3594 
3595  // fill the correlation condition
3596  correlationWORCond.setCondType(cType);
3597  correlationWORCond.setObjectType(objType);
3598  correlationWORCond.setCondGEq(gEq);
3599  correlationWORCond.setCondChipNr(chipNr);
3600 
3601  correlationWORCond.setCond0Category(condCateg[0]);
3602  correlationWORCond.setCond1Category(condCateg[1]);
3603  correlationWORCond.setCond2Category(condCateg[2]);
3604 
3605  correlationWORCond.setCond0Index(corrIndexVal[0]);
3606  correlationWORCond.setCond1Index(corrIndexVal[1]);
3607  correlationWORCond.setCond2Index(corrIndexVal[2]);
3608 
3609  correlationWORCond.setCorrelationWithOverlapRemovalParameter(corrParameter);
3610 
3611  if (edm::isDebugEnabled()) {
3612  std::ostringstream myCoutStream;
3613  correlationWORCond.print(myCoutStream);
3614  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3615  }
3616 
3617  // insert condition into the map
3618  // condition is not duplicate, check was done at the beginning
3619 
3620  (m_vecCorrelationWithOverlapRemovalTemplate[chipNr]).push_back(correlationWORCond);
3621 
3622  //
3623  return true;
3624 }
size
Write out results.
Definition: L1GtObject.h:38
bool isDebugEnabled()
const int getType() const
bool parseEnergySumCorr(const L1TUtmObject *corrESum, unsigned int chipNr=0)
const std::vector< L1TUtmObject > & getObjects() const
constexpr int pow(int x)
Definition: conifer.h:24
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Log< level::Error, false > LogError
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
#define LogTrace(id)
Definition: L1GtObject.h:35
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
bool parseMuonCorr(const L1TUtmObject *condMu, unsigned int chipNr=0)
bool parseCaloCorr(const L1TUtmObject *corrCalo, unsigned int chipNr=0)
const std::vector< L1TUtmCut > & getCuts() const
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
#define LogDebug(id)

◆ parseDeltaEta_Cosh_LUTS()

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 946 of file TriggerMenuParser.cc.

References dqmiodumpmetadata::n, and AlCaHLTBitMon_QueryRunRegistry::string.

950  {
951  using namespace tmeventsetup;
952 
953  // First Delta Eta for this set
954  std::string scLabel1 = obj1;
955  scLabel1 += "-ETA";
956  std::string scLabel2 = obj2;
957  scLabel2 += "-ETA";
958 
959  //This LUT does not exist in L1 Menu file, don't fill it
960  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
961  return;
962 
963  const tmeventsetup::esScale* scale1 = &scaleMap.find(scLabel1)->second;
964  const tmeventsetup::esScale* scale2 = &scaleMap.find(scLabel2)->second;
965  std::vector<double> val_delta_eta;
966  std::vector<long long> lut_delta_eta;
967  size_t n = getDeltaVector(val_delta_eta, scale1, scale2);
968  setLut(lut_delta_eta, val_delta_eta, prec1);
969  std::string lutName = obj1;
970  lutName += "-";
971  lutName += obj2;
972  m_gtScales.setLUT_DeltaEta(lutName, lut_delta_eta, prec1);
973 
974  // Second Get the Cosh for this delta Eta Set
975  std::vector<long long> lut_cosh;
976  applyCosh(val_delta_eta, n);
977  setLut(lut_cosh, val_delta_eta, prec2);
978  m_gtScales.setLUT_Cosh(lutName, lut_cosh, prec2);
979 }
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)

◆ parseDeltaPhi_Cos_LUTS()

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 981 of file TriggerMenuParser.cc.

References dqmiodumpmetadata::n, and AlCaHLTBitMon_QueryRunRegistry::string.

985  {
986  using namespace tmeventsetup;
987 
988  // First Delta phi for this set
989  std::string scLabel1 = obj1;
990  scLabel1 += "-PHI";
991  std::string scLabel2 = obj2;
992  scLabel2 += "-PHI";
993 
994  //This LUT does not exist in L1 Menu file, don't fill it
995  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
996  return;
997 
998  const tmeventsetup::esScale* scale1 = &scaleMap.find(scLabel1)->second;
999  const tmeventsetup::esScale* scale2 = &scaleMap.find(scLabel2)->second;
1000  std::vector<double> val_delta_phi;
1001  std::vector<long long> lut_delta_phi;
1002  size_t n = getDeltaVector(val_delta_phi, scale1, scale2);
1003  setLut(lut_delta_phi, val_delta_phi, prec1);
1004  std::string lutName = obj1;
1005  lutName += "-";
1006  lutName += obj2;
1007  m_gtScales.setLUT_DeltaPhi(lutName, lut_delta_phi, prec1);
1008 
1009  // Second Get the Cosh for this delta phi Set
1010  std::vector<long long> lut_cos;
1011  applyCos(val_delta_phi, n);
1012  setLut(lut_cos, val_delta_phi, prec2);
1013  m_gtScales.setLUT_Cos(lutName, lut_cos, prec2);
1014 }
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

◆ parseEnergySum()

bool TriggerMenuParser::parseEnergySum ( L1TUtmCondition  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 2176 of file TriggerMenuParser.cc.

References DMR_cfg::cut, TauDecayModes::dec, L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), 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, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, EnergySumTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2023v12_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.

2176  {
2177  // XERCES_CPP_NAMESPACE_USE
2178  using namespace tmeventsetup;
2179 
2180  // get condition, particle name and type name
2181 
2182  std::string condition = "calo";
2183  std::string type = l1t2string(condEnergySum.getType());
2184  std::string name = l1t2string(condEnergySum.getName());
2185 
2186  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2187  << "\n (in parseEnergySum) "
2188  << "\n condition = " << condition << "\n type = " << type
2189  << "\n name = " << name << std::endl;
2190 
2191  // determine object type type
2192  GlobalObject energySumObjType;
2193  GtConditionType cType;
2194 
2195  if (condEnergySum.getType() == esConditionType::MissingEt) {
2196  energySumObjType = GlobalObject::gtETM;
2197  cType = TypeETM;
2198  } else if (condEnergySum.getType() == esConditionType::TotalEt) {
2199  energySumObjType = GlobalObject::gtETT;
2200  cType = TypeETT;
2201  } else if (condEnergySum.getType() == esConditionType::TotalEtEM) {
2202  energySumObjType = GlobalObject::gtETTem;
2203  cType = TypeETTem;
2204  } else if (condEnergySum.getType() == esConditionType::TotalHt) {
2205  energySumObjType = GlobalObject::gtHTT;
2206  cType = TypeHTT;
2207  } else if (condEnergySum.getType() == esConditionType::MissingHt) {
2208  energySumObjType = GlobalObject::gtHTM;
2209  cType = TypeHTM;
2210  } else if (condEnergySum.getType() == esConditionType::MissingEtHF) {
2211  energySumObjType = GlobalObject::gtETMHF;
2212  cType = TypeETMHF;
2213  } else if (condEnergySum.getType() == esConditionType::TowerCount) {
2214  energySumObjType = GlobalObject::gtTowerCount;
2215  cType = TypeTowerCount;
2216  } else if (condEnergySum.getType() == esConditionType::MinBiasHFP0) {
2217  energySumObjType = GlobalObject::gtMinBiasHFP0;
2218  cType = TypeMinBiasHFP0;
2219  } else if (condEnergySum.getType() == esConditionType::MinBiasHFM0) {
2220  energySumObjType = GlobalObject::gtMinBiasHFM0;
2221  cType = TypeMinBiasHFM0;
2222  } else if (condEnergySum.getType() == esConditionType::MinBiasHFP1) {
2223  energySumObjType = GlobalObject::gtMinBiasHFP1;
2224  cType = TypeMinBiasHFP1;
2225  } else if (condEnergySum.getType() == esConditionType::MinBiasHFM1) {
2226  energySumObjType = GlobalObject::gtMinBiasHFM1;
2227  cType = TypeMinBiasHFM1;
2228  } else if (condEnergySum.getType() == esConditionType::AsymmetryEt) {
2229  energySumObjType = GlobalObject::gtAsymmetryEt;
2230  cType = TypeAsymEt;
2231  } else if (condEnergySum.getType() == esConditionType::AsymmetryHt) {
2232  energySumObjType = GlobalObject::gtAsymmetryHt;
2233  cType = TypeAsymHt;
2234  } else if (condEnergySum.getType() == esConditionType::AsymmetryEtHF) {
2235  energySumObjType = GlobalObject::gtAsymmetryEtHF;
2236  cType = TypeAsymEtHF;
2237  } else if (condEnergySum.getType() == esConditionType::AsymmetryHtHF) {
2238  energySumObjType = GlobalObject::gtAsymmetryHtHF;
2239  cType = TypeAsymHtHF;
2240  } else if (condEnergySum.getType() == esConditionType::Centrality0) {
2241  energySumObjType = GlobalObject::gtCentrality0;
2242  cType = TypeCent0;
2243  } else if (condEnergySum.getType() == esConditionType::Centrality1) {
2244  energySumObjType = GlobalObject::gtCentrality1;
2245  cType = TypeCent1;
2246  } else if (condEnergySum.getType() == esConditionType::Centrality2) {
2247  energySumObjType = GlobalObject::gtCentrality2;
2248  cType = TypeCent2;
2249  } else if (condEnergySum.getType() == esConditionType::Centrality3) {
2250  energySumObjType = GlobalObject::gtCentrality3;
2251  cType = TypeCent3;
2252  } else if (condEnergySum.getType() == esConditionType::Centrality4) {
2253  energySumObjType = GlobalObject::gtCentrality4;
2254  cType = TypeCent4;
2255  } else if (condEnergySum.getType() == esConditionType::Centrality5) {
2256  energySumObjType = GlobalObject::gtCentrality5;
2257  cType = TypeCent5;
2258  } else if (condEnergySum.getType() == esConditionType::Centrality6) {
2259  energySumObjType = GlobalObject::gtCentrality6;
2260  cType = TypeCent6;
2261  } else if (condEnergySum.getType() == esConditionType::Centrality7) {
2262  energySumObjType = GlobalObject::gtCentrality7;
2263  cType = TypeCent7;
2264  } else {
2265  edm::LogError("TriggerMenuParser") << "Wrong type for energy-sum condition (" << type << ")" << std::endl;
2266  return false;
2267  }
2268 
2269  // global object
2270  int nrObj = 1;
2271 
2272  // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2273 
2274  // get values
2275 
2276  // temporary storage of the parameters
2277  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2278 
2279  int cnt = 0;
2280 
2281  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2282  int relativeBx = 0;
2283  bool gEq = false;
2284 
2285  // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2286 
2287  // Loop over objects and extract the cuts on the objects
2288  const std::vector<L1TUtmObject>& objects = condEnergySum.getObjects();
2289  for (size_t jj = 0; jj < objects.size(); jj++) {
2290  const L1TUtmObject& object = objects.at(jj);
2291  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
2292 
2293  // BLW TO DO: This needs to be added to the Object Parameters
2294  relativeBx = object.getBxOffset();
2295 
2296  // Loop over the cuts for this object
2297  int lowerThresholdInd = 0;
2298  int upperThresholdInd = -1;
2299  int cntPhi = 0;
2300  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2301 
2302  const std::vector<L1TUtmCut>& cuts = object.getCuts();
2303  for (size_t kk = 0; kk < cuts.size(); kk++) {
2304  const L1TUtmCut& cut = cuts.at(kk);
2305 
2306  switch (cut.getCutType()) {
2307  case esCutType::Threshold:
2308  lowerThresholdInd = cut.getMinimum().index;
2309  upperThresholdInd = cut.getMaximum().index;
2310  break;
2311 
2312  case esCutType::Eta:
2313  break;
2314 
2315  case esCutType::Phi: {
2316  if (cntPhi == 0) {
2317  phiWindow1Lower = cut.getMinimum().index;
2318  phiWindow1Upper = cut.getMaximum().index;
2319  } else if (cntPhi == 1) {
2320  phiWindow2Lower = cut.getMinimum().index;
2321  phiWindow2Upper = cut.getMaximum().index;
2322  } else {
2323  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition (" << type << ")" << std::endl;
2324  return false;
2325  }
2326  cntPhi++;
2327 
2328  } break;
2329 
2330  case esCutType::Count:
2331  lowerThresholdInd = cut.getMinimum().index;
2332  upperThresholdInd = 0xffffff;
2333  break;
2334 
2335  default:
2336  break;
2337  } //end switch
2338 
2339  } //end loop over cuts
2340 
2341  // Fill the object parameters
2342  objParameter[cnt].etLowThreshold = lowerThresholdInd;
2343  objParameter[cnt].etHighThreshold = upperThresholdInd;
2344  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
2345  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
2346  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
2347  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
2348 
2349  // Output for debugging
2350  LogDebug("TriggerMenuParser") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2351  << std::hex << objParameter[cnt].etLowThreshold << " - "
2352  << objParameter[cnt].etHighThreshold
2353  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2354  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
2355  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2356  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
2357  << std::dec << std::endl;
2358 
2359  cnt++;
2360  } //end loop over objects
2361 
2362  // object types - all same energySumObjType
2363  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2364 
2365  // now create a new energySum condition
2366 
2367  EnergySumTemplate energySumCond(name);
2368 
2369  energySumCond.setCondType(cType);
2370  energySumCond.setObjectType(objType);
2371  energySumCond.setCondGEq(gEq);
2372  energySumCond.setCondChipNr(chipNr);
2373  energySumCond.setCondRelativeBx(relativeBx);
2374 
2375  energySumCond.setConditionParameter(objParameter);
2376 
2377  if (edm::isDebugEnabled()) {
2378  std::ostringstream myCoutStream;
2379  energySumCond.print(myCoutStream);
2380  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2381  }
2382 
2383  // insert condition into the map
2384  if (!insertConditionIntoMap(energySumCond, chipNr)) {
2385  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2386 
2387  return false;
2388  } else {
2389  if (corrFlag) {
2390  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2391 
2392  } else {
2393  (m_vecEnergySumTemplate[chipNr]).push_back(energySumCond);
2394  }
2395  }
2396 
2397  //
2398  return true;
2399 }
bool isDebugEnabled()
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
#define LogDebug(id)

◆ parseEnergySumCorr()

bool TriggerMenuParser::parseEnergySumCorr ( const L1TUtmObject corrESum,
unsigned int  chipNr = 0 
)
private

parseEnergySumCorr Parse an "energy sum" 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 2550 of file TriggerMenuParser.cc.

References DMR_cfg::cut, TauDecayModes::dec, ETM, L1TUtmObject::getBxOffset(), L1TUtmObject::getComparisonOperator(), L1TUtmObject::getCuts(), L1TUtmObject::getName(), L1TUtmObject::getType(), l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtTowerCount, HTM, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, EnergySumTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2023v12_cff::Threshold, l1t::TypeETM, l1t::TypeETMHF, l1t::TypeHTM, and l1t::TypeTowerCount.

2550  {
2551  // XERCES_CPP_NAMESPACE_USE
2552  using namespace tmeventsetup;
2553 
2554  // get condition, particle name and type name
2555 
2556  std::string condition = "calo";
2557  std::string type = l1t2string(corrESum->getType());
2558  std::string name = l1t2string(corrESum->getName());
2559 
2560  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2561  << "\n (in parseEnergySum) "
2562  << "\n condition = " << condition << "\n type = " << type
2563  << "\n name = " << name << std::endl;
2564 
2565  // determine object type type
2566  GlobalObject energySumObjType;
2567  GtConditionType cType;
2568 
2569  if (corrESum->getType() == esObjectType::ETM) {
2570  energySumObjType = GlobalObject::gtETM;
2571  cType = TypeETM;
2572  } else if (corrESum->getType() == esObjectType::HTM) {
2573  energySumObjType = GlobalObject::gtHTM;
2574  cType = TypeHTM;
2575  } else if (corrESum->getType() == esObjectType::ETMHF) {
2576  energySumObjType = GlobalObject::gtETMHF;
2577  cType = TypeETMHF;
2578  } else if (corrESum->getType() == esObjectType::TOWERCOUNT) {
2579  energySumObjType = GlobalObject::gtTowerCount;
2580  cType = TypeTowerCount;
2581  } else {
2582  edm::LogError("TriggerMenuParser") << "Wrong type for energy-sum correclation condition (" << type << ")"
2583  << std::endl;
2584  return false;
2585  }
2586 
2587  // global object
2588  int nrObj = 1;
2589 
2590  // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2591 
2592  // get values
2593 
2594  // temporary storage of the parameters
2595  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2596 
2597  int cnt = 0;
2598 
2599  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2600  int relativeBx = 0;
2601  bool gEq = false;
2602 
2603  // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2604 
2605  gEq = (corrESum->getComparisonOperator() == esComparisonOperator::GE);
2606 
2607  // BLW TO DO: This needs to be added to the Object Parameters
2608  relativeBx = corrESum->getBxOffset();
2609 
2610  // Loop over the cuts for this object
2611  int lowerThresholdInd = 0;
2612  int upperThresholdInd = -1;
2613  int cntPhi = 0;
2614  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2615 
2616  const std::vector<L1TUtmCut>& cuts = corrESum->getCuts();
2617  for (size_t kk = 0; kk < cuts.size(); kk++) {
2618  const L1TUtmCut& cut = cuts.at(kk);
2619 
2620  switch (cut.getCutType()) {
2621  case esCutType::Threshold:
2622  lowerThresholdInd = cut.getMinimum().index;
2623  upperThresholdInd = cut.getMaximum().index;
2624  break;
2625 
2626  case esCutType::Eta:
2627  break;
2628 
2629  case esCutType::Phi: {
2630  if (cntPhi == 0) {
2631  phiWindow1Lower = cut.getMinimum().index;
2632  phiWindow1Upper = cut.getMaximum().index;
2633  } else if (cntPhi == 1) {
2634  phiWindow2Lower = cut.getMinimum().index;
2635  phiWindow2Upper = cut.getMaximum().index;
2636  } else {
2637  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition (" << type << ")" << std::endl;
2638  return false;
2639  }
2640  cntPhi++;
2641 
2642  } break;
2643 
2644  default:
2645  break;
2646  } //end switch
2647 
2648  } //end loop over cuts
2649 
2650  // Fill the object parameters
2651  objParameter[0].etLowThreshold = lowerThresholdInd;
2652  objParameter[0].etHighThreshold = upperThresholdInd;
2653  objParameter[0].phiWindow1Lower = phiWindow1Lower;
2654  objParameter[0].phiWindow1Upper = phiWindow1Upper;
2655  objParameter[0].phiWindow2Lower = phiWindow2Lower;
2656  objParameter[0].phiWindow2Upper = phiWindow2Upper;
2657 
2658  // Output for debugging
2659  LogDebug("TriggerMenuParser") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2660  << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etLowThreshold
2661  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2662  << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
2663  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2664  << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper
2665  << std::dec << std::endl;
2666 
2667  // object types - all same energySumObjType
2668  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2669 
2670  // now create a new energySum condition
2671 
2672  EnergySumTemplate energySumCond(name);
2673 
2674  energySumCond.setCondType(cType);
2675  energySumCond.setObjectType(objType);
2676  energySumCond.setCondGEq(gEq);
2677  energySumCond.setCondChipNr(chipNr);
2678  energySumCond.setCondRelativeBx(relativeBx);
2679 
2680  energySumCond.setConditionParameter(objParameter);
2681 
2682  if (edm::isDebugEnabled()) {
2683  std::ostringstream myCoutStream;
2684  energySumCond.print(myCoutStream);
2685  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2686  }
2687  /*
2688  // insert condition into the map
2689  if ( !insertConditionIntoMap(energySumCond, chipNr)) {
2690 
2691  edm::LogError("TriggerMenuParser")
2692  << " Error: duplicate condition (" << name << ")"
2693  << std::endl;
2694 
2695  return false;
2696  }
2697  else {
2698 
2699  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2700 
2701  }
2702 */
2703  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2704 
2705  //
2706  return true;
2707 }
Definition: L1GtObject.h:38
bool isDebugEnabled()
const std::vector< L1TUtmCut > & getCuts() const
Definition: L1TUtmObject.h:118
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
Log< level::Error, false > LogError
const int getComparisonOperator() const
Definition: L1TUtmObject.h:103
const std::string & getName() const
Definition: L1TUtmObject.h:97
#define LogTrace(id)
const int getBxOffset() const
Definition: L1TUtmObject.h:106
Definition: L1GtObject.h:35
const int getType() const
Definition: L1TUtmObject.h:100
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
#define LogDebug(id)

◆ parseEnergySumZdc()

bool TriggerMenuParser::parseEnergySumZdc ( L1TUtmCondition  condEnergySumZdc,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parseEnergySumZdc Parse an "energy sum" condition from the ZDC subsystem 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 2412 of file TriggerMenuParser.cc.

References DMR_cfg::cut, TauDecayModes::dec, L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), l1t::gtZDCM, l1t::gtZDCP, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Skims_PA_cff::name, electrons_cff::objType, EnergySumZdcTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumZdcTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2023v12_cff::Threshold, l1t::TypeZDCM, and l1t::TypeZDCP.

2414  {
2415  // XERCES_CPP_NAMESPACE_USE
2416  using namespace tmeventsetup;
2417 
2418  // get condition, particle name and type name
2419 
2420  std::string condition = "calo";
2421  std::string type = l1t2string(condEnergySumZdc.getType());
2422  std::string name = l1t2string(condEnergySumZdc.getName());
2423 
2424  LogDebug("TriggerMenuParser")
2425  << "\n ******************************************\n (in parseEnergySumZdc)\n condition = " << condition
2426  << "\n type = " << type << "\n name = " << name;
2427 
2428  // determine object type
2429  GlobalObject energySumObjType;
2430  GtConditionType cType;
2431 
2432  if (condEnergySumZdc.getType() == esConditionType::ZDCPlus) {
2433  LogDebug("TriggerMenuParser") << "ZDC signals: esConditionType::ZDCPlus " << std::endl;
2434  energySumObjType = GlobalObject::gtZDCP;
2435  cType = TypeZDCP;
2436  } else if (condEnergySumZdc.getType() == esConditionType::ZDCMinus) {
2437  LogDebug("TriggerMenuParser") << "ZDC signals: esConditionType::ZDCMinus " << std::endl;
2438  energySumObjType = GlobalObject::gtZDCM;
2439  cType = TypeZDCM;
2440  } else {
2441  edm::LogError("TriggerMenuParser") << "Wrong type for ZDC energy-sum condition (" << type << ")" << std::endl;
2442  return false;
2443  }
2444 
2445  // global object
2446  int nrObj = 1;
2447 
2448  // temporary storage of the parameters
2449  std::vector<EnergySumZdcTemplate::ObjectParameter> objParameter(nrObj);
2450 
2451  // Loop over the cuts for this object
2452  int lowerThresholdInd = 0;
2453  int upperThresholdInd = -1;
2454 
2455  int cnt = 0;
2456 
2457  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2458  int relativeBx = 0;
2459  bool gEq = false;
2460 
2461  // l1t::EnergySumsObjectRequirement objPar = condEnergySumZdc.objectRequirement();
2462 
2463  // Loop over objects and extract the cuts on the objects
2464  const std::vector<L1TUtmObject>& objects = condEnergySumZdc.getObjects();
2465  for (size_t jj = 0; jj < objects.size(); jj++) {
2466  const L1TUtmObject& object = objects.at(jj);
2467  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
2468 
2469  // BLW TO DO: This needs to be added to the Object Parameters
2470  relativeBx = object.getBxOffset();
2471 
2472  // Loop over the cuts for this object
2473  const std::vector<L1TUtmCut>& cuts = object.getCuts();
2474  for (size_t kk = 0; kk < cuts.size(); kk++) {
2475  const L1TUtmCut& cut = cuts.at(kk);
2476 
2477  switch (cut.getCutType()) {
2478  case esCutType::Threshold:
2479  lowerThresholdInd = cut.getMinimum().index;
2480  upperThresholdInd = cut.getMaximum().index;
2481  break;
2482 
2483  case esCutType::Count:
2484  lowerThresholdInd = cut.getMinimum().index;
2485  upperThresholdInd = 0xffffff;
2486  break;
2487 
2488  default:
2489  break;
2490  } //end switch
2491 
2492  } //end loop over cuts
2493 
2494  // Fill the object parameters
2495  objParameter[cnt].etLowThreshold = lowerThresholdInd;
2496  objParameter[cnt].etHighThreshold = upperThresholdInd;
2497 
2498  // Output for debugging
2499  LogDebug("TriggerMenuParser") << "\n EnergySumZdc ET high threshold (hex) for energy sum object " << cnt
2500  << " = " << std::hex << objParameter[cnt].etLowThreshold << " - "
2501  << objParameter[cnt].etHighThreshold << std::dec;
2502 
2503  cnt++;
2504  } //end loop over objects
2505 
2506  // object types - all same energySumObjType
2507  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2508 
2509  // now create a new energySum condition
2510 
2511  EnergySumZdcTemplate energySumCond(name);
2512 
2513  energySumCond.setCondType(cType);
2514  energySumCond.setObjectType(objType);
2515  energySumCond.setCondGEq(gEq);
2516  energySumCond.setCondChipNr(chipNr);
2517  energySumCond.setCondRelativeBx(relativeBx);
2518 
2519  energySumCond.setConditionParameter(objParameter);
2520 
2521  if (edm::isDebugEnabled()) {
2522  std::ostringstream myCoutStream;
2523  energySumCond.print(myCoutStream);
2524  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2525  }
2526 
2527  // insert condition into the map
2528  if (!insertConditionIntoMap(energySumCond, chipNr)) {
2529  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2530 
2531  return false;
2532  } else {
2533  (m_vecEnergySumZdcTemplate[chipNr]).push_back(energySumCond);
2534  }
2535  //
2536  return true;
2537 }
bool isDebugEnabled()
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
Log< level::Error, false > LogError
#define LogTrace(id)
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
std::vector< std::vector< EnergySumZdcTemplate > > m_vecEnergySumZdcTemplate
#define LogDebug(id)

◆ parseExternal()

bool TriggerMenuParser::parseExternal ( L1TUtmCondition  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 2810 of file TriggerMenuParser.cc.

References L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), l1t::gtExternal, findQualityFiles::jj, LogDebug, LogTrace, Skims_PA_cff::name, electrons_cff::objType, push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), ExternalTemplate::setExternalChannel(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::TypeExternal.

2810  {
2811  using namespace tmeventsetup;
2812  // get condition, particle name and type name
2813  std::string condition = "ext";
2814  std::string particle = "test-fix";
2815  std::string type = l1t2string(condExt.getType());
2816  std::string name = l1t2string(condExt.getName());
2817 
2818  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2819  << "\n (in parseExternal) "
2820  << "\n condition = " << condition << "\n particle = " << particle
2821  << "\n type = " << type << "\n name = " << name << std::endl;
2822 
2823  // object type and condition type
2824  // object type - irrelevant for External conditions
2825  GtConditionType cType = TypeExternal;
2826  GlobalObject extSignalType = GlobalObject::gtExternal;
2827  int nrObj = 1; //only one object for these conditions
2828 
2829  int relativeBx = 0;
2830  unsigned int channelID = 0;
2831 
2832  // Get object for External conditions
2833  const std::vector<L1TUtmObject>& objects = condExt.getObjects();
2834  for (size_t jj = 0; jj < objects.size(); jj++) {
2835  const L1TUtmObject& object = objects.at(jj);
2836  if (object.getType() == esObjectType::EXT) {
2837  relativeBx = object.getBxOffset();
2838  channelID = object.getExternalChannelId();
2839  }
2840  }
2841 
2842  // set the boolean value for the ge_eq mode - irrelevant for External conditions
2843  bool gEq = false;
2844 
2845  //object types - all same for external conditions
2846  std::vector<GlobalObject> objType(nrObj, extSignalType);
2847 
2848  // now create a new External condition
2849  ExternalTemplate externalCond(name);
2850 
2851  externalCond.setCondType(cType);
2852  externalCond.setObjectType(objType);
2853  externalCond.setCondGEq(gEq);
2854  externalCond.setCondChipNr(chipNr);
2855  externalCond.setCondRelativeBx(relativeBx);
2856  externalCond.setExternalChannel(channelID);
2857 
2858  LogTrace("TriggerMenuParser") << externalCond << "\n" << std::endl;
2859 
2860  // insert condition into the map
2861  if (!insertConditionIntoMap(externalCond, chipNr)) {
2862  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2863 
2864  return false;
2865  } else {
2866  (m_vecExternalTemplate[chipNr]).push_back(externalCond);
2867  }
2868 
2869  return true;
2870 }
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
Log< level::Error, false > LogError
#define LogTrace(id)
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
#define LogDebug(id)

◆ parseMuon()

bool TriggerMenuParser::parseMuon ( L1TUtmCondition  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 1068 of file TriggerMenuParser.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, PixelTestBeamValidation_cfi::Charge, MuonTemplate::CorrelationParameter::chargeCorrelation, DMR_cfg::cut, L1TUtmCondition::getCuts(), L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), l1t::gtMu, createfilelist::int, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, MuonTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), hltExoticaValidator_cfi::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, HLT_2023v12_cff::Threshold, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

1068  {
1069  using namespace tmeventsetup;
1070  // get condition, particle name (must be muon) and type name
1071  std::string condition = "muon";
1072  std::string particle = "muon"; //l1t2string( condMu.objectType() );
1073  std::string type = l1t2string(condMu.getType());
1074  std::string name = l1t2string(condMu.getName());
1075  int nrObj = -1;
1076 
1078 
1079  if (condMu.getType() == esConditionType::SingleMuon) {
1080  type = "1_s";
1081  cType = l1t::Type1s;
1082  nrObj = 1;
1083  } else if (condMu.getType() == esConditionType::DoubleMuon) {
1084  type = "2_s";
1085  cType = l1t::Type2s;
1086  nrObj = 2;
1087  } else if (condMu.getType() == esConditionType::TripleMuon) {
1088  type = "3";
1089  cType = l1t::Type3s;
1090  nrObj = 3;
1091  } else if (condMu.getType() == esConditionType::QuadMuon) {
1092  type = "4";
1093  cType = l1t::Type4s;
1094  nrObj = 4;
1095  } else {
1096  edm::LogError("TriggerMenuParser") << "Wrong type for muon-condition (" << type << ")" << std::endl;
1097  return false;
1098  }
1099 
1100  if (nrObj < 0) {
1101  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type << ")"
1102  << "\nCan not determine number of trigger objects. " << std::endl;
1103  return false;
1104  }
1105 
1106  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1107  << "\n parseMuon "
1108  << "\n condition = " << condition << "\n particle = " << particle
1109  << "\n type = " << type << "\n name = " << name << std::endl;
1110 
1111  // // get values
1112 
1113  // temporary storage of the parameters
1114  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1115 
1116  // Do we need this?
1117  MuonTemplate::CorrelationParameter corrParameter;
1118 
1119  // need at least two values for deltaPhi
1120  std::vector<uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1121  tmpValues.reserve(nrObj);
1122 
1123  if (int(condMu.getObjects().size()) != nrObj) {
1124  edm::LogError("TriggerMenuParser") << " condMu objects: nrObj = " << nrObj
1125  << "condMu.getObjects().size() = " << condMu.getObjects().size() << std::endl;
1126  return false;
1127  }
1128 
1129  // Look for cuts on the objects in the condition
1130  unsigned int chargeCorrelation = 1;
1131  const std::vector<L1TUtmCut>& cuts = condMu.getCuts();
1132  for (size_t jj = 0; jj < cuts.size(); jj++) {
1133  const L1TUtmCut& cut = cuts.at(jj);
1134  if (cut.getCutType() == esCutType::ChargeCorrelation) {
1135  if (cut.getData() == "ls")
1136  chargeCorrelation = 2;
1137  else if (cut.getData() == "os")
1138  chargeCorrelation = 4;
1139  else
1140  chargeCorrelation = 1; //ignore correlation
1141  }
1142  }
1143 
1144  //set charge correlation parameter
1145  corrParameter.chargeCorrelation = chargeCorrelation; //tmpValues[0];
1146 
1147  int cnt = 0;
1148 
1149  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1150  int relativeBx = 0;
1151  bool gEq = false;
1152 
1153  // Loop over objects and extract the cuts on the objects
1154  const std::vector<L1TUtmObject>& objects = condMu.getObjects();
1155  for (size_t jj = 0; jj < objects.size(); jj++) {
1156  const L1TUtmObject& object = objects.at(jj);
1157  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1158 
1159  // BLW TO DO: This needs to be added to the Object Parameters
1160  relativeBx = object.getBxOffset();
1161 
1162  // Loop over the cuts for this object
1163  int upperUnconstrainedPtInd = -1;
1164  int lowerUnconstrainedPtInd = 0;
1165  int upperImpactParameterInd = -1;
1166  int lowerImpactParameterInd = 0;
1167  int upperThresholdInd = -1;
1168  int lowerThresholdInd = 0;
1169  int upperIndexInd = -1;
1170  int lowerIndexInd = 0;
1171  int cntPhi = 0;
1172  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1173  int isolationLUT = 0xF; //default is to ignore unless specified.
1174  int impactParameterLUT = 0xF; //default is to ignore unless specified
1175  int charge = -1; //default value is to ignore unless specified
1176  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1177 
1178  std::vector<MuonTemplate::Window> etaWindows;
1179  std::vector<MuonTemplate::Window> tfMuonIndexWindows;
1180 
1181  const std::vector<L1TUtmCut>& cuts = object.getCuts();
1182  for (size_t kk = 0; kk < cuts.size(); kk++) {
1183  const L1TUtmCut& cut = cuts.at(kk);
1184 
1185  switch (cut.getCutType()) {
1186  case esCutType::UnconstrainedPt:
1187  lowerUnconstrainedPtInd = cut.getMinimum().index;
1188  upperUnconstrainedPtInd = cut.getMaximum().index;
1189  break;
1190 
1191  case esCutType::ImpactParameter:
1192  lowerImpactParameterInd = cut.getMinimum().index;
1193  upperImpactParameterInd = cut.getMaximum().index;
1194  impactParameterLUT = l1tstr2int(cut.getData());
1195  break;
1196 
1197  case esCutType::Threshold:
1198  lowerThresholdInd = cut.getMinimum().index;
1199  upperThresholdInd = cut.getMaximum().index;
1200  break;
1201 
1202  case esCutType::Slice:
1203  lowerIndexInd = int(cut.getMinimum().value);
1204  upperIndexInd = int(cut.getMaximum().value);
1205  break;
1206 
1207  case esCutType::Eta: {
1208  if (etaWindows.size() < 5) {
1209  etaWindows.push_back({cut.getMinimum().index, cut.getMaximum().index});
1210  } else {
1211  edm::LogError("TriggerMenuParser")
1212  << "Too Many Eta Cuts for muon-condition (" << particle << ")" << std::endl;
1213  return false;
1214  }
1215  } break;
1216 
1217  case esCutType::Phi: {
1218  if (cntPhi == 0) {
1219  phiWindow1Lower = cut.getMinimum().index;
1220  phiWindow1Upper = cut.getMaximum().index;
1221  } else if (cntPhi == 1) {
1222  phiWindow2Lower = cut.getMinimum().index;
1223  phiWindow2Upper = cut.getMaximum().index;
1224  } else {
1225  edm::LogError("TriggerMenuParser")
1226  << "Too Many Phi Cuts for muon-condition (" << particle << ")" << std::endl;
1227  return false;
1228  }
1229  cntPhi++;
1230 
1231  } break;
1232 
1233  case esCutType::Charge:
1234  if (cut.getData() == "positive")
1235  charge = 0;
1236  else if (cut.getData() == "negative")
1237  charge = 1;
1238  else
1239  charge = -1;
1240  break;
1241  case esCutType::Quality:
1242 
1243  qualityLUT = l1tstr2int(cut.getData());
1244 
1245  break;
1246  case esCutType::Isolation: {
1247  isolationLUT = l1tstr2int(cut.getData());
1248 
1249  } break;
1250 
1251  case esCutType::Index: {
1252  tfMuonIndexWindows.push_back({cut.getMinimum().index, cut.getMaximum().index});
1253  } break;
1254 
1255  default:
1256  break;
1257  } //end switch
1258 
1259  } //end loop over cuts
1260 
1261  // Set the parameter cuts
1262  objParameter[cnt].unconstrainedPtHigh = upperUnconstrainedPtInd;
1263  objParameter[cnt].unconstrainedPtLow = lowerUnconstrainedPtInd;
1264  objParameter[cnt].impactParameterHigh = upperImpactParameterInd;
1265  objParameter[cnt].impactParameterLow = lowerImpactParameterInd;
1266  objParameter[cnt].impactParameterLUT = impactParameterLUT;
1267 
1268  objParameter[cnt].ptHighThreshold = upperThresholdInd;
1269  objParameter[cnt].ptLowThreshold = lowerThresholdInd;
1270 
1271  objParameter[cnt].indexHigh = upperIndexInd;
1272  objParameter[cnt].indexLow = lowerIndexInd;
1273 
1274  objParameter[cnt].etaWindows = etaWindows;
1275 
1276  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1277  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1278  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1279  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1280 
1281  // BLW TO DO: Do we need these anymore? Drop them?
1282  objParameter[cnt].enableMip = false; //tmpMip[i];
1283  objParameter[cnt].enableIso = false; //tmpEnableIso[i];
1284  objParameter[cnt].requestIso = false; //tmpRequestIso[i];
1285 
1286  objParameter[cnt].charge = charge;
1287  objParameter[cnt].qualityLUT = qualityLUT;
1288  objParameter[cnt].isolationLUT = isolationLUT;
1289 
1290  objParameter[cnt].tfMuonIndexWindows = tfMuonIndexWindows;
1291 
1292  cnt++;
1293  } //end loop over objects
1294 
1295  // object types - all muons
1296  std::vector<GlobalObject> objType(nrObj, gtMu);
1297 
1298  // now create a new CondMuonition
1299  MuonTemplate muonCond(name);
1300 
1301  muonCond.setCondType(cType);
1302  muonCond.setObjectType(objType);
1303  muonCond.setCondGEq(gEq);
1304  muonCond.setCondChipNr(chipNr);
1305  muonCond.setCondRelativeBx(relativeBx);
1306 
1307  muonCond.setConditionParameter(objParameter, corrParameter);
1308 
1309  if (edm::isDebugEnabled()) {
1310  std::ostringstream myCoutStream;
1311  muonCond.print(myCoutStream);
1312  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1313  }
1314 
1315  // insert condition into the map and into muon template vector
1316  if (!insertConditionIntoMap(muonCond, chipNr)) {
1317  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
1318  return false;
1319  } else {
1320  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1321  if (corrFlag) {
1322  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1323  } else {
1324  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the vecMuonTemplate vector" << std::endl;
1325  (m_vecMuonTemplate[chipNr]).push_back(muonCond);
1326  }
1327  }
1328 
1329  //
1330  return true;
1331 }
bool isDebugEnabled()
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
Log< level::Error, false > LogError
#define LogTrace(id)
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
const std::vector< L1TUtmCut > & getCuts() const
int l1tstr2int(const std::string data)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
#define LogDebug(id)

◆ parseMuonCorr()

bool TriggerMenuParser::parseMuonCorr ( const L1TUtmObject condMu,
unsigned int  chipNr = 0 
)
private

Definition at line 1333 of file TriggerMenuParser.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, PixelTestBeamValidation_cfi::Charge, MuonTemplate::CorrelationParameter::chargeCorrelation, DMR_cfg::cut, L1TUtmObject::getBxOffset(), L1TUtmObject::getComparisonOperator(), L1TUtmObject::getCuts(), L1TUtmObject::getName(), L1TUtmObject::getType(), l1t::gtMu, createfilelist::int, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Skims_PA_cff::name, electrons_cff::objType, VtxSmearedParameters_cfi::Phi, MuonTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_2023v12_cff::Threshold, and l1t::Type1s.

1333  {
1334  // XERCES_CPP_NAMESPACE_USE
1335  using namespace tmeventsetup;
1336 
1337  // get condition, particle name (must be muon) and type name
1338  std::string condition = "muon";
1339  std::string particle = "muon"; //l1t2string( condMu.objectType() );
1340  std::string type = l1t2string(corrMu->getType());
1341  std::string name = l1t2string(corrMu->getName());
1342  int nrObj = 1;
1343  type = "1_s";
1344  GtConditionType cType = l1t::Type1s;
1345 
1346  if (nrObj < 0) {
1347  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type << ")"
1348  << "\nCan not determine number of trigger objects. " << std::endl;
1349  return false;
1350  }
1351 
1352  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1353  << "\n parseMuon "
1354  << "\n condition = " << condition << "\n particle = " << particle
1355  << "\n type = " << type << "\n name = " << name << std::endl;
1356 
1357  // // get values
1358 
1359  // temporary storage of the parameters
1360  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1361 
1362  // Do we need this?
1363  MuonTemplate::CorrelationParameter corrParameter;
1364 
1365  // need at least two values for deltaPhi
1366  std::vector<uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1367  tmpValues.reserve(nrObj);
1368 
1369  // BLW TO DO: How do we deal with these in the new format
1370  // std::string str_chargeCorrelation = l1t2string( condMu.requestedChargeCorr() );
1371  std::string str_chargeCorrelation = "ig";
1372  unsigned int chargeCorrelation = 0;
1373  if (str_chargeCorrelation == "ig")
1374  chargeCorrelation = 1;
1375  else if (str_chargeCorrelation == "ls")
1376  chargeCorrelation = 2;
1377  else if (str_chargeCorrelation == "os")
1378  chargeCorrelation = 4;
1379 
1380  //getXMLHexTextValue("1", dst);
1381  corrParameter.chargeCorrelation = chargeCorrelation; //tmpValues[0];
1382 
1383  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1384  int relativeBx = 0;
1385  bool gEq = false;
1386 
1387  //const esObject* object = condMu;
1388  gEq = (corrMu->getComparisonOperator() == esComparisonOperator::GE);
1389 
1390  // BLW TO DO: This needs to be added to the Object Parameters
1391  relativeBx = corrMu->getBxOffset();
1392 
1393  // Loop over the cuts for this object
1394  int upperUnconstrainedPtInd = -1; // Added for displaced muons
1395  int lowerUnconstrainedPtInd = 0; // Added for displaced muons
1396  int upperImpactParameterInd = -1; // Added for displaced muons
1397  int lowerImpactParameterInd = 0; // Added for displaced muons
1398  int impactParameterLUT = 0xF; // Added for displaced muons, default is to ignore unless specified
1399  int upperThresholdInd = -1;
1400  int lowerThresholdInd = 0;
1401  int upperIndexInd = -1;
1402  int lowerIndexInd = 0;
1403  int cntPhi = 0;
1404  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1405  int isolationLUT = 0xF; //default is to ignore unless specified.
1406  int charge = -1; //defaut is to ignore unless specified
1407  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1408 
1409  std::vector<MuonTemplate::Window> etaWindows;
1410  std::vector<MuonTemplate::Window> tfMuonIndexWindows;
1411 
1412  const std::vector<L1TUtmCut>& cuts = corrMu->getCuts();
1413  for (size_t kk = 0; kk < cuts.size(); kk++) {
1414  const L1TUtmCut& cut = cuts.at(kk);
1415 
1416  switch (cut.getCutType()) {
1417  case esCutType::UnconstrainedPt: // Added for displaced muons
1418  lowerUnconstrainedPtInd = cut.getMinimum().index;
1419  upperUnconstrainedPtInd = cut.getMaximum().index;
1420  break;
1421 
1422  case esCutType::ImpactParameter: // Added for displaced muons
1423  lowerImpactParameterInd = cut.getMinimum().index;
1424  upperImpactParameterInd = cut.getMaximum().index;
1425  impactParameterLUT = l1tstr2int(cut.getData());
1426  break;
1427 
1428  case esCutType::Threshold:
1429  lowerThresholdInd = cut.getMinimum().index;
1430  upperThresholdInd = cut.getMaximum().index;
1431  break;
1432 
1433  case esCutType::Slice:
1434  lowerIndexInd = int(cut.getMinimum().value);
1435  upperIndexInd = int(cut.getMaximum().value);
1436  break;
1437 
1438  case esCutType::Eta: {
1439  if (etaWindows.size() < 5) {
1440  etaWindows.push_back({cut.getMinimum().index, cut.getMaximum().index});
1441  } else {
1442  edm::LogError("TriggerMenuParser")
1443  << "Too Many Eta Cuts for muon-condition (" << particle << ")" << std::endl;
1444  return false;
1445  }
1446  } break;
1447 
1448  case esCutType::Phi: {
1449  if (cntPhi == 0) {
1450  phiWindow1Lower = cut.getMinimum().index;
1451  phiWindow1Upper = cut.getMaximum().index;
1452  } else if (cntPhi == 1) {
1453  phiWindow2Lower = cut.getMinimum().index;
1454  phiWindow2Upper = cut.getMaximum().index;
1455  } else {
1456  edm::LogError("TriggerMenuParser")
1457  << "Too Many Phi Cuts for muon-condition (" << particle << ")" << std::endl;
1458  return false;
1459  }
1460  cntPhi++;
1461 
1462  } break;
1463 
1464  case esCutType::Charge:
1465  if (cut.getData() == "positive")
1466  charge = 0;
1467  else if (cut.getData() == "negative")
1468  charge = 1;
1469  else
1470  charge = -1;
1471  break;
1472  case esCutType::Quality:
1473 
1474  qualityLUT = l1tstr2int(cut.getData());
1475 
1476  break;
1477  case esCutType::Isolation: {
1478  isolationLUT = l1tstr2int(cut.getData());
1479 
1480  } break;
1481 
1482  case esCutType::Index: {
1483  tfMuonIndexWindows.push_back({cut.getMinimum().index, cut.getMaximum().index});
1484  } break;
1485 
1486  default:
1487  break;
1488  } //end switch
1489 
1490  } //end loop over cuts
1491 
1492  // Set the parameter cuts
1493  objParameter[0].unconstrainedPtHigh = upperUnconstrainedPtInd; // Added for displacd muons
1494  objParameter[0].unconstrainedPtLow = lowerUnconstrainedPtInd; // Added for displacd muons
1495  objParameter[0].impactParameterHigh = upperImpactParameterInd; // Added for displacd muons
1496  objParameter[0].impactParameterLow = lowerImpactParameterInd; // Added for displacd muons
1497  objParameter[0].impactParameterLUT = impactParameterLUT; // Added for displacd muons
1498 
1499  objParameter[0].ptHighThreshold = upperThresholdInd;
1500  objParameter[0].ptLowThreshold = lowerThresholdInd;
1501 
1502  objParameter[0].indexHigh = upperIndexInd;
1503  objParameter[0].indexLow = lowerIndexInd;
1504 
1505  objParameter[0].etaWindows = etaWindows;
1506 
1507  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1508  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1509  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1510  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1511 
1512  // BLW TO DO: Do we need these anymore? Drop them?
1513  objParameter[0].enableMip = false; //tmpMip[i];
1514  objParameter[0].enableIso = false; //tmpEnableIso[i];
1515  objParameter[0].requestIso = false; //tmpRequestIso[i];
1516 
1517  objParameter[0].charge = charge;
1518  objParameter[0].qualityLUT = qualityLUT;
1519  objParameter[0].isolationLUT = isolationLUT;
1520 
1521  objParameter[0].tfMuonIndexWindows = tfMuonIndexWindows;
1522 
1523  // object types - all muons
1524  std::vector<GlobalObject> objType(nrObj, gtMu);
1525 
1526  // now create a new CondMuonition
1527  MuonTemplate muonCond(name);
1528 
1529  muonCond.setCondType(cType);
1530  muonCond.setObjectType(objType);
1531  muonCond.setCondGEq(gEq);
1532  muonCond.setCondChipNr(chipNr);
1533  muonCond.setCondRelativeBx(relativeBx);
1534  muonCond.setConditionParameter(objParameter, corrParameter);
1535 
1536  if (edm::isDebugEnabled()) {
1537  std::ostringstream myCoutStream;
1538  muonCond.print(myCoutStream);
1539  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1540  }
1541 
1542  /*
1543  // insert condition into the map and into muon template vector
1544  if ( !insertConditionIntoMap(muonCond, chipNr)) {
1545  edm::LogError("TriggerMenuParser")
1546  << " Error: duplicate condition (" << name << ")"
1547  << std::endl;
1548  return false;
1549  }
1550  else {
1551  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1552  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1553  }
1554 */
1555  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1556 
1557  //
1558  return true;
1559 }
bool isDebugEnabled()
Log< level::Error, false > LogError
#define LogTrace(id)
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
int l1tstr2int(const std::string data)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
#define LogDebug(id)

◆ parseMuonShower()

bool TriggerMenuParser::parseMuonShower ( L1TUtmCondition  condMu,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse a muon shower condition

parseMuonShower Parse a muonShower 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 1572 of file TriggerMenuParser.cc.

References L1TUtmCondition::getName(), L1TUtmCondition::getObjects(), L1TUtmCondition::getType(), l1t::gtMuShower, edm::isDebugEnabled(), Skims_PA_cff::name, electrons_cff::objType, MuonShowerTemplate::print(), push_back(), GlobalCondition::setCondChipNr(), MuonShowerTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::Type1s.

1572  {
1573  using namespace tmeventsetup;
1574 
1575  // get condition, particle name (must be muon) and type name
1576  std::string condition = "muonShower";
1577  std::string particle = "muonShower"; //l1t2string( condMu.objectType() );
1578  std::string type = l1t2string(condMu.getType());
1579  std::string name = l1t2string(condMu.getName());
1580  // the number of muon shower objects is always 1
1581  int nrObj = 1;
1582 
1583  // condition type is always 1 particle, thus Type1s
1584  GtConditionType cType = l1t::Type1s;
1585 
1586  // temporary storage of the parameters
1587  std::vector<MuonShowerTemplate::ObjectParameter> objParameter(nrObj);
1588 
1589  if (int(condMu.getObjects().size()) != nrObj) {
1590  edm::LogError("TriggerMenuParser") << " condMu objects: nrObj = " << nrObj
1591  << "condMu.getObjects().size() = " << condMu.getObjects().size() << std::endl;
1592  return false;
1593  }
1594 
1595  // Get the muon shower object
1596  L1TUtmObject object = condMu.getObjects().at(0);
1597  int relativeBx = object.getBxOffset();
1598 
1599  if (condMu.getType() == esConditionType::MuonShower0) {
1600  objParameter[0].MuonShower0 = true;
1601  } else if (condMu.getType() == esConditionType::MuonShower1) {
1602  objParameter[0].MuonShower1 = true;
1603  } else if (condMu.getType() == esConditionType::MuonShower2) {
1604  objParameter[0].MuonShower2 = true;
1605  } else if (condMu.getType() == esConditionType::MuonShowerOutOfTime0) {
1606  objParameter[0].MuonShowerOutOfTime0 = true;
1607  } else if (condMu.getType() == esConditionType::MuonShowerOutOfTime1) {
1608  objParameter[0].MuonShowerOutOfTime1 = true;
1609  }
1610 
1611  // object types - all muons
1612  std::vector<GlobalObject> objType(nrObj, gtMuShower);
1613 
1614  // now create a new CondMuonition
1615  MuonShowerTemplate muonShowerCond(name);
1616  muonShowerCond.setCondType(cType);
1617  muonShowerCond.setObjectType(objType);
1618  muonShowerCond.setCondChipNr(chipNr);
1619  muonShowerCond.setCondRelativeBx(relativeBx);
1620 
1621  muonShowerCond.setConditionParameter(objParameter);
1622 
1623  if (edm::isDebugEnabled()) {
1624  std::ostringstream myCoutStream;
1625  muonShowerCond.print(myCoutStream);
1626  }
1627 
1628  // insert condition into the map and into muon template vector
1629  if (!insertConditionIntoMap(muonShowerCond, chipNr)) {
1630  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
1631  return false;
1632  } else {
1633  (m_vecMuonShowerTemplate[chipNr]).push_back(muonShowerCond);
1634  }
1635 
1636  return true;
1637 }
std::vector< std::vector< MuonShowerTemplate > > m_vecMuonShowerTemplate
bool isDebugEnabled()
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
Log< level::Error, false > LogError
const std::string & getName() const
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})

◆ parsePhi_Trig_LUTS()

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 1016 of file TriggerMenuParser.cc.

References mps_check::array, reco::ceil(), l1t::COS, EcalMonitorTask_cff::func, cuy::ii, dqmiodumpmetadata::n, getGTfromDQMFile::obj, conifer::pow(), FastTimerService_cff::range, pfClustersFromCombinedCaloHF_cfi::scale, l1t::SIN, and AlCaHLTBitMon_QueryRunRegistry::string.

1019  {
1020  using namespace tmeventsetup;
1021 
1022  std::string scLabel = obj;
1023  scLabel += "-PHI";
1024 
1025  //This LUT does not exist in L1 Menu file, don't fill it
1026  if (scaleMap.find(scLabel) == scaleMap.end())
1027  return;
1028  if (func != l1t::SIN and func != l1t::COS)
1029  return;
1030 
1031  const tmeventsetup::esScale* scale = &scaleMap.find(scLabel)->second;
1032 
1033  const double step = scale->getStep();
1034  const double range = scale->getMaximum() - scale->getMinimum();
1035  const size_t n = std::ceil(range / step);
1036  const size_t bitwidth = std::ceil(std::log10(n) / std::log10(2));
1037 
1038  std::vector<double> array(std::pow(2, bitwidth), 0);
1039 
1040  for (size_t ii = 0; ii < n; ii++) {
1041  array.at(ii) = step * ii;
1042  }
1043 
1044  const std::string& lutName = obj;
1045  std::vector<long long> lut;
1046  if (func == l1t::SIN) {
1047  applySin(array, n);
1048  setLut(lut, array, prec);
1049  m_gtScales.setLUT_Sin(lutName, lut, prec);
1050  } else if (func == l1t::COS) {
1051  applyCos(array, n);
1052  setLut(lut, array, prec);
1053  m_gtScales.setLUT_Cos(lutName, lut, prec);
1054  }
1055 }
constexpr int32_t ceil(float num)
constexpr int pow(int x)
Definition: conifer.h:24
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
ii
Definition: cuy.py:589
step
Definition: StallMonitor.cc:83
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)

◆ parsePt_LUTS()

void TriggerMenuParser::parsePt_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  lutpfx,
std::string  obj1,
unsigned int  prec 
)
private

Definition at line 901 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

904  {
905  using namespace tmeventsetup;
906 
907  // First Delta Eta for this set
908  std::string scLabel1 = obj1;
909  scLabel1 += "-ET";
910 
911  //This LUT does not exist in L1 Menu file, don't fill it
912  if (scaleMap.find(scLabel1) == scaleMap.end())
913  return;
914 
915  const tmeventsetup::esScale* scale1 = &scaleMap.find(scLabel1)->second;
916 
917  std::vector<long long> lut_pt;
918  getLut(lut_pt, scale1, prec);
919 
920  m_gtScales.setLUT_Pt(lutpfx + "_" + scLabel1, lut_pt, prec);
921 }
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:87

◆ parseScales()

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 568 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, dumpRecoGeometry_cfg::Muon, l1t::GlobalScales::ScaleParameters::phiBins, l1t::GlobalScales::ScaleParameters::phiMax, l1t::GlobalScales::ScaleParameters::phiMin, l1t::GlobalScales::ScaleParameters::phiStep, conifer::pow(), pfClustersFromCombinedCaloHF_cfi::scale, l1t::SIN, L1TRate_Offline_cfi::Tau, l1t::GlobalScales::ScaleParameters::uptBins, l1t::GlobalScales::ScaleParameters::uptMax, l1t::GlobalScales::ScaleParameters::uptMin, and l1t::GlobalScales::ScaleParameters::uptStep.

568  {
569  using namespace tmeventsetup;
570 
571  // Setup ScaleParameter to hold information from parsing
572  GlobalScales::ScaleParameters muScales;
573  GlobalScales::ScaleParameters egScales;
574  GlobalScales::ScaleParameters tauScales;
575  GlobalScales::ScaleParameters jetScales;
576  GlobalScales::ScaleParameters ettScales;
577  GlobalScales::ScaleParameters ettEmScales;
578  GlobalScales::ScaleParameters etmScales;
579  GlobalScales::ScaleParameters etmHfScales;
580  GlobalScales::ScaleParameters httScales;
581  GlobalScales::ScaleParameters htmScales;
582  GlobalScales::ScaleParameters zdcScales;
583 
584  // Start by parsing the Scale Map
585  for (std::map<std::string, tmeventsetup::esScale>::const_iterator cit = scaleMap.begin(); cit != scaleMap.end();
586  cit++) {
587  const tmeventsetup::esScale& scale = cit->second;
588 
589  GlobalScales::ScaleParameters* scaleParam;
590  if (scale.getObjectType() == esObjectType::Muon)
591  scaleParam = &muScales;
592  else if (scale.getObjectType() == esObjectType::Egamma)
593  scaleParam = &egScales;
594  else if (scale.getObjectType() == esObjectType::Tau)
595  scaleParam = &tauScales;
596  else if (scale.getObjectType() == esObjectType::Jet)
597  scaleParam = &jetScales;
598  else if (scale.getObjectType() == esObjectType::ETT)
599  scaleParam = &ettScales;
600  else if (scale.getObjectType() == esObjectType::ETTEM)
601  scaleParam = &ettEmScales;
602  else if (scale.getObjectType() == esObjectType::ETM)
603  scaleParam = &etmScales;
604  else if (scale.getObjectType() == esObjectType::ETMHF)
605  scaleParam = &etmHfScales;
606  else if (scale.getObjectType() == esObjectType::HTT)
607  scaleParam = &httScales;
608  else if (scale.getObjectType() == esObjectType::HTM)
609  scaleParam = &htmScales;
610  else if (scale.getObjectType() == esObjectType::ZDCP || scale.getObjectType() == esObjectType::ZDCM)
611  scaleParam = &zdcScales;
612  else
613  scaleParam = nullptr;
614 
615  if (scaleParam != nullptr) {
616  switch (scale.getScaleType()) {
617  case esScaleType::EtScale: {
618  scaleParam->etMin = scale.getMinimum();
619  scaleParam->etMax = scale.getMaximum();
620  scaleParam->etStep = scale.getStep();
621 
622  //Get bin edges
623  const std::vector<tmeventsetup::esBin>& binsV = scale.getBins();
624  for (unsigned int i = 0; i < binsV.size(); i++) {
625  const tmeventsetup::esBin& bin = binsV.at(i);
626  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
627  scaleParam->etBins.push_back(binLimits);
628  }
629 
630  // If this is an energy sum fill dummy values for eta and phi
631  // There are no scales for these in the XML so the other case statements will not be seen....do it here.
632  if (scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
633  scale.getObjectType() == esObjectType::ETM || scale.getObjectType() == esObjectType::HTM ||
634  scale.getObjectType() == esObjectType::ETTEM || scale.getObjectType() == esObjectType::ETMHF) {
635  scaleParam->etaMin = -1.;
636  scaleParam->etaMax = -1.;
637  scaleParam->etaStep = -1.;
638  if (scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
639  scale.getObjectType() == esObjectType::ETTEM) {
640  // if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT) {
641  scaleParam->phiMin = -1.;
642  scaleParam->phiMax = -1.;
643  scaleParam->phiStep = -1.;
644  }
645  }
646  } break;
647  case esScaleType::UnconstrainedPtScale: { // Added for displaced muons
648  scaleParam->uptMin = scale.getMinimum();
649  scaleParam->uptMax = scale.getMaximum();
650  scaleParam->uptStep = scale.getStep();
651 
652  //Get bin edges
653  const std::vector<tmeventsetup::esBin>& binsV = scale.getBins();
654  for (unsigned int i = 0; i < binsV.size(); i++) {
655  const tmeventsetup::esBin& bin = binsV.at(i);
656  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
657  scaleParam->uptBins.push_back(binLimits);
658  }
659  } break;
660  case esScaleType::EtaScale: {
661  scaleParam->etaMin = scale.getMinimum();
662  scaleParam->etaMax = scale.getMaximum();
663  scaleParam->etaStep = scale.getStep();
664 
665  //Get bin edges
666  const std::vector<tmeventsetup::esBin>& binsV = scale.getBins();
667  scaleParam->etaBins.resize(pow(2, scale.getNbits()));
668  for (unsigned int i = 0; i < binsV.size(); i++) {
669  const tmeventsetup::esBin& bin = binsV.at(i);
670  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
671  scaleParam->etaBins.at(bin.hw_index) = binLimits;
672  }
673  } break;
674  case esScaleType::PhiScale: {
675  scaleParam->phiMin = scale.getMinimum();
676  scaleParam->phiMax = scale.getMaximum();
677  scaleParam->phiStep = scale.getStep();
678 
679  //Get bin edges
680  const std::vector<tmeventsetup::esBin>& binsV = scale.getBins();
681  scaleParam->phiBins.resize(pow(2, scale.getNbits()));
682  for (unsigned int i = 0; i < binsV.size(); i++) {
683  const tmeventsetup::esBin& bin = binsV.at(i);
684  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
685  scaleParam->phiBins.at(bin.hw_index) = binLimits;
686  }
687  } break;
688  default:
689 
690  break;
691  } //end switch
692  } //end valid scale
693  } //end loop over scaleMap
694 
695  // put the ScaleParameters into the class
696  m_gtScales.setMuonScales(muScales);
697  m_gtScales.setEGScales(egScales);
698  m_gtScales.setTauScales(tauScales);
699  m_gtScales.setJetScales(jetScales);
700  m_gtScales.setETTScales(ettScales);
701  m_gtScales.setETTEmScales(ettEmScales);
702  m_gtScales.setETMScales(etmScales);
703  m_gtScales.setETMHfScales(etmHfScales);
704  m_gtScales.setHTTScales(httScales);
705  m_gtScales.setHTMScales(htmScales);
706  m_gtScales.setHTMScales(zdcScales);
707 
708  // Setup the LUT for the Scale Conversions
709  bool hasPrecision = false;
710  std::map<std::string, unsigned int> precisions;
711  getPrecisions(precisions, scaleMap);
712  for (std::map<std::string, unsigned int>::const_iterator cit = precisions.begin(); cit != precisions.end(); cit++) {
713  hasPrecision = true;
714  }
715 
716  if (hasPrecision) {
717  //Start with the Cal - Muon Eta LUTS
718  //----------------------------------
719  parseCalMuEta_LUTS(scaleMap, "EG", "MU");
720  parseCalMuEta_LUTS(scaleMap, "JET", "MU");
721  parseCalMuEta_LUTS(scaleMap, "TAU", "MU");
722 
723  //Now the Cal - Muon Phi LUTS
724  //-------------------------------------
725  parseCalMuPhi_LUTS(scaleMap, "EG", "MU");
726  parseCalMuPhi_LUTS(scaleMap, "JET", "MU");
727  parseCalMuPhi_LUTS(scaleMap, "TAU", "MU");
728  parseCalMuPhi_LUTS(scaleMap, "HTM", "MU");
729  parseCalMuPhi_LUTS(scaleMap, "ETM", "MU");
730  parseCalMuPhi_LUTS(scaleMap, "ETMHF", "MU");
731 
732  // Now the Pt LUTs (??? more combinations needed ??)
733  // ---------------
734  parsePt_LUTS(scaleMap, "Mass", "EG", precisions["PRECISION-EG-MU-MassPt"]);
735  parsePt_LUTS(scaleMap, "Mass", "MU", precisions["PRECISION-EG-MU-MassPt"]);
736  parseUpt_LUTS(scaleMap, "Mass", "MU", precisions["PRECISION-EG-MU-MassPt"]); // Added for displaced muons
737  parsePt_LUTS(scaleMap, "Mass", "JET", precisions["PRECISION-EG-JET-MassPt"]);
738  parsePt_LUTS(scaleMap, "Mass", "TAU", precisions["PRECISION-EG-TAU-MassPt"]);
739  parsePt_LUTS(scaleMap, "Mass", "ETM", precisions["PRECISION-EG-ETM-MassPt"]);
740  parsePt_LUTS(scaleMap, "Mass", "ETMHF", precisions["PRECISION-EG-ETMHF-MassPt"]);
741  parsePt_LUTS(scaleMap, "Mass", "HTM", precisions["PRECISION-EG-HTM-MassPt"]);
742 
743  // Now the Pt LUTs for TBPT calculation (??? CCLA following what was done for MASS pt LUTs for now ??)
744  // ---------------
745  parsePt_LUTS(scaleMap, "TwoBody", "EG", precisions["PRECISION-EG-MU-TwoBodyPt"]);
746  parsePt_LUTS(scaleMap, "TwoBody", "MU", precisions["PRECISION-EG-MU-TwoBodyPt"]);
747  parsePt_LUTS(scaleMap, "TwoBody", "JET", precisions["PRECISION-EG-JET-TwoBodyPt"]);
748  parsePt_LUTS(scaleMap, "TwoBody", "TAU", precisions["PRECISION-EG-TAU-TwoBodyPt"]);
749  parsePt_LUTS(scaleMap, "TwoBody", "ETM", precisions["PRECISION-EG-ETM-TwoBodyPt"]);
750  parsePt_LUTS(scaleMap, "TwoBody", "ETMHF", precisions["PRECISION-EG-ETMHF-TwoBodyPt"]);
751  parsePt_LUTS(scaleMap, "TwoBody", "HTM", precisions["PRECISION-EG-HTM-TwoBodyPt"]);
752 
753  // Now the Delta Eta/Cosh LUTs (must be done in groups)
754  // ----------------------------------------------------
756  scaleMap, "EG", "EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
758  scaleMap, "EG", "JET", precisions["PRECISION-EG-JET-Delta"], precisions["PRECISION-EG-JET-Math"]);
760  scaleMap, "EG", "TAU", precisions["PRECISION-EG-TAU-Delta"], precisions["PRECISION-EG-TAU-Math"]);
762  scaleMap, "EG", "MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
763 
765  scaleMap, "JET", "JET", precisions["PRECISION-JET-JET-Delta"], precisions["PRECISION-JET-JET-Math"]);
767  scaleMap, "JET", "TAU", precisions["PRECISION-JET-TAU-Delta"], precisions["PRECISION-JET-TAU-Math"]);
769  scaleMap, "JET", "MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
770 
772  scaleMap, "TAU", "TAU", precisions["PRECISION-TAU-TAU-Delta"], precisions["PRECISION-TAU-TAU-Math"]);
774  scaleMap, "TAU", "MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
775 
777  scaleMap, "MU", "MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
778 
779  // Now the Delta Phi/Cos LUTs (must be done in groups)
780  // ----------------------------------------------------
782  scaleMap, "EG", "EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
784  scaleMap, "EG", "JET", precisions["PRECISION-EG-JET-Delta"], precisions["PRECISION-EG-JET-Math"]);
786  scaleMap, "EG", "TAU", precisions["PRECISION-EG-TAU-Delta"], precisions["PRECISION-EG-TAU-Math"]);
788  scaleMap, "EG", "ETM", precisions["PRECISION-EG-ETM-Delta"], precisions["PRECISION-EG-ETM-Math"]);
790  scaleMap, "EG", "ETMHF", precisions["PRECISION-EG-ETMHF-Delta"], precisions["PRECISION-EG-ETMHF-Math"]);
792  scaleMap, "EG", "HTM", precisions["PRECISION-EG-HTM-Delta"], precisions["PRECISION-EG-HTM-Math"]);
794  scaleMap, "EG", "MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
795 
797  scaleMap, "JET", "JET", precisions["PRECISION-JET-JET-Delta"], precisions["PRECISION-JET-JET-Math"]);
799  scaleMap, "JET", "TAU", precisions["PRECISION-JET-TAU-Delta"], precisions["PRECISION-JET-TAU-Math"]);
801  scaleMap, "JET", "ETM", precisions["PRECISION-JET-ETM-Delta"], precisions["PRECISION-JET-ETM-Math"]);
803  scaleMap, "JET", "ETMHF", precisions["PRECISION-JET-ETMHF-Delta"], precisions["PRECISION-JET-ETMHF-Math"]);
805  scaleMap, "JET", "HTM", precisions["PRECISION-JET-HTM-Delta"], precisions["PRECISION-JET-HTM-Math"]);
807  scaleMap, "JET", "MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
808 
810  scaleMap, "TAU", "TAU", precisions["PRECISION-TAU-TAU-Delta"], precisions["PRECISION-TAU-TAU-Math"]);
812  scaleMap, "TAU", "ETM", precisions["PRECISION-TAU-ETM-Delta"], precisions["PRECISION-TAU-ETM-Math"]);
814  scaleMap, "TAU", "ETMHF", precisions["PRECISION-TAU-ETMHF-Delta"], precisions["PRECISION-TAU-ETMHF-Math"]);
816  scaleMap, "TAU", "HTM", precisions["PRECISION-TAU-HTM-Delta"], precisions["PRECISION-TAU-HTM-Math"]);
818  scaleMap, "TAU", "MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
819 
821  scaleMap, "MU", "ETM", precisions["PRECISION-MU-ETM-Delta"], precisions["PRECISION-MU-ETM-Math"]);
823  scaleMap, "MU", "ETMHF", precisions["PRECISION-MU-ETMHF-Delta"], precisions["PRECISION-MU-ETMHF-Math"]);
825  scaleMap, "MU", "HTM", precisions["PRECISION-MU-HTM-Delta"], precisions["PRECISION-MU-HTM-Math"]);
827  scaleMap, "MU", "MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
828 
829  parsePhi_Trig_LUTS(scaleMap, "EG", l1t::COS, precisions["PRECISION-EG-EG-Math"]);
830  parsePhi_Trig_LUTS(scaleMap, "JET", l1t::COS, precisions["PRECISION-JET-JET-Math"]);
831  parsePhi_Trig_LUTS(scaleMap, "TAU", l1t::COS, precisions["PRECISION-TAU-TAU-Math"]);
832  parsePhi_Trig_LUTS(scaleMap, "MU", l1t::COS, precisions["PRECISION-MU-MU-Math"]);
833 
834  parsePhi_Trig_LUTS(scaleMap, "EG", l1t::SIN, precisions["PRECISION-EG-EG-Math"]);
835  parsePhi_Trig_LUTS(scaleMap, "JET", l1t::SIN, precisions["PRECISION-JET-JET-Math"]);
836  parsePhi_Trig_LUTS(scaleMap, "TAU", l1t::SIN, precisions["PRECISION-TAU-TAU-Math"]);
837  parsePhi_Trig_LUTS(scaleMap, "MU", l1t::SIN, precisions["PRECISION-MU-MU-Math"]);
838 
839  //CCLA
840  //m_gtScales.dumpAllLUTs(std::cout);
841  //m_gtScales.print(std::cout);
842  }
843 
844  return true;
845 }
Definition: L1GtObject.h:38
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:67
void setJetScales(ScaleParameters &scales)
Definition: GlobalScales.h:62
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)
void parseUpt_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string lutpfx, std::string obj1, unsigned int prec)
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:36
constexpr int pow(int x)
Definition: conifer.h:24
struct ZDCP ZDCP
void setETMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:68
void parseDeltaEta_Cosh_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2, unsigned int prec1, unsigned int prec2)
Definition: L1GtObject.h:35
void setEGScales(ScaleParameters &scales)
Definition: GlobalScales.h:58
void setTauScales(ScaleParameters &scales)
Definition: GlobalScales.h:59
void setETTEmScales(ScaleParameters &scales)
Definition: GlobalScales.h:65
void setMuonScales(ScaleParameters &scales)
Definition: GlobalScales.h:60
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:66
void setHTMScales(ScaleParameters &scales)
Definition: GlobalScales.h:69
void setETTScales(ScaleParameters &scales)
Definition: GlobalScales.h:64
Definition: L1GtObject.h:37
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)

◆ parseUpt_LUTS()

void TriggerMenuParser::parseUpt_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  lutpfx,
std::string  obj1,
unsigned int  prec 
)
private

Definition at line 924 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

927  {
928  using namespace tmeventsetup;
929 
930  // First Delta Eta for this set
931  std::string scLabel1 = obj1;
932  scLabel1 += "-UPT";
933 
934  //This LUT does not exist in L1 Menu file, don't fill it
935  if (scaleMap.find(scLabel1) == scaleMap.end())
936  return;
937 
938  const tmeventsetup::esScale* scale1 = &scaleMap.find(scLabel1)->second;
939 
940  std::vector<long long> lut_pt;
941  getLut(lut_pt, scale1, prec);
942 
943  m_gtScales.setLUT_Upt(lutpfx + "_" + scLabel1, lut_pt, prec);
944 }
virtual void setLUT_Upt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)

◆ setCorCaloTemplate()

void TriggerMenuParser::setCorCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  corCaloTempl)

Definition at line 176 of file TriggerMenuParser.cc.

176  {
177  m_corCaloTemplate = corCaloTempl;
178 }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate

◆ setCorEnergySumTemplate()

void TriggerMenuParser::setCorEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  corEnergySumTempl)

Definition at line 180 of file TriggerMenuParser.cc.

181  {
182  m_corEnergySumTemplate = corEnergySumTempl;
183 }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate

◆ setCorMuonTemplate()

void TriggerMenuParser::setCorMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  corMuonTempl)

Definition at line 172 of file TriggerMenuParser.cc.

172  {
173  m_corMuonTemplate = corMuonTempl;
174 }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate

◆ setGtAlgorithmAliasMap()

void TriggerMenuParser::setGtAlgorithmAliasMap ( const AlgorithmMap algoMap)

Definition at line 189 of file TriggerMenuParser.cc.

189 { m_algorithmAliasMap = algoMap; }
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)

◆ setGtAlgorithmImplementation()

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

Definition at line 422 of file TriggerMenuParser.cc.

References heppy_batch::val.

◆ setGtAlgorithmMap()

void TriggerMenuParser::setGtAlgorithmMap ( const AlgorithmMap algoMap)

Definition at line 186 of file TriggerMenuParser.cc.

186 { m_algorithmMap = algoMap; }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)

◆ setGtConditionMap()

void TriggerMenuParser::setGtConditionMap ( const std::vector< ConditionMap > &  condMap)

Definition at line 103 of file TriggerMenuParser.cc.

103 { m_conditionMap = condMap; }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient

◆ setGtNumberConditionChips()

void TriggerMenuParser::setGtNumberConditionChips ( const unsigned int &  numberConditionChipsValue)

Definition at line 82 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

82  {
83  m_numberConditionChips = numberConditionChipsValue;
84 }
unsigned int m_numberConditionChips
hardware limits

◆ setGtNumberPhysTriggers()

void TriggerMenuParser::setGtNumberPhysTriggers ( const unsigned int &  numberPhysTriggersValue)

Definition at line 98 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

98  {
99  m_numberPhysTriggers = numberPhysTriggersValue;
100 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms

◆ setGtOrderConditionChip()

void TriggerMenuParser::setGtOrderConditionChip ( const std::vector< int > &  orderConditionChipValue)

Definition at line 93 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

93  {
94  m_orderConditionChip = orderConditionChipValue;
95 }
std::vector< int > m_orderConditionChip

◆ setGtPinsOnConditionChip()

void TriggerMenuParser::setGtPinsOnConditionChip ( const unsigned int &  pinsOnConditionChipValue)

Definition at line 87 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

87  {
88  m_pinsOnConditionChip = pinsOnConditionChipValue;
89 }
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips

◆ setGtScaleDbKey()

void TriggerMenuParser::setGtScaleDbKey ( const std::string &  scaleKey)

Definition at line 120 of file TriggerMenuParser.cc.

120 { m_scaleDbKey = scaleKey; }
std::string m_scaleDbKey
menu associated scale key

◆ setGtTriggerMenuAuthor()

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

Definition at line 418 of file TriggerMenuParser.cc.

References heppy_batch::val.

◆ setGtTriggerMenuDate()

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

Definition at line 416 of file TriggerMenuParser.cc.

References heppy_batch::val.

◆ setGtTriggerMenuDescription()

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

Definition at line 420 of file TriggerMenuParser.cc.

References heppy_batch::val.

◆ setGtTriggerMenuImplementation()

void TriggerMenuParser::setGtTriggerMenuImplementation ( const unsigned long &  menuImplementation)

Definition at line 115 of file TriggerMenuParser.cc.

115  {
116  m_triggerMenuImplementation = menuImplementation;
117 }
unsigned long m_triggerMenuImplementation

◆ setGtTriggerMenuInterface()

void TriggerMenuParser::setGtTriggerMenuInterface ( const std::string &  menuInterface)

Definition at line 106 of file TriggerMenuParser.cc.

106  {
107  m_triggerMenuInterface = menuInterface;
108 }
std::string m_triggerMenuInterface
menu names

◆ setGtTriggerMenuInterfaceAuthor()

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

Definition at line 408 of file TriggerMenuParser.cc.

References heppy_batch::val.

408  {
410 }
std::string m_triggerMenuInterfaceAuthor

◆ setGtTriggerMenuInterfaceDate()

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

Definition at line 406 of file TriggerMenuParser.cc.

References heppy_batch::val.

std::string m_triggerMenuInterfaceDate
number of technical triggers

◆ setGtTriggerMenuInterfaceDescription()

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

Definition at line 412 of file TriggerMenuParser.cc.

References heppy_batch::val.

412  {
414 }
std::string m_triggerMenuInterfaceDescription

◆ setGtTriggerMenuName()

void TriggerMenuParser::setGtTriggerMenuName ( const std::string &  menuName)

Definition at line 113 of file TriggerMenuParser.cc.

113 { m_triggerMenuName = menuName; }

◆ setGtTriggerMenuUUID()

void TriggerMenuParser::setGtTriggerMenuUUID ( const int  uuid)

Definition at line 111 of file TriggerMenuParser.cc.

References createPayload::uuid.

◆ setVecAXOL1TLTemplate()

void TriggerMenuParser::setVecAXOL1TLTemplate ( const std::vector< std::vector< AXOL1TLTemplate > > &  vecAXOL1TLTempl)

Definition at line 146 of file TriggerMenuParser.cc.

146  {
147  m_vecAXOL1TLTemplate = vecAXOL1TLTempl;
148 }
std::vector< std::vector< AXOL1TLTemplate > > m_vecAXOL1TLTemplate

◆ setVecCaloTemplate()

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

Definition at line 132 of file TriggerMenuParser.cc.

132  {
133  m_vecCaloTemplate = vecCaloTempl;
134 }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate

◆ setVecCorrelationTemplate()

void TriggerMenuParser::setVecCorrelationTemplate ( const std::vector< std::vector< CorrelationTemplate > > &  vecCorrelationTempl)

Definition at line 155 of file TriggerMenuParser.cc.

156  {
157  m_vecCorrelationTemplate = vecCorrelationTempl;
158 }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate

◆ setVecCorrelationThreeBodyTemplate()

void TriggerMenuParser::setVecCorrelationThreeBodyTemplate ( const std::vector< std::vector< CorrelationThreeBodyTemplate > > &  vecCorrelationThreeBodyTempl)

Definition at line 160 of file TriggerMenuParser.cc.

161  {
162  m_vecCorrelationThreeBodyTemplate = vecCorrelationThreeBodyTempl;
163 }
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate

◆ setVecCorrelationWithOverlapRemovalTemplate()

void TriggerMenuParser::setVecCorrelationWithOverlapRemovalTemplate ( const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &  vecCorrelationWithOverlapRemovalTempl)

Definition at line 165 of file TriggerMenuParser.cc.

166  {
167  m_vecCorrelationWithOverlapRemovalTemplate = vecCorrelationWithOverlapRemovalTempl;
168 }
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate

◆ setVecEnergySumTemplate()

void TriggerMenuParser::setVecEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  vecEnergySumTempl)

Definition at line 136 of file TriggerMenuParser.cc.

137  {
138  m_vecEnergySumTemplate = vecEnergySumTempl;
139 }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate

◆ setVecEnergySumZdcTemplate()

void TriggerMenuParser::setVecEnergySumZdcTemplate ( const std::vector< std::vector< EnergySumZdcTemplate > > &  vecEnergySumZdcTempl)

Definition at line 141 of file TriggerMenuParser.cc.

142  {
143  m_vecEnergySumZdcTemplate = vecEnergySumZdcTempl;
144 }
std::vector< std::vector< EnergySumZdcTemplate > > m_vecEnergySumZdcTemplate

◆ setVecExternalTemplate()

void TriggerMenuParser::setVecExternalTemplate ( const std::vector< std::vector< ExternalTemplate > > &  vecExternalTempl)

Definition at line 150 of file TriggerMenuParser.cc.

151  {
152  m_vecExternalTemplate = vecExternalTempl;
153 }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate

◆ setVecMuonShowerTemplate()

void TriggerMenuParser::setVecMuonShowerTemplate ( const std::vector< std::vector< MuonShowerTemplate > > &  vecMuonShowerTempl)

Definition at line 127 of file TriggerMenuParser.cc.

128  {
129  m_vecMuonShowerTemplate = vecMuonShowerTempl;
130 }
std::vector< std::vector< MuonShowerTemplate > > m_vecMuonShowerTemplate

◆ setVecMuonTemplate()

void TriggerMenuParser::setVecMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  vecMuonTempl)

Definition at line 123 of file TriggerMenuParser.cc.

123  {
124  m_vecMuonTemplate = vecMuonTempl;
125 }
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate

◆ vecAXOL1TLTemplate()

const std::vector<std::vector<AXOL1TLTemplate> >& l1t::TriggerMenuParser::vecAXOL1TLTemplate ( ) const
inline

Definition at line 157 of file TriggerMenuParser.h.

References m_vecAXOL1TLTemplate.

Referenced by L1TGlobalProducer::produce().

157 { return m_vecAXOL1TLTemplate; }
std::vector< std::vector< AXOL1TLTemplate > > m_vecAXOL1TLTemplate

◆ vecCaloTemplate()

const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::vecCaloTemplate ( ) const
inline

Definition at line 138 of file TriggerMenuParser.h.

References m_vecCaloTemplate.

Referenced by L1TGlobalProducer::produce().

138 { return m_vecCaloTemplate; }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate

◆ vecCorrelationTemplate()

const std::vector<std::vector<CorrelationTemplate> >& l1t::TriggerMenuParser::vecCorrelationTemplate ( ) const
inline

Definition at line 168 of file TriggerMenuParser.h.

References m_vecCorrelationTemplate.

Referenced by L1TGlobalProducer::produce().

168  {
170  }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate

◆ vecCorrelationThreeBodyTemplate()

const std::vector<std::vector<CorrelationThreeBodyTemplate> >& l1t::TriggerMenuParser::vecCorrelationThreeBodyTemplate ( ) const
inline

Definition at line 175 of file TriggerMenuParser.h.

References m_vecCorrelationThreeBodyTemplate.

Referenced by L1TGlobalProducer::produce().

175  {
177  }
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate

◆ vecCorrelationWithOverlapRemovalTemplate()

const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& l1t::TriggerMenuParser::vecCorrelationWithOverlapRemovalTemplate ( ) const
inline

Definition at line 183 of file TriggerMenuParser.h.

References m_vecCorrelationWithOverlapRemovalTemplate.

Referenced by L1TGlobalProducer::produce().

183  {
185  }
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate

◆ vecEnergySumTemplate()

const std::vector<std::vector<EnergySumTemplate> >& l1t::TriggerMenuParser::vecEnergySumTemplate ( ) const
inline

Definition at line 143 of file TriggerMenuParser.h.

References m_vecEnergySumTemplate.

Referenced by L1TGlobalProducer::produce().

143  {
144  return m_vecEnergySumTemplate;
145  }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate

◆ vecEnergySumZdcTemplate()

const std::vector<std::vector<EnergySumZdcTemplate> >& l1t::TriggerMenuParser::vecEnergySumZdcTemplate ( ) const
inline

Definition at line 150 of file TriggerMenuParser.h.

References m_vecEnergySumZdcTemplate.

Referenced by L1TGlobalProducer::produce().

150  {
152  }
std::vector< std::vector< EnergySumZdcTemplate > > m_vecEnergySumZdcTemplate

◆ vecExternalTemplate()

const std::vector<std::vector<ExternalTemplate> >& l1t::TriggerMenuParser::vecExternalTemplate ( ) const
inline

Definition at line 161 of file TriggerMenuParser.h.

References m_vecExternalTemplate.

Referenced by L1TGlobalProducer::produce().

161  {
162  return m_vecExternalTemplate;
163  }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate

◆ vecMuonShowerTemplate()

const std::vector<std::vector<MuonShowerTemplate> >& l1t::TriggerMenuParser::vecMuonShowerTemplate ( ) const
inline

Definition at line 132 of file TriggerMenuParser.h.

References m_vecMuonShowerTemplate.

Referenced by L1TGlobalProducer::produce().

132  {
134  }
std::vector< std::vector< MuonShowerTemplate > > m_vecMuonShowerTemplate

◆ vecMuonTemplate()

const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::vecMuonTemplate ( ) const
inline

get / set the vectors containing the conditions

Definition at line 128 of file TriggerMenuParser.h.

References m_vecMuonTemplate.

Referenced by L1TGlobalProducer::produce().

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

Member Data Documentation

◆ m_algorithmAliasMap

AlgorithmMap l1t::TriggerMenuParser::m_algorithmAliasMap
private

map containing the physics algorithms (by alias)

Definition at line 432 of file TriggerMenuParser.h.

Referenced by gtAlgorithmAliasMap().

◆ m_algorithmImplementation

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

Definition at line 395 of file TriggerMenuParser.h.

Referenced by gtAlgorithmImplementation().

◆ m_algorithmMap

AlgorithmMap l1t::TriggerMenuParser::m_algorithmMap
private

map containing the physics algorithms (by name)

Definition at line 429 of file TriggerMenuParser.h.

Referenced by gtAlgorithmMap().

◆ m_conditionMap

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

map containing the conditions (per condition chip) - transient

Definition at line 399 of file TriggerMenuParser.h.

Referenced by gtConditionMap().

◆ m_corCaloTemplate

std::vector<std::vector<CaloTemplate> > l1t::TriggerMenuParser::m_corCaloTemplate
private

Definition at line 425 of file TriggerMenuParser.h.

Referenced by corCaloTemplate().

◆ m_corEnergySumTemplate

std::vector<std::vector<EnergySumTemplate> > l1t::TriggerMenuParser::m_corEnergySumTemplate
private

Definition at line 426 of file TriggerMenuParser.h.

Referenced by corEnergySumTemplate().

◆ m_corMuonTemplate

std::vector<std::vector<MuonTemplate> > l1t::TriggerMenuParser::m_corMuonTemplate
private

Definition at line 424 of file TriggerMenuParser.h.

Referenced by corMuonTemplate().

◆ m_gtScales

GlobalScales l1t::TriggerMenuParser::m_gtScales
private

Definition at line 435 of file TriggerMenuParser.h.

Referenced by gtScales().

◆ m_numberConditionChips

unsigned int l1t::TriggerMenuParser::m_numberConditionChips
private

hardware limits

number of condition chips

Definition at line 371 of file TriggerMenuParser.h.

Referenced by gtNumberConditionChips().

◆ m_numberPhysTriggers

unsigned int l1t::TriggerMenuParser::m_numberPhysTriggers
private

number of physics trigger algorithms

Definition at line 381 of file TriggerMenuParser.h.

Referenced by gtNumberPhysTriggers().

◆ m_orderConditionChip

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 378 of file TriggerMenuParser.h.

Referenced by gtOrderConditionChip().

◆ m_pinsOnConditionChip

unsigned int l1t::TriggerMenuParser::m_pinsOnConditionChip
private

number of pins on the GTL condition chips

Definition at line 374 of file TriggerMenuParser.h.

Referenced by gtPinsOnConditionChip().

◆ m_scaleDbKey

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

menu associated scale key

Definition at line 409 of file TriggerMenuParser.h.

Referenced by gtScaleDbKey().

◆ m_triggerMenuAuthor

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

Definition at line 392 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuAuthor().

◆ m_triggerMenuDate

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

Definition at line 391 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDate().

◆ m_triggerMenuDescription

std::string l1t::TriggerMenuParser::m_triggerMenuDescription
private

Definition at line 393 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDescription().

◆ m_triggerMenuImplementation

unsigned long l1t::TriggerMenuParser::m_triggerMenuImplementation
private

Definition at line 405 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuImplementation().

◆ m_triggerMenuInterface

std::string l1t::TriggerMenuParser::m_triggerMenuInterface
private

menu names

Definition at line 403 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterface().

◆ m_triggerMenuInterfaceAuthor

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

Definition at line 388 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceAuthor().

◆ m_triggerMenuInterfaceDate

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

number of technical triggers

Definition at line 387 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDate().

◆ m_triggerMenuInterfaceDescription

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

Definition at line 389 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDescription().

◆ m_triggerMenuName

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

Definition at line 404 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuName().

◆ m_triggerMenuUUID

unsigned long l1t::TriggerMenuParser::m_triggerMenuUUID
private

Definition at line 406 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuUUID().

◆ m_vecAXOL1TLTemplate

std::vector<std::vector<AXOL1TLTemplate> > l1t::TriggerMenuParser::m_vecAXOL1TLTemplate
private

Definition at line 418 of file TriggerMenuParser.h.

Referenced by vecAXOL1TLTemplate().

◆ m_vecCaloTemplate

std::vector<std::vector<CaloTemplate> > l1t::TriggerMenuParser::m_vecCaloTemplate
private

Definition at line 415 of file TriggerMenuParser.h.

Referenced by vecCaloTemplate().

◆ m_vecCorrelationTemplate

std::vector<std::vector<CorrelationTemplate> > l1t::TriggerMenuParser::m_vecCorrelationTemplate
private

Definition at line 421 of file TriggerMenuParser.h.

Referenced by vecCorrelationTemplate().

◆ m_vecCorrelationThreeBodyTemplate

std::vector<std::vector<CorrelationThreeBodyTemplate> > l1t::TriggerMenuParser::m_vecCorrelationThreeBodyTemplate
private

Definition at line 422 of file TriggerMenuParser.h.

Referenced by vecCorrelationThreeBodyTemplate().

◆ m_vecCorrelationWithOverlapRemovalTemplate

std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> > l1t::TriggerMenuParser::m_vecCorrelationWithOverlapRemovalTemplate
private

Definition at line 423 of file TriggerMenuParser.h.

Referenced by vecCorrelationWithOverlapRemovalTemplate().

◆ m_vecEnergySumTemplate

std::vector<std::vector<EnergySumTemplate> > l1t::TriggerMenuParser::m_vecEnergySumTemplate
private

Definition at line 416 of file TriggerMenuParser.h.

Referenced by vecEnergySumTemplate().

◆ m_vecEnergySumZdcTemplate

std::vector<std::vector<EnergySumZdcTemplate> > l1t::TriggerMenuParser::m_vecEnergySumZdcTemplate
private

Definition at line 417 of file TriggerMenuParser.h.

Referenced by vecEnergySumZdcTemplate().

◆ m_vecExternalTemplate

std::vector<std::vector<ExternalTemplate> > l1t::TriggerMenuParser::m_vecExternalTemplate
private

Definition at line 419 of file TriggerMenuParser.h.

Referenced by vecExternalTemplate().

◆ m_vecMuonShowerTemplate

std::vector<std::vector<MuonShowerTemplate> > l1t::TriggerMenuParser::m_vecMuonShowerTemplate
private

Definition at line 414 of file TriggerMenuParser.h.

Referenced by vecMuonShowerTemplate().

◆ m_vecMuonTemplate

std::vector<std::vector<MuonTemplate> > l1t::TriggerMenuParser::m_vecMuonTemplate
private

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

Definition at line 413 of file TriggerMenuParser.h.

Referenced by vecMuonTemplate().