CMS 3D CMS Logo

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

#include <TriggerMenuParser.h>

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 58 of file TriggerMenuParser.h.

Constructor & Destructor Documentation

TriggerMenuParser::TriggerMenuParser ( )

constructor empty

Definition at line 52 of file TriggerMenuParser.cc.

52  :
53  m_triggerMenuInterface("NULL"),
55 
56 {
57 
58  // menu names, scale key initialized to NULL due to ORACLE treatment of strings
59 
60  // empty
61 
62 }
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 65 of file TriggerMenuParser.cc.

References clearMaps().

65  {
66 
67  clearMaps();
68 
69 }

Member Function Documentation

void TriggerMenuParser::clearMaps ( )
private

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

Definition at line 485 of file TriggerMenuParser.cc.

References m_algorithmMap, and m_conditionMap.

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

485  {
486 
487  // loop over condition maps (one map per condition chip)
488  // then loop over conditions in the map
489  for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip
490  != m_conditionMap.end(); itCondOnChip++) {
491 
492  // the conditions in the maps are deleted in L1uGtTriggerMenu, not here
493 
494  itCondOnChip->clear();
495 
496  }
497 
498  // the algorithms in the maps are deleted in L1uGtTriggerMenu, not here
499  m_algorithmMap.clear();
500 
501 }
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 206 of file TriggerMenuParser.h.

References m_corCaloTemplate, and setCorCaloTemplate().

Referenced by L1TGlobalProducer::produce().

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

Definition at line 213 of file TriggerMenuParser.h.

References m_corEnergySumTemplate, and setCorEnergySumTemplate().

Referenced by L1TGlobalProducer::produce().

213  {
214 
215  return m_corEnergySumTemplate;
216  }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::corMuonTemplate ( ) const
inline

Definition at line 199 of file TriggerMenuParser.h.

References m_corMuonTemplate, and setCorMuonTemplate().

Referenced by L1TGlobalProducer::produce().

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

Definition at line 207 of file TriggerMenuParser.cc.

References findQualityFiles::jj, dataset::name, and AlCaHLTBitMon_QueryRunRegistry::string.

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

207  {
208 
209  using namespace tmeventsetup;
210  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*> (utmMenu);
211  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
212 
213  std::map<std::string, unsigned int> extBitMap;
214 
215  //loop over the algorithms
216  for (std::map<std::string, esCondition>::const_iterator cit = condMap.begin();
217  cit != condMap.end(); cit++)
218  {
219  const esCondition& condition = cit->second;
220  if(condition.getType() == esConditionType::Externals ) {
221 
222  // Get object for External conditions
223  const std::vector<esObject>& objects = condition.getObjects();
224  for (size_t jj = 0; jj < objects.size(); jj++) {
225 
226  const esObject object = objects.at(jj);
227  if(object.getType() == esObjectType::EXT) {
228 
229  unsigned int channelID = object.getExternalChannelId();
230  std::string name = object.getExternalSignalName();
231 
232  if (extBitMap.count(name) == 0) extBitMap.insert(std::map<std::string, unsigned int>::value_type(name,channelID));
233  }
234  }
235 
236  }
237 
238  }
239 /*
240  for (std::map<std::string, unsigned int>::const_iterator cit = extBitMap.begin();
241  cit != extBitMap.end(); cit++) {
242  std::cout << " Ext Map: Name " << cit->first << " Bit " << cit->second << std::endl;
243  }
244 */
245  return extBitMap;
246 
247 }
const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmAliasMap ( ) const
inline

get / set the algorithm map (by alias)

Definition at line 229 of file TriggerMenuParser.h.

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

Referenced by L1TGlobalProducer::produce().

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

get / set the algorithm map (by name)

Definition at line 222 of file TriggerMenuParser.h.

References m_algorithmMap, and setGtAlgorithmMap().

Referenced by L1TGlobalProducer::produce().

222  {
223  return m_algorithmMap;
224  }
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 108 of file TriggerMenuParser.h.

References m_conditionMap, and setGtConditionMap().

108  {
109  return m_conditionMap;
110  }
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 75 of file TriggerMenuParser.h.

References m_numberConditionChips, and setGtNumberConditionChips().

75  {
77  }
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 97 of file TriggerMenuParser.h.

References m_numberPhysTriggers, and setGtNumberPhysTriggers().

97  {
98  return m_numberPhysTriggers;
99  }
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 90 of file TriggerMenuParser.h.

References m_orderConditionChip, and setGtOrderConditionChip().

90  {
91  return m_orderConditionChip;
92  }
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 82 of file TriggerMenuParser.h.

References m_pinsOnConditionChip, and setGtPinsOnConditionChip().

82  {
83  return m_pinsOnConditionChip;
84  }
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 136 of file TriggerMenuParser.h.

References m_scaleDbKey.

Referenced by L1TGlobalProducer::produce().

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

menu associated scales

Definition at line 141 of file TriggerMenuParser.h.

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

Referenced by L1TGlobalProducer::produce().

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

Definition at line 279 of file TriggerMenuParser.h.

