CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
l1t::TriggerMenuParser Class Reference

#include <TriggerMenuParser.h>

Public Member Functions

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

Private Member Functions

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

Detailed Description

Definition at line 63 of file TriggerMenuParser.h.

Constructor & Destructor Documentation

TriggerMenuParser::TriggerMenuParser ( )

constructor empty

Definition at line 53 of file TriggerMenuParser.cc.

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

destructor

Definition at line 66 of file TriggerMenuParser.cc.

Member Function Documentation

void TriggerMenuParser::clearMaps ( )
private

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

Definition at line 391 of file TriggerMenuParser.cc.

391  {
392  // loop over condition maps (one map per condition chip)
393  // then loop over conditions in the map
394  for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip != m_conditionMap.end();
395  itCondOnChip++) {
396  // the conditions in the maps are deleted in L1uGtTriggerMenu, not here
397 
398  itCondOnChip->clear();
399  }
400 
401  // the algorithms in the maps are deleted in L1uGtTriggerMenu, not here
402  m_algorithmMap.clear();
403 }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::corCaloTemplate ( ) const
inline

Definition at line 176 of file TriggerMenuParser.h.

References m_corCaloTemplate.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 181 of file TriggerMenuParser.h.

References m_corEnergySumTemplate.

Referenced by L1TGlobalProducer::produce().

181  {
182  return m_corEnergySumTemplate;
183  }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::corMuonTemplate ( ) const
inline

Definition at line 171 of file TriggerMenuParser.h.

References m_corMuonTemplate.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 164 of file TriggerMenuParser.cc.

References submitPVResolutionJobs::EXT, findQualityFiles::jj, relval_steps::menu, mergeVDriftHistosByStation::name, hgcalPerformanceValidation::objects, and AlCaHLTBitMon_QueryRunRegistry::string.

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

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

get / set the algorithm map (by alias)

Definition at line 193 of file TriggerMenuParser.h.

References m_algorithmAliasMap.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 234 of file TriggerMenuParser.h.

References m_algorithmImplementation.

234 { return m_algorithmImplementation; }
std::string m_algorithmImplementation
const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmMap ( ) const
inline

get / set the algorithm map (by name)

Definition at line 188 of file TriggerMenuParser.h.

References m_algorithmMap.

Referenced by L1TGlobalProducer::produce().

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

get / set / build the condition maps

Definition at line 96 of file TriggerMenuParser.h.

References m_conditionMap.

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

get / set the number of condition chips in GTL

Definition at line 74 of file TriggerMenuParser.h.

References m_numberConditionChips.

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

get / set the number of physics trigger algorithms

Definition at line 90 of file TriggerMenuParser.h.

References m_numberPhysTriggers.

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

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

Definition at line 85 of file TriggerMenuParser.h.

References m_orderConditionChip.

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

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

Definition at line 79 of file TriggerMenuParser.h.

References m_pinsOnConditionChip.

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

menu associated scale key

Definition at line 116 of file TriggerMenuParser.h.

References m_scaleDbKey.

Referenced by L1TGlobalProducer::produce().

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

menu associated scales

Definition at line 119 of file TriggerMenuParser.h.

References m_gtScales.

Referenced by L1TGlobalProducer::produce().

119 { return m_gtScales; }
const std::string& l1t::TriggerMenuParser::gtTriggerMenuAuthor ( ) const
inline

Definition at line 226 of file TriggerMenuParser.h.

References m_triggerMenuAuthor.

226 { return m_triggerMenuAuthor; }
const std::string& l1t::TriggerMenuParser::gtTriggerMenuDate ( ) const
inline

Definition at line 222 of file TriggerMenuParser.h.

References m_triggerMenuDate.

222 { return m_triggerMenuDate; }
const std::string& l1t::TriggerMenuParser::gtTriggerMenuDescription ( ) const
inline

Definition at line 230 of file TriggerMenuParser.h.

References m_triggerMenuDescription.

230 { return m_triggerMenuDescription; }
std::string m_triggerMenuDescription
const unsigned long l1t::TriggerMenuParser::gtTriggerMenuImplementation ( ) const
inline

Definition at line 111 of file TriggerMenuParser.h.

References m_triggerMenuImplementation.

Referenced by L1TGlobalProducer::produce().

111 { return m_triggerMenuImplementation; }
unsigned long m_triggerMenuImplementation
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterface ( ) const
inline

get / set the trigger menu names

Definition at line 101 of file TriggerMenuParser.h.

References m_triggerMenuInterface.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 208 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceAuthor.

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

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

Definition at line 204 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDate.

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

Definition at line 212 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDescription.

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

Definition at line 106 of file TriggerMenuParser.h.

References m_triggerMenuName.

Referenced by L1TGlobalProducer::produce().

106 { return m_triggerMenuName; }
const int l1t::TriggerMenuParser::gtTriggerMenuUUID ( ) const
inline

Definition at line 218 of file TriggerMenuParser.h.

References m_triggerMenuUUID.

Referenced by L1TGlobalProducer::produce().

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

insert an algorithm into algorithm map

Definition at line 425 of file TriggerMenuParser.cc.

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

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

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

Definition at line 407 of file TriggerMenuParser.cc.

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

407  {
408  std::string cName = cond.condName();
409  LogTrace("TriggerMenuParser") << " Trying to insert condition \"" << cName << "\" in the condition map."
410  << std::endl;
411 
412  // no condition name has to appear twice!
413  if ((m_conditionMap[chipNr]).count(cName) != 0) {
414  LogTrace("TriggerMenuParser") << " Condition " << cName << " already exists - not inserted!" << std::endl;
415  return false;
416  }
417 
418  (m_conditionMap[chipNr])[cName] = &cond;
419  LogTrace("TriggerMenuParser") << " OK - condition inserted!" << std::endl;
420 
421  return true;
422 }
#define LogTrace(id)
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
const std::string & condName() const
get / set condition name
template<typename T >
std::string TriggerMenuParser::l1t2string ( T  data)
private

Definition at line 511 of file TriggerMenuParser.cc.

References data, and contentValuesCheck::ss.

511  {
512  std::stringstream ss;
513  ss << data;
514  return ss.str();
515 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int TriggerMenuParser::l1tstr2int ( const std::string  data)
private

Definition at line 516 of file TriggerMenuParser.cc.

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

516  {
517  std::stringstream ss;
518  ss << data;
519  int value;
520  ss >> value;
521  return value;
522 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
bool TriggerMenuParser::parseAlgorithm ( tmeventsetup::esAlgorithm  algorithm,
unsigned int  chipNr = 0 
)
private

parse all algorithms

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

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

Definition at line 3273 of file TriggerMenuParser.cc.

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

3273  {
3274  using namespace tmeventsetup;
3275  //using namespace Algorithm;
3276 
3277  // get alias
3278  std::string algAlias = algorithm.getName();
3279  const std::string& algName = algorithm.getName();
3280 
3281  if (algAlias.empty()) {
3282  algAlias = algName;
3283  LogDebug("TriggerMenuParser") << "\n No alias defined for algorithm. Alias set to algorithm name."
3284  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3285  << std::endl;
3286  } else {
3287  //LogDebug("TriggerMenuParser")
3288  LogDebug("TriggerMenuParser") << "\n Alias defined for algorithm."
3289  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3290  << std::endl;
3291  }
3292 
3293  // get the logical expression
3294  const std::string& logExpression = algorithm.getExpressionInCondition();
3295 
3296  LogDebug("TriggerMenuParser") << " Logical expression: " << logExpression
3297  << " Chip number: " << chipNr << std::endl;
3298 
3299  // determine output pin
3300  int outputPin = algorithm.getIndex();
3301 
3302  //LogTrace("TriggerMenuParser")
3303  LogDebug("TriggerMenuParser") << " Output pin: " << outputPin << std::endl;
3304 
3305  // compute the bit number from chip number, output pin and order of the chips
3306  // pin numbering start with 1, bit numbers with 0
3307  int bitNumber = outputPin; // + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1;
3308 
3309  //LogTrace("TriggerMenuParser")
3310  LogDebug("TriggerMenuParser") << " Bit number: " << bitNumber << std::endl;
3311 
3312  // create a new algorithm and insert it into algorithm map
3313  GlobalAlgorithm alg(algName, logExpression, bitNumber);
3314  alg.setAlgoChipNumber(static_cast<int>(chipNr));
3315  alg.setAlgoAlias(algAlias);
3316 
3317  if (edm::isDebugEnabled()) {
3318  std::ostringstream myCoutStream;
3319  alg.print(myCoutStream);
3320  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3321  }
3322 
3323  // insert algorithm into the map
3324  if (!insertAlgorithmIntoMap(alg)) {
3325  return false;
3326  }
3327 
3328  return true;
3329 }
bool isDebugEnabled()
#define LogTrace(id)
bool insertAlgorithmIntoMap(const GlobalAlgorithm &alg)
insert an algorithm into algorithm map
#define LogDebug(id)
void TriggerMenuParser::parseCalMuEta_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2 
)
private

Definition at line 805 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

807  {
808  using namespace tmeventsetup;
809 
810  // First Delta Eta for this set
811  std::string scLabel1 = obj1;
812  scLabel1 += "-ETA";
813  std::string scLabel2 = obj2;
814  scLabel2 += "-ETA";
815 
816  //This LUT does not exist in L1 Menu file, don't fill it
817  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
818  return;
819 
820  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
821  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
822 
823  std::vector<long long> lut_cal_2_mu_eta;
824  getCaloMuonEtaConversionLut(lut_cal_2_mu_eta, scale1, scale2);
825 
826  std::string lutName = obj1;
827  lutName += "-";
828  lutName += obj2;
829  m_gtScales.setLUT_CalMuEta(lutName, lut_cal_2_mu_eta);
830 }
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:29
void TriggerMenuParser::parseCalMuPhi_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2 
)
private

Definition at line 832 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

834  {
835  using namespace tmeventsetup;
836 
837  // First Delta Eta for this set
838  std::string scLabel1 = obj1;
839  scLabel1 += "-PHI";
840  std::string scLabel2 = obj2;
841  scLabel2 += "-PHI";
842 
843  //This LUT does not exist in L1 Menu file, don't fill it
844  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
845  return;
846 
847  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
848  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
849 
850  std::vector<long long> lut_cal_2_mu_phi;
851  getCaloMuonPhiConversionLut(lut_cal_2_mu_phi, scale1, scale2);
852 
853  std::string lutName = obj1;
854  lutName += "-";
855  lutName += obj2;
856  m_gtScales.setLUT_CalMuPhi(lutName, lut_cal_2_mu_phi);
857 }
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:42
bool TriggerMenuParser::parseCalo ( tmeventsetup::esCondition  condCalo,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse a calorimeter condition

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

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

Definition at line 1533 of file TriggerMenuParser.cc.

References PixelTestBeamValidation_cfi::Charge, GOODCOLL_filter_cfg::cut, cuts, TauDecayModes::dec, l1t::gtEG, l1t::gtJet, l1t::gtTau, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, hgcalPerformanceValidation::objects, colinearityKinematic::Phi, CaloTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

1533  {
1534  // XERCES_CPP_NAMESPACE_USE
1535  using namespace tmeventsetup;
1536 
1537  // get condition, particle name and type name
1538 
1539  std::string condition = "calo";
1540  std::string particle = "test-fix";
1541  std::string type = l1t2string(condCalo.getType());
1542  std::string name = l1t2string(condCalo.getName());
1543 
1544  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1545  << "\n (in parseCalo) "
1546  << "\n condition = " << condition << "\n particle = " << particle
1547  << "\n type = " << type << "\n name = " << name << std::endl;
1548 
1550 
1551  // determine object type type
1552  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1553  GlobalObject caloObjType;
1554  int nrObj = -1;
1555 
1556  if (condCalo.getType() == esConditionType::SingleEgamma) {
1557  caloObjType = gtEG;
1558  type = "1_s";
1559  cType = l1t::Type1s;
1560  nrObj = 1;
1561  } else if (condCalo.getType() == esConditionType::DoubleEgamma) {
1562  caloObjType = gtEG;
1563  type = "2_s";
1564  cType = l1t::Type2s;
1565  nrObj = 2;
1566  } else if (condCalo.getType() == esConditionType::TripleEgamma) {
1567  caloObjType = gtEG;
1568  cType = l1t::Type3s;
1569  type = "3";
1570  nrObj = 3;
1571  } else if (condCalo.getType() == esConditionType::QuadEgamma) {
1572  caloObjType = gtEG;
1573  cType = l1t::Type4s;
1574  type = "4";
1575  nrObj = 4;
1576  } else if (condCalo.getType() == esConditionType::SingleJet) {
1577  caloObjType = gtJet;
1578  cType = l1t::Type1s;
1579  type = "1_s";
1580  nrObj = 1;
1581  } else if (condCalo.getType() == esConditionType::DoubleJet) {
1582  caloObjType = gtJet;
1583  cType = l1t::Type2s;
1584  type = "2_s";
1585  nrObj = 2;
1586  } else if (condCalo.getType() == esConditionType::TripleJet) {
1587  caloObjType = gtJet;
1588  cType = l1t::Type3s;
1589  type = "3";
1590  nrObj = 3;
1591  } else if (condCalo.getType() == esConditionType::QuadJet) {
1592  caloObjType = gtJet;
1593  cType = l1t::Type4s;
1594  type = "4";
1595  nrObj = 4;
1596  } else if (condCalo.getType() == esConditionType::SingleTau) {
1597  caloObjType = gtTau;
1598  cType = l1t::Type1s;
1599  type = "1_s";
1600  nrObj = 1;
1601  } else if (condCalo.getType() == esConditionType::DoubleTau) {
1602  caloObjType = gtTau;
1603  cType = l1t::Type2s;
1604  type = "2_s";
1605  nrObj = 2;
1606  } else if (condCalo.getType() == esConditionType::TripleTau) {
1607  caloObjType = gtTau;
1608  cType = l1t::Type3s;
1609  type = "3";
1610  nrObj = 3;
1611  } else if (condCalo.getType() == esConditionType::QuadTau) {
1612  caloObjType = gtTau;
1613  cType = l1t::Type4s;
1614  type = "4";
1615  nrObj = 4;
1616  } else {
1617  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition (" << particle << ")" << std::endl;
1618  return false;
1619  }
1620 
1621  // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1622 
1623  if (nrObj < 0) {
1624  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type << ")"
1625  << "\nCan not determine number of trigger objects. " << std::endl;
1626  return false;
1627  }
1628 
1629  // get values
1630 
1631  // temporary storage of the parameters
1632  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1633 
1634  //BLW TO DO: Can this be dropped?
1635  CaloTemplate::CorrelationParameter corrParameter;
1636 
1637  // need at least one value for deltaPhiRange
1638  std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1639  tmpValues.reserve(nrObj);
1640 
1641  if (int(condCalo.getObjects().size()) != nrObj) {
1642  edm::LogError("TriggerMenuParser") << " condCalo objects: nrObj = " << nrObj
1643  << "condCalo.getObjects().size() = " << condCalo.getObjects().size()
1644  << std::endl;
1645  return false;
1646  }
1647 
1648  // std::string str_condCalo = "";
1649  // uint64_t tempUIntH, tempUIntL;
1650  // uint64_t dst;
1651  int cnt = 0;
1652 
1653  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1654  int relativeBx = 0;
1655  bool gEq = false;
1656 
1657  // Loop over objects and extract the cuts on the objects
1658  const std::vector<esObject>& objects = condCalo.getObjects();
1659  for (size_t jj = 0; jj < objects.size(); jj++) {
1660  const esObject object = objects.at(jj);
1661  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1662 
1663  // BLW TO DO: This needs to be added to the Object Parameters
1664  relativeBx = object.getBxOffset();
1665 
1666  // Loop over the cuts for this object
1667  int upperThresholdInd = -1;
1668  int lowerThresholdInd = 0;
1669  int upperIndexInd = -1;
1670  int lowerIndexInd = 0;
1671  int cntEta = 0;
1672  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1673  int cntPhi = 0;
1674  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1675  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1676  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1677 
1678  const std::vector<esCut>& cuts = object.getCuts();
1679  for (size_t kk = 0; kk < cuts.size(); kk++) {
1680  const esCut cut = cuts.at(kk);
1681 
1682  switch (cut.getCutType()) {
1683  case esCutType::Threshold:
1684  lowerThresholdInd = cut.getMinimum().index;
1685  upperThresholdInd = cut.getMaximum().index;
1686  break;
1687  case esCutType::Slice:
1688  lowerIndexInd = int(cut.getMinimum().value);
1689  upperIndexInd = int(cut.getMaximum().value);
1690  break;
1691  case esCutType::Eta: {
1692  if (cntEta == 0) {
1693  etaWindow1Lower = cut.getMinimum().index;
1694  etaWindow1Upper = cut.getMaximum().index;
1695  } else if (cntEta == 1) {
1696  etaWindow2Lower = cut.getMinimum().index;
1697  etaWindow2Upper = cut.getMaximum().index;
1698  } else {
1699  edm::LogError("TriggerMenuParser")
1700  << "Too Many Eta Cuts for calo-condition (" << particle << ")" << std::endl;
1701  return false;
1702  }
1703  cntEta++;
1704 
1705  } break;
1706 
1707  case esCutType::Phi: {
1708  if (cntPhi == 0) {
1709  phiWindow1Lower = cut.getMinimum().index;
1710  phiWindow1Upper = cut.getMaximum().index;
1711  } else if (cntPhi == 1) {
1712  phiWindow2Lower = cut.getMinimum().index;
1713  phiWindow2Upper = cut.getMaximum().index;
1714  } else {
1715  edm::LogError("TriggerMenuParser")
1716  << "Too Many Phi Cuts for calo-condition (" << particle << ")" << std::endl;
1717  return false;
1718  }
1719  cntPhi++;
1720 
1721  } break;
1722 
1723  case esCutType::Charge: {
1724  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition (" << particle << ")" << std::endl;
1725  return false;
1726 
1727  } break;
1728  case esCutType::Quality: {
1729  qualityLUT = l1tstr2int(cut.getData());
1730 
1731  } break;
1732  case esCutType::Isolation: {
1733  isolationLUT = l1tstr2int(cut.getData());
1734 
1735  } break;
1736  default:
1737  break;
1738  } //end switch
1739 
1740  } //end loop over cuts
1741 
1742  // Fill the object parameters
1743  objParameter[cnt].etHighThreshold = upperThresholdInd;
1744  objParameter[cnt].etLowThreshold = lowerThresholdInd;
1745  objParameter[cnt].indexHigh = upperIndexInd;
1746  objParameter[cnt].indexLow = lowerIndexInd;
1747  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1748  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1749  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1750  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1751  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1752  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1753  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1754  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1755  objParameter[cnt].isolationLUT = isolationLUT;
1756  objParameter[cnt].qualityLUT = qualityLUT; //TO DO: Must add
1757 
1758  // Output for debugging
1759  LogDebug("TriggerMenuParser") << "\n Calo ET high thresholds (hex) for calo object " << caloObjType << " "
1760  << cnt << " = " << std::hex << objParameter[cnt].etLowThreshold << " - "
1761  << objParameter[cnt].etHighThreshold
1762  << "\n etaWindow Lower / Upper for calo object " << cnt << " = 0x"
1763  << objParameter[cnt].etaWindow1Lower << " / 0x" << objParameter[cnt].etaWindow1Upper
1764  << "\n etaWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1765  << objParameter[cnt].etaWindow2Lower << " / 0x" << objParameter[cnt].etaWindow2Upper
1766  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
1767  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
1768  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1769  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
1770  << "\n Isolation LUT for calo object " << cnt << " = 0x"
1771  << objParameter[cnt].isolationLUT << "\n Quality LUT for calo object " << cnt
1772  << " = 0x" << objParameter[cnt].qualityLUT << std::dec << std::endl;
1773 
1774  cnt++;
1775  } //end loop over objects
1776 
1777  // object types - all same caloObjType
1778  std::vector<GlobalObject> objType(nrObj, caloObjType);
1779 
1780  // now create a new calo condition
1781  CaloTemplate caloCond(name);
1782 
1783  caloCond.setCondType(cType);
1784  caloCond.setObjectType(objType);
1785 
1786  //BLW TO DO: This needs to be added to the object rather than the whole condition
1787  caloCond.setCondGEq(gEq);
1788  caloCond.setCondChipNr(chipNr);
1789 
1790  //BLW TO DO: This needs to be added to the object rather than the whole condition
1791  caloCond.setCondRelativeBx(relativeBx);
1792 
1793  caloCond.setConditionParameter(objParameter, corrParameter);
1794 
1795  if (edm::isDebugEnabled()) {
1796  std::ostringstream myCoutStream;
1797  caloCond.print(myCoutStream);
1798  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1799  }
1800 
1801  // insert condition into the map
1802  if (!insertConditionIntoMap(caloCond, chipNr)) {
1803  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
1804 
1805  return false;
1806  } else {
1807  if (corrFlag) {
1808  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1809  } else {
1810  (m_vecCaloTemplate[chipNr]).push_back(caloCond);
1811  }
1812  }
1813 
1814  //
1815  return true;
1816 }
bool isDebugEnabled()
pixelTrack::Quality Quality
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
int l1tstr2int(const std::string data)
typedef for correlation parameters
Definition: CaloTemplate.h:78
#define LogDebug(id)
bool TriggerMenuParser::parseCaloCorr ( const tmeventsetup::esObject *  corrCalo,
unsigned int  chipNr = 0 
)
private

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

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

Definition at line 1829 of file TriggerMenuParser.cc.

References PixelTestBeamValidation_cfi::Charge, GOODCOLL_filter_cfg::cut, cuts, TauDecayModes::dec, l1t::gtEG, l1t::gtJet, l1t::gtTau, edm::isDebugEnabled(), configurableAnalysis::Jet, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, CaloTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_FULL_cff::Tau, and l1t::Type1s.

1829  {
1830  // XERCES_CPP_NAMESPACE_USE
1831  using namespace tmeventsetup;
1832 
1833  // get condition, particle name and type name
1834 
1835  std::string condition = "calo";
1836  std::string particle = "test-fix";
1837  std::string type = l1t2string(corrCalo->getType());
1838  std::string name = l1t2string(corrCalo->getName());
1839 
1840  LogDebug("TriggerMenuParser") << "\n ****************************************** "
1841  << "\n (in parseCalo) "
1842  << "\n condition = " << condition << "\n particle = " << particle
1843  << "\n type = " << type << "\n name = " << name << std::endl;
1844 
1845  // determine object type type
1846  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1847  GlobalObject caloObjType;
1848  int nrObj = 1;
1849  type = "1_s";
1850  GtConditionType cType = l1t::Type1s;
1851 
1852  if (corrCalo->getType() == esObjectType::Egamma) {
1853  caloObjType = gtEG;
1854  } else if (corrCalo->getType() == esObjectType::Jet) {
1855  caloObjType = gtJet;
1856  } else if (corrCalo->getType() == esObjectType::Tau) {
1857  caloObjType = gtTau;
1858  } else {
1859  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition (" << particle << ")" << std::endl;
1860  return false;
1861  }
1862 
1863  // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1864 
1865  if (nrObj < 0) {
1866  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type << ")"
1867  << "\nCan not determine number of trigger objects. " << std::endl;
1868  return false;
1869  }
1870 
1871  // get values
1872 
1873  // temporary storage of the parameters
1874  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1875 
1876  //BLW TO DO: Can this be dropped?
1877  CaloTemplate::CorrelationParameter corrParameter;
1878 
1879  // need at least one value for deltaPhiRange
1880  std::vector<uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1881  tmpValues.reserve(nrObj);
1882 
1883  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1884  int relativeBx = 0;
1885  bool gEq = false;
1886 
1887  gEq = (corrCalo->getComparisonOperator() == esComparisonOperator::GE);
1888 
1889  // BLW TO DO: This needs to be added to the Object Parameters
1890  relativeBx = corrCalo->getBxOffset();
1891 
1892  // Loop over the cuts for this object
1893  int upperThresholdInd = -1;
1894  int lowerThresholdInd = 0;
1895  int upperIndexInd = -1;
1896  int lowerIndexInd = 0;
1897  int cntEta = 0;
1898  unsigned int etaWindow1Lower = -1, etaWindow1Upper = -1, etaWindow2Lower = -1, etaWindow2Upper = -1;
1899  int cntPhi = 0;
1900  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
1901  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1902  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1903 
1904  const std::vector<esCut>& cuts = corrCalo->getCuts();
1905  for (size_t kk = 0; kk < cuts.size(); kk++) {
1906  const esCut cut = cuts.at(kk);
1907 
1908  switch (cut.getCutType()) {
1909  case esCutType::Threshold:
1910  lowerThresholdInd = cut.getMinimum().index;
1911  upperThresholdInd = cut.getMaximum().index;
1912  break;
1913  case esCutType::Slice:
1914  lowerIndexInd = int(cut.getMinimum().value);
1915  upperIndexInd = int(cut.getMaximum().value);
1916  break;
1917  case esCutType::Eta: {
1918  if (cntEta == 0) {
1919  etaWindow1Lower = cut.getMinimum().index;
1920  etaWindow1Upper = cut.getMaximum().index;
1921  } else if (cntEta == 1) {
1922  etaWindow2Lower = cut.getMinimum().index;
1923  etaWindow2Upper = cut.getMaximum().index;
1924  } else {
1925  edm::LogError("TriggerMenuParser")
1926  << "Too Many Eta Cuts for calo-condition (" << particle << ")" << std::endl;
1927  return false;
1928  }
1929  cntEta++;
1930 
1931  } break;
1932 
1933  case esCutType::Phi: {
1934  if (cntPhi == 0) {
1935  phiWindow1Lower = cut.getMinimum().index;
1936  phiWindow1Upper = cut.getMaximum().index;
1937  } else if (cntPhi == 1) {
1938  phiWindow2Lower = cut.getMinimum().index;
1939  phiWindow2Upper = cut.getMaximum().index;
1940  } else {
1941  edm::LogError("TriggerMenuParser")
1942  << "Too Many Phi Cuts for calo-condition (" << particle << ")" << std::endl;
1943  return false;
1944  }
1945  cntPhi++;
1946 
1947  } break;
1948 
1949  case esCutType::Charge: {
1950  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition (" << particle << ")" << std::endl;
1951  return false;
1952 
1953  } break;
1954  case esCutType::Quality: {
1955  qualityLUT = l1tstr2int(cut.getData());
1956 
1957  } break;
1958  case esCutType::Isolation: {
1959  isolationLUT = l1tstr2int(cut.getData());
1960 
1961  } break;
1962  default:
1963  break;
1964  } //end switch
1965 
1966  } //end loop over cuts
1967 
1968  // Fill the object parameters
1969  objParameter[0].etLowThreshold = lowerThresholdInd;
1970  objParameter[0].etHighThreshold = upperThresholdInd;
1971  objParameter[0].indexHigh = upperIndexInd;
1972  objParameter[0].indexLow = lowerIndexInd;
1973  objParameter[0].etaWindow1Lower = etaWindow1Lower;
1974  objParameter[0].etaWindow1Upper = etaWindow1Upper;
1975  objParameter[0].etaWindow2Lower = etaWindow2Lower;
1976  objParameter[0].etaWindow2Upper = etaWindow2Upper;
1977  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1978  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1979  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1980  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1981  objParameter[0].isolationLUT = isolationLUT;
1982  objParameter[0].qualityLUT = qualityLUT; //TO DO: Must add
1983 
1984  // Output for debugging
1985  LogDebug("TriggerMenuParser") << "\n Calo ET high threshold (hex) for calo object " << caloObjType << " "
1986  << " = " << std::hex << objParameter[0].etLowThreshold << " - "
1987  << objParameter[0].etHighThreshold << "\n etaWindow Lower / Upper for calo object "
1988  << " = 0x" << objParameter[0].etaWindow1Lower << " / 0x"
1989  << objParameter[0].etaWindow1Upper
1990  << "\n etaWindowVeto Lower / Upper for calo object "
1991  << " = 0x" << objParameter[0].etaWindow2Lower << " / 0x"
1992  << objParameter[0].etaWindow2Upper << "\n phiWindow Lower / Upper for calo object "
1993  << " = 0x" << objParameter[0].phiWindow1Lower << " / 0x"
1994  << objParameter[0].phiWindow1Upper
1995  << "\n phiWindowVeto Lower / Upper for calo object "
1996  << " = 0x" << objParameter[0].phiWindow2Lower << " / 0x"
1997  << objParameter[0].phiWindow2Upper << "\n Isolation LUT for calo object "
1998  << " = 0x" << objParameter[0].isolationLUT << "\n Quality LUT for calo object "
1999  << " = 0x" << objParameter[0].qualityLUT << std::dec << std::endl;
2000 
2001  // object types - all same caloObjType
2002  std::vector<GlobalObject> objType(nrObj, caloObjType);
2003 
2004  // now create a new calo condition
2005  CaloTemplate caloCond(name);
2006 
2007  caloCond.setCondType(cType);
2008  caloCond.setObjectType(objType);
2009 
2010  //BLW TO DO: This needs to be added to the object rather than the whole condition
2011  caloCond.setCondGEq(gEq);
2012  caloCond.setCondChipNr(chipNr);
2013 
2014  //BLW TO DO: This needs to be added to the object rather than the whole condition
2015  caloCond.setCondRelativeBx(relativeBx);
2016 
2017  caloCond.setConditionParameter(objParameter, corrParameter);
2018 
2019  if (edm::isDebugEnabled()) {
2020  std::ostringstream myCoutStream;
2021  caloCond.print(myCoutStream);
2022  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2023  }
2024 
2025  /*
2026  // insert condition into the map
2027  if ( !insertConditionIntoMap(caloCond, chipNr)) {
2028 
2029  edm::LogError("TriggerMenuParser")
2030  << " Error: duplicate condition (" << name << ")"
2031  << std::endl;
2032 
2033  return false;
2034  }
2035  else {
2036  (m_corCaloTemplate[chipNr]).push_back(caloCond);
2037  }
2038 */
2039  (m_corCaloTemplate[chipNr]).push_back(caloCond);
2040 
2041  //
2042  return true;
2043 }
bool isDebugEnabled()
pixelTrack::Quality Quality
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
int l1tstr2int(const std::string data)
constexpr char Jet[]
Definition: modules.cc:9
typedef for correlation parameters
Definition: CaloTemplate.h:78
#define LogDebug(id)
void TriggerMenuParser::parseCondFormats ( const L1TUtmTriggerMenu utmMenu)

Definition at line 199 of file TriggerMenuParser.cc.

References submitPVResolutionJobs::count, HLT_FULL_cff::DoubleMuon, cuy::ii, relval_steps::menu, HLT_FULL_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

Referenced by L1TGlobalProducer::produce().

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

parse a correlation condition

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

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

Definition at line 2540 of file TriggerMenuParser.cc.

References CorrelationTemplate::CorrelationParameter::chargeCorrelation, l1t::CondCalo, l1t::CondEnergySum, l1t::CondMuon, GOODCOLL_filter_cfg::cut, cuts, HLT_FULL_cff::DeltaEta, HLT_FULL_cff::DeltaPhi, HLT_FULL_cff::DeltaR, ETM, l1t::gtEG, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtJet, l1t::gtMu, l1t::gtTau, l1t::gtTowerCount, HTM, if(), edm::isDebugEnabled(), configurableAnalysis::Jet, findQualityFiles::jj, LogDebug, LogTrace, HLT_FULL_cff::Mass, dumpRecoGeometry_cfg::Muon, mergeVDriftHistosByStation::name, hgcalPerformanceValidation::objects, funct::pow(), CorrelationTemplate::print(), CorrelationTemplate::setCond0Category(), CorrelationTemplate::setCond0Index(), CorrelationTemplate::setCond1Category(), CorrelationTemplate::setCond1Index(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondType(), CorrelationTemplate::setCorrelationParameter(), GlobalCondition::setObjectType(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, HLT_FULL_cff::Tau, and l1t::Type2cor.

2540  {
2541  using namespace tmeventsetup;
2542 
2543  std::string condition = "corr";
2544  std::string particle = "test-fix";
2545  std::string type = l1t2string(corrCond.getType());
2546  std::string name = l1t2string(corrCond.getName());
2547 
2548  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2549  << " (in parseCorrelation) " << std::endl
2550  << " condition = " << condition << std::endl
2551  << " particle = " << particle << std::endl
2552  << " type = " << type << std::endl
2553  << " name = " << name << std::endl;
2554 
2555  // create a new correlation condition
2556  CorrelationTemplate correlationCond(name);
2557 
2558  // check that the condition does not exist already in the map
2559  if (!insertConditionIntoMap(correlationCond, chipNr)) {
2560  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
2561 
2562  return false;
2563  }
2564 
2565  // Define some of the quantities to store the parased information
2566 
2567  // condition type BLW (Do we change this to the type of correlation condition?)
2569 
2570  // two objects (for sure)
2571  const int nrObj = 2;
2572 
2573  // object types and greater equal flag - filled in the loop
2574  int intGEq[nrObj] = {-1, -1};
2575  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
2576  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2577 
2578  // correlation flag and index in the cor*vector
2579  const bool corrFlag = true;
2580  int corrIndexVal[nrObj] = {-1, -1};
2581 
2582  // Storage of the correlation selection
2584  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2585 
2586  // Get the correlation Cuts on the legs
2587  int cutType = 0;
2588  const std::vector<esCut>& cuts = corrCond.getCuts();
2589  for (size_t jj = 0; jj < cuts.size(); jj++) {
2590  const esCut cut = cuts.at(jj);
2591 
2592  if (cut.getCutType() == esCutType::ChargeCorrelation) {
2593  if (cut.getData() == "ls")
2594  corrParameter.chargeCorrelation = 2;
2595  else if (cut.getData() == "os")
2596  corrParameter.chargeCorrelation = 4;
2597  else
2598  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2599  } else {
2600  //
2601  // Until utm has method to calculate these, do the integer value calculation with precision.
2602  //
2603  double minV = cut.getMinimum().value;
2604  double maxV = cut.getMaximum().value;
2605 
2606  //Scale down very large numbers out of xml
2607  if (maxV > 1.0e8)
2608  maxV = 1.0e8;
2609 
2610  if (cut.getCutType() == esCutType::DeltaEta) {
2611  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaEta Cut minV = " << minV
2612  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2613  << " precMax = " << cut.getMaximum().index << std::endl;
2614  corrParameter.minEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2615  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2616  corrParameter.precEtaCut = cut.getMinimum().index;
2617  cutType = cutType | 0x1;
2618  } else if (cut.getCutType() == esCutType::DeltaPhi) {
2619  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaPhi Cut minV = " << minV
2620  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2621  << " precMax = " << cut.getMaximum().index << std::endl;
2622  corrParameter.minPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2623  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2624  corrParameter.precPhiCut = cut.getMinimum().index;
2625  cutType = cutType | 0x2;
2626  } else if (cut.getCutType() == esCutType::DeltaR) {
2627  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaR Cut minV = " << minV
2628  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2629  << " precMax = " << cut.getMaximum().index << std::endl;
2630  corrParameter.minDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2631  corrParameter.maxDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2632  corrParameter.precDRCut = cut.getMinimum().index;
2633  cutType = cutType | 0x4;
2634  } else if (cut.getCutType() == esCutType::TwoBodyPt) {
2635  corrParameter.minTBPTCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2636  corrParameter.maxTBPTCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2637  corrParameter.precTBPTCut = cut.getMinimum().index;
2638  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tTPBT Cut minV = " << minV
2639  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2640  << " precMax = " << cut.getMaximum().index << std::endl;
2641  cutType = cutType | 0x20;
2642  } else if (cut.getCutType() == esCutType::Mass) {
2643  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV
2644  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2645  << " precMax = " << cut.getMaximum().index << std::endl;
2646  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2647  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2648  corrParameter.precMassCut = cut.getMinimum().index;
2649  // cutType = cutType | 0x8;
2650  if (corrCond.getType() == esConditionType::TransverseMass) {
2651  cutType = cutType | 0x10;
2652  } else {
2653  cutType = cutType | 0x8;
2654  }
2655  } else if (cut.getCutType() == esCutType::MassUpt) { // Added for displaced muons
2656  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV
2657  << " Max = " << maxV << " precMin = " << cut.getMinimum().index
2658  << " precMax = " << cut.getMaximum().index << std::endl;
2659  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2660  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2661  corrParameter.precMassCut = cut.getMinimum().index;
2662  cutType = cutType | 0x40; // Note: 0x40 (MassUpt) is next available bit after 0x20 (TwoBodyPt)
2663  } // Careful: cutType carries same info as esCutType, but is hard coded!!
2664  } // This seems like a historical hack, which may be error prone.
2665  } // cutType is defined here, for use later in CorrCondition.cc
2666  corrParameter.corrCutType = cutType;
2667 
2668  // Get the two objects that form the legs
2669  const std::vector<esObject>& objects = corrCond.getObjects();
2670  if (objects.size() != 2) {
2671  edm::LogError("TriggerMenuParser") << "incorrect number of objects for the correlation condition " << name
2672  << " corrFlag " << corrFlag << std::endl;
2673  return false;
2674  }
2675 
2676  // loop over legs
2677  for (size_t jj = 0; jj < objects.size(); jj++) {
2678  const esObject object = objects.at(jj);
2679  LogDebug("TriggerMenuParser") << " obj name = " << object.getName() << "\n";
2680  LogDebug("TriggerMenuParser") << " obj type = " << object.getType() << "\n";
2681  LogDebug("TriggerMenuParser") << " obj op = " << object.getComparisonOperator() << "\n";
2682  LogDebug("TriggerMenuParser") << " obj bx = " << object.getBxOffset() << "\n";
2683 
2684  // check the leg type
2685  if (object.getType() == esObjectType::Muon) {
2686  // we have a muon
2687 
2688  /*
2689  //BLW Hold on to this code we may need to go back to it at some point.
2690  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
2691  // This is potentially a place to slim down the code. Note: We currently evaluate the
2692  // conditions every time, so even if we put the condition in the vector once, we would
2693  // still evaluate it multiple times. This is a place for optimization.
2694  {
2695 
2696  parseMuonCorr(&object,chipNr);
2697  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2698 
2699  } else {
2700  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
2701  bool found = false;
2702  int index = 0;
2703  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
2704  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
2705  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
2706  found = true;
2707  } else {
2708  index++;
2709  }
2710  }
2711  if(found) {
2712  corrIndexVal[jj] = index;
2713  } else {
2714  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
2715  }
2716 
2717  }
2718 */
2719  parseMuonCorr(&object, chipNr);
2720  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2721 
2722  //Now set some flags for this subCondition
2723  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2724  objType[jj] = gtMu;
2725  condCateg[jj] = CondMuon;
2726 
2727  } else if (object.getType() == esObjectType::Egamma || object.getType() == esObjectType::Jet ||
2728  object.getType() == esObjectType::Tau) {
2729  // we have an Calo object
2730  parseCaloCorr(&object, chipNr);
2731  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
2732 
2733  //Now set some flags for this subCondition
2734  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2735  switch (object.getType()) {
2736  case esObjectType::Egamma: {
2737  objType[jj] = gtEG;
2738  } break;
2739  case esObjectType::Jet: {
2740  objType[jj] = gtJet;
2741  } break;
2742  case esObjectType::Tau: {
2743  objType[jj] = gtTau;
2744  } break;
2745  default: {
2746  } break;
2747  }
2748  condCateg[jj] = CondCalo;
2749 
2750  } else if (object.getType() == esObjectType::ETM || object.getType() == esObjectType::ETMHF ||
2751  object.getType() == esObjectType::TOWERCOUNT || object.getType() == esObjectType::HTM) {
2752  // we have Energy Sum
2753  parseEnergySumCorr(&object, chipNr);
2754  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
2755 
2756  //Now set some flags for this subCondition
2757  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2758  switch (object.getType()) {
2759  case esObjectType::ETM: {
2760  objType[jj] = GlobalObject::gtETM;
2761  } break;
2762  case esObjectType::HTM: {
2763  objType[jj] = GlobalObject::gtHTM;
2764  } break;
2765  case esObjectType::ETMHF: {
2766  objType[jj] = GlobalObject::gtETMHF;
2767  } break;
2768  case esObjectType::TOWERCOUNT: {
2769  objType[jj] = GlobalObject::gtTowerCount;
2770  } break;
2771  default: {
2772  } break;
2773  }
2774  condCateg[jj] = CondEnergySum;
2775 
2776  } else {
2777  edm::LogError("TriggerMenuParser") << "Illegal Object Type " << object.getType()
2778  << " for the correlation condition " << name << std::endl;
2779  return false;
2780 
2781  } //if block on leg types
2782 
2783  } //loop over legs
2784 
2785  // get greater equal flag for the correlation condition
2786  bool gEq = true;
2787  if (intGEq[0] != intGEq[1]) {
2788  edm::LogError("TriggerMenuParser") << "Inconsistent GEq flags for sub-conditions "
2789  << " for the correlation condition " << name << std::endl;
2790  return false;
2791 
2792  } else {
2793  gEq = (intGEq[0] != 0);
2794  }
2795 
2796  // fill the correlation condition
2797  correlationCond.setCondType(cType);
2798  correlationCond.setObjectType(objType);
2799  correlationCond.setCondGEq(gEq);
2800  correlationCond.setCondChipNr(chipNr);
2801 
2802  correlationCond.setCond0Category(condCateg[0]);
2803  correlationCond.setCond1Category(condCateg[1]);
2804 
2805  correlationCond.setCond0Index(corrIndexVal[0]);
2806  correlationCond.setCond1Index(corrIndexVal[1]);
2807 
2808  correlationCond.setCorrelationParameter(corrParameter);
2809 
2810  if (edm::isDebugEnabled()) {
2811  std::ostringstream myCoutStream;
2812  correlationCond.print(myCoutStream);
2813  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2814  }
2815 
2816  // insert condition into the map
2817  // condition is not duplicate, check was done at the beginning
2818 
2819  (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond);
2820 
2821  //
2822  return true;
2823 }
bool isDebugEnabled()
Definition: L1GtObject.h:38
Definition: L1GtObject.h:35
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
if(conf_.getParameter< bool >("UseStripCablingDB"))
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
constexpr char Jet[]
Definition: modules.cc:9
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
typedef for correlation parameters
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
#define LogDebug(id)
bool TriggerMenuParser::parseCorrelationThreeBody ( tmeventsetup::esCondition  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 2838 of file TriggerMenuParser.cc.

References l1t::CondMuon, GOODCOLL_filter_cfg::cut, cuts, l1t::gtMu, edm::isDebugEnabled(), LogDebug, LogTrace, HLT_FULL_cff::Mass, dumpRecoGeometry_cfg::Muon, mergeVDriftHistosByStation::name, hgcalPerformanceValidation::objects, funct::pow(), CorrelationThreeBodyTemplate::print(), CorrelationThreeBodyTemplate::setCond0Category(), CorrelationThreeBodyTemplate::setCond0Index(), CorrelationThreeBodyTemplate::setCond1Category(), CorrelationThreeBodyTemplate::setCond1Index(), CorrelationThreeBodyTemplate::setCond2Category(), CorrelationThreeBodyTemplate::setCond2Index(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondType(), CorrelationThreeBodyTemplate::setCorrelationThreeBodyParameter(), GlobalCondition::setObjectType(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and l1t::Type3s.

2838  {
2839  using namespace tmeventsetup;
2840 
2841  std::string condition = "corrThreeBody";
2842  std::string particle = "muon";
2843  std::string type = l1t2string(corrCond.getType());
2844  std::string name = l1t2string(corrCond.getName());
2845 
2846  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2847  << " (in parseCorrelationThreeBody) " << std::endl
2848  << " condition = " << condition << std::endl
2849  << " particle = " << particle << std::endl
2850  << " type = " << type << std::endl
2851  << " name = " << name << std::endl;
2852 
2853  // create a new correlation condition
2854  CorrelationThreeBodyTemplate correlationThreeBodyCond(name);
2855 
2856  // check that the condition does not exist already in the map
2857  if (!insertConditionIntoMap(correlationThreeBodyCond, chipNr)) {
2858  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
2859  return false;
2860  }
2861 
2862  // Define some of the quantities to store the parsed information
2863  GtConditionType cType = l1t::Type3s;
2864 
2865  // three objects (for sure)
2866  const int nrObj = 3;
2867 
2868  // object types and greater equal flag - filled in the loop
2869  std::vector<GlobalObject> objType(nrObj);
2870  std::vector<GtConditionCategory> condCateg(nrObj);
2871 
2872  // correlation flag and index in the cor*vector
2873  const bool corrFlag = true;
2874  int corrIndexVal[nrObj] = {-1, -1, -1};
2875 
2876  // Storage of the correlation selection
2878 
2879  // Get the correlation cuts on the legs
2880  int cutType = 0;
2881  const std::vector<esCut>& cuts = corrCond.getCuts();
2882  for (size_t lll = 0; lll < cuts.size(); lll++) {
2883  const esCut cut = cuts.at(lll);
2884 
2885  //
2886  // Until utm has method to calculate these, do the integer value calculation with precision.
2887  //
2888  double minV = cut.getMinimum().value;
2889  double maxV = cut.getMaximum().value;
2890 
2891  //Scale down very large numbers out of xml
2892  if (maxV > 1.0e8)
2893  maxV = 1.0e8;
2894 
2895  if (cut.getCutType() == esCutType::Mass) {
2896  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV
2897  << "\tMass Cut maxV = " << maxV << " precMin = " << cut.getMinimum().index
2898  << " precMax = " << cut.getMaximum().index << std::endl;
2899  corrThreeBodyParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
2900  corrThreeBodyParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
2901  corrThreeBodyParameter.precMassCut = cut.getMinimum().index;
2902  cutType = cutType | 0x8;
2903  }
2904  }
2905  corrThreeBodyParameter.corrCutType = cutType;
2906 
2907  // Get the three objects that form the legs
2908  const std::vector<esObject>& objects = corrCond.getObjects();
2909  if (objects.size() != 3) {
2910  edm::LogError("TriggerMenuParser") << "incorrect number of objects for the correlation condition " << name
2911  << " corrFlag " << corrFlag << std::endl;
2912  return false;
2913  }
2914 
2915  // Loop over legs
2916  for (size_t lll = 0; lll < objects.size(); lll++) {
2917  const esObject object = objects.at(lll);
2918  LogDebug("TriggerMenuParser") << " obj name = " << object.getName() << "\n";
2919  LogDebug("TriggerMenuParser") << " obj type = " << object.getType() << "\n";
2920  LogDebug("TriggerMenuParser") << " obj bx = " << object.getBxOffset() << "\n";
2921 
2922  // check the leg type
2923  if (object.getType() == esObjectType::Muon) {
2924  // we have a muon
2925  parseMuonCorr(&object, chipNr);
2926  corrIndexVal[lll] = (m_corMuonTemplate[chipNr]).size() - 1;
2927 
2928  //Now set some flags for this subCondition
2929  objType[lll] = gtMu;
2930  condCateg[lll] = CondMuon;
2931 
2932  } else {
2933  edm::LogError("TriggerMenuParser") << "Checked the object Type " << object.getType()
2934  << " for the correlation condition " << name
2935  << ": no three muons in the event!" << std::endl;
2936  }
2937  } // End loop over legs
2938 
2939  // fill the three-body correlation condition
2940  correlationThreeBodyCond.setCondType(cType);
2941  correlationThreeBodyCond.setObjectType(objType);
2942  correlationThreeBodyCond.setCondChipNr(chipNr);
2943 
2944  correlationThreeBodyCond.setCond0Category(condCateg[0]);
2945  correlationThreeBodyCond.setCond1Category(condCateg[1]);
2946  correlationThreeBodyCond.setCond2Category(condCateg[2]);
2947 
2948  correlationThreeBodyCond.setCond0Index(corrIndexVal[0]);
2949  correlationThreeBodyCond.setCond1Index(corrIndexVal[1]);
2950  correlationThreeBodyCond.setCond2Index(corrIndexVal[2]);
2951 
2952  correlationThreeBodyCond.setCorrelationThreeBodyParameter(corrThreeBodyParameter);
2953 
2954  if (edm::isDebugEnabled()) {
2955  std::ostringstream myCoutStream;
2956  correlationThreeBodyCond.print(myCoutStream);
2957  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2958  }
2959 
2960  // insert condition into the map
2961  // condition is not duplicate, check was done at the beginning
2962 
2963  (m_vecCorrelationThreeBodyTemplate[chipNr]).push_back(correlationThreeBodyCond);
2964 
2965  //
2966  return true;
2967 }
bool isDebugEnabled()
Log< level::Error, false > LogError
#define LogTrace(id)
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
#define LogDebug(id)
bool TriggerMenuParser::parseCorrelationWithOverlapRemoval ( const tmeventsetup::esCondition &  corrCond,
unsigned int  chipNr = 0 
)
private

parse a correlation condition with overlap removal

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

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

Definition at line 2982 of file TriggerMenuParser.cc.

References CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalParameter::chargeCorrelation, l1t::CondCalo, l1t::CondEnergySum, l1t::CondMuon, GOODCOLL_filter_cfg::cut, cuts, HLT_FULL_cff::DeltaEta, HLT_FULL_cff::DeltaPhi, HLT_FULL_cff::DeltaR, ETM, l1t::gtEG, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtJet, l1t::gtMu, l1t::gtTau, l1t::gtTowerCount, HTM, if(), edm::isDebugEnabled(), configurableAnalysis::Jet, findQualityFiles::jj, LogDebug, LogTrace, HLT_FULL_cff::Mass, dumpRecoGeometry_cfg::Muon, mergeVDriftHistosByStation::name, hgcalPerformanceValidation::objects, funct::pow(), CorrelationWithOverlapRemovalTemplate::print(), CorrelationWithOverlapRemovalTemplate::setCond0Category(), CorrelationWithOverlapRemovalTemplate::setCond0Index(), CorrelationWithOverlapRemovalTemplate::setCond1Category(), CorrelationWithOverlapRemovalTemplate::setCond1Index(), CorrelationWithOverlapRemovalTemplate::setCond2Category(), CorrelationWithOverlapRemovalTemplate::setCond2Index(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondType(), CorrelationWithOverlapRemovalTemplate::setCorrelationWithOverlapRemovalParameter(), GlobalCondition::setObjectType(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, HLT_FULL_cff::Tau, and l1t::Type2corWithOverlapRemoval.

2983  {
2984  using namespace tmeventsetup;
2985 
2986  std::string condition = "corrWithOverlapRemoval";
2987  std::string particle = "test-fix";
2988  std::string type = l1t2string(corrCond.getType());
2989  std::string name = l1t2string(corrCond.getName());
2990 
2991  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2992  << " (in parseCorrelationWithOverlapRemoval) " << std::endl
2993  << " condition = " << condition << std::endl
2994  << " particle = " << particle << std::endl
2995  << " type = " << type << std::endl
2996  << " name = " << name << std::endl;
2997 
2998  // create a new correlation condition
2999  CorrelationWithOverlapRemovalTemplate correlationWORCond(name);
3000 
3001  // check that the condition does not exist already in the map
3002  if (!insertConditionIntoMap(correlationWORCond, chipNr)) {
3003  edm::LogError("TriggerMenuParser") << " Error: duplicate correlation condition (" << name << ")" << std::endl;
3004 
3005  return false;
3006  }
3007 
3008  // Define some of the quantities to store the parased information
3009 
3010  // condition type BLW (Do we change this to the type of correlation condition?)
3012 
3013  // three objects (for sure)
3014  const int nrObj = 3;
3015 
3016  // object types and greater equal flag - filled in the loop
3017  int intGEq[nrObj] = {-1, -1, -1};
3018  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
3019  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
3020 
3021  // correlation flag and index in the cor*vector
3022  const bool corrFlag = true;
3023  int corrIndexVal[nrObj] = {-1, -1, -1};
3024 
3025  // Storage of the correlation selection
3027  corrParameter.chargeCorrelation = 1; //ignore charge correlation for corr-legs
3028 
3029  // Get the correlation Cuts on the legs
3030  int cutType = 0;
3031  const std::vector<esCut>& cuts = corrCond.getCuts();
3032  for (size_t jj = 0; jj < cuts.size(); jj++) {
3033  const esCut cut = cuts.at(jj);
3034 
3035  if (cut.getCutType() == esCutType::ChargeCorrelation) {
3036  if (cut.getData() == "ls")
3037  corrParameter.chargeCorrelation = 2;
3038  else if (cut.getData() == "os")
3039  corrParameter.chargeCorrelation = 4;
3040  else
3041  corrParameter.chargeCorrelation = 1; //ignore charge correlation
3042  } else {
3043  //
3044  // Unitl utm has method to calculate these, do the integer value calculation with precision.
3045  //
3046  double minV = cut.getMinimum().value;
3047  double maxV = cut.getMaximum().value;
3048 
3049  //Scale down very large numbers out of xml
3050  if (maxV > 1.0e8)
3051  maxV = 1.0e8;
3052 
3053  if (cut.getCutType() == esCutType::DeltaEta) {
3054  //std::cout << "DeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3055  corrParameter.minEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3056  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3057  corrParameter.precEtaCut = cut.getMinimum().index;
3058  cutType = cutType | 0x1;
3059  } else if (cut.getCutType() == esCutType::DeltaPhi) {
3060  //std::cout << "DeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3061  corrParameter.minPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3062  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3063  corrParameter.precPhiCut = cut.getMinimum().index;
3064  cutType = cutType | 0x2;
3065  } else if (cut.getCutType() == esCutType::DeltaR) {
3066  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3067  corrParameter.minDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3068  corrParameter.maxDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3069  corrParameter.precDRCut = cut.getMinimum().index;
3070  cutType = cutType | 0x4;
3071  } else if (cut.getCutType() == esCutType::Mass) {
3072  //std::cout << "Mass Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3073  corrParameter.minMassCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3074  corrParameter.maxMassCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3075  corrParameter.precMassCut = cut.getMinimum().index;
3076  cutType = cutType | 0x8;
3077  }
3078  if (cut.getCutType() == esCutType::OvRmDeltaEta) {
3079  //std::cout << "OverlapRemovalDeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3080  corrParameter.minOverlapRemovalEtaCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3081  corrParameter.maxOverlapRemovalEtaCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3082  corrParameter.precOverlapRemovalEtaCut = cut.getMinimum().index;
3083  cutType = cutType | 0x10;
3084  } else if (cut.getCutType() == esCutType::OvRmDeltaPhi) {
3085  //std::cout << "OverlapRemovalDeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3086  corrParameter.minOverlapRemovalPhiCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3087  corrParameter.maxOverlapRemovalPhiCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3088  corrParameter.precOverlapRemovalPhiCut = cut.getMinimum().index;
3089  cutType = cutType | 0x20;
3090  } else if (cut.getCutType() == esCutType::OvRmDeltaR) {
3091  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3092  corrParameter.minOverlapRemovalDRCutValue = (long long)(minV * pow(10., cut.getMinimum().index));
3093  corrParameter.maxOverlapRemovalDRCutValue = (long long)(maxV * pow(10., cut.getMaximum().index));
3094  corrParameter.precOverlapRemovalDRCut = cut.getMinimum().index;
3095  cutType = cutType | 0x40;
3096  }
3097  }
3098  }
3099  corrParameter.corrCutType = cutType;
3100 
3101  // Get the two objects that form the legs
3102  const std::vector<esObject>& objects = corrCond.getObjects();
3103  if (objects.size() != 3) {
3104  edm::LogError("TriggerMenuParser")
3105  << "incorrect number of objects for the correlation condition with overlap removal " << name << " corrFlag "
3106  << corrFlag << std::endl;
3107  return false;
3108  }
3109 
3110  // Loop over legs
3111  for (size_t jj = 0; jj < objects.size(); jj++) {
3112  const esObject& object = objects.at(jj);
3113  LogDebug("TriggerMenuParser") << " obj name = " << object.getName() << "\n";
3114  LogDebug("TriggerMenuParser") << " obj type = " << object.getType() << "\n";
3115  LogDebug("TriggerMenuParser") << " obj op = " << object.getComparisonOperator() << "\n";
3116  LogDebug("TriggerMenuParser") << " obj bx = " << object.getBxOffset() << "\n";
3117  LogDebug("TriggerMenuParser") << "type = done" << std::endl;
3118 
3119  // check the leg type
3120  if (object.getType() == esObjectType::Muon) {
3121  // we have a muon
3122 
3123  /*
3124  //BLW Hold on to this code we may need to go back to it at some point.
3125  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
3126  // This is potentially a place to slim down the code. Note: We currently evaluate the
3127  // conditions every time, so even if we put the condition in the vector once, we would
3128  // still evaluate it multiple times. This is a place for optimization.
3129  {
3130 
3131  parseMuonCorr(&object,chipNr);
3132  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
3133 
3134  } else {
3135  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
3136  bool found = false;
3137  int index = 0;
3138  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
3139  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
3140  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
3141  found = true;
3142  } else {
3143  index++;
3144  }
3145  }
3146  if(found) {
3147  corrIndexVal[jj] = index;
3148  } else {
3149  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
3150  }
3151 
3152  }
3153 */
3154  parseMuonCorr(&object, chipNr);
3155  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
3156 
3157  //Now set some flags for this subCondition
3158  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3159  objType[jj] = gtMu;
3160  condCateg[jj] = CondMuon;
3161 
3162  } else if (object.getType() == esObjectType::Egamma || object.getType() == esObjectType::Jet ||
3163  object.getType() == esObjectType::Tau) {
3164  // we have an Calo object
3165  parseCaloCorr(&object, chipNr);
3166  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
3167 
3168  //Now set some flags for this subCondition
3169  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3170  switch (object.getType()) {
3171  case esObjectType::Egamma: {
3172  objType[jj] = gtEG;
3173  } break;
3174  case esObjectType::Jet: {
3175  objType[jj] = gtJet;
3176  } break;
3177  case esObjectType::Tau: {
3178  objType[jj] = gtTau;
3179  } break;
3180  default: {
3181  } break;
3182  }
3183  condCateg[jj] = CondCalo;
3184 
3185  } else if (object.getType() == esObjectType::ETM || object.getType() == esObjectType::ETMHF ||
3186  object.getType() == esObjectType::TOWERCOUNT || object.getType() == esObjectType::HTM) {
3187  // we have Energy Sum
3188  parseEnergySumCorr(&object, chipNr);
3189  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
3190 
3191  //Now set some flags for this subCondition
3192  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3193  switch (object.getType()) {
3194  case esObjectType::ETM: {
3195  objType[jj] = GlobalObject::gtETM;
3196  } break;
3197  case esObjectType::HTM: {
3198  objType[jj] = GlobalObject::gtHTM;
3199  } break;
3200  case esObjectType::ETMHF: {
3201  objType[jj] = GlobalObject::gtETMHF;
3202  } break;
3203  case esObjectType::TOWERCOUNT: {
3204  objType[jj] = GlobalObject::gtTowerCount;
3205  } break;
3206  default: {
3207  } break;
3208  }
3209  condCateg[jj] = CondEnergySum;
3210 
3211  } else {
3212  edm::LogError("TriggerMenuParser") << "Illegal Object Type " << object.getType()
3213  << " for the correlation condition " << name << std::endl;
3214  return false;
3215 
3216  } //if block on leg types
3217 
3218  } //loop over legs
3219 
3220  // get greater equal flag for the correlation condition
3221  bool gEq = true;
3222  if (intGEq[0] != intGEq[1]) {
3223  edm::LogError("TriggerMenuParser") << "Inconsistent GEq flags for sub-conditions "
3224  << " for the correlation condition " << name << std::endl;
3225  return false;
3226 
3227  } else {
3228  gEq = (intGEq[0] != 0);
3229  }
3230 
3231  // fill the correlation condition
3232  correlationWORCond.setCondType(cType);
3233  correlationWORCond.setObjectType(objType);
3234  correlationWORCond.setCondGEq(gEq);
3235  correlationWORCond.setCondChipNr(chipNr);
3236 
3237  correlationWORCond.setCond0Category(condCateg[0]);
3238  correlationWORCond.setCond1Category(condCateg[1]);
3239  correlationWORCond.setCond2Category(condCateg[2]);
3240 
3241  correlationWORCond.setCond0Index(corrIndexVal[0]);
3242  correlationWORCond.setCond1Index(corrIndexVal[1]);
3243  correlationWORCond.setCond2Index(corrIndexVal[2]);
3244 
3245  correlationWORCond.setCorrelationWithOverlapRemovalParameter(corrParameter);
3246 
3247  if (edm::isDebugEnabled()) {
3248  std::ostringstream myCoutStream;
3249  correlationWORCond.print(myCoutStream);
3250  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3251  }
3252 
3253  // insert condition into the map
3254  // condition is not duplicate, check was done at the beginning
3255 
3256  (m_vecCorrelationWithOverlapRemovalTemplate[chipNr]).push_back(correlationWORCond);
3257 
3258  //
3259  return true;
3260 }
bool isDebugEnabled()
Definition: L1GtObject.h:38
Definition: L1GtObject.h:35
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)
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
if(conf_.getParameter< bool >("UseStripCablingDB"))
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
constexpr char Jet[]
Definition: modules.cc:9
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
#define LogDebug(id)
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 904 of file TriggerMenuParser.cc.

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

908  {
909  using namespace tmeventsetup;
910 
911  // First Delta Eta for this set
912  std::string scLabel1 = obj1;
913  scLabel1 += "-ETA";
914  std::string scLabel2 = obj2;
915  scLabel2 += "-ETA";
916 
917  //This LUT does not exist in L1 Menu file, don't fill it
918  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
919  return;
920 
921  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
922  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
923  std::vector<double> val_delta_eta;
924  std::vector<long long> lut_delta_eta;
925  size_t n = getDeltaVector(val_delta_eta, scale1, scale2);
926  setLut(lut_delta_eta, val_delta_eta, prec1);
927  std::string lutName = obj1;
928  lutName += "-";
929  lutName += obj2;
930  m_gtScales.setLUT_DeltaEta(lutName, lut_delta_eta, prec1);
931 
932  // Second Get the Cosh for this delta Eta Set
933  std::vector<long long> lut_cosh;
934  applyCosh(val_delta_eta, n);
935  setLut(lut_cosh, val_delta_eta, prec2);
936  m_gtScales.setLUT_Cosh(lutName, lut_cosh, prec2);
937 }
virtual void setLUT_DeltaEta(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:55
virtual void setLUT_Cosh(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
void TriggerMenuParser::parseDeltaPhi_Cos_LUTS ( const std::map< std::string, tmeventsetup::esScale > &  scaleMap,
const std::string &  obj1,
const std::string &  obj2,
unsigned int  prec1,
unsigned int  prec2 
)
private

Definition at line 939 of file TriggerMenuParser.cc.

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

943  {
944  using namespace tmeventsetup;
945 
946  // First Delta phi for this set
947  std::string scLabel1 = obj1;
948  scLabel1 += "-PHI";
949  std::string scLabel2 = obj2;
950  scLabel2 += "-PHI";
951 
952  //This LUT does not exist in L1 Menu file, don't fill it
953  if (scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end())
954  return;
955 
956  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
957  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
958  std::vector<double> val_delta_phi;
959  std::vector<long long> lut_delta_phi;
960  size_t n = getDeltaVector(val_delta_phi, scale1, scale2);
961  setLut(lut_delta_phi, val_delta_phi, prec1);
962  std::string lutName = obj1;
963  lutName += "-";
964  lutName += obj2;
965  m_gtScales.setLUT_DeltaPhi(lutName, lut_delta_phi, prec1);
966 
967  // Second Get the Cosh for this delta phi Set
968  std::vector<long long> lut_cos;
969  applyCos(val_delta_phi, n);
970  setLut(lut_cos, val_delta_phi, prec2);
971  m_gtScales.setLUT_Cos(lutName, lut_cos, prec2);
972 }
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
virtual void setLUT_DeltaPhi(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:71
bool TriggerMenuParser::parseEnergySum ( tmeventsetup::esCondition  condEnergySum,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse an "energy sum" condition

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

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

Definition at line 2056 of file TriggerMenuParser.cc.

References GOODCOLL_filter_cfg::cut, cuts, TauDecayModes::dec, l1t::gtAsymmetryEt, l1t::gtAsymmetryEtHF, l1t::gtAsymmetryHt, l1t::gtAsymmetryHtHF, l1t::gtCentrality0, l1t::gtCentrality1, l1t::gtCentrality2, l1t::gtCentrality3, l1t::gtCentrality4, l1t::gtCentrality5, l1t::gtCentrality6, l1t::gtCentrality7, l1t::gtETM, l1t::gtETMHF, l1t::gtETT, l1t::gtETTem, l1t::gtHTM, l1t::gtHTT, l1t::gtMinBiasHFM0, l1t::gtMinBiasHFM1, l1t::gtMinBiasHFP0, l1t::gtMinBiasHFP1, l1t::gtTowerCount, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, hgcalPerformanceValidation::objects, colinearityKinematic::Phi, EnergySumTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, 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.

2058  {
2059  // XERCES_CPP_NAMESPACE_USE
2060  using namespace tmeventsetup;
2061 
2062  // get condition, particle name and type name
2063 
2064  std::string condition = "calo";
2065  std::string type = l1t2string(condEnergySum.getType());
2066  std::string name = l1t2string(condEnergySum.getName());
2067 
2068  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2069  << "\n (in parseEnergySum) "
2070  << "\n condition = " << condition << "\n type = " << type
2071  << "\n name = " << name << std::endl;
2072 
2073  // determine object type type
2074  GlobalObject energySumObjType;
2075  GtConditionType cType;
2076 
2077  if (condEnergySum.getType() == esConditionType::MissingEt) {
2078  energySumObjType = GlobalObject::gtETM;
2079  cType = TypeETM;
2080  } else if (condEnergySum.getType() == esConditionType::TotalEt) {
2081  energySumObjType = GlobalObject::gtETT;
2082  cType = TypeETT;
2083  } else if (condEnergySum.getType() == esConditionType::TotalEtEM) {
2084  energySumObjType = GlobalObject::gtETTem;
2085  cType = TypeETTem;
2086  } else if (condEnergySum.getType() == esConditionType::TotalHt) {
2087  energySumObjType = GlobalObject::gtHTT;
2088  cType = TypeHTT;
2089  } else if (condEnergySum.getType() == esConditionType::MissingHt) {
2090  energySumObjType = GlobalObject::gtHTM;
2091  cType = TypeHTM;
2092  } else if (condEnergySum.getType() == esConditionType::MissingEtHF) {
2093  energySumObjType = GlobalObject::gtETMHF;
2094  cType = TypeETMHF;
2095  } else if (condEnergySum.getType() == esConditionType::TowerCount) {
2096  energySumObjType = GlobalObject::gtTowerCount;
2097  cType = TypeTowerCount;
2098  } else if (condEnergySum.getType() == esConditionType::MinBiasHFP0) {
2099  energySumObjType = GlobalObject::gtMinBiasHFP0;
2100  cType = TypeMinBiasHFP0;
2101  } else if (condEnergySum.getType() == esConditionType::MinBiasHFM0) {
2102  energySumObjType = GlobalObject::gtMinBiasHFM0;
2103  cType = TypeMinBiasHFM0;
2104  } else if (condEnergySum.getType() == esConditionType::MinBiasHFP1) {
2105  energySumObjType = GlobalObject::gtMinBiasHFP1;
2106  cType = TypeMinBiasHFP1;
2107  } else if (condEnergySum.getType() == esConditionType::MinBiasHFM1) {
2108  energySumObjType = GlobalObject::gtMinBiasHFM1;
2109  cType = TypeMinBiasHFM1;
2110  } else if (condEnergySum.getType() == esConditionType::AsymmetryEt) {
2111  energySumObjType = GlobalObject::gtAsymmetryEt;
2112  cType = TypeAsymEt;
2113  } else if (condEnergySum.getType() == esConditionType::AsymmetryHt) {
2114  energySumObjType = GlobalObject::gtAsymmetryHt;
2115  cType = TypeAsymHt;
2116  } else if (condEnergySum.getType() == esConditionType::AsymmetryEtHF) {
2117  energySumObjType = GlobalObject::gtAsymmetryEtHF;
2118  cType = TypeAsymEtHF;
2119  } else if (condEnergySum.getType() == esConditionType::AsymmetryHtHF) {
2120  energySumObjType = GlobalObject::gtAsymmetryHtHF;
2121  cType = TypeAsymHtHF;
2122  } else if (condEnergySum.getType() == esConditionType::Centrality0) {
2123  energySumObjType = GlobalObject::gtCentrality0;
2124  cType = TypeCent0;
2125  } else if (condEnergySum.getType() == esConditionType::Centrality1) {
2126  energySumObjType = GlobalObject::gtCentrality1;
2127  cType = TypeCent1;
2128  } else if (condEnergySum.getType() == esConditionType::Centrality2) {
2129  energySumObjType = GlobalObject::gtCentrality2;
2130  cType = TypeCent2;
2131  } else if (condEnergySum.getType() == esConditionType::Centrality3) {
2132  energySumObjType = GlobalObject::gtCentrality3;
2133  cType = TypeCent3;
2134  } else if (condEnergySum.getType() == esConditionType::Centrality4) {
2135  energySumObjType = GlobalObject::gtCentrality4;
2136  cType = TypeCent4;
2137  } else if (condEnergySum.getType() == esConditionType::Centrality5) {
2138  energySumObjType = GlobalObject::gtCentrality5;
2139  cType = TypeCent5;
2140  } else if (condEnergySum.getType() == esConditionType::Centrality6) {
2141  energySumObjType = GlobalObject::gtCentrality6;
2142  cType = TypeCent6;
2143  } else if (condEnergySum.getType() == esConditionType::Centrality7) {
2144  energySumObjType = GlobalObject::gtCentrality7;
2145  cType = TypeCent7;
2146  } else {
2147  edm::LogError("TriggerMenuParser") << "Wrong type for energy-sum condition (" << type << ")" << std::endl;
2148  return false;
2149  }
2150 
2151  // global object
2152  int nrObj = 1;
2153 
2154  // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2155 
2156  // get values
2157 
2158  // temporary storage of the parameters
2159  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2160 
2161  int cnt = 0;
2162 
2163  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2164  int relativeBx = 0;
2165  bool gEq = false;
2166 
2167  // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2168 
2169  // Loop over objects and extract the cuts on the objects
2170  const std::vector<esObject>& objects = condEnergySum.getObjects();
2171  for (size_t jj = 0; jj < objects.size(); jj++) {
2172  const esObject object = objects.at(jj);
2173  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
2174 
2175  // BLW TO DO: This needs to be added to the Object Parameters
2176  relativeBx = object.getBxOffset();
2177 
2178  // Loop over the cuts for this object
2179  int lowerThresholdInd = 0;
2180  int upperThresholdInd = -1;
2181  int cntPhi = 0;
2182  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2183 
2184  const std::vector<esCut>& cuts = object.getCuts();
2185  for (size_t kk = 0; kk < cuts.size(); kk++) {
2186  const esCut cut = cuts.at(kk);
2187 
2188  switch (cut.getCutType()) {
2189  case esCutType::Threshold:
2190  lowerThresholdInd = cut.getMinimum().index;
2191  upperThresholdInd = cut.getMaximum().index;
2192  break;
2193 
2194  case esCutType::Eta:
2195  break;
2196 
2197  case esCutType::Phi: {
2198  if (cntPhi == 0) {
2199  phiWindow1Lower = cut.getMinimum().index;
2200  phiWindow1Upper = cut.getMaximum().index;
2201  } else if (cntPhi == 1) {
2202  phiWindow2Lower = cut.getMinimum().index;
2203  phiWindow2Upper = cut.getMaximum().index;
2204  } else {
2205  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition (" << type << ")" << std::endl;
2206  return false;
2207  }
2208  cntPhi++;
2209 
2210  } break;
2211 
2212  case esCutType::Count:
2213  lowerThresholdInd = cut.getMinimum().index;
2214  upperThresholdInd = 0xffffff;
2215  break;
2216 
2217  default:
2218  break;
2219  } //end switch
2220 
2221  } //end loop over cuts
2222 
2223  // Fill the object parameters
2224  objParameter[cnt].etLowThreshold = lowerThresholdInd;
2225  objParameter[cnt].etHighThreshold = upperThresholdInd;
2226  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
2227  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
2228  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
2229  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
2230 
2231  // Output for debugging
2232  LogDebug("TriggerMenuParser") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2233  << std::hex << objParameter[cnt].etLowThreshold << " - "
2234  << objParameter[cnt].etHighThreshold
2235  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2236  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
2237  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2238  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
2239  << std::dec << std::endl;
2240 
2241  cnt++;
2242  } //end loop over objects
2243 
2244  // object types - all same energySumObjType
2245  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2246 
2247  // now create a new energySum condition
2248 
2249  EnergySumTemplate energySumCond(name);
2250 
2251  energySumCond.setCondType(cType);
2252  energySumCond.setObjectType(objType);
2253  energySumCond.setCondGEq(gEq);
2254  energySumCond.setCondChipNr(chipNr);
2255  energySumCond.setCondRelativeBx(relativeBx);
2256 
2257  energySumCond.setConditionParameter(objParameter);
2258 
2259  if (edm::isDebugEnabled()) {
2260  std::ostringstream myCoutStream;
2261  energySumCond.print(myCoutStream);
2262  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2263  }
2264 
2265  // insert condition into the map
2266  if (!insertConditionIntoMap(energySumCond, chipNr)) {
2267  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2268 
2269  return false;
2270  } else {
2271  if (corrFlag) {
2272  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2273 
2274  } else {
2275  (m_vecEnergySumTemplate[chipNr]).push_back(energySumCond);
2276  }
2277  }
2278 
2279  //
2280  return true;
2281 }
bool isDebugEnabled()
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
#define LogDebug(id)
bool TriggerMenuParser::parseEnergySumCorr ( const tmeventsetup::esObject *  corrESum,
unsigned int  chipNr = 0 
)
private

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

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

Definition at line 2294 of file TriggerMenuParser.cc.

References GOODCOLL_filter_cfg::cut, cuts, TauDecayModes::dec, ETM, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtTowerCount, HTM, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, EnergySumTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, l1t::TypeETM, l1t::TypeETMHF, l1t::TypeHTM, and l1t::TypeTowerCount.

2294  {
2295  // XERCES_CPP_NAMESPACE_USE
2296  using namespace tmeventsetup;
2297 
2298  // get condition, particle name and type name
2299 
2300  std::string condition = "calo";
2301  std::string type = l1t2string(corrESum->getType());
2302  std::string name = l1t2string(corrESum->getName());
2303 
2304  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2305  << "\n (in parseEnergySum) "
2306  << "\n condition = " << condition << "\n type = " << type
2307  << "\n name = " << name << std::endl;
2308 
2309  // determine object type type
2310  GlobalObject energySumObjType;
2311  GtConditionType cType;
2312 
2313  if (corrESum->getType() == esObjectType::ETM) {
2314  energySumObjType = GlobalObject::gtETM;
2315  cType = TypeETM;
2316  } else if (corrESum->getType() == esObjectType::HTM) {
2317  energySumObjType = GlobalObject::gtHTM;
2318  cType = TypeHTM;
2319  } else if (corrESum->getType() == esObjectType::ETMHF) {
2320  energySumObjType = GlobalObject::gtETMHF;
2321  cType = TypeETMHF;
2322  } else if (corrESum->getType() == esObjectType::TOWERCOUNT) {
2323  energySumObjType = GlobalObject::gtTowerCount;
2324  cType = TypeTowerCount;
2325  } else {
2326  edm::LogError("TriggerMenuParser") << "Wrong type for energy-sum correclation condition (" << type << ")"
2327  << std::endl;
2328  return false;
2329  }
2330 
2331  // global object
2332  int nrObj = 1;
2333 
2334  // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2335 
2336  // get values
2337 
2338  // temporary storage of the parameters
2339  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2340 
2341  int cnt = 0;
2342 
2343  // BLW TO DO: These needs to the added to the object rather than the whole condition.
2344  int relativeBx = 0;
2345  bool gEq = false;
2346 
2347  // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2348 
2349  gEq = (corrESum->getComparisonOperator() == esComparisonOperator::GE);
2350 
2351  // BLW TO DO: This needs to be added to the Object Parameters
2352  relativeBx = corrESum->getBxOffset();
2353 
2354  // Loop over the cuts for this object
2355  int lowerThresholdInd = 0;
2356  int upperThresholdInd = -1;
2357  int cntPhi = 0;
2358  unsigned int phiWindow1Lower = -1, phiWindow1Upper = -1, phiWindow2Lower = -1, phiWindow2Upper = -1;
2359 
2360  const std::vector<esCut>& cuts = corrESum->getCuts();
2361  for (size_t kk = 0; kk < cuts.size(); kk++) {
2362  const esCut cut = cuts.at(kk);
2363 
2364  switch (cut.getCutType()) {
2365  case esCutType::Threshold:
2366  lowerThresholdInd = cut.getMinimum().index;
2367  upperThresholdInd = cut.getMaximum().index;
2368  break;
2369 
2370  case esCutType::Eta:
2371  break;
2372 
2373  case esCutType::Phi: {
2374  if (cntPhi == 0) {
2375  phiWindow1Lower = cut.getMinimum().index;
2376  phiWindow1Upper = cut.getMaximum().index;
2377  } else if (cntPhi == 1) {
2378  phiWindow2Lower = cut.getMinimum().index;
2379  phiWindow2Upper = cut.getMaximum().index;
2380  } else {
2381  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition (" << type << ")" << std::endl;
2382  return false;
2383  }
2384  cntPhi++;
2385 
2386  } break;
2387 
2388  default:
2389  break;
2390  } //end switch
2391 
2392  } //end loop over cuts
2393 
2394  // Fill the object parameters
2395  objParameter[0].etLowThreshold = lowerThresholdInd;
2396  objParameter[0].etHighThreshold = upperThresholdInd;
2397  objParameter[0].phiWindow1Lower = phiWindow1Lower;
2398  objParameter[0].phiWindow1Upper = phiWindow1Upper;
2399  objParameter[0].phiWindow2Lower = phiWindow2Lower;
2400  objParameter[0].phiWindow2Upper = phiWindow2Upper;
2401 
2402  // Output for debugging
2403  LogDebug("TriggerMenuParser") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2404  << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etLowThreshold
2405  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2406  << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
2407  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2408  << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper
2409  << std::dec << std::endl;
2410 
2411  // object types - all same energySumObjType
2412  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2413 
2414  // now create a new energySum condition
2415 
2416  EnergySumTemplate energySumCond(name);
2417 
2418  energySumCond.setCondType(cType);
2419  energySumCond.setObjectType(objType);
2420  energySumCond.setCondGEq(gEq);
2421  energySumCond.setCondChipNr(chipNr);
2422  energySumCond.setCondRelativeBx(relativeBx);
2423 
2424  energySumCond.setConditionParameter(objParameter);
2425 
2426  if (edm::isDebugEnabled()) {
2427  std::ostringstream myCoutStream;
2428  energySumCond.print(myCoutStream);
2429  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2430  }
2431  /*
2432  // insert condition into the map
2433  if ( !insertConditionIntoMap(energySumCond, chipNr)) {
2434 
2435  edm::LogError("TriggerMenuParser")
2436  << " Error: duplicate condition (" << name << ")"
2437  << std::endl;
2438 
2439  return false;
2440  }
2441  else {
2442 
2443  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2444 
2445  }
2446 */
2447  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2448 
2449  //
2450  return true;
2451 }
bool isDebugEnabled()
Definition: L1GtObject.h:38
Definition: L1GtObject.h:35
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
Log< level::Error, false > LogError
#define LogTrace(id)
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
#define LogDebug(id)
bool TriggerMenuParser::parseExternal ( tmeventsetup::esCondition  condExt,
unsigned int  chipNr = 0 
)
private

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

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

Definition at line 2465 of file TriggerMenuParser.cc.

References submitPVResolutionJobs::EXT, l1t::gtExternal, findQualityFiles::jj, LogDebug, LogTrace, mergeVDriftHistosByStation::name, hgcalPerformanceValidation::objects, GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), ExternalTemplate::setExternalChannel(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::TypeExternal.

2465  {
2466  using namespace tmeventsetup;
2467 
2468  // get condition, particle name and type name
2469  std::string condition = "ext";
2470  std::string particle = "test-fix";
2471  std::string type = l1t2string(condExt.getType());
2472  std::string name = l1t2string(condExt.getName());
2473 
2474  LogDebug("TriggerMenuParser") << "\n ****************************************** "
2475  << "\n (in parseExternal) "
2476  << "\n condition = " << condition << "\n particle = " << particle
2477  << "\n type = " << type << "\n name = " << name << std::endl;
2478 
2479  // object type and condition type
2480  // object type - irrelevant for External conditions
2481  GtConditionType cType = TypeExternal;
2482  GlobalObject extSignalType = GlobalObject::gtExternal;
2483  int nrObj = 1; //only one object for these conditions
2484 
2485  int relativeBx = 0;
2486  unsigned int channelID = 0;
2487 
2488  // Get object for External conditions
2489  const std::vector<esObject>& objects = condExt.getObjects();
2490  for (size_t jj = 0; jj < objects.size(); jj++) {
2491  const esObject object = objects.at(jj);
2492  if (object.getType() == esObjectType::EXT) {
2493  relativeBx = object.getBxOffset();
2494  channelID = object.getExternalChannelId();
2495  }
2496  }
2497 
2498  // set the boolean value for the ge_eq mode - irrelevant for External conditions
2499  bool gEq = false;
2500 
2501  //object types - all same for external conditions
2502  std::vector<GlobalObject> objType(nrObj, extSignalType);
2503 
2504  // now create a new External condition
2505  ExternalTemplate externalCond(name);
2506 
2507  externalCond.setCondType(cType);
2508  externalCond.setObjectType(objType);
2509  externalCond.setCondGEq(gEq);
2510  externalCond.setCondChipNr(chipNr);
2511  externalCond.setCondRelativeBx(relativeBx);
2512  externalCond.setExternalChannel(channelID);
2513 
2514  LogTrace("TriggerMenuParser") << externalCond << "\n" << std::endl;
2515 
2516  // insert condition into the map
2517  if (!insertConditionIntoMap(externalCond, chipNr)) {
2518  edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
2519 
2520  return false;
2521  } else {
2522  (m_vecExternalTemplate[chipNr]).push_back(externalCond);
2523  }
2524 
2525  return true;
2526 }
Log< level::Error, false > LogError
#define LogTrace(id)
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
#define LogDebug(id)
bool TriggerMenuParser::parseMuon ( tmeventsetup::esCondition  condMu,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse a muon condition

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

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

Definition at line 1026 of file TriggerMenuParser.cc.

References RecoTauCleanerPlugins::charge, PixelTestBeamValidation_cfi::Charge, GOODCOLL_filter_cfg::cut, cuts, HLT_FULL_cff::DoubleMuon, l1t::gtMu, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, hgcalPerformanceValidation::objects, colinearityKinematic::Phi, MuonTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), HLT_FULL_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

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

Definition at line 1293 of file TriggerMenuParser.cc.

References RecoTauCleanerPlugins::charge, PixelTestBeamValidation_cfi::Charge, GOODCOLL_filter_cfg::cut, cuts, l1t::gtMu, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, MuonTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::Type1s.

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

References mps_check::array, reco::ceil(), l1t::COS, cuy::ii, dqmiodumpmetadata::n, getGTfromDQMFile::obj, funct::pow(), sistrip::SpyUtilities::range(), pileupReCalc_HLTpaths::scale, l1t::SIN, and AlCaHLTBitMon_QueryRunRegistry::string.

977  {
978  using namespace tmeventsetup;
979 
980  std::string scLabel = obj;
981  scLabel += "-PHI";
982 
983  //This LUT does not exist in L1 Menu file, don't fill it
984  if (scaleMap.find(scLabel) == scaleMap.end())
985  return;
986  if (func != l1t::SIN and func != l1t::COS)
987  return;
988 
989  const esScale* scale = &scaleMap.find(scLabel)->second;
990 
991  const double step = scale->getStep();
992  const double range = scale->getMaximum() - scale->getMinimum();
993  const size_t n = std::ceil(range / step);
994  const size_t bitwidth = std::ceil(std::log10(n) / std::log10(2));
995 
996  std::vector<double> array(std::pow(2, bitwidth), 0);
997 
998  for (size_t ii = 0; ii < n; ii++) {
999  array.at(ii) = step * ii;
1000  }
1001 
1002  const std::string& lutName = obj;
1003  std::vector<long long> lut;
1004  if (func == l1t::SIN) {
1005  applySin(array, n);
1006  setLut(lut, array, prec);
1007  m_gtScales.setLUT_Sin(lutName, lut, prec);
1008  } else if (func == l1t::COS) {
1009  applyCos(array, n);
1010  setLut(lut, array, prec);
1011  m_gtScales.setLUT_Cos(lutName, lut, prec);
1012  }
1013 }
constexpr int32_t ceil(float num)
tuple array
Definition: mps_check.py:216
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
int ii
Definition: cuy.py:589
const uint16_t range(const Frame &aFrame)
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
step
Definition: StallMonitor.cc:94
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
void TriggerMenuParser::parsePt_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  lutpfx,
std::string  obj1,
unsigned int  prec 
)
private

Definition at line 859 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

862  {
863  using namespace tmeventsetup;
864 
865  // First Delta Eta for this set
866  std::string scLabel1 = obj1;
867  scLabel1 += "-ET";
868 
869  //This LUT does not exist in L1 Menu file, don't fill it
870  if (scaleMap.find(scLabel1) == scaleMap.end())
871  return;
872 
873  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
874 
875  std::vector<long long> lut_pt;
876  getLut(lut_pt, scale1, prec);
877 
878  m_gtScales.setLUT_Pt(lutpfx + "_" + scLabel1, lut_pt, prec);
879 }
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:87
bool TriggerMenuParser::parseScales ( std::map< std::string, tmeventsetup::esScale >  scaleMap)
private

parse scales

parseScales Parse Et, Eta, and Phi Scales

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

Definition at line 531 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, configurableAnalysis::Jet, dumpRecoGeometry_cfg::Muon, l1t::GlobalScales::ScaleParameters::phiBins, l1t::GlobalScales::ScaleParameters::phiMax, l1t::GlobalScales::ScaleParameters::phiMin, l1t::GlobalScales::ScaleParameters::phiStep, funct::pow(), pileupReCalc_HLTpaths::scale, l1t::SIN, HLT_FULL_cff::Tau, l1t::GlobalScales::ScaleParameters::uptBins, l1t::GlobalScales::ScaleParameters::uptMax, l1t::GlobalScales::ScaleParameters::uptMin, and l1t::GlobalScales::ScaleParameters::uptStep.

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

Definition at line 882 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

885  {
886  using namespace tmeventsetup;
887 
888  // First Delta Eta for this set
889  std::string scLabel1 = obj1;
890  scLabel1 += "-UPT";
891 
892  //This LUT does not exist in L1 Menu file, don't fill it
893  if (scaleMap.find(scLabel1) == scaleMap.end())
894  return;
895 
896  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
897 
898  std::vector<long long> lut_pt;
899  getLut(lut_pt, scale1, prec);
900 
901  m_gtScales.setLUT_Upt(lutpfx + "_" + scLabel1, lut_pt, prec);
902 }
virtual void setLUT_Upt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
void TriggerMenuParser::setCorCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  corCaloTempl)

Definition at line 149 of file TriggerMenuParser.cc.

149  {
150  m_corCaloTemplate = corCaloTempl;
151 }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
void TriggerMenuParser::setCorEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  corEnergySumTempl)

Definition at line 153 of file TriggerMenuParser.cc.

154  {
155  m_corEnergySumTemplate = corEnergySumTempl;
156 }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
void TriggerMenuParser::setCorMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  corMuonTempl)

Definition at line 145 of file TriggerMenuParser.cc.

145  {
146  m_corMuonTemplate = corMuonTempl;
147 }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
void TriggerMenuParser::setGtAlgorithmAliasMap ( const AlgorithmMap algoMap)

Definition at line 162 of file TriggerMenuParser.cc.

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

Definition at line 159 of file TriggerMenuParser.cc.

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

Definition at line 90 of file TriggerMenuParser.cc.

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

Definition at line 69 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

69  {
70  m_numberConditionChips = numberConditionChipsValue;
71 }
unsigned int m_numberConditionChips
hardware limits
void TriggerMenuParser::setGtNumberPhysTriggers ( const unsigned int &  numberPhysTriggersValue)

Definition at line 85 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 80 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

80  {
81  m_orderConditionChip = orderConditionChipValue;
82 }
std::vector< int > m_orderConditionChip
void TriggerMenuParser::setGtPinsOnConditionChip ( const unsigned int &  pinsOnConditionChipValue)

Definition at line 74 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 107 of file TriggerMenuParser.cc.

107 { m_scaleDbKey = scaleKey; }
std::string m_scaleDbKey
menu associated scale key
void TriggerMenuParser::setGtTriggerMenuAuthor ( const std::string &  val)
void TriggerMenuParser::setGtTriggerMenuDate ( const std::string &  val)
void TriggerMenuParser::setGtTriggerMenuDescription ( const std::string &  val)
void TriggerMenuParser::setGtTriggerMenuImplementation ( const unsigned long &  menuImplementation)

Definition at line 102 of file TriggerMenuParser.cc.

102  {
103  m_triggerMenuImplementation = menuImplementation;
104 }
unsigned long m_triggerMenuImplementation
void TriggerMenuParser::setGtTriggerMenuInterface ( const std::string &  menuInterface)

Definition at line 93 of file TriggerMenuParser.cc.

93  {
94  m_triggerMenuInterface = menuInterface;
95 }
std::string m_triggerMenuInterface
menu names
void TriggerMenuParser::setGtTriggerMenuInterfaceAuthor ( const std::string &  val)
void TriggerMenuParser::setGtTriggerMenuInterfaceDate ( const std::string &  val)

Definition at line 369 of file TriggerMenuParser.cc.

References hgcalPerformanceValidation::val.

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

Definition at line 100 of file TriggerMenuParser.cc.

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

Definition at line 98 of file TriggerMenuParser.cc.

References createPayload::uuid.

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

Definition at line 114 of file TriggerMenuParser.cc.

114  {
115  m_vecCaloTemplate = vecCaloTempl;
116 }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
void TriggerMenuParser::setVecCorrelationTemplate ( const std::vector< std::vector< CorrelationTemplate > > &  vecCorrelationTempl)

Definition at line 128 of file TriggerMenuParser.cc.

129  {
130  m_vecCorrelationTemplate = vecCorrelationTempl;
131 }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
void TriggerMenuParser::setVecCorrelationThreeBodyTemplate ( const std::vector< std::vector< CorrelationThreeBodyTemplate > > &  vecCorrelationThreeBodyTempl)

Definition at line 133 of file TriggerMenuParser.cc.

134  {
135  m_vecCorrelationThreeBodyTemplate = vecCorrelationThreeBodyTempl;
136 }
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate
void TriggerMenuParser::setVecCorrelationWithOverlapRemovalTemplate ( const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &  vecCorrelationWithOverlapRemovalTempl)

Definition at line 138 of file TriggerMenuParser.cc.

139  {
140  m_vecCorrelationWithOverlapRemovalTemplate = vecCorrelationWithOverlapRemovalTempl;
141 }
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
void TriggerMenuParser::setVecEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  vecEnergySumTempl)

Definition at line 118 of file TriggerMenuParser.cc.

119  {
120  m_vecEnergySumTemplate = vecEnergySumTempl;
121 }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
void TriggerMenuParser::setVecExternalTemplate ( const std::vector< std::vector< ExternalTemplate > > &  vecExternalTempl)

Definition at line 123 of file TriggerMenuParser.cc.

124  {
125  m_vecExternalTemplate = vecExternalTempl;
126 }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
void TriggerMenuParser::setVecMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  vecMuonTempl)

Definition at line 110 of file TriggerMenuParser.cc.

110  {
111  m_vecMuonTemplate = vecMuonTempl;
112 }
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::vecCaloTemplate ( ) const
inline

Definition at line 128 of file TriggerMenuParser.h.

References m_vecCaloTemplate.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 147 of file TriggerMenuParser.h.

References m_vecCorrelationTemplate.

Referenced by L1TGlobalProducer::produce().

147  {
149  }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
const std::vector<std::vector<CorrelationThreeBodyTemplate> >& l1t::TriggerMenuParser::vecCorrelationThreeBodyTemplate ( ) const
inline

Definition at line 154 of file TriggerMenuParser.h.

References m_vecCorrelationThreeBodyTemplate.

Referenced by L1TGlobalProducer::produce().

154  {
156  }
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate
const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& l1t::TriggerMenuParser::vecCorrelationWithOverlapRemovalTemplate ( ) const
inline

Definition at line 162 of file TriggerMenuParser.h.

References m_vecCorrelationWithOverlapRemovalTemplate.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 133 of file TriggerMenuParser.h.

References m_vecEnergySumTemplate.

Referenced by L1TGlobalProducer::produce().

133  {
134  return m_vecEnergySumTemplate;
135  }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
const std::vector<std::vector<ExternalTemplate> >& l1t::TriggerMenuParser::vecExternalTemplate ( ) const
inline

Definition at line 140 of file TriggerMenuParser.h.

References m_vecExternalTemplate.

Referenced by L1TGlobalProducer::produce().

140  {
141  return m_vecExternalTemplate;
142  }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::vecMuonTemplate ( ) const
inline

get / set the vectors containing the conditions

Definition at line 124 of file TriggerMenuParser.h.

References m_vecMuonTemplate.

Referenced by L1TGlobalProducer::produce().

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

Member Data Documentation

AlgorithmMap l1t::TriggerMenuParser::m_algorithmAliasMap
private

map containing the physics algorithms (by alias)

Definition at line 401 of file TriggerMenuParser.h.

Referenced by gtAlgorithmAliasMap().

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

Definition at line 367 of file TriggerMenuParser.h.

Referenced by gtAlgorithmImplementation().

AlgorithmMap l1t::TriggerMenuParser::m_algorithmMap
private

map containing the physics algorithms (by name)

Definition at line 398 of file TriggerMenuParser.h.

Referenced by gtAlgorithmMap().

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

map containing the conditions (per condition chip) - transient

Definition at line 371 of file TriggerMenuParser.h.

Referenced by gtConditionMap().

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

Definition at line 394 of file TriggerMenuParser.h.

Referenced by corCaloTemplate().

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

Definition at line 395 of file TriggerMenuParser.h.

Referenced by corEnergySumTemplate().

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

Definition at line 393 of file TriggerMenuParser.h.

Referenced by corMuonTemplate().

GlobalScales l1t::TriggerMenuParser::m_gtScales
private

Definition at line 404 of file TriggerMenuParser.h.

Referenced by gtScales().

unsigned int l1t::TriggerMenuParser::m_numberConditionChips
private

hardware limits

number of condition chips

Definition at line 343 of file TriggerMenuParser.h.

Referenced by gtNumberConditionChips().

unsigned int l1t::TriggerMenuParser::m_numberPhysTriggers
private

number of physics trigger algorithms

Definition at line 353 of file TriggerMenuParser.h.

Referenced by gtNumberPhysTriggers().

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

Referenced by gtOrderConditionChip().

unsigned int l1t::TriggerMenuParser::m_pinsOnConditionChip
private

number of pins on the GTL condition chips

Definition at line 346 of file TriggerMenuParser.h.

Referenced by gtPinsOnConditionChip().

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

menu associated scale key

Definition at line 381 of file TriggerMenuParser.h.

Referenced by gtScaleDbKey().

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

Definition at line 364 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuAuthor().

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

Definition at line 363 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDate().

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

Definition at line 365 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDescription().

unsigned long l1t::TriggerMenuParser::m_triggerMenuImplementation
private

Definition at line 377 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuImplementation().

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

menu names

Definition at line 375 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterface().

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

Definition at line 360 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceAuthor().

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

number of technical triggers

Definition at line 359 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDate().

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

Definition at line 361 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDescription().

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

Definition at line 376 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuName().

unsigned long l1t::TriggerMenuParser::m_triggerMenuUUID
private

Definition at line 378 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuUUID().

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

Definition at line 386 of file TriggerMenuParser.h.

Referenced by vecCaloTemplate().

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

Definition at line 390 of file TriggerMenuParser.h.

Referenced by vecCorrelationTemplate().

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

Definition at line 391 of file TriggerMenuParser.h.

Referenced by vecCorrelationThreeBodyTemplate().

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

Definition at line 392 of file TriggerMenuParser.h.

Referenced by vecCorrelationWithOverlapRemovalTemplate().

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

Definition at line 387 of file TriggerMenuParser.h.

Referenced by vecEnergySumTemplate().

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

Definition at line 388 of file TriggerMenuParser.h.

Referenced by vecExternalTemplate().

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

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

Definition at line 385 of file TriggerMenuParser.h.

Referenced by vecMuonTemplate().