References m_triggerMenuAuthor, setGtTriggerMenuAuthor(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

Definition at line 273 of file TriggerMenuParser.h.

References m_triggerMenuDate, setGtTriggerMenuDate(), and AlCaHLTBitMon_QueryRunRegistry::string.

273  {
274  return m_triggerMenuDate;
275  }
const std::string& l1t::TriggerMenuParser::gtTriggerMenuDescription ( ) const
inline
const unsigned long l1t::TriggerMenuParser::gtTriggerMenuImplementation ( ) const
inline

Definition at line 129 of file TriggerMenuParser.h.

References m_triggerMenuImplementation, and setGtTriggerMenuImplementation().

Referenced by L1TGlobalProducer::produce().

129  {
131  }
unsigned long m_triggerMenuImplementation
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterface ( ) const
inline

get / set the trigger menu names

Definition at line 115 of file TriggerMenuParser.h.

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

Referenced by L1TGlobalProducer::produce().

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

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

Definition at line 247 of file TriggerMenuParser.h.

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

247  {
249  }
std::string m_triggerMenuInterfaceDate
number of technical triggers
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDescription ( ) const
inline
const std::string& l1t::TriggerMenuParser::gtTriggerMenuName ( ) const
inline

Definition at line 122 of file TriggerMenuParser.h.

References m_triggerMenuName, setGtTriggerMenuName(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by L1TGlobalProducer::produce().

122  {
123  return m_triggerMenuName;
124  }
const int l1t::TriggerMenuParser::gtTriggerMenuUUID ( ) const
inline

Definition at line 267 of file TriggerMenuParser.h.

References m_triggerMenuUUID, and setGtTriggerMenuUUID().

Referenced by L1TGlobalProducer::produce().

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

insert an algorithm into algorithm map

Definition at line 530 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseAlgorithm().

530  {
531 
532  std::string algName = alg.algoName();
533  const std::string& algAlias = alg.algoAlias();
534  //LogTrace("TriggerMenuParser")
535  //<< " Trying to insert algorithm \"" << algName << "\" in the algorithm map." ;
536 
537  // no algorithm name has to appear twice!
538  if (m_algorithmMap.count(algName) != 0) {
539  LogTrace("TriggerMenuParser") << " Algorithm \"" << algName
540  << "\"already exists in the algorithm map- not inserted!" << std::endl;
541  return false;
542  }
543 
544  if (m_algorithmAliasMap.count(algAlias) != 0) {
545  LogTrace("TriggerMenuParser") << " Algorithm alias \"" << algAlias
546  << "\"already exists in the algorithm alias map- not inserted!" << std::endl;
547  return false;
548  }
549 
550  // bit number less than zero or greater than maximum number of algorithms
551  int bitNumber = alg.algoBitNumber();
552  if ((bitNumber < 0) || (bitNumber >= static_cast<int>(m_numberPhysTriggers))) {
553  LogTrace("TriggerMenuParser") << " Bit number " << bitNumber
554  << " outside allowed range [0, " << m_numberPhysTriggers
555  << ") - algorithm not inserted!" << std::endl;
556  return false;
557  }
558 
559  // maximum number of algorithms
560  if (m_algorithmMap.size() >= m_numberPhysTriggers) {
561  LogTrace("TriggerMenuParser") << " More than maximum allowed "
562  << m_numberPhysTriggers << " algorithms in the algorithm map - not inserted!"
563  << std::endl;
564  return false;
565  }
566 
567 
568  // chip number outside allowed values
569  int chipNr = alg.algoChipNumber(static_cast<int>(m_numberConditionChips),
570  static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
571 
572  if ((chipNr < 0) || (chipNr > static_cast<int>(m_numberConditionChips))) {
573  LogTrace("TriggerMenuParser") << " Chip number " << chipNr
574  << " outside allowed range [0, " << m_numberConditionChips
575  << ") - algorithm not inserted!" << std::endl;
576  return false;
577  }
578 
579  // output pin outside allowed values
580  int outputPin = alg.algoOutputPin(static_cast<int>(m_numberConditionChips),
581  static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
582 
583  if ((outputPin < 0) || (outputPin > static_cast<int>(m_pinsOnConditionChip))) {
584  LogTrace("TriggerMenuParser") << " Output pin " << outputPin
585  << " outside allowed range [0, " << m_pinsOnConditionChip
586  << "] - algorithm not inserted!" << std::endl;
587  return false;
588  }
589 
590  // no two algorithms on the same chip can have the same output pin
591  for (CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
592 
593  int iPin = (itAlgo->second).algoOutputPin( static_cast<int>(m_numberConditionChips),
594  static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
595  std::string iName = itAlgo->first;
596  int iChip = (itAlgo->second).algoChipNumber(static_cast<int>(m_numberConditionChips),
597  static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
598 
599  if ( (outputPin == iPin) && (chipNr == iChip)) {
600  LogTrace("TriggerMenuParser") << " Output pin " << outputPin
601  << " is the same as for algorithm " << iName
602  << "\n from the same chip number " << chipNr << " - algorithm not inserted!"
603  << std::endl;
604  return false;
605  }
606 
607  }
608 
609  // insert algorithm
610  m_algorithmMap[algName] = alg;
611  m_algorithmAliasMap[algAlias] = alg;
612 
613  //LogTrace("TriggerMenuParser")
614  //<< " OK - algorithm inserted!"
615  //<< std::endl;
616 
617  return true;
618 
619 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
unsigned int m_numberConditionChips
hardware limits
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
int algoBitNumber() const
get / set algorithm bit number
const int algoOutputPin(const int numberConditionChips, const int pinsOnConditionChip, const std::vector< int > &orderConditionChip) const
get the output pin on the condition chip for the algorithm
#define LogTrace(id)
const std::string algoName() const
get / set algorithm name
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
std::vector< int > m_orderConditionChip
std::string const & algoAlias() const
get / set algorithm alias
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
const int algoChipNumber() const
get / set algorithm bit number
bool TriggerMenuParser::insertConditionIntoMap ( GlobalCondition cond,
const int  chipNr 
)
private

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

Definition at line 505 of file TriggerMenuParser.cc.

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

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

505  {
506 
507  std::string cName = cond.condName();
508  LogTrace("TriggerMenuParser")
509  << " Trying to insert condition \"" << cName << "\" in the condition map." << std::endl;
510 
511  // no condition name has to appear twice!
512  if ((m_conditionMap[chipNr]).count(cName) != 0) {
513  LogTrace("TriggerMenuParser")
514  << " Condition " << cName
515  << " already exists - not inserted!" << std::endl;
516  return false;
517  }
518 
519  (m_conditionMap[chipNr])[cName] = &cond;
520  LogTrace("TriggerMenuParser")
521  << " OK - condition inserted!"
522  << std::endl;
523 
524 
525  return true;
526 
527 }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
#define LogTrace(id)
const std::string & condName() const
get / set condition name
template<typename T >
std::string TriggerMenuParser::l1t2string ( T  data)
private

Definition at line 622 of file TriggerMenuParser.cc.

References data.

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

622  {
623  std::stringstream ss;
624  ss << data;
625  return ss.str();
626 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int TriggerMenuParser::l1tstr2int ( const std::string  data)
private

Definition at line 627 of file TriggerMenuParser.cc.

References data, and relativeConstraints::value.

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

627  {
628  std::stringstream ss;
629  ss << data;
630  int value;
631  ss >> value;
632  return value;
633 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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 3431 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

3432  {
3433 
3434 
3435  using namespace tmeventsetup;
3436  //using namespace Algorithm;
3437 
3438 
3439  // get alias
3440  std::string algAlias = algorithm.getName();
3441  const std::string& algName = algorithm.getName();
3442 
3443  if (algAlias.empty()) {
3444  algAlias = algName;
3445  LogDebug("TriggerMenuParser")
3446  << "\n No alias defined for algorithm. Alias set to algorithm name."
3447  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3448  << std::endl;
3449  } else {
3450  //LogDebug("TriggerMenuParser")
3451  LogDebug("TriggerMenuParser") << "\n Alias defined for algorithm."
3452  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
3453  << std::endl;
3454  }
3455 
3456  // get the logical expression
3457  const std::string& logExpression = algorithm.getExpressionInCondition();
3458 
3459  LogDebug("TriggerMenuParser")
3460  << " Logical expression: " << logExpression
3461  << " Chip number: " << chipNr
3462  << std::endl;
3463 
3464  // determine output pin
3465  int outputPin = algorithm.getIndex();
3466 
3467 
3468  //LogTrace("TriggerMenuParser")
3469  LogDebug("TriggerMenuParser") << " Output pin: " << outputPin
3470  << std::endl;
3471 
3472 
3473  // compute the bit number from chip number, output pin and order of the chips
3474  // pin numbering start with 1, bit numbers with 0
3475  int bitNumber = outputPin;// + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1;
3476 
3477  //LogTrace("TriggerMenuParser")
3478  LogDebug("TriggerMenuParser") << " Bit number: " << bitNumber
3479  << std::endl;
3480 
3481  // create a new algorithm and insert it into algorithm map
3482  GlobalAlgorithm alg(algName, logExpression, bitNumber);
3483  alg.setAlgoChipNumber(static_cast<int>(chipNr));
3484  alg.setAlgoAlias(algAlias);
3485 
3486  if (edm::isDebugEnabled() ) {
3487 
3488  std::ostringstream myCoutStream;
3489  alg.print(myCoutStream);
3490  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
3491 
3492  }
3493 
3494  // insert algorithm into the map
3495  if ( !insertAlgorithmIntoMap(alg)) {
3496  return false;
3497  }
3498 
3499  return true;
3500 
3501 }
#define LogDebug(id)
bool isDebugEnabled()
#define LogTrace(id)
bool insertAlgorithmIntoMap(const GlobalAlgorithm &alg)
insert an algorithm into algorithm map
void TriggerMenuParser::parseCalMuEta_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2 
)
private

Definition at line 883 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseScales().

884 {
885 
886  using namespace tmeventsetup;
887 
888  // First Delta Eta for this set
889  std::string scLabel1 = obj1;
890  scLabel1 += "-ETA";
891  std::string scLabel2 = obj2;
892  scLabel2 += "-ETA";
893 
894  //This LUT does not exist in L1 Menu file, don't fill it
895  if( scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end()) return;
896 
897  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
898  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
899 
900  std::vector<long long> lut_cal_2_mu_eta;
901  getCaloMuonEtaConversionLut(lut_cal_2_mu_eta, scale1, scale2);
902 
903  std::string lutName = obj1;
904  lutName += "-";
905  lutName += obj2;
906  m_gtScales.setLUT_CalMuEta(lutName,lut_cal_2_mu_eta);
907 
908 
909 }
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:39
void TriggerMenuParser::parseCalMuPhi_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2 
)
private

Definition at line 911 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseScales().

912 {
913 
914  using namespace tmeventsetup;
915 
916  // First Delta Eta for this set
917  std::string scLabel1 = obj1;
918  scLabel1 += "-PHI";
919  std::string scLabel2 = obj2;
920  scLabel2 += "-PHI";
921 
922  //This LUT does not exist in L1 Menu file, don't fill it
923  if( scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end()) return;
924 
925  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
926  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
927 
928 
929  std::vector<long long> lut_cal_2_mu_phi;
930  getCaloMuonPhiConversionLut(lut_cal_2_mu_phi, scale1, scale2);
931 
932  std::string lutName = obj1;
933  lutName += "-";
934  lutName += obj2;
935  m_gtScales.setLUT_CalMuPhi(lutName,lut_cal_2_mu_phi);
936 
937 
938 }
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:55
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 1589 of file TriggerMenuParser.cc.

References TkAlMuonSelectors_cfi::cut, egammaForCoreTracking_cff::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), l1t::gtEG, l1t::gtJet, l1t::gtTau, insertConditionIntoMap(), createfilelist::int, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), l1tstr2int(), LogDebug, LogTrace, m_corCaloTemplate, m_vecCaloTemplate, dataset::name, electrons_cff::objType, colinearityKinematic::Phi, CaloTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, jetExtractorBlock_cff::Threshold, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

1590  {
1591 
1592 
1593 // XERCES_CPP_NAMESPACE_USE
1594  using namespace tmeventsetup;
1595 
1596  // get condition, particle name and type name
1597 
1598  std::string condition = "calo";
1599  std::string particle = "test-fix" ;
1600  std::string type = l1t2string( condCalo.getType() );
1601  std::string name = l1t2string( condCalo.getName() );
1602 
1603  LogDebug("TriggerMenuParser")
1604  << "\n ****************************************** "
1605  << "\n (in parseCalo) "
1606  << "\n condition = " << condition
1607  << "\n particle = " << particle
1608  << "\n type = " << type
1609  << "\n name = " << name
1610  << std::endl;
1611 
1612 
1614 
1615  // determine object type type
1616  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1617  GlobalObject caloObjType;
1618  int nrObj = -1;
1619 
1620  if (condCalo.getType() == esConditionType::SingleEgamma) {
1621  caloObjType = gtEG;
1622  type = "1_s";
1623  cType= l1t::Type1s;
1624  nrObj = 1;
1625  } else if (condCalo.getType() == esConditionType::DoubleEgamma) {
1626  caloObjType = gtEG;
1627  type = "2_s";
1628  cType= l1t::Type2s;
1629  nrObj = 2;
1630  } else if (condCalo.getType() == esConditionType::TripleEgamma) {
1631  caloObjType = gtEG;
1632  cType= l1t::Type3s;
1633  type = "3";
1634  nrObj = 3;
1635  } else if (condCalo.getType() == esConditionType::QuadEgamma) {
1636  caloObjType = gtEG;
1637  cType= l1t::Type4s;
1638  type = "4";
1639  nrObj = 4;
1640  } else if (condCalo.getType() == esConditionType::SingleJet) {
1641  caloObjType = gtJet;
1642  cType= l1t::Type1s;
1643  type = "1_s";
1644  nrObj = 1;
1645  } else if (condCalo.getType() == esConditionType::DoubleJet) {
1646  caloObjType = gtJet;
1647  cType= l1t::Type2s;
1648  type = "2_s";
1649  nrObj = 2;
1650  } else if (condCalo.getType() == esConditionType::TripleJet) {
1651  caloObjType = gtJet;
1652  cType= l1t::Type3s;
1653  type = "3";
1654  nrObj = 3;
1655  } else if (condCalo.getType() == esConditionType::QuadJet) {
1656  caloObjType = gtJet;
1657  cType= l1t::Type4s;
1658  type = "4";
1659  nrObj = 4;
1660  } else if (condCalo.getType() == esConditionType::SingleTau) {
1661  caloObjType = gtTau;
1662  cType= l1t::Type1s;
1663  type = "1_s";
1664  nrObj = 1;
1665  } else if (condCalo.getType() == esConditionType::DoubleTau) {
1666  caloObjType = gtTau;
1667  cType= l1t::Type2s;
1668  type = "2_s";
1669  nrObj = 2;
1670  } else if (condCalo.getType() == esConditionType::TripleTau) {
1671  caloObjType = gtTau;
1672  cType= l1t::Type3s;
1673  type = "3";
1674  nrObj = 3;
1675  } else if (condCalo.getType() == esConditionType::QuadTau) {
1676  caloObjType = gtTau;
1677  cType= l1t::Type4s;
1678  type = "4";
1679  nrObj = 4;
1680  } else {
1681  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition ("
1682  << particle << ")" << std::endl;
1683  return false;
1684  }
1685 
1686 // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1687 
1688  if (nrObj < 0) {
1689  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type
1690  << ")" << "\nCan not determine number of trigger objects. " << std::endl;
1691  return false;
1692  }
1693 
1694  // get values
1695 
1696  // temporary storage of the parameters
1697  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1698 
1699  //BLW TO DO: Can this be dropped?
1700  CaloTemplate::CorrelationParameter corrParameter;
1701 
1702  // need at least one value for deltaPhiRange
1703  std::vector<boost::uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1704  tmpValues.reserve( nrObj );
1705 
1706 
1707  if( int(condCalo.getObjects().size())!=nrObj ){
1708  edm::LogError("TriggerMenuParser") << " condCalo objects: nrObj = " << nrObj
1709  << "condCalo.getObjects().size() = "
1710  << condCalo.getObjects().size()
1711  << std::endl;
1712  return false;
1713  }
1714 
1715 
1716 // std::string str_condCalo = "";
1717 // boost::uint64_t tempUIntH, tempUIntL;
1718 // boost::uint64_t dst;
1719  int cnt = 0;
1720 
1721 // BLW TO DO: These needs to the added to the object rather than the whole condition.
1722  int relativeBx = 0;
1723  bool gEq = false;
1724 
1725 // Loop over objects and extract the cuts on the objects
1726  const std::vector<esObject>& objects = condCalo.getObjects();
1727  for (size_t jj = 0; jj < objects.size(); jj++) {
1728 
1729  const esObject object = objects.at(jj);
1730  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1731 
1732 // BLW TO DO: This needs to be added to the Object Parameters
1733  relativeBx = object.getBxOffset();
1734 
1735 // Loop over the cuts for this object
1736  int upperThresholdInd = -1;
1737  int lowerThresholdInd = 0;
1738  int upperIndexInd = -1;
1739  int lowerIndexInd = 0;
1740  int cntEta = 0;
1741  unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1;
1742  int cntPhi = 0;
1743  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
1744  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1745  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1746 
1747 
1748  const std::vector<esCut>& cuts = object.getCuts();
1749  for (size_t kk = 0; kk < cuts.size(); kk++)
1750  {
1751  const esCut cut = cuts.at(kk);
1752 
1753  switch(cut.getCutType()){
1754  case esCutType::Threshold:
1755  lowerThresholdInd = cut.getMinimum().index;
1756  upperThresholdInd = cut.getMaximum().index;
1757  break;
1758  case esCutType::Slice:
1759  lowerIndexInd = int(cut.getMinimum().value);
1760  upperIndexInd = int(cut.getMaximum().value);
1761  break;
1762  case esCutType::Eta: {
1763 
1764  if(cntEta == 0) {
1765  etaWindow1Lower = cut.getMinimum().index;
1766  etaWindow1Upper = cut.getMaximum().index;
1767  } else if(cntEta == 1) {
1768  etaWindow2Lower = cut.getMinimum().index;
1769  etaWindow2Upper = cut.getMaximum().index;
1770  } else {
1771  edm::LogError("TriggerMenuParser") << "Too Many Eta Cuts for calo-condition ("
1772  << particle << ")" << std::endl;
1773  return false;
1774  }
1775  cntEta++;
1776 
1777  } break;
1778 
1779  case esCutType::Phi: {
1780 
1781  if(cntPhi == 0) {
1782  phiWindow1Lower = cut.getMinimum().index;
1783  phiWindow1Upper = cut.getMaximum().index;
1784  } else if(cntPhi == 1) {
1785  phiWindow2Lower = cut.getMinimum().index;
1786  phiWindow2Upper = cut.getMaximum().index;
1787  } else {
1788  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for calo-condition ("
1789  << particle << ")" << std::endl;
1790  return false;
1791  }
1792  cntPhi++;
1793 
1794  }break;
1795 
1796  case esCutType::Charge: {
1797 
1798  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition ("
1799  << particle << ")" << std::endl;
1800  return false;
1801 
1802  }break;
1803  case esCutType::Quality: {
1804 
1805  qualityLUT = l1tstr2int(cut.getData());
1806 
1807  }break;
1808  case esCutType::Isolation: {
1809 
1810  isolationLUT = l1tstr2int(cut.getData());
1811 
1812  } break;
1813  default:
1814  break;
1815  } //end switch
1816 
1817  } //end loop over cuts
1818 
1819 // Fill the object parameters
1820  objParameter[cnt].etHighThreshold = upperThresholdInd;
1821  objParameter[cnt].etLowThreshold = lowerThresholdInd;
1822  objParameter[cnt].indexHigh = upperIndexInd;
1823  objParameter[cnt].indexLow = lowerIndexInd;
1824  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1825  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1826  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1827  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1828  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1829  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1830  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1831  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1832  objParameter[cnt].isolationLUT = isolationLUT;
1833  objParameter[cnt].qualityLUT = qualityLUT; //TO DO: Must add
1834 
1835  // Output for debugging
1836  LogDebug("TriggerMenuParser")
1837  << "\n Calo ET high thresholds (hex) for calo object " << caloObjType << " " << cnt << " = "
1838  << std::hex << objParameter[cnt].etLowThreshold << " - " << objParameter[cnt].etHighThreshold
1839  << "\n etaWindow Lower / Upper for calo object " << cnt << " = 0x"
1840  << objParameter[cnt].etaWindow1Lower << " / 0x" << objParameter[cnt].etaWindow1Upper
1841  << "\n etaWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1842  << objParameter[cnt].etaWindow2Lower << " / 0x" << objParameter[cnt].etaWindow2Upper
1843  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
1844  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
1845  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1846  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
1847  << "\n Isolation LUT for calo object " << cnt << " = 0x"
1848  << objParameter[cnt].isolationLUT
1849  << "\n Quality LUT for calo object " << cnt << " = 0x"
1850  << objParameter[cnt].qualityLUT << std::dec
1851  << std::endl;
1852 
1853  cnt++;
1854  } //end loop over objects
1855 
1856 
1857 
1858  // object types - all same caloObjType
1859  std::vector<GlobalObject> objType(nrObj, caloObjType);
1860 
1861 
1862 
1863 
1864  // now create a new calo condition
1865  CaloTemplate caloCond(name);
1866 
1867  caloCond.setCondType(cType);
1868  caloCond.setObjectType(objType);
1869 
1870  //BLW TO DO: This needs to be added to the object rather than the whole condition
1871  caloCond.setCondGEq(gEq);
1872  caloCond.setCondChipNr(chipNr);
1873 
1874  //BLW TO DO: This needs to be added to the object rather than the whole condition
1875  caloCond.setCondRelativeBx(relativeBx);
1876 
1877  caloCond.setConditionParameter(objParameter, corrParameter);
1878 
1879  if (edm::isDebugEnabled() ) {
1880 
1881  std::ostringstream myCoutStream;
1882  caloCond.print(myCoutStream);
1883  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1884 
1885  }
1886 
1887 
1888  // insert condition into the map
1889  if ( !insertConditionIntoMap(caloCond, chipNr)) {
1890 
1891  edm::LogError("TriggerMenuParser")
1892  << " Error: duplicate condition (" << name << ")"
1893  << std::endl;
1894 
1895  return false;
1896  }
1897  else {
1898 
1899  if (corrFlag) {
1900  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1901  }
1902  else {
1903  (m_vecCaloTemplate[chipNr]).push_back(caloCond);
1904  }
1905 
1906  }
1907 
1908 
1909  //
1910  return true;
1911 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
int l1tstr2int(const std::string data)
typedef for correlation parameters
Definition: CaloTemplate.h:84
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 1926 of file TriggerMenuParser.cc.

References TkAlMuonSelectors_cfi::cut, egammaForCoreTracking_cff::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), l1t::gtEG, l1t::gtJet, l1t::gtTau, createfilelist::int, edm::isDebugEnabled(), nanoDQM_cfi::Jet, GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), l1tstr2int(), LogDebug, LogTrace, m_corCaloTemplate, dataset::name, electrons_cff::objType, colinearityKinematic::Phi, CaloTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, jetExtractorBlock_cff::Threshold, and l1t::Type1s.

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

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

Definition at line 250 of file TriggerMenuParser.cc.

References patPFMETCorrections_cff::algo, DefaultClusterizer_cff::Algorithm, KineDebug3::count(), cuy::ii, reco::tau::disc::InvariantMass(), m_conditionMap, m_corCaloTemplate, m_corEnergySumTemplate, m_corMuonTemplate, m_gtScales, m_numberConditionChips, m_triggerMenuDate, m_triggerMenuDescription, m_triggerMenuImplementation, m_triggerMenuInterface, m_triggerMenuName, m_triggerMenuUUID, m_vecCaloTemplate, m_vecCorrelationTemplate, m_vecCorrelationWithOverlapRemovalTemplate, m_vecEnergySumTemplate, m_vecExternalTemplate, m_vecMuonTemplate, parseAlgorithm(), parseCalo(), parseCorrelation(), parseCorrelationWithOverlapRemoval(), parseEnergySum(), parseExternal(), parseMuon(), parseScales(), l1t::GlobalScales::setScalesName(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

250  {
251 
252 
253  // resize the vector of condition maps
254  // the number of condition chips should be correctly set before calling parseXmlFile
256 
261 
267 
268  using namespace tmeventsetup;
269  using namespace Algorithm;
270 
271  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*> (utmMenu);
272 
273  //get the meta data
274  m_triggerMenuDescription = menu->getComment();
275  m_triggerMenuDate = menu->getDatetime();
276  m_triggerMenuImplementation = ( getMmHashN(menu->getFirmwareUuid()) & 0xFFFFFFFF); //make sure we only have 32 bits
277  m_triggerMenuName = menu->getName();
278  m_triggerMenuInterface = menu->getVersion(); //BLW: correct descriptor?
279  m_triggerMenuUUID = ( getMmHashN(menu->getName()) & 0xFFFFFFFF); //make sure we only have 32 bits
280 
281  const std::map<std::string, esAlgorithm>& algoMap = menu->getAlgorithmMap();
282  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
283  const std::map<std::string, esScale>& scaleMap = menu->getScaleMap();
284 
285  // parse the scales
286  m_gtScales.setScalesName( menu->getScaleSetName() );
287  parseScales(scaleMap);
288 
289 
290  //loop over the algorithms
291  for (std::map<std::string, esAlgorithm>::const_iterator cit = algoMap.begin();
292  cit != algoMap.end(); cit++)
293  {
294  //condition chip (artifact) TO DO: Update
295  int chipNr = 0;
296 
297  //get algorithm
298  const esAlgorithm& algo = cit->second;
299 
300  //parse the algorithm
301  parseAlgorithm(algo,chipNr); //blw
302 
303  //get conditions for this algorithm
304  const std::vector<std::string>& rpn_vec = algo.getRpnVector();
305  for (size_t ii = 0; ii < rpn_vec.size(); ii++)
306  {
307  const std::string& token = rpn_vec.at(ii);
308  if (isGate(token)) continue;
309 // long hash = getHash(token);
310  const esCondition& condition = condMap.find(token)->second;
311 
312 
313  //check to see if this condtion already exists
314  if ((m_conditionMap[chipNr]).count(condition.getName()) == 0) {
315 
316  // parse Calo Conditions (EG, Jets, Taus)
317  if(condition.getType() == esConditionType::SingleEgamma ||
318  condition.getType() == esConditionType::DoubleEgamma ||
319  condition.getType() == esConditionType::TripleEgamma ||
320  condition.getType() == esConditionType::QuadEgamma ||
321  condition.getType() == esConditionType::SingleTau ||
322  condition.getType() == esConditionType::DoubleTau ||
323  condition.getType() == esConditionType::TripleTau ||
324  condition.getType() == esConditionType::QuadTau ||
325  condition.getType() == esConditionType::SingleJet ||
326  condition.getType() == esConditionType::DoubleJet ||
327  condition.getType() == esConditionType::TripleJet ||
328  condition.getType() == esConditionType::QuadJet )
329  {
330  parseCalo(condition,chipNr,false);
331 
332  // parse Energy Sums
333  } else if(condition.getType() == esConditionType::TotalEt ||
334  condition.getType() == esConditionType::TotalEtEM ||
335  condition.getType() == esConditionType::TotalHt ||
336  condition.getType() == esConditionType::MissingEt ||
337  condition.getType() == esConditionType::MissingHt ||
338  condition.getType() == esConditionType::MissingEtHF ||
339  condition.getType() == esConditionType::TowerCount ||
340  condition.getType() == esConditionType::MinBiasHFP0 ||
341  condition.getType() == esConditionType::MinBiasHFM0 ||
342  condition.getType() == esConditionType::MinBiasHFP1 ||
343  condition.getType() == esConditionType::MinBiasHFM1 ||
344  condition.getType() == esConditionType::AsymmetryEt ||
345  condition.getType() == esConditionType::AsymmetryHt ||
346  condition.getType() == esConditionType::AsymmetryEtHF ||
347  condition.getType() == esConditionType::AsymmetryHtHF ||
348  condition.getType() == esConditionType::Centrality0 ||
349  condition.getType() == esConditionType::Centrality1 ||
350  condition.getType() == esConditionType::Centrality2 ||
351  condition.getType() == esConditionType::Centrality3 ||
352  condition.getType() == esConditionType::Centrality4 ||
353  condition.getType() == esConditionType::Centrality5 ||
354  condition.getType() == esConditionType::Centrality6 ||
355  condition.getType() == esConditionType::Centrality7 )
356  {
357  parseEnergySum(condition,chipNr,false);
358 
359  //parse Muons
360  } else if(condition.getType() == esConditionType::SingleMuon ||
361  condition.getType() == esConditionType::DoubleMuon ||
362  condition.getType() == esConditionType::TripleMuon ||
363  condition.getType() == esConditionType::QuadMuon )
364  {
365  parseMuon(condition,chipNr,false);
366 
367 
368  //parse Correlation Conditions
369  } else if(condition.getType() == esConditionType::MuonMuonCorrelation ||
370  condition.getType() == esConditionType::MuonEsumCorrelation ||
371  condition.getType() == esConditionType::CaloMuonCorrelation ||
372  condition.getType() == esConditionType::CaloCaloCorrelation ||
373  condition.getType() == esConditionType::CaloEsumCorrelation ||
374  condition.getType() == esConditionType::InvariantMass ||
375  condition.getType() == esConditionType::TransverseMass )
376  {
377  parseCorrelation(condition,chipNr);
378 
379  //parse Externals
380  } else if(condition.getType() == esConditionType::Externals )
381  {
382  parseExternal(condition,chipNr);
383 
384  }
385  else if(condition.getType() == esConditionType::SingleEgammaOvRm ||
386  condition.getType() == esConditionType::DoubleEgammaOvRm ||
387  condition.getType() == esConditionType::TripleEgammaOvRm ||
388  condition.getType() == esConditionType::QuadEgammaOvRm ||
389  condition.getType() == esConditionType::SingleTauOvRm ||
390  condition.getType() == esConditionType::DoubleTauOvRm ||
391  condition.getType() == esConditionType::TripleTauOvRm ||
392  condition.getType() == esConditionType::QuadTauOvRm ||
393  condition.getType() == esConditionType::SingleJetOvRm ||
394  condition.getType() == esConditionType::DoubleJetOvRm ||
395  condition.getType() == esConditionType::TripleJetOvRm ||
396  condition.getType() == esConditionType::QuadJetOvRm) {
397 
398  edm::LogError("TriggerMenuParser") << std::endl
399  << "SingleEgammaOvRm" << std::endl
400  << "DoubleEgammaOvRm" << std::endl
401  << "TripleEgammaOvRm" << std::endl
402  << "QuadEgammaOvRm" << std::endl
403  << "SingleTauOvRm" << std::endl
404  << "DoubleTauOvRm" << std::endl
405  << "TripleTauOvRm" << std::endl
406  << "QuadTauOvRm" << std::endl
407  << "SingleJetOvRm" << std::endl
408  << "DoubleJetOvRm" << std::endl
409  << "TripleJetOvRm" << std::endl
410  << "QuadJetOvRm" << std::endl
411  << "The above conditions types OvRm are not implemented yet in the parser. Please remove alogrithms that use this type of condtion from L1T Menu!" << std::endl;
412 
413  }
414  //parse CorrelationWithOverlapRemoval
415  else if(condition.getType() == esConditionType::CaloCaloCorrelationOvRm ||
416  condition.getType() == esConditionType::InvariantMassOvRm ||
417  condition.getType() == esConditionType::TransverseMassOvRm) {
418 
419  parseCorrelationWithOverlapRemoval(condition,chipNr);
420 
421  }
422 
423  }//if condition is a new one
424  }//loop over conditions
425  }//loop over algorithms
426 
427  return;
428 
429 
430 }
unsigned int m_numberConditionChips
hardware limits
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
void setScalesName(const std::string &name)
Definition: GlobalScales.h:80
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
bool parseExternal(tmeventsetup::esCondition condExt, unsigned int chipNr=0)
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
std::string m_triggerMenuInterface
menu names
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::string m_triggerMenuDescription
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
ii
Definition: cuy.py:590
bool parseScales(std::map< std::string, tmeventsetup::esScale > scaleMap)
parse scales
bool parseEnergySum(tmeventsetup::esCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
parse an "energy sum" condition
unsigned long m_triggerMenuUUID
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
bool parseMuon(tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon condition
bool parseAlgorithm(tmeventsetup::esAlgorithm algorithm, unsigned int chipNr=0)
parse all algorithms
unsigned long m_triggerMenuImplementation
bool parseCorrelationWithOverlapRemoval(const tmeventsetup::esCondition &corrCond, unsigned int chipNr=0)
parse a correlation condition with overlap removal
bool parseCalo(tmeventsetup::esCondition condCalo, unsigned int chipNr=0, const bool corrFlag=false)
parse a calorimeter condition
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
bool parseCorrelation(tmeventsetup::esCondition corrCond, unsigned int chipNr=0)
parse a correlation condition
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
bool TriggerMenuParser::parseCorrelation ( tmeventsetup::esCondition  corrCond,
unsigned int  chipNr = 0 
)
private

parse a correlation condition

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

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

Definition at line 2777 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

2779  {
2780 
2781  using namespace tmeventsetup;
2782 
2783  std::string condition = "corr";
2784  std::string particle = "test-fix" ;
2785  std::string type = l1t2string( corrCond.getType() );
2786  std::string name = l1t2string( corrCond.getName() );
2787 
2788  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2789  << " (in parseCorrelation) " << std::endl
2790  << " condition = " << condition << std::endl
2791  << " particle = " << particle << std::endl
2792  << " type = " << type << std::endl
2793  << " name = " << name << std::endl;
2794 
2795 
2796 
2797 
2798  // create a new correlation condition
2799  CorrelationTemplate correlationCond(name);
2800 
2801  // check that the condition does not exist already in the map
2802  if ( !insertConditionIntoMap(correlationCond, chipNr)) {
2803 
2804  edm::LogError("TriggerMenuParser")
2805  << " Error: duplicate correlation condition (" << name << ")"
2806  << std::endl;
2807 
2808  return false;
2809  }
2810 
2811 
2812 // Define some of the quantities to store the parased information
2813 
2814  // condition type BLW (Do we change this to the type of correlation condition?)
2816 
2817  // two objects (for sure)
2818  const int nrObj = 2;
2819 
2820  // object types and greater equal flag - filled in the loop
2821  int intGEq[nrObj] = { -1, -1 };
2822  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
2823  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2824 
2825  // correlation flag and index in the cor*vector
2826  const bool corrFlag = true;
2827  int corrIndexVal[nrObj] = { -1, -1 };
2828 
2829 
2830  // Storage of the correlation selection
2832  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2833 
2834 // Get the correlation Cuts on the legs
2835  int cutType = 0;
2836  const std::vector<esCut>& cuts = corrCond.getCuts();
2837  for (size_t jj = 0; jj < cuts.size(); jj++)
2838  {
2839  const esCut cut = cuts.at(jj);
2840 
2841  if(cut.getCutType() == esCutType::ChargeCorrelation) {
2842  if( cut.getData()=="ls" ) corrParameter.chargeCorrelation = 2;
2843  else if( cut.getData()=="os" ) corrParameter.chargeCorrelation = 4;
2844  else corrParameter.chargeCorrelation = 1; //ignore charge correlation
2845  } else {
2846 
2847 //
2848 // Unitl utm has method to calculate these, do the integer value calculation with precision.
2849 //
2850  double minV = cut.getMinimum().value;
2851  double maxV = cut.getMaximum().value;
2852 
2853  //Scale down very large numbers out of xml
2854  if(maxV > 1.0e8) maxV = 1.0e8;
2855 
2856  if(cut.getCutType() == esCutType::DeltaEta) {
2857  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2858  corrParameter.minEtaCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2859  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2860  corrParameter.precEtaCut = cut.getMinimum().index;
2861  cutType = cutType | 0x1;
2862  } else if (cut.getCutType() == esCutType::DeltaPhi) {
2863  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2864  corrParameter.minPhiCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2865  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2866  corrParameter.precPhiCut = cut.getMinimum().index;
2867  cutType = cutType | 0x2;
2868  } else if (cut.getCutType() == esCutType::DeltaR) {
2869  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tDeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2870  corrParameter.minDRCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2871  corrParameter.maxDRCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2872  corrParameter.precDRCut = cut.getMinimum().index;
2873  cutType = cutType | 0x4;
2874  } else if (cut.getCutType() == esCutType::TwoBodyPt) {
2875  corrParameter.minTBPTCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2876  corrParameter.maxTBPTCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2877  corrParameter.precTBPTCut = cut.getMinimum().index;
2878  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tTPBT Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2879  cutType = cutType | 0x20;
2880  } else if (cut.getCutType() == esCutType::Mass) {
2881  LogDebug("TriggerMenuParser") << "CutType: " << cut.getCutType() << "\tMass Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2882  corrParameter.minMassCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2883  corrParameter.maxMassCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2884  corrParameter.precMassCut = cut.getMinimum().index;
2885  // cutType = cutType | 0x8;
2886  if (corrCond.getType() == esConditionType::TransverseMass){
2887  cutType = cutType | 0x10;
2888  //std::cout << "CCLA running Transverse mass cutType= " << cutType << std::endl;
2889  }else{
2890  cutType = cutType | 0x8;
2891  //std::cout << "CCLA running Invarient mass cutType= " << cutType << std::endl;
2892  }
2893  }
2894  }
2895 
2896  }
2897  corrParameter.corrCutType = cutType;
2898 
2899 // Get the two objects that form the legs
2900  const std::vector<esObject>& objects = corrCond.getObjects();
2901  if(objects.size() != 2) {
2902  edm::LogError("TriggerMenuParser")
2903  << "incorrect number of objects for the correlation condition " << name << " corrFlag " << corrFlag << std::endl;
2904  return false;
2905  }
2906 
2907 // loop over legs
2908  for (size_t jj = 0; jj < objects.size(); jj++)
2909  {
2910  const esObject object = objects.at(jj);
2911  //std::cout << " obj name = " << object.getName() << "\n";
2912  //std::cout << " obj type = " << object.getType() << "\n";
2913  //std::cout << " obj op = " << object.getComparisonOperator() << "\n";
2914  //std::cout << " obj bx = " << object.getBxOffset() << "\n";
2915 
2916 
2917 // check the leg type
2918  if(object.getType() == esObjectType::Muon) {
2919  // we have a muon
2920 
2921 /*
2922  //BLW Hold on to this code we may need to go back to it at some point.
2923  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
2924  // This is potentially a place to slim down the code. Note: We currently evaluate the
2925  // conditions every time, so even if we put the condition in the vector once, we would
2926  // still evaluate it multiple times. This is a place for optimization.
2927  {
2928 
2929  parseMuonCorr(&object,chipNr);
2930  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2931 
2932  } else {
2933  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
2934  bool found = false;
2935  int index = 0;
2936  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
2937  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
2938  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
2939  found = true;
2940  } else {
2941  index++;
2942  }
2943  }
2944  if(found) {
2945  corrIndexVal[jj] = index;
2946  } else {
2947  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
2948  }
2949 
2950  }
2951 */
2952  parseMuonCorr(&object,chipNr);
2953  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2954 
2955  //Now set some flags for this subCondition
2956  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2957  objType[jj] = gtMu;
2958  condCateg[jj] = CondMuon;
2959 
2960  } else if(object.getType() == esObjectType::Egamma ||
2961  object.getType() == esObjectType::Jet ||
2962  object.getType() == esObjectType::Tau ) {
2963 
2964  // we have an Calo object
2965  parseCaloCorr(&object,chipNr);
2966  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
2967 
2968  //Now set some flags for this subCondition
2969  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2970  switch(object.getType()) {
2971  case esObjectType::Egamma: {
2972  objType[jj] = gtEG;
2973  }
2974  break;
2975  case esObjectType::Jet: {
2976  objType[jj] = gtJet;
2977  }
2978  break;
2979  case esObjectType::Tau: {
2980  objType[jj] = gtTau;
2981  }
2982  break;
2983  default: {
2984  }
2985  break;
2986  }
2987  condCateg[jj] = CondCalo;
2988 
2989 
2990 
2991 
2992  } else if(object.getType() == esObjectType::ETM ||
2993  object.getType() == esObjectType::ETMHF ||
2994  object.getType() == esObjectType::TOWERCOUNT ||
2995  object.getType() == esObjectType::HTM ) {
2996 
2997  // we have Energy Sum
2998  parseEnergySumCorr(&object,chipNr);
2999  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
3000 
3001  //Now set some flags for this subCondition
3002  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3003  switch(object.getType()) {
3004  case esObjectType::ETM: {
3006  }
3007  break;
3008  case esObjectType::HTM: {
3010  }
3011  break;
3012  case esObjectType::ETMHF: {
3014  }
3015  break;
3016  case esObjectType::TOWERCOUNT: {
3018  }
3019  break;
3020  default: {
3021  }
3022  break;
3023  }
3024  condCateg[jj] = CondEnergySum;
3025 
3026 
3027  } else {
3028 
3029  edm::LogError("TriggerMenuParser")
3030  << "Illegal Object Type " << object.getType()
3031  << " for the correlation condition " << name << std::endl;
3032  return false;
3033 
3034  } //if block on leg types
3035 
3036  } //loop over legs
3037 
3038 
3039  // get greater equal flag for the correlation condition
3040  bool gEq = true;
3041  if (intGEq[0] != intGEq[1]) {
3042  edm::LogError("TriggerMenuParser")
3043  << "Inconsistent GEq flags for sub-conditions "
3044  << " for the correlation condition " << name << std::endl;
3045  return false;
3046 
3047  }
3048  else {
3049  gEq = (intGEq[0] != 0);
3050 
3051  }
3052 
3053 
3054  // fill the correlation condition
3055  correlationCond.setCondType(cType);
3056  correlationCond.setObjectType(objType);
3057  correlationCond.setCondGEq(gEq);
3058  correlationCond.setCondChipNr(chipNr);
3059 
3060  correlationCond.setCond0Category(condCateg[0]);
3061  correlationCond.setCond1Category(condCateg[1]);
3062 
3063  correlationCond.setCond0Index(corrIndexVal[0]);
3064  correlationCond.setCond1Index(corrIndexVal[1]);
3065 
3066  correlationCond.setCorrelationParameter(corrParameter);
3067 
3068  if (edm::isDebugEnabled() ) {
3069 
3070  std::ostringstream myCoutStream;
3071  correlationCond.print(myCoutStream);
3072  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n"
3073  << std::endl;
3074 
3075  }
3076 
3077  // insert condition into the map
3078  // condition is not duplicate, check was done at the beginning
3079 
3080  (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond);
3081 
3082 
3083  //
3084  return true;
3085 }
#define LogDebug(id)
size
Write out results.
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
typedef for correlation parameters
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
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 3099 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

3101  {
3102 
3103  using namespace tmeventsetup;
3104 
3105  std::string condition = "corrWithOverlapRemoval";
3106  std::string particle = "test-fix" ;
3107  std::string type = l1t2string( corrCond.getType() );
3108  std::string name = l1t2string( corrCond.getName() );
3109 
3110  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
3111  << " (in parseCorrelationWithOverlapRemoval) " << std::endl
3112  << " condition = " << condition << std::endl
3113  << " particle = " << particle << std::endl
3114  << " type = " << type << std::endl
3115  << " name = " << name << std::endl;
3116 
3117 
3118 
3119 
3120  // create a new correlation condition
3121  CorrelationWithOverlapRemovalTemplate correlationWORCond(name);
3122 
3123  // check that the condition does not exist already in the map
3124  if ( !insertConditionIntoMap(correlationWORCond, chipNr)) {
3125 
3126  edm::LogError("TriggerMenuParser")
3127  << " Error: duplicate correlation condition (" << name << ")"
3128  << std::endl;
3129 
3130  return false;
3131  }
3132 
3133 
3134 // Define some of the quantities to store the parased information
3135 
3136  // condition type BLW (Do we change this to the type of correlation condition?)
3138 
3139  // three objects (for sure)
3140  const int nrObj = 3;
3141 
3142  // object types and greater equal flag - filled in the loop
3143  int intGEq[nrObj] = { -1, -1, -1 };
3144  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
3145  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
3146 
3147  // correlation flag and index in the cor*vector
3148  const bool corrFlag = true;
3149  int corrIndexVal[nrObj] = { -1, -1, -1 };
3150 
3151 
3152  // Storage of the correlation selection
3154  corrParameter.chargeCorrelation = 1; //ignore charge correlation for corr-legs
3155 
3156 // Get the correlation Cuts on the legs
3157  int cutType = 0;
3158  const std::vector<esCut>& cuts = corrCond.getCuts();
3159  for (size_t jj = 0; jj < cuts.size(); jj++)
3160  {
3161  const esCut cut = cuts.at(jj);
3162 
3163  if(cut.getCutType() == esCutType::ChargeCorrelation) {
3164  if( cut.getData()=="ls" ) corrParameter.chargeCorrelation = 2;
3165  else if( cut.getData()=="os" ) corrParameter.chargeCorrelation = 4;
3166  else corrParameter.chargeCorrelation = 1; //ignore charge correlation
3167  } else {
3168 
3169  //
3170  // Unitl utm has method to calculate these, do the integer value calculation with precision.
3171  //
3172  double minV = cut.getMinimum().value;
3173  double maxV = cut.getMaximum().value;
3174 
3175  //Scale down very large numbers out of xml
3176  if(maxV > 1.0e8) maxV = 1.0e8;
3177 
3178  if(cut.getCutType() == esCutType::DeltaEta) {
3179  //std::cout << "DeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3180  corrParameter.minEtaCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
3181  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
3182  corrParameter.precEtaCut = cut.getMinimum().index;
3183  cutType = cutType | 0x1;
3184  } else if (cut.getCutType() == esCutType::DeltaPhi) {
3185  //std::cout << "DeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3186  corrParameter.minPhiCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
3187  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
3188  corrParameter.precPhiCut = cut.getMinimum().index;
3189  cutType = cutType | 0x2;
3190  } else if (cut.getCutType() == esCutType::DeltaR) {
3191  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3192  corrParameter.minDRCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
3193  corrParameter.maxDRCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
3194  corrParameter.precDRCut = cut.getMinimum().index;
3195  cutType = cutType | 0x4;
3196  } else if (cut.getCutType() == esCutType::Mass) {
3197  //std::cout << "Mass Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3198  corrParameter.minMassCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
3199  corrParameter.maxMassCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
3200  corrParameter.precMassCut = cut.getMinimum().index;
3201  cutType = cutType | 0x8;
3202  }
3203  if(cut.getCutType() == esCutType::OvRmDeltaEta) {
3204  //std::cout << "OverlapRemovalDeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3205  corrParameter.minOverlapRemovalEtaCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
3206  corrParameter.maxOverlapRemovalEtaCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
3207  corrParameter.precOverlapRemovalEtaCut = cut.getMinimum().index;
3208  cutType = cutType | 0x10;
3209  } else if (cut.getCutType() == esCutType::OvRmDeltaPhi) {
3210  //std::cout << "OverlapRemovalDeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3211  corrParameter.minOverlapRemovalPhiCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
3212  corrParameter.maxOverlapRemovalPhiCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
3213  corrParameter.precOverlapRemovalPhiCut = cut.getMinimum().index;
3214  cutType = cutType | 0x20;
3215  } else if (cut.getCutType() == esCutType::OvRmDeltaR) {
3216  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
3217  corrParameter.minOverlapRemovalDRCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
3218  corrParameter.maxOverlapRemovalDRCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
3219  corrParameter.precOverlapRemovalDRCut = cut.getMinimum().index;
3220  cutType = cutType | 0x40;
3221  }
3222 
3223  }
3224 
3225  }
3226  corrParameter.corrCutType = cutType;
3227 
3228 // Get the two objects that form the legs
3229  const std::vector<esObject>& objects = corrCond.getObjects();
3230  if(objects.size() != 3) {
3231  edm::LogError("TriggerMenuParser")
3232  << "incorrect number of objects for the correlation condition with overlap removal " << name << " corrFlag " << corrFlag << std::endl;
3233  return false;
3234  }
3235 
3236 // loop over legs
3237  for (size_t jj = 0; jj < objects.size(); jj++)
3238  {
3239  const esObject& object = objects.at(jj);
3240  //std::cout << " obj name = " << object.getName() << "\n";
3241  //std::cout << " obj type = " << object.getType() << "\n";
3242  //std::cout << " obj op = " << object.getComparisonOperator() << "\n";
3243  //std::cout << " obj bx = " << object.getBxOffset() << "\n";
3244  //std::cout << "type = done" << std::endl;
3245 
3246 
3247 // check the leg type
3248  if(object.getType() == esObjectType::Muon) {
3249  // we have a muon
3250 
3251 /*
3252  //BLW Hold on to this code we may need to go back to it at some point.
3253  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
3254  // This is potentially a place to slim down the code. Note: We currently evaluate the
3255  // conditions every time, so even if we put the condition in the vector once, we would
3256  // still evaluate it multiple times. This is a place for optimization.
3257  {
3258 
3259  parseMuonCorr(&object,chipNr);
3260  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
3261 
3262  } else {
3263  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
3264  bool found = false;
3265  int index = 0;
3266  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
3267  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
3268  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
3269  found = true;
3270  } else {
3271  index++;
3272  }
3273  }
3274  if(found) {
3275  corrIndexVal[jj] = index;
3276  } else {
3277  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
3278  }
3279 
3280  }
3281 */
3282  parseMuonCorr(&object,chipNr);
3283  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
3284 
3285  //Now set some flags for this subCondition
3286  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3287  objType[jj] = gtMu;
3288  condCateg[jj] = CondMuon;
3289 
3290  } else if(object.getType() == esObjectType::Egamma ||
3291  object.getType() == esObjectType::Jet ||
3292  object.getType() == esObjectType::Tau ) {
3293 
3294  // we have an Calo object
3295  parseCaloCorr(&object,chipNr);
3296  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
3297 
3298  //Now set some flags for this subCondition
3299  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3300  switch(object.getType()) {
3301  case esObjectType::Egamma: {
3302  objType[jj] = gtEG;
3303  }
3304  break;
3305  case esObjectType::Jet: {
3306  objType[jj] = gtJet;
3307  }
3308  break;
3309  case esObjectType::Tau: {
3310  objType[jj] = gtTau;
3311  }
3312  break;
3313  default: {
3314  }
3315  break;
3316  }
3317  condCateg[jj] = CondCalo;
3318 
3319 
3320 
3321 
3322  } else if(object.getType() == esObjectType::ETM ||
3323  object.getType() == esObjectType::ETMHF ||
3324  object.getType() == esObjectType::TOWERCOUNT ||
3325  object.getType() == esObjectType::HTM ) {
3326 
3327  // we have Energy Sum
3328  parseEnergySumCorr(&object,chipNr);
3329  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
3330 
3331  //Now set some flags for this subCondition
3332  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
3333  switch(object.getType()) {
3334  case esObjectType::ETM: {
3336  }
3337  break;
3338  case esObjectType::HTM: {
3340  }
3341  break;
3342  case esObjectType::ETMHF: {
3344  }
3345  break;
3346  case esObjectType::TOWERCOUNT: {
3348  }
3349  break;
3350  default: {
3351  }
3352  break;
3353  }
3354  condCateg[jj] = CondEnergySum;
3355 
3356 
3357  } else {
3358 
3359  edm::LogError("TriggerMenuParser")
3360  << "Illegal Object Type " << object.getType()
3361  << " for the correlation condition " << name << std::endl;
3362  return false;
3363 
3364  } //if block on leg types
3365 
3366  } //loop over legs
3367 
3368 
3369  // get greater equal flag for the correlation condition
3370  bool gEq = true;
3371  if (intGEq[0] != intGEq[1]) {
3372  edm::LogError("TriggerMenuParser")
3373  << "Inconsistent GEq flags for sub-conditions "
3374  << " for the correlation condition " << name << std::endl;
3375  return false;
3376 
3377  }
3378  else {
3379  gEq = (intGEq[0] != 0);
3380 
3381  }
3382 
3383 
3384  // fill the correlation condition
3385  correlationWORCond.setCondType(cType);
3386  correlationWORCond.setObjectType(objType);
3387  correlationWORCond.setCondGEq(gEq);
3388  correlationWORCond.setCondChipNr(chipNr);
3389 
3390  correlationWORCond.setCond0Category(condCateg[0]);
3391  correlationWORCond.setCond1Category(condCateg[1]);
3392  correlationWORCond.setCond2Category(condCateg[2]);
3393 
3394  correlationWORCond.setCond0Index(corrIndexVal[0]);
3395  correlationWORCond.setCond1Index(corrIndexVal[1]);
3396  correlationWORCond.setCond2Index(corrIndexVal[2]);
3397 
3398  correlationWORCond.setCorrelationWithOverlapRemovalParameter(corrParameter);
3399 
3400  if (edm::isDebugEnabled() ) {
3401 
3402  std::ostringstream myCoutStream;
3403  correlationWORCond.print(myCoutStream);
3404  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n"
3405  << std::endl;
3406 
3407  }
3408 
3409  // insert condition into the map
3410  // condition is not duplicate, check was done at the beginning
3411 
3412  (m_vecCorrelationWithOverlapRemovalTemplate[chipNr]).push_back(correlationWORCond);
3413 
3414 
3415  //
3416  return true;
3417 }
#define LogDebug(id)
size
Write out results.
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
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 962 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseScales().

963 {
964 
965  using namespace tmeventsetup;
966 
967  // First Delta Eta for this set
968  std::string scLabel1 = obj1;
969  scLabel1 += "-ETA";
970  std::string scLabel2 = obj2;
971  scLabel2 += "-ETA";
972 
973  //This LUT does not exist in L1 Menu file, don't fill it
974  if( scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end()) return;
975 
976  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
977  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
978  std::vector<double> val_delta_eta;
979  std::vector<long long> lut_delta_eta;
980  size_t n = getDeltaVector(val_delta_eta, scale1, scale2);
981  setLut(lut_delta_eta, val_delta_eta, prec1);
982  std::string lutName = obj1;
983  lutName += "-";
984  lutName += obj2;
985  m_gtScales.setLUT_DeltaEta(lutName,lut_delta_eta,prec1);
986 
987  // Second Get the Cosh for this delta Eta Set
988  std::vector<long long> lut_cosh;
989  applyCosh(val_delta_eta, n);
990  setLut(lut_cosh, val_delta_eta, prec2);
991  m_gtScales.setLUT_Cosh(lutName,lut_cosh,prec2);
992 
993 }
virtual void setLUT_DeltaEta(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:71
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 995 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseScales().

996 {
997 
998  using namespace tmeventsetup;
999 
1000  // First Delta phi for this set
1001  std::string scLabel1 = obj1;
1002  scLabel1 += "-PHI";
1003  std::string scLabel2 = obj2;
1004  scLabel2 += "-PHI";
1005 
1006  //This LUT does not exist in L1 Menu file, don't fill it
1007  if( scaleMap.find(scLabel1) == scaleMap.end() || scaleMap.find(scLabel2) == scaleMap.end()) return;
1008 
1009  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
1010  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
1011  std::vector<double> val_delta_phi;
1012  std::vector<long long> lut_delta_phi;
1013  size_t n = getDeltaVector(val_delta_phi, scale1, scale2);
1014  setLut(lut_delta_phi, val_delta_phi, prec1);
1015  std::string lutName = obj1;
1016  lutName += "-";
1017  lutName += obj2;
1018  m_gtScales.setLUT_DeltaPhi(lutName,lut_delta_phi,prec1);
1019 
1020  // Second Get the Cosh for this delta phi Set
1021  std::vector<long long> lut_cos;
1022  applyCos(val_delta_phi, n);
1023  setLut(lut_cos, val_delta_phi, prec2);
1024  m_gtScales.setLUT_Cos(lutName,lut_cos,prec2);
1025 
1026 }
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:87
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 2187 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

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

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

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

Definition at line 2480 of file TriggerMenuParser.cc.

References TkAlMuonSelectors_cfi::cut, egammaForCoreTracking_cff::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), ETM, l1t::gtETM, l1t::gtETMHF, l1t::gtHTM, l1t::gtTowerCount, HTM, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), LogDebug, LogTrace, m_corEnergySumTemplate, dataset::name, electrons_cff::objType, colinearityKinematic::Phi, EnergySumTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, jetExtractorBlock_cff::Threshold, l1t::TypeETM, l1t::TypeETMHF, l1t::TypeHTM, and l1t::TypeTowerCount.

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

2481  {
2482 
2483 
2484 // XERCES_CPP_NAMESPACE_USE
2485  using namespace tmeventsetup;
2486 
2487  // get condition, particle name and type name
2488 
2489  std::string condition = "calo";
2490  std::string type = l1t2string( corrESum->getType() );
2491  std::string name = l1t2string( corrESum->getName() );
2492 
2493  LogDebug("TriggerMenuParser")
2494  << "\n ****************************************** "
2495  << "\n (in parseEnergySum) "
2496  << "\n condition = " << condition
2497  << "\n type = " << type
2498  << "\n name = " << name
2499  << std::endl;
2500 
2501 
2502 
2503  // determine object type type
2504  GlobalObject energySumObjType;
2505  GtConditionType cType;
2506 
2507  if( corrESum->getType()== esObjectType::ETM ){
2508  energySumObjType = GlobalObject::gtETM;
2509  cType = TypeETM;
2510  }
2511  else if( corrESum->getType()== esObjectType::HTM ){
2512  energySumObjType = GlobalObject::gtHTM;
2513  cType = TypeHTM;
2514  }
2515  else if( corrESum->getType()== esObjectType::ETMHF ){
2516  energySumObjType = GlobalObject::gtETMHF;
2517  cType = TypeETMHF;
2518  }
2519  else if( corrESum->getType()== esObjectType::TOWERCOUNT ){
2520  energySumObjType = GlobalObject::gtTowerCount;
2521  cType = TypeTowerCount;
2522  }
2523  else {
2524  edm::LogError("TriggerMenuParser")
2525  << "Wrong type for energy-sum correclation condition (" << type
2526  << ")" << std::endl;
2527  return false;
2528  }
2529 
2530 
2531 
2532  // global object
2533  int nrObj = 1;
2534 
2535 // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2536 
2537  // get values
2538 
2539  // temporary storage of the parameters
2540  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2541 
2542 
2543  int cnt = 0;
2544 
2545 // BLW TO DO: These needs to the added to the object rather than the whole condition.
2546  int relativeBx = 0;
2547  bool gEq = false;
2548 
2549 // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2550 
2551 
2552  gEq = (corrESum->getComparisonOperator() == esComparisonOperator::GE);
2553 
2554 // BLW TO DO: This needs to be added to the Object Parameters
2555  relativeBx = corrESum->getBxOffset();
2556 
2557 // Loop over the cuts for this object
2558  int lowerThresholdInd = 0;
2559  int upperThresholdInd = -1;
2560  int cntPhi = 0;
2561  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
2562 
2563 
2564  const std::vector<esCut>& cuts = corrESum->getCuts();
2565  for (size_t kk = 0; kk < cuts.size(); kk++)
2566  {
2567  const esCut cut = cuts.at(kk);
2568 
2569  switch(cut.getCutType()){
2570  case esCutType::Threshold:
2571  lowerThresholdInd = cut.getMinimum().index;
2572  upperThresholdInd = cut.getMaximum().index;
2573  break;
2574 
2575  case esCutType::Eta:
2576  break;
2577 
2578  case esCutType::Phi: {
2579 
2580  if(cntPhi == 0) {
2581  phiWindow1Lower = cut.getMinimum().index;
2582  phiWindow1Upper = cut.getMaximum().index;
2583  } else if(cntPhi == 1) {
2584  phiWindow2Lower = cut.getMinimum().index;
2585  phiWindow2Upper = cut.getMaximum().index;
2586  } else {
2587  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition ("
2588  << type << ")" << std::endl;
2589  return false;
2590  }
2591  cntPhi++;
2592 
2593  }
2594  break;
2595 
2596  default:
2597  break;
2598  } //end switch
2599 
2600  } //end loop over cuts
2601 
2602 
2603 
2604  // Fill the object parameters
2605  objParameter[0].etLowThreshold = lowerThresholdInd;
2606  objParameter[0].etHighThreshold = upperThresholdInd;
2607  objParameter[0].phiWindow1Lower = phiWindow1Lower;
2608  objParameter[0].phiWindow1Upper = phiWindow1Upper;
2609  objParameter[0].phiWindow2Lower = phiWindow2Lower;
2610  objParameter[0].phiWindow2Upper = phiWindow2Upper;
2611 
2612 
2613  // Output for debugging
2614  LogDebug("TriggerMenuParser")
2615  << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2616  << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etLowThreshold
2617  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2618  << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
2619  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2620  << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper << std::dec
2621  << std::endl;
2622 
2623 
2624  // object types - all same energySumObjType
2625  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2626 
2627  // now create a new energySum condition
2628 
2629  EnergySumTemplate energySumCond(name);
2630 
2631  energySumCond.setCondType(cType);
2632  energySumCond.setObjectType(objType);
2633  energySumCond.setCondGEq(gEq);
2634  energySumCond.setCondChipNr(chipNr);
2635  energySumCond.setCondRelativeBx(relativeBx);
2636 
2637  energySumCond.setConditionParameter(objParameter);
2638 
2639  if (edm::isDebugEnabled() ) {
2640 
2641  std::ostringstream myCoutStream;
2642  energySumCond.print(myCoutStream);
2643  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2644 
2645  }
2646 /*
2647  // insert condition into the map
2648  if ( !insertConditionIntoMap(energySumCond, chipNr)) {
2649 
2650  edm::LogError("TriggerMenuParser")
2651  << " Error: duplicate condition (" << name << ")"
2652  << std::endl;
2653 
2654  return false;
2655  }
2656  else {
2657 
2658  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2659 
2660  }
2661 */
2662  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2663 
2664 
2665  //
2666  return true;
2667 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
#define LogTrace(id)
bool TriggerMenuParser::parseExternal ( tmeventsetup::esCondition  condExt,
unsigned int  chipNr = 0 
)
private

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

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

Definition at line 2683 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

2684  {
2685 
2686 
2687  using namespace tmeventsetup;
2688 
2689 
2690  // get condition, particle name and type name
2691  std::string condition = "ext";
2692  std::string particle = "test-fix";
2693  std::string type = l1t2string( condExt.getType() );
2694  std::string name = l1t2string( condExt.getName() );
2695 
2696 
2697  LogDebug("TriggerMenuParser")
2698  << "\n ****************************************** "
2699  << "\n (in parseExternal) "
2700  << "\n condition = " << condition
2701  << "\n particle = " << particle
2702  << "\n type = " << type
2703  << "\n name = " << name
2704  << std::endl;
2705 
2706 
2707  // object type and condition type
2708  // object type - irrelevant for External conditions
2709  GtConditionType cType = TypeExternal;
2710  GlobalObject extSignalType = GlobalObject::gtExternal;
2711  int nrObj = 1; //only one object for these conditions
2712 
2713  int relativeBx = 0;
2714  unsigned int channelID = 0;
2715 
2716  // Get object for External conditions
2717  const std::vector<esObject>& objects = condExt.getObjects();
2718  for (size_t jj = 0; jj < objects.size(); jj++) {
2719 
2720  const esObject object = objects.at(jj);
2721  if(object.getType() == esObjectType::EXT) {
2722  relativeBx = object.getBxOffset();
2723  channelID = object.getExternalChannelId();
2724  }
2725  }
2726 
2727 
2728  // set the boolean value for the ge_eq mode - irrelevant for External conditions
2729  bool gEq = false;
2730 
2731  //object types - all same for external conditions
2732  std::vector<GlobalObject> objType(nrObj, extSignalType);
2733 
2734  // now create a new External condition
2735  ExternalTemplate externalCond(name);
2736 
2737  externalCond.setCondType(cType);
2738  externalCond.setObjectType(objType);
2739  externalCond.setCondGEq(gEq);
2740  externalCond.setCondChipNr(chipNr);
2741  externalCond.setCondRelativeBx(relativeBx);
2742  externalCond.setExternalChannel(channelID);
2743 
2744  LogTrace("TriggerMenuParser")
2745  << externalCond << "\n" << std::endl;
2746 
2747  // insert condition into the map
2748  if ( !insertConditionIntoMap(externalCond, chipNr)) {
2749 
2750  edm::LogError("TriggerMenuParser")
2751  << " Error: duplicate condition (" << name
2752  << ")" << std::endl;
2753 
2754  return false;
2755  } else {
2756 
2757  (m_vecExternalTemplate[chipNr]).push_back(externalCond);
2758 
2759  }
2760 
2761  return true;
2762 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
#define LogTrace(id)
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
bool TriggerMenuParser::parseMuon ( tmeventsetup::esCondition  condMu,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse a muon condition

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

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

Definition at line 1081 of file TriggerMenuParser.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, MuonTemplate::CorrelationParameter::chargeCorrelation, TkAlMuonSelectors_cfi::cut, egammaForCoreTracking_cff::cuts, reco::tau::disc::Eta(), l1t::gtMu, insertConditionIntoMap(), createfilelist::int, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), l1tstr2int(), LogDebug, LogTrace, m_corMuonTemplate, m_vecMuonTemplate, dataset::name, electrons_cff::objType, colinearityKinematic::Phi, MuonTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, jetExtractorBlock_cff::Threshold, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

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

Definition at line 1354 of file TriggerMenuParser.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, MuonTemplate::CorrelationParameter::chargeCorrelation, TkAlMuonSelectors_cfi::cut, egammaForCoreTracking_cff::cuts, reco::tau::disc::Eta(), l1t::gtMu, createfilelist::int, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, l1t2string(), l1tstr2int(), LogDebug, LogTrace, m_corMuonTemplate, dataset::name, electrons_cff::objType, colinearityKinematic::Phi, MuonTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, jetExtractorBlock_cff::Threshold, and l1t::Type1s.

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

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

Definition at line 1028 of file TriggerMenuParser.cc.

References mps_check::array, l1t::COS, cuy::ii, lumiPlot::lut, m_gtScales, gen::n, hgcalPlots::obj, funct::pow(), Scenarios_cff::scale, l1t::GlobalScales::setLUT_Cos(), l1t::GlobalScales::setLUT_Sin(), l1t::SIN, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by gtAlgorithmImplementation(), and parseScales().

1029 {
1030 
1031  using namespace tmeventsetup;
1032 
1033  std::string scLabel = obj;
1034  scLabel += "-PHI";
1035 
1036  //This LUT does not exist in L1 Menu file, don't fill it
1037  if( scaleMap.find(scLabel) == scaleMap.end() ) return;
1038  if( func != l1t::SIN and func != l1t::COS) return;
1039 
1040  const esScale* scale = &scaleMap.find(scLabel)->second;
1041 
1042  const double step = scale->getStep();
1043  const double range = scale->getMaximum() - scale->getMinimum();
1044  const size_t n = std::ceil(range / step);
1045  const size_t bitwidth = std::ceil(std::log10(n) / std::log10(2));
1046 
1047  std::vector<double> array(std::pow(2,bitwidth),0);
1048 
1049  for (size_t ii = 0; ii < n; ii++)
1050  {
1051  array.at(ii) = step * ii;
1052  }
1053 
1054  const std::string& lutName = obj;
1055  std::vector<long long> lut;
1056  if ( func == l1t::SIN ) {
1057  applySin(array, n);
1058  setLut(lut, array, prec);
1059  m_gtScales.setLUT_Sin(lutName,lut,prec);
1060  }else if ( func == l1t::COS ) {
1061  applyCos(array, n);
1062  setLut(lut, array, prec);
1063  m_gtScales.setLUT_Cos(lutName,lut,prec);
1064  }
1065 }
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
ii
Definition: cuy.py:590
step
Definition: StallMonitor.cc:94
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void TriggerMenuParser::parsePt_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  lutpfx,
std::string  obj1,
unsigned int  prec 
)
private

Definition at line 940 of file TriggerMenuParser.cc.

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

Referenced by gtAlgorithmImplementation(), and parseScales().

941 {
942 
943  using namespace tmeventsetup;
944 
945  // First Delta Eta for this set
946  std::string scLabel1 = obj1;
947  scLabel1 += "-ET";
948 
949  //This LUT does not exist in L1 Menu file, don't fill it
950  if( scaleMap.find(scLabel1) == scaleMap.end()) return;
951 
952  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
953 
954  std::vector<long long> lut_pt;
955  getLut(lut_pt, scale1, prec);
956 
957  m_gtScales.setLUT_Pt(lutpfx + "_" + scLabel1,lut_pt,prec);
958 
959 
960 }
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
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 643 of file TriggerMenuParser.cc.

References stringResolutionProvider_cfi::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, nanoDQM_cfi::Jet, m_gtScales, nanoDQM_cff::Muon, parseCalMuEta_LUTS(), parseCalMuPhi_LUTS(), parseDeltaEta_Cosh_LUTS(), parseDeltaPhi_Cos_LUTS(), parsePhi_Trig_LUTS(), parsePt_LUTS(), l1t::GlobalScales::ScaleParameters::phiBins, l1t::GlobalScales::ScaleParameters::phiMax, l1t::GlobalScales::ScaleParameters::phiMin, l1t::GlobalScales::ScaleParameters::phiStep, funct::pow(), Scenarios_cff::scale, l1t::GlobalScales::setEGScales(), l1t::GlobalScales::setETMHfScales(), l1t::GlobalScales::setETMScales(), l1t::GlobalScales::setETTEmScales(), l1t::GlobalScales::setETTScales(), l1t::GlobalScales::setHTMScales(), l1t::GlobalScales::setHTTScales(), l1t::GlobalScales::setJetScales(), l1t::GlobalScales::setMuonScales(), l1t::GlobalScales::setTauScales(), and l1t::SIN.

Referenced by gtAlgorithmImplementation(), and parseCondFormats().

643  {
644 
645  using namespace tmeventsetup;
646 
647 // Setup ScaleParameter to hold information from parsing
648  GlobalScales::ScaleParameters muScales;
649  GlobalScales::ScaleParameters egScales;
650  GlobalScales::ScaleParameters tauScales;
651  GlobalScales::ScaleParameters jetScales;
652  GlobalScales::ScaleParameters ettScales;
653  GlobalScales::ScaleParameters ettEmScales;
654  GlobalScales::ScaleParameters etmScales;
655  GlobalScales::ScaleParameters etmHfScales;
656  GlobalScales::ScaleParameters httScales;
657  GlobalScales::ScaleParameters htmScales;
658 
659 
660 // Start by parsing the Scale Map
661  for (std::map<std::string, esScale>::const_iterator cit = scaleMap.begin();
662  cit != scaleMap.end(); cit++)
663  {
664  const esScale& scale = cit->second;
665 
666  GlobalScales::ScaleParameters *scaleParam;
667  if (scale.getObjectType() == esObjectType::Muon) scaleParam = &muScales;
668  else if (scale.getObjectType() == esObjectType::Egamma) scaleParam = &egScales;
669  else if (scale.getObjectType() == esObjectType::Tau) scaleParam = &tauScales;
670  else if (scale.getObjectType() == esObjectType::Jet) scaleParam = &jetScales;
671  else if (scale.getObjectType() == esObjectType::ETT) scaleParam = &ettScales;
672  else if (scale.getObjectType() == esObjectType::ETTEM) scaleParam = &ettEmScales;
673  else if (scale.getObjectType() == esObjectType::ETM) scaleParam = &etmScales;
674  else if (scale.getObjectType() == esObjectType::ETMHF) scaleParam = &etmHfScales;
675  else if (scale.getObjectType() == esObjectType::HTT) scaleParam = &httScales;
676  else if (scale.getObjectType() == esObjectType::HTM) scaleParam = &htmScales;
677  else scaleParam = nullptr;
678 
679  if(scaleParam != nullptr) {
680  switch(scale.getScaleType()) {
681  case esScaleType::EtScale: {
682  scaleParam->etMin = scale.getMinimum();
683  scaleParam->etMax = scale.getMaximum();
684  scaleParam->etStep = scale.getStep();
685 
686  //Get bin edges
687  const std::vector<esBin>& binsV = scale.getBins();
688  for(unsigned int i=0; i<binsV.size(); i++) {
689  const esBin& bin = binsV.at(i);
690  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
691  scaleParam->etBins.push_back(binLimits);
692  }
693 
694  // If this is an energy sum fill dummy values for eta and phi
695  // There are no scales for these in the XML so the other case statements will not be seen....do it here.
696  if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
697  scale.getObjectType() == esObjectType::ETM || scale.getObjectType() == esObjectType::HTM ||
698  scale.getObjectType() == esObjectType::ETTEM || scale.getObjectType() == esObjectType::ETMHF) {
699 
700  scaleParam->etaMin = -1.;
701  scaleParam->etaMax = -1.;
702  scaleParam->etaStep = -1.;
703  if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT || scale.getObjectType() == esObjectType::ETTEM) {
704 // if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT) {
705  scaleParam->phiMin = -1.;
706  scaleParam->phiMax = -1.;
707  scaleParam->phiStep = -1.;
708  }
709  }
710  }
711  break;
712  case esScaleType::EtaScale: {
713  scaleParam->etaMin = scale.getMinimum();
714  scaleParam->etaMax = scale.getMaximum();
715  scaleParam->etaStep = scale.getStep();
716 
717  //Get bin edges
718  const std::vector<esBin>& binsV = scale.getBins();
719  scaleParam->etaBins.resize(pow(2,scale.getNbits()));
720  for(unsigned int i=0; i<binsV.size(); i++) {
721  const esBin& bin = binsV.at(i);
722  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
723  scaleParam->etaBins.at(bin.hw_index) = binLimits;
724  }
725  }
726  break;
727  case esScaleType::PhiScale: {
728  scaleParam->phiMin = scale.getMinimum();
729  scaleParam->phiMax = scale.getMaximum();
730  scaleParam->phiStep = scale.getStep();
731 
732  //Get bin edges
733  const std::vector<esBin>& binsV = scale.getBins();
734  scaleParam->phiBins.resize(pow(2,scale.getNbits()));
735  for(unsigned int i=0; i<binsV.size(); i++) {
736  const esBin& bin = binsV.at(i);
737  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
738  scaleParam->phiBins.at(bin.hw_index) = binLimits;
739  }
740  }
741  break;
742  default:
743 
744  break;
745  } //end switch
746  } //end valid scale
747  } //end loop over scaleMap
748 
749  // put the ScaleParameters into the class
750  m_gtScales.setMuonScales(muScales);
751  m_gtScales.setEGScales(egScales);
752  m_gtScales.setTauScales(tauScales);
753  m_gtScales.setJetScales(jetScales);
754  m_gtScales.setETTScales(ettScales);
755  m_gtScales.setETTEmScales(ettEmScales);
756  m_gtScales.setETMScales(etmScales);
757  m_gtScales.setETMHfScales(etmHfScales);
758  m_gtScales.setHTTScales(httScales);
759  m_gtScales.setHTMScales(htmScales);
760 
761 
762 
763 // Setup the LUT for the Scale Conversions
764  bool hasPrecision = false;
765  std::map<std::string, unsigned int> precisions;
766  getPrecisions(precisions, scaleMap);
767  for (std::map<std::string, unsigned int>::const_iterator cit = precisions.begin(); cit != precisions.end(); cit++)
768  {
769  //std::cout << cit->first << " = " << cit->second << "\n";
770  hasPrecision = true;
771  }
772 
773 
774  if (hasPrecision)
775  {
776 
777  //Start with the Cal - Muon Eta LUTS
778  //----------------------------------
779  parseCalMuEta_LUTS(scaleMap, "EG", "MU");
780  parseCalMuEta_LUTS(scaleMap, "JET", "MU");
781  parseCalMuEta_LUTS(scaleMap, "TAU", "MU");
782 
783  //Now the Cal - Muon Phi LUTS
784  //-------------------------------------
785  parseCalMuPhi_LUTS(scaleMap, "EG", "MU");
786  parseCalMuPhi_LUTS(scaleMap, "JET", "MU");
787  parseCalMuPhi_LUTS(scaleMap, "TAU", "MU");
788  parseCalMuPhi_LUTS(scaleMap, "HTM", "MU");
789  parseCalMuPhi_LUTS(scaleMap, "ETM", "MU");
790  parseCalMuPhi_LUTS(scaleMap, "ETMHF", "MU");
791 
792  // Now the Pt LUTs (??? more combinations needed ??)
793  // ---------------
794  parsePt_LUTS(scaleMap, "Mass" ,"EG", precisions["PRECISION-EG-MU-MassPt"] );
795  parsePt_LUTS(scaleMap, "Mass" ,"MU", precisions["PRECISION-EG-MU-MassPt"] );
796  parsePt_LUTS(scaleMap, "Mass" ,"JET", precisions["PRECISION-EG-JET-MassPt"] );
797  parsePt_LUTS(scaleMap, "Mass" ,"TAU", precisions["PRECISION-EG-TAU-MassPt"] );
798  parsePt_LUTS(scaleMap, "Mass" ,"ETM", precisions["PRECISION-EG-ETM-MassPt"] );
799  parsePt_LUTS(scaleMap, "Mass" ,"ETMHF", precisions["PRECISION-EG-ETMHF-MassPt"] );
800  parsePt_LUTS(scaleMap, "Mass" ,"HTM", precisions["PRECISION-EG-HTM-MassPt"] );
801 
802  // Now the Pt LUTs for TBPT calculation (??? CCLA following what was done for MASS pt LUTs for now ??)
803  // ---------------
804  parsePt_LUTS(scaleMap,"TwoBody" ,"EG", precisions["PRECISION-EG-MU-TwoBodyPt"] );
805  parsePt_LUTS(scaleMap,"TwoBody" ,"MU", precisions["PRECISION-EG-MU-TwoBodyPt"] );
806  parsePt_LUTS(scaleMap,"TwoBody" ,"JET", precisions["PRECISION-EG-JET-TwoBodyPt"] );
807  parsePt_LUTS(scaleMap,"TwoBody" ,"TAU", precisions["PRECISION-EG-TAU-TwoBodyPt"] );
808  parsePt_LUTS(scaleMap,"TwoBody" ,"ETM", precisions["PRECISION-EG-ETM-TwoBodyPt"] );
809  parsePt_LUTS(scaleMap,"TwoBody" ,"ETMHF", precisions["PRECISION-EG-ETMHF-TwoBodyPt"] );
810  parsePt_LUTS(scaleMap,"TwoBody" ,"HTM", precisions["PRECISION-EG-HTM-TwoBodyPt"] );
811 
812 
813 
814  // Now the Delta Eta/Cosh LUTs (must be done in groups)
815  // ----------------------------------------------------
816  parseDeltaEta_Cosh_LUTS(scaleMap,"EG","EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
817  parseDeltaEta_Cosh_LUTS(scaleMap,"EG","JET",precisions["PRECISION-EG-JET-Delta"],precisions["PRECISION-EG-JET-Math"]);
818  parseDeltaEta_Cosh_LUTS(scaleMap,"EG","TAU",precisions["PRECISION-EG-TAU-Delta"],precisions["PRECISION-EG-TAU-Math"]);
819  parseDeltaEta_Cosh_LUTS(scaleMap,"EG","MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
820 
821  parseDeltaEta_Cosh_LUTS(scaleMap,"JET","JET",precisions["PRECISION-JET-JET-Delta"],precisions["PRECISION-JET-JET-Math"]);
822  parseDeltaEta_Cosh_LUTS(scaleMap,"JET","TAU",precisions["PRECISION-JET-TAU-Delta"],precisions["PRECISION-JET-TAU-Math"]);
823  parseDeltaEta_Cosh_LUTS(scaleMap,"JET","MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
824 
825  parseDeltaEta_Cosh_LUTS(scaleMap,"TAU","TAU",precisions["PRECISION-TAU-TAU-Delta"],precisions["PRECISION-TAU-TAU-Math"]);
826  parseDeltaEta_Cosh_LUTS(scaleMap,"TAU","MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
827 
828  parseDeltaEta_Cosh_LUTS(scaleMap,"MU","MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
829 
830 
831  // Now the Delta Phi/Cos LUTs (must be done in groups)
832  // ----------------------------------------------------
833  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
834  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","JET",precisions["PRECISION-EG-JET-Delta"],precisions["PRECISION-EG-JET-Math"]);
835  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","TAU",precisions["PRECISION-EG-TAU-Delta"],precisions["PRECISION-EG-TAU-Math"]);
836  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","ETM",precisions["PRECISION-EG-ETM-Delta"],precisions["PRECISION-EG-ETM-Math"]);
837  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","ETMHF",precisions["PRECISION-EG-ETMHF-Delta"],precisions["PRECISION-EG-ETMHF-Math"]);
838  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","HTM",precisions["PRECISION-EG-HTM-Delta"],precisions["PRECISION-EG-HTM-Math"]);
839  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
840 
841  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","JET",precisions["PRECISION-JET-JET-Delta"],precisions["PRECISION-JET-JET-Math"]);
842  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","TAU",precisions["PRECISION-JET-TAU-Delta"],precisions["PRECISION-JET-TAU-Math"]);
843  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","ETM",precisions["PRECISION-JET-ETM-Delta"],precisions["PRECISION-JET-ETM-Math"]);
844  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","ETMHF",precisions["PRECISION-JET-ETMHF-Delta"],precisions["PRECISION-JET-ETMHF-Math"]);
845  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","HTM",precisions["PRECISION-JET-HTM-Delta"],precisions["PRECISION-JET-HTM-Math"]);
846  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
847 
848  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","TAU",precisions["PRECISION-TAU-TAU-Delta"],precisions["PRECISION-TAU-TAU-Math"]);
849  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","ETM",precisions["PRECISION-TAU-ETM-Delta"],precisions["PRECISION-TAU-ETM-Math"]);
850  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","ETMHF",precisions["PRECISION-TAU-ETMHF-Delta"],precisions["PRECISION-TAU-ETMHF-Math"]);
851  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","HTM",precisions["PRECISION-TAU-HTM-Delta"],precisions["PRECISION-TAU-HTM-Math"]);
852  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
853 
854  parseDeltaPhi_Cos_LUTS(scaleMap,"MU","ETM",precisions["PRECISION-MU-ETM-Delta"],precisions["PRECISION-MU-ETM-Math"]);
855  parseDeltaPhi_Cos_LUTS(scaleMap,"MU","ETMHF",precisions["PRECISION-MU-ETMHF-Delta"],precisions["PRECISION-MU-ETMHF-Math"]);
856  parseDeltaPhi_Cos_LUTS(scaleMap,"MU","HTM",precisions["PRECISION-MU-HTM-Delta"],precisions["PRECISION-MU-HTM-Math"]);
857  parseDeltaPhi_Cos_LUTS(scaleMap,"MU","MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
858 
859  parsePhi_Trig_LUTS(scaleMap,"EG", l1t::COS , precisions["PRECISION-EG-EG-Math"]);
860  parsePhi_Trig_LUTS(scaleMap,"JET", l1t::COS , precisions["PRECISION-JET-JET-Math"]);
861  parsePhi_Trig_LUTS(scaleMap,"TAU", l1t::COS , precisions["PRECISION-TAU-TAU-Math"]);
862  parsePhi_Trig_LUTS(scaleMap,"MU", l1t::COS , precisions["PRECISION-MU-MU-Math"]);
863 
864  parsePhi_Trig_LUTS(scaleMap,"EG", l1t::SIN , precisions["PRECISION-EG-EG-Math"]);
865  parsePhi_Trig_LUTS(scaleMap,"JET", l1t::SIN , precisions["PRECISION-JET-JET-Math"]);
866  parsePhi_Trig_LUTS(scaleMap,"TAU", l1t::SIN , precisions["PRECISION-TAU-TAU-Math"]);
867  parsePhi_Trig_LUTS(scaleMap,"MU", l1t::SIN , precisions["PRECISION-MU-MU-Math"]);
868 
869 
870  //CCLA
871  //m_gtScales.dumpAllLUTs(std::cout);
872  //m_gtScales.print(std::cout);
873 
874  }
875 
876 
877 
878 
879 
880  return true;
881 }
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:39
void parseDeltaPhi_Cos_LUTS(const std::map< std::string, tmeventsetup::esScale > &scaleMap, const std::string &obj1, const std::string &obj2, unsigned int prec1, unsigned int prec2)
Definition: L1GtObject.h:36
void setETMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:68
Definition: L1GtObject.h:38
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
bin
set the eta bin as selection string.
void setMuonScales(ScaleParameters &scales)
Definition: GlobalScales.h:60
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:66
void setHTMScales(ScaleParameters &scales)
Definition: GlobalScales.h:69
Definition: L1GtObject.h:37
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:40
void parsePt_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string lutpfx, std::string obj1, unsigned int prec)
void TriggerMenuParser::setCorCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  corCaloTempl)

Definition at line 180 of file TriggerMenuParser.cc.

References m_corCaloTemplate.

Referenced by corCaloTemplate().

181  {
182 
183  m_corCaloTemplate = corCaloTempl;
184 }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
void TriggerMenuParser::setCorEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  corEnergySumTempl)

Definition at line 186 of file TriggerMenuParser.cc.

References m_corEnergySumTemplate.

Referenced by corEnergySumTemplate().

187  {
188 
189  m_corEnergySumTemplate = corEnergySumTempl;
190 }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
void TriggerMenuParser::setCorMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  corMuonTempl)

Definition at line 174 of file TriggerMenuParser.cc.

References m_corMuonTemplate.

Referenced by corMuonTemplate().

175  {
176 
177  m_corMuonTemplate = corMuonTempl;
178 }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
void TriggerMenuParser::setGtAlgorithmAliasMap ( const AlgorithmMap algoMap)

Definition at line 201 of file TriggerMenuParser.cc.

References m_algorithmAliasMap.

Referenced by gtAlgorithmAliasMap().

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

Definition at line 473 of file TriggerMenuParser.cc.

References m_algorithmImplementation, and heppy_batch::val.

Referenced by gtAlgorithmImplementation().

473  {
474 
476 
477 }
std::string m_algorithmImplementation
void TriggerMenuParser::setGtAlgorithmMap ( const AlgorithmMap algoMap)

Definition at line 196 of file TriggerMenuParser.cc.

References m_algorithmMap.

Referenced by gtAlgorithmMap().

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

Definition at line 105 of file TriggerMenuParser.cc.

References m_conditionMap.

Referenced by gtConditionMap().

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

Definition at line 72 of file TriggerMenuParser.cc.

References m_numberConditionChips.

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

73  {
74 
75  m_numberConditionChips = numberConditionChipsValue;
76 
77 }
unsigned int m_numberConditionChips
hardware limits
void TriggerMenuParser::setGtNumberPhysTriggers ( const unsigned int &  numberPhysTriggersValue)

Definition at line 96 of file TriggerMenuParser.cc.

References m_numberPhysTriggers.

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

97  {
98 
99  m_numberPhysTriggers = numberPhysTriggersValue;
100 
101 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
void TriggerMenuParser::setGtOrderConditionChip ( const std::vector< int > &  orderConditionChipValue)

Definition at line 88 of file TriggerMenuParser.cc.

References m_orderConditionChip.

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

89  {
90 
91  m_orderConditionChip = orderConditionChipValue;
92 
93 }
std::vector< int > m_orderConditionChip
void TriggerMenuParser::setGtPinsOnConditionChip ( const unsigned int &  pinsOnConditionChipValue)

Definition at line 80 of file TriggerMenuParser.cc.

References m_pinsOnConditionChip.

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

80  {
81 
82  m_pinsOnConditionChip = pinsOnConditionChipValue;
83 
84 }
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
void TriggerMenuParser::setGtScaleDbKey ( const std::string &  scaleKey)

Definition at line 128 of file TriggerMenuParser.cc.

References m_scaleDbKey.

Referenced by gtScales().

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

Definition at line 461 of file TriggerMenuParser.cc.

References m_triggerMenuAuthor, and heppy_batch::val.

Referenced by gtTriggerMenuAuthor().

461  {
462 
464 
465 }
void TriggerMenuParser::setGtTriggerMenuDate ( const std::string &  val)

Definition at line 455 of file TriggerMenuParser.cc.

References m_triggerMenuDate, and heppy_batch::val.

Referenced by gtTriggerMenuDate().

455  {
456 
458 
459 }
void TriggerMenuParser::setGtTriggerMenuDescription ( const std::string &  val)

Definition at line 467 of file TriggerMenuParser.cc.

References m_triggerMenuDescription, and heppy_batch::val.

Referenced by gtTriggerMenuDescription().

467  {
468 
470 
471 }
std::string m_triggerMenuDescription
void TriggerMenuParser::setGtTriggerMenuImplementation ( const unsigned long &  menuImplementation)

Definition at line 123 of file TriggerMenuParser.cc.

References m_triggerMenuImplementation.

Referenced by gtTriggerMenuImplementation().

123  {
124  m_triggerMenuImplementation = menuImplementation;
125 }
unsigned long m_triggerMenuImplementation
void TriggerMenuParser::setGtTriggerMenuInterface ( const std::string &  menuInterface)

Definition at line 110 of file TriggerMenuParser.cc.

References m_triggerMenuInterface.

Referenced by gtTriggerMenuInterface().

110  {
111  m_triggerMenuInterface = menuInterface;
112 }
std::string m_triggerMenuInterface
menu names
void TriggerMenuParser::setGtTriggerMenuInterfaceAuthor ( const std::string &  val)

Definition at line 442 of file TriggerMenuParser.cc.

References m_triggerMenuInterfaceAuthor, and heppy_batch::val.

Referenced by gtTriggerMenuInterfaceAuthor().

442  {
443 
445 
446 }
std::string m_triggerMenuInterfaceAuthor
void TriggerMenuParser::setGtTriggerMenuInterfaceDate ( const std::string &  val)

Definition at line 436 of file TriggerMenuParser.cc.

References m_triggerMenuInterfaceDate, and heppy_batch::val.

Referenced by gtTriggerMenuInterfaceDate().

436  {
437 
439 
440 }
std::string m_triggerMenuInterfaceDate
number of technical triggers
void TriggerMenuParser::setGtTriggerMenuInterfaceDescription ( const std::string &  val)

Definition at line 448 of file TriggerMenuParser.cc.

References m_triggerMenuInterfaceDescription, and heppy_batch::val.

Referenced by gtTriggerMenuInterfaceDescription().

448  {
449 
451 
452 }
std::string m_triggerMenuInterfaceDescription
void TriggerMenuParser::setGtTriggerMenuName ( const std::string &  menuName)

Definition at line 119 of file TriggerMenuParser.cc.

References m_triggerMenuName.

Referenced by gtTriggerMenuName().

119  {
120  m_triggerMenuName = menuName;
121 }
void TriggerMenuParser::setGtTriggerMenuUUID ( const int  uuid)

Definition at line 115 of file TriggerMenuParser.cc.

References m_triggerMenuUUID, and createPayload::uuid.

Referenced by gtTriggerMenuUUID().

115  {
117 }
unsigned long m_triggerMenuUUID
void TriggerMenuParser::setVecCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  vecCaloTempl)

Definition at line 139 of file TriggerMenuParser.cc.

References m_vecCaloTemplate.

Referenced by vecCaloTemplate().

140  {
141 
142  m_vecCaloTemplate = vecCaloTempl;
143 }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
void TriggerMenuParser::setVecCorrelationTemplate ( const std::vector< std::vector< CorrelationTemplate > > &  vecCorrelationTempl)

Definition at line 160 of file TriggerMenuParser.cc.

References m_vecCorrelationTemplate.

Referenced by vecCorrelationTemplate().

161  {
162 
163  m_vecCorrelationTemplate = vecCorrelationTempl;
164 }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
void TriggerMenuParser::setVecCorrelationWithOverlapRemovalTemplate ( const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &  vecCorrelationWithOverlapRemovalTempl)

Definition at line 166 of file TriggerMenuParser.cc.

References m_vecCorrelationWithOverlapRemovalTemplate.

Referenced by vecCorrelationWithOverlapRemovalTemplate().

167  {
168 
169  m_vecCorrelationWithOverlapRemovalTemplate = vecCorrelationWithOverlapRemovalTempl;
170 }
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
void TriggerMenuParser::setVecEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  vecEnergySumTempl)

Definition at line 145 of file TriggerMenuParser.cc.

References m_vecEnergySumTemplate.

Referenced by vecEnergySumTemplate().

146  {
147 
148  m_vecEnergySumTemplate = vecEnergySumTempl;
149 }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
void TriggerMenuParser::setVecExternalTemplate ( const std::vector< std::vector< ExternalTemplate > > &  vecExternalTempl)

Definition at line 153 of file TriggerMenuParser.cc.

References m_vecExternalTemplate.

Referenced by vecExternalTemplate().

154  {
155 
156  m_vecExternalTemplate = vecExternalTempl;
157 }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
void TriggerMenuParser::setVecMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  vecMuonTempl)

Definition at line 133 of file TriggerMenuParser.cc.

References m_vecMuonTemplate.

Referenced by vecMuonTemplate().

134  {
135 
136  m_vecMuonTemplate = vecMuonTempl;
137 }
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::vecCaloTemplate ( ) const
inline

Definition at line 154 of file TriggerMenuParser.h.

References m_vecCaloTemplate, and setVecCaloTemplate().

Referenced by L1TGlobalProducer::produce().

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

Definition at line 181 of file TriggerMenuParser.h.

References m_vecCorrelationTemplate, and setVecCorrelationTemplate().

Referenced by L1TGlobalProducer::produce().

181  {
182 
184  }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& l1t::TriggerMenuParser::vecCorrelationWithOverlapRemovalTemplate ( ) const
inline

Definition at line 189 of file TriggerMenuParser.h.

References m_vecCorrelationWithOverlapRemovalTemplate, and setVecCorrelationWithOverlapRemovalTemplate().

Referenced by L1TGlobalProducer::produce().

189  {
190 
192  }
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
const std::vector<std::vector<EnergySumTemplate> >& l1t::TriggerMenuParser::vecEnergySumTemplate ( ) const
inline

Definition at line 161 of file TriggerMenuParser.h.

References m_vecEnergySumTemplate, and setVecEnergySumTemplate().

Referenced by L1TGlobalProducer::produce().

161  {
162 
163  return m_vecEnergySumTemplate;
164  }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
const std::vector<std::vector<ExternalTemplate> >& l1t::TriggerMenuParser::vecExternalTemplate ( ) const
inline

Definition at line 172 of file TriggerMenuParser.h.

References m_vecExternalTemplate, and setVecExternalTemplate().

Referenced by L1TGlobalProducer::produce().

172  {
173 
174  return m_vecExternalTemplate;
175  }
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 148 of file TriggerMenuParser.h.

References m_vecMuonTemplate, and setVecMuonTemplate().

Referenced by L1TGlobalProducer::produce().

148  {
149  return m_vecMuonTemplate;
150  }
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 472 of file TriggerMenuParser.h.

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

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

Definition at line 436 of file TriggerMenuParser.h.

Referenced by gtAlgorithmImplementation(), and setGtAlgorithmImplementation().

AlgorithmMap l1t::TriggerMenuParser::m_algorithmMap
private

map containing the physics algorithms (by name)

Definition at line 469 of file TriggerMenuParser.h.

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

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

map containing the conditions (per condition chip) - transient

Definition at line 442 of file TriggerMenuParser.h.

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

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

hardware limits

number of condition chips

Definition at line 409 of file TriggerMenuParser.h.

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

unsigned int l1t::TriggerMenuParser::m_numberPhysTriggers
private

number of physics trigger algorithms

Definition at line 419 of file TriggerMenuParser.h.

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

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

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

Definition at line 416 of file TriggerMenuParser.h.

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

unsigned int l1t::TriggerMenuParser::m_pinsOnConditionChip
private

number of pins on the GTL condition chips

Definition at line 412 of file TriggerMenuParser.h.

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

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

menu associated scale key

Definition at line 453 of file TriggerMenuParser.h.

Referenced by gtScaleDbKey(), and setGtScaleDbKey().

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

Definition at line 433 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuAuthor(), and setGtTriggerMenuAuthor().

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

Definition at line 432 of file TriggerMenuParser.h.

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

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

menu names

Definition at line 447 of file TriggerMenuParser.h.

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

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

number of technical triggers

Definition at line 428 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDate(), and setGtTriggerMenuInterfaceDate().

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

Definition at line 448 of file TriggerMenuParser.h.

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

unsigned long l1t::TriggerMenuParser::m_triggerMenuUUID
private

Definition at line 450 of file TriggerMenuParser.h.

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

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

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

Definition at line 457 of file TriggerMenuParser.h.

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