test
CMS 3D CMS Logo

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

#include <TriggerMenuParser.h>

Public Member Functions

const std::vector< std::vector
< CaloTemplate > > & 
corCaloTemplate () const
 
const std::vector< std::vector
< EnergySumTemplate > > & 
corEnergySumTemplate () const
 
const std::vector< std::vector
< MuonTemplate > > & 
corMuonTemplate () const
 
std::map< std::string,
unsigned int > 
getExternalSignals (const L1TUtmTriggerMenu *utmMenu)
 
const AlgorithmMapgtAlgorithmAliasMap () const
 get / set the algorithm map (by alias) More...
 
const std::string & gtAlgorithmImplementation () const
 
const AlgorithmMapgtAlgorithmMap () const
 get / set the algorithm map (by name) More...
 
const std::vector< ConditionMap > & gtConditionMap () const
 get / set / build the condition maps More...
 
const unsigned int gtNumberConditionChips () const
 get / set the number of condition chips in GTL More...
 
const unsigned int gtNumberPhysTriggers () const
 get / set the number of physics trigger algorithms More...
 
std::vector< int > gtOrderConditionChip () const
 
const unsigned int gtPinsOnConditionChip () const
 get / set the number of pins on the GTL condition chips More...
 
const std::string & gtScaleDbKey () const
 menu associated scale key More...
 
const GlobalScalesgtScales () const
 menu associated scales More...
 
const std::string & gtTriggerMenuAuthor () const
 
const std::string & gtTriggerMenuDate () const
 
const std::string & gtTriggerMenuDescription () const
 
const unsigned long gtTriggerMenuImplementation () const
 
const std::string & gtTriggerMenuInterface () const
 get / set the trigger menu names More...
 
const std::string & gtTriggerMenuInterfaceAuthor () const
 
const std::string & gtTriggerMenuInterfaceDate () const
 get / set the XML parser creation date, author, description for menu interface, menu More...
 
const std::string & gtTriggerMenuInterfaceDescription () const
 
const std::string & gtTriggerMenuName () const
 
const int gtTriggerMenuUUID () const
 
void parseCondFormats (const L1TUtmTriggerMenu *utmMenu)
 
void setCorCaloTemplate (const std::vector< std::vector< CaloTemplate > > &)
 
void setCorEnergySumTemplate (const std::vector< std::vector< EnergySumTemplate > > &)
 
void setCorMuonTemplate (const std::vector< std::vector< MuonTemplate > > &)
 
void setGtAlgorithmAliasMap (const AlgorithmMap &)
 
void setGtAlgorithmImplementation (const std::string &)
 
void setGtAlgorithmMap (const AlgorithmMap &)
 
void setGtConditionMap (const std::vector< ConditionMap > &)
 
void setGtNumberConditionChips (const unsigned int &)
 
void setGtNumberPhysTriggers (const unsigned int &)
 
void setGtOrderConditionChip (const std::vector< int > &)
 
void setGtPinsOnConditionChip (const unsigned int &)
 
void setGtScaleDbKey (const std::string &)
 
void setGtTriggerMenuAuthor (const std::string &)
 
void setGtTriggerMenuDate (const std::string &)
 
void setGtTriggerMenuDescription (const std::string &)
 
void setGtTriggerMenuImplementation (const unsigned long &)
 
void setGtTriggerMenuInterface (const std::string &)
 
void setGtTriggerMenuInterfaceAuthor (const std::string &)
 
void setGtTriggerMenuInterfaceDate (const std::string &)
 
void setGtTriggerMenuInterfaceDescription (const std::string &)
 
void setGtTriggerMenuName (const std::string &)
 
void setGtTriggerMenuUUID (const int)
 
void setVecCaloTemplate (const std::vector< std::vector< CaloTemplate > > &)
 
void setVecCorrelationTemplate (const std::vector< std::vector< CorrelationTemplate > > &)
 
void 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
< 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...
 
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 (std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, 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 parsePt_LUTS (std::map< std::string, tmeventsetup::esScale > scaleMap, 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
< EnergySumTemplate > > 
m_vecEnergySumTemplate
 
std::vector< std::vector
< ExternalTemplate > > 
m_vecExternalTemplate
 
std::vector< std::vector
< MuonTemplate > > 
m_vecMuonTemplate
 

Detailed Description

Definition at line 51 of file TriggerMenuParser.h.

Constructor & Destructor Documentation

TriggerMenuParser::TriggerMenuParser ( )

constructor empty

Definition at line 47 of file TriggerMenuParser.cc.

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

60  {
61 
62  clearMaps();
63 
64 }

Member Function Documentation

void TriggerMenuParser::clearMaps ( )
private

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

Definition at line 421 of file TriggerMenuParser.cc.

421  {
422 
423  // loop over condition maps (one map per condition chip)
424  // then loop over conditions in the map
425  for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip
426  != m_conditionMap.end(); itCondOnChip++) {
427 
428  // the conditions in the maps are deleted in L1uGtTriggerMenu, not here
429 
430  itCondOnChip->clear();
431 
432  }
433 
434  // the algorithms in the maps are deleted in L1uGtTriggerMenu, not here
435  m_algorithmMap.clear();
436 
437 }
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 189 of file TriggerMenuParser.h.

References m_corCaloTemplate.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 196 of file TriggerMenuParser.h.

References m_corEnergySumTemplate.

Referenced by L1TGlobalProducer::produce().

196  {
197 
198  return m_corEnergySumTemplate;
199  }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::corMuonTemplate ( ) const
inline

Definition at line 182 of file TriggerMenuParser.h.

References m_corMuonTemplate.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 196 of file TriggerMenuParser.cc.

References findQualityFiles::jj, relval_steps::menu, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

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

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

get / set the algorithm map (by alias)

Definition at line 212 of file TriggerMenuParser.h.

References m_algorithmAliasMap.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 275 of file TriggerMenuParser.h.

References m_algorithmImplementation.

275  {
277  }
std::string m_algorithmImplementation
const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmMap ( ) const
inline

get / set the algorithm map (by name)

Definition at line 205 of file TriggerMenuParser.h.

References m_algorithmMap.

Referenced by L1TGlobalProducer::produce().

205  {
206  return m_algorithmMap;
207  }
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 99 of file TriggerMenuParser.h.

References m_conditionMap.

99  {
100  return m_conditionMap;
101  }
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 66 of file TriggerMenuParser.h.

References m_numberConditionChips.

66  {
68  }
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 88 of file TriggerMenuParser.h.

References m_numberPhysTriggers.

88  {
89  return m_numberPhysTriggers;
90  }
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 81 of file TriggerMenuParser.h.

References m_orderConditionChip.

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

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

Definition at line 73 of file TriggerMenuParser.h.

References m_pinsOnConditionChip.

73  {
74  return m_pinsOnConditionChip;
75  }
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 127 of file TriggerMenuParser.h.

References m_scaleDbKey.

Referenced by L1TGlobalProducer::produce().

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

menu associated scales

Definition at line 132 of file TriggerMenuParser.h.

References m_gtScales.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 262 of file TriggerMenuParser.h.

References m_triggerMenuAuthor.

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

Definition at line 256 of file TriggerMenuParser.h.

References m_triggerMenuDate.

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

Definition at line 268 of file TriggerMenuParser.h.

References m_triggerMenuDescription.

268  {
270  }
std::string m_triggerMenuDescription
const unsigned long l1t::TriggerMenuParser::gtTriggerMenuImplementation ( ) const
inline

Definition at line 120 of file TriggerMenuParser.h.

References m_triggerMenuImplementation.

Referenced by L1TGlobalProducer::produce().

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

get / set the trigger menu names

Definition at line 106 of file TriggerMenuParser.h.

References m_triggerMenuInterface.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 236 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceAuthor.

236  {
238  }
std::string m_triggerMenuInterfaceAuthor
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDate ( ) const
inline

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

Definition at line 230 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDate.

230  {
232  }
std::string m_triggerMenuInterfaceDate
number of technical triggers
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDescription ( ) const
inline

Definition at line 242 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDescription.

242  {
244  }
std::string m_triggerMenuInterfaceDescription
const std::string& l1t::TriggerMenuParser::gtTriggerMenuName ( ) const
inline

Definition at line 113 of file TriggerMenuParser.h.

References m_triggerMenuName.

Referenced by L1TGlobalProducer::produce().

113  {
114  return m_triggerMenuName;
115  }
const int l1t::TriggerMenuParser::gtTriggerMenuUUID ( ) const
inline

Definition at line 250 of file TriggerMenuParser.h.

References m_triggerMenuUUID.

Referenced by L1TGlobalProducer::produce().

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

insert an algorithm into algorithm map

Definition at line 465 of file TriggerMenuParser.cc.

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

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

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

441  {
442 
443  std::string cName = cond.condName();
444  LogTrace("TriggerMenuParser")
445  << " Trying to insert condition \"" << cName << "\" in the condition map." ;
446 
447  // no condition name has to appear twice!
448  if ((m_conditionMap[chipNr]).count(cName) != 0) {
449  LogTrace("TriggerMenuParser") << " Condition " << cName
450  << " already exists - not inserted!" << std::endl;
451  return false;
452  }
453 
454  (m_conditionMap[chipNr])[cName] = &cond;
455  LogTrace("TriggerMenuParser")
456  << " OK - condition inserted!"
457  << std::endl;
458 
459 
460  return true;
461 
462 }
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 557 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::data, and contentValuesCheck::ss.

557  {
558  std::stringstream ss;
559  ss << data;
560  return ss.str();
561 }
int TriggerMenuParser::l1tstr2int ( const std::string  data)
private

Definition at line 562 of file TriggerMenuParser.cc.

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

562  {
563  std::stringstream ss;
564  ss << data;
565  int value;
566  ss >> value;
567  return value;
568 }
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 2809 of file TriggerMenuParser.cc.

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

2810  {
2811 
2812 
2813  using namespace tmeventsetup;
2814  //using namespace Algorithm;
2815 
2816 
2817  // get alias
2818  std::string algAlias = algorithm.getName();
2819  std::string algName = algorithm.getName();
2820 
2821  if (algAlias == "") {
2822  algAlias = algName;
2823  LogDebug("TriggerMenuParser")
2824  << "\n No alias defined for algorithm. Alias set to algorithm name."
2825  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
2826  << std::endl;
2827  } else {
2828  //LogDebug("TriggerMenuParser")
2829  LogDebug("TriggerMenuParser") << "\n Alias defined for algorithm."
2830  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
2831  << std::endl;
2832  }
2833 
2834  // get the logical expression
2835  std::string logExpression = algorithm.getExpressionInCondition();
2836 
2837  LogDebug("TriggerMenuParser")
2838  << " Logical expression: " << logExpression
2839  << " Chip number: " << chipNr
2840  << std::endl;
2841 
2842  // determine output pin
2843  int outputPin = algorithm.getIndex();
2844 
2845 
2846  //LogTrace("TriggerMenuParser")
2847  LogDebug("TriggerMenuParser") << " Output pin: " << outputPin
2848  << std::endl;
2849 
2850 
2851  // compute the bit number from chip number, output pin and order of the chips
2852  // pin numbering start with 1, bit numbers with 0
2853  int bitNumber = outputPin;// + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1;
2854 
2855  //LogTrace("TriggerMenuParser")
2856  LogDebug("TriggerMenuParser") << " Bit number: " << bitNumber
2857  << std::endl;
2858 
2859  // create a new algorithm and insert it into algorithm map
2860  GlobalAlgorithm alg(algName, logExpression, bitNumber);
2861  alg.setAlgoChipNumber(static_cast<int>(chipNr));
2862  alg.setAlgoAlias(algAlias);
2863 
2864  if (edm::isDebugEnabled() ) {
2865 
2866  std::ostringstream myCoutStream;
2867  alg.print(myCoutStream);
2868  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2869 
2870  }
2871 
2872  // insert algorithm into the map
2873  if ( !insertAlgorithmIntoMap(alg)) {
2874  return false;
2875  }
2876 
2877  return true;
2878 
2879 }
#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 778 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

779 {
780 
781  using namespace tmeventsetup;
782 
783  // First Delta Eta for this set
784  std::string scLabel1 = obj1;
785  scLabel1 += "-ETA";
786  std::string scLabel2 = obj2;
787  scLabel2 += "-ETA";
788  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
789  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
790 
791  std::vector<long long> lut_cal_2_mu_eta;
792  getCaloMuonEtaConversionLut(lut_cal_2_mu_eta, scale1, scale2);
793 
794  std::string lutName = obj1;
795  lutName += "-";
796  lutName += obj2;
797  m_gtScales.setLUT_CalMuEta(lutName,lut_cal_2_mu_eta);
798 
799 
800 }
virtual void setLUT_CalMuEta(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 802 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

803 {
804 
805  using namespace tmeventsetup;
806 
807  // First Delta Eta for this set
808  std::string scLabel1 = obj1;
809  scLabel1 += "-PHI";
810  std::string scLabel2 = obj2;
811  scLabel2 += "-PHI";
812  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
813  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
814 
815  std::vector<long long> lut_cal_2_mu_phi;
816  getCaloMuonPhiConversionLut(lut_cal_2_mu_phi, scale1, scale2);
817 
818  std::string lutName = obj1;
819  lutName += "-";
820  lutName += obj2;
821  m_gtScales.setLUT_CalMuPhi(lutName,lut_cal_2_mu_phi);
822 
823 
824 }
virtual void setLUT_CalMuPhi(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 1400 of file TriggerMenuParser.cc.

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

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

References GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), ora::GE, l1t::gtEG, l1t::gtJet, l1t::gtTau, edm::isDebugEnabled(), configurableAnalysis::Jet, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, CaloTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::Type1s.

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

Definition at line 239 of file TriggerMenuParser.cc.

References ecalcalib_dqm_sourceclient-live_cfg::algo, KineDebug3::count(), HLT_25ns10e33_v2_cff::DoubleMuon, cuy::ii, reco::tau::disc::InvariantMass(), relval_steps::menu, HLT_25ns10e33_v2_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

Referenced by L1TGlobalProducer::produce().

239  {
240 
241 
242  // resize the vector of condition maps
243  // the number of condition chips should be correctly set before calling parseXmlFile
245 
250 
255 
256  using namespace tmeventsetup;
257  using namespace Algorithm;
258 
259  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*> (utmMenu);
260 
261  //get the meta data
262  m_triggerMenuDescription = menu->getComment();
263  m_triggerMenuDate = menu->getDatetime();
264  m_triggerMenuImplementation = ( getMmHashN(menu->getFirmwareUuid()) & 0xFFFFFFFF); //make sure we only have 32 bits
265  m_triggerMenuName = menu->getName();
266  m_triggerMenuInterface = menu->getVersion(); //BLW: correct descriptor?
267  m_triggerMenuUUID = ( getMmHashN(menu->getName()) & 0xFFFFFFFF); //make sure we only have 32 bits
268 
269  const std::map<std::string, esAlgorithm>& algoMap = menu->getAlgorithmMap();
270  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
271  const std::map<std::string, esScale>& scaleMap = menu->getScaleMap();
272 
273  // parse the scales
274  m_gtScales.setScalesName( menu->getScaleSetName() );
275  parseScales(scaleMap);
276 
277 
278  //loop over the algorithms
279  for (std::map<std::string, esAlgorithm>::const_iterator cit = algoMap.begin();
280  cit != algoMap.end(); cit++)
281  {
282  //condition chip (artifact) TO DO: Update
283  int chipNr = 0;
284 
285  //get algorithm
286  const esAlgorithm& algo = cit->second;
287 
288  //parse the algorithm
289  parseAlgorithm(algo,chipNr); //blw
290 
291  //get conditions for this algorithm
292  const std::vector<std::string>& rpn_vec = algo.getRpnVector();
293  for (size_t ii = 0; ii < rpn_vec.size(); ii++)
294  {
295  const std::string& token = rpn_vec.at(ii);
296  if (isGate(token)) continue;
297 // long hash = getHash(token);
298  const esCondition& condition = condMap.find(token)->second;
299 
300 
301  //check to see if this condtion already exists
302  if ((m_conditionMap[chipNr]).count(condition.getName()) == 0) {
303 
304  // parse Calo Conditions (EG, Jets, Taus)
305  if(condition.getType() == esConditionType::SingleEgamma ||
306  condition.getType() == esConditionType::DoubleEgamma ||
307  condition.getType() == esConditionType::TripleEgamma ||
308  condition.getType() == esConditionType::QuadEgamma ||
309  condition.getType() == esConditionType::SingleTau ||
310  condition.getType() == esConditionType::DoubleTau ||
311  condition.getType() == esConditionType::TripleTau ||
312  condition.getType() == esConditionType::QuadTau ||
313  condition.getType() == esConditionType::SingleJet ||
314  condition.getType() == esConditionType::DoubleJet ||
315  condition.getType() == esConditionType::TripleJet ||
316  condition.getType() == esConditionType::QuadJet )
317  {
318  parseCalo(condition,chipNr,false); //blw
319 
320  // parse Energy Sums
321  } else if(condition.getType() == esConditionType::TotalEt ||
322  condition.getType() == esConditionType::TotalHt ||
323  condition.getType() == esConditionType::MissingEt ||
324  condition.getType() == esConditionType::MissingHt ||
325  //condition.getType() == esConditionType::MissingEt2 ||
326  condition.getType() == esConditionType::MinBiasHFP0 ||
327  condition.getType() == esConditionType::MinBiasHFM0 ||
328  condition.getType() == esConditionType::MinBiasHFP1 ||
329  condition.getType() == esConditionType::MinBiasHFM1 )
330  {
331  parseEnergySum(condition,chipNr,false);
332 
333  //parse Muons
334  } else if(condition.getType() == esConditionType::SingleMuon ||
335  condition.getType() == esConditionType::DoubleMuon ||
336  condition.getType() == esConditionType::TripleMuon ||
337  condition.getType() == esConditionType::QuadMuon )
338  {
339  parseMuon(condition,chipNr,false);
340 
341 
342  //parse Correlation Conditions
343  } else if(condition.getType() == esConditionType::MuonMuonCorrelation ||
344  condition.getType() == esConditionType::MuonEsumCorrelation ||
345  condition.getType() == esConditionType::CaloMuonCorrelation ||
346  condition.getType() == esConditionType::CaloCaloCorrelation ||
347  condition.getType() == esConditionType::CaloEsumCorrelation ||
348  condition.getType() == esConditionType::InvariantMass )
349  {
350  parseCorrelation(condition,chipNr);
351 
352  //parse Muons
353  } else if(condition.getType() == esConditionType::Externals )
354  {
355  parseExternal(condition,chipNr);
356 
357  }
358 
359  }//if condition is a new one
360  }//loop over conditions
361  }//loop over algorithms
362 
363  return;
364 
365 
366 }
unsigned int m_numberConditionChips
hardware limits
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
bool parseExternal(tmeventsetup::esCondition condExt, unsigned int chipNr=0)
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
int ii
Definition: cuy.py:588
std::string m_triggerMenuInterface
menu names
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
void setScalesName(std::string name)
Definition: GlobalScales.h:77
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::string m_triggerMenuDescription
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
bool parseScales(std::map< std::string, tmeventsetup::esScale > scaleMap)
parse scales
bool parseEnergySum(tmeventsetup::esCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
parse an &quot;energy sum&quot; condition
unsigned long m_triggerMenuUUID
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
bool parseMuon(tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon condition
bool parseAlgorithm(tmeventsetup::esAlgorithm algorithm, unsigned int chipNr=0)
parse all algorithms
unsigned long m_triggerMenuImplementation
bool 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 2506 of file TriggerMenuParser.cc.

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

2508  {
2509 
2510  using namespace tmeventsetup;
2511 
2512  std::string condition = "corr";
2513  std::string particle = "test-fix" ;
2514  std::string type = l1t2string( corrCond.getType() );
2515  std::string name = l1t2string( corrCond.getName() );
2516 
2517  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2518  << " (in parseCorrelation) " << std::endl
2519  << " condition = " << condition << std::endl
2520  << " particle = " << particle << std::endl
2521  << " type = " << type << std::endl
2522  << " name = " << name << std::endl;
2523 
2524 
2525 
2526 
2527  // create a new correlation condition
2528  CorrelationTemplate correlationCond(name);
2529 
2530  // check that the condition does not exist already in the map
2531  if ( !insertConditionIntoMap(correlationCond, chipNr)) {
2532 
2533  edm::LogError("TriggerMenuParser")
2534  << " Error: duplicate correlation condition (" << name << ")"
2535  << std::endl;
2536 
2537  return false;
2538  }
2539 
2540 
2541 // Define some of the quantities to store the parased information
2542 
2543  // condition type BLW (Do we change this to the type of correlation condition?)
2545 
2546  // two objects (for sure)
2547  const int nrObj = 2;
2548 
2549  // object types and greater equal flag - filled in the loop
2550  int intGEq[nrObj] = { -1, -1 };
2551  std::vector<GlobalObject> objType(nrObj); //BLW do we want to define these as a different type?
2552  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2553 
2554  // correlation flag and index in the cor*vector
2555  const bool corrFlag = true;
2556  int corrIndexVal[nrObj] = { -1, -1 };
2557 
2558 
2559  // Storage of the correlation selection
2561  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2562 
2563 // Get the correlation Cuts on the legs
2564  int cutType = 0;
2565  const std::vector<esCut>& cuts = corrCond.getCuts();
2566  for (size_t jj = 0; jj < cuts.size(); jj++)
2567  {
2568  const esCut cut = cuts.at(jj);
2569 
2570  if(cut.getCutType() == esCutType::ChargeCorrelation) {
2571  if( cut.getData()=="ls" ) corrParameter.chargeCorrelation = 2;
2572  else if( cut.getData()=="os" ) corrParameter.chargeCorrelation = 4;
2573  else corrParameter.chargeCorrelation = 1; //ignore charge correlation
2574  } else {
2575 
2576 //
2577 // Unitl utm has method to calculate these, do the integer value calculation with precision.
2578 //
2579  double minV = cut.getMinimum().value;
2580  double maxV = cut.getMaximum().value;
2581 
2582  //Scale down very large numbers out of xml
2583  if(maxV > 1.0e6) maxV = 1.0e6;
2584 
2585  if(cut.getCutType() == esCutType::DeltaEta) {
2586  //std::cout << "DeltaEta Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2587  corrParameter.minEtaCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2588  corrParameter.maxEtaCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2589  corrParameter.precEtaCut = cut.getMinimum().index;
2590  cutType = cutType | 0x1;
2591  } else if (cut.getCutType() == esCutType::DeltaPhi) {
2592  //std::cout << "DeltaPhi Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2593  corrParameter.minPhiCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2594  corrParameter.maxPhiCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2595  corrParameter.precPhiCut = cut.getMinimum().index;
2596  cutType = cutType | 0x2;
2597  } else if (cut.getCutType() == esCutType::DeltaR) {
2598  //std::cout << "DeltaR Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2599  corrParameter.minDRCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2600  corrParameter.maxDRCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2601  corrParameter.precDRCut = cut.getMinimum().index;
2602  cutType = cutType | 0x4;
2603  } else if (cut.getCutType() == esCutType::Mass) {
2604  //std::cout << "Mass Cut minV = " << minV << " Max = " << maxV << " precMin = " << cut.getMinimum().index << " precMax = " << cut.getMaximum().index << std::endl;
2605  corrParameter.minMassCutValue = (long long)(minV * pow(10.,cut.getMinimum().index));
2606  corrParameter.maxMassCutValue = (long long)(maxV * pow(10.,cut.getMaximum().index));
2607  corrParameter.precMassCut = cut.getMinimum().index;
2608  cutType = cutType | 0x8;
2609  }
2610  }
2611 
2612  }
2613  corrParameter.corrCutType = cutType;
2614 
2615 // Get the two objects that form the legs
2616  const std::vector<esObject>& objects = corrCond.getObjects();
2617  if(objects.size() != 2) {
2618  edm::LogError("TriggerMenuParser")
2619  << "incorrect number of objects for the correlation condition " << name << " corrFlag " << corrFlag << std::endl;
2620  return false;
2621  }
2622 
2623 // loop over legs
2624  for (size_t jj = 0; jj < objects.size(); jj++)
2625  {
2626  const esObject object = objects.at(jj);
2627 /* std::cout << " obj name = " << object->getName() << "\n";
2628  std::cout << " obj type = " << object->getType() << "\n";
2629  std::cout << " obj op = " << object->getComparisonOperator() << "\n";
2630  std::cout << " obj bx = " << object->getBxOffset() << "\n";
2631 */
2632 
2633 // check the leg type
2634  if(object.getType() == esObjectType::Muon) {
2635  // we have a muon
2636 
2637 /*
2638  //BLW Hold on to this code we may need to go back to it at some point.
2639  // Now we are putting ALL leg conditions into the vector (so there are duplicates)
2640  // This is potentially a place to slim down the code. Note: We currently evaluate the
2641  // conditions every time, so even if we put the condition in the vector once, we would
2642  // still evaluate it multiple times. This is a place for optimization.
2643 
2644  parseMuonCorr(&object,chipNr);
2645  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2646 
2647  } else {
2648  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition to Map...looking for the condition in Muon Cor Vector" << std::endl;
2649  bool found = false;
2650  int index = 0;
2651  while(!found && index<(int)((m_corMuonTemplate[chipNr]).size()) ) {
2652  if( (m_corMuonTemplate[chipNr]).at(index).condName() == object.getName() ) {
2653  LogDebug("TriggerMenuParser") << "Found condition " << object.getName() << " in vector at index " << index << std::endl;
2654  found = true;
2655  } else {
2656  index++;
2657  }
2658  }
2659  if(found) {
2660  corrIndexVal[jj] = index;
2661  } else {
2662  edm::LogError("TriggerMenuParser") << "FAILURE: Condition " << object.getName() << " is in map but not in cor. vector " << std::endl;
2663  }
2664 
2665  }
2666 */
2667  parseMuonCorr(&object,chipNr);
2668  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2669 
2670  //Now set some flags for this subCondition
2671  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2672  objType[jj] = gtMu;
2673  condCateg[jj] = CondMuon;
2674 
2675  } else if(object.getType() == esObjectType::Egamma ||
2676  object.getType() == esObjectType::Jet ||
2677  object.getType() == esObjectType::Tau ) {
2678 
2679  // we have an Calo object
2680  parseCaloCorr(&object,chipNr);
2681  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
2682 
2683  //Now set some flags for this subCondition
2684  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2685  switch(object.getType()) {
2686  case esObjectType::Egamma: {
2687  objType[jj] = gtEG;
2688  }
2689  break;
2690  case esObjectType::Jet: {
2691  objType[jj] = gtJet;
2692  }
2693  break;
2694  case esObjectType::Tau: {
2695  objType[jj] = gtTau;
2696  }
2697  break;
2698  default: {
2699  }
2700  break;
2701  }
2702  condCateg[jj] = CondCalo;
2703 
2704 
2705 
2706 
2707  } else if(object.getType() == esObjectType::ETM ||
2708  // object.getType() == esObjectType::ETM2 ||
2709  object.getType() == esObjectType::HTM ) {
2710 
2711  // we have Energy Sum
2712  parseEnergySumCorr(&object,chipNr);
2713  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
2714 
2715  //Now set some flags for this subCondition
2716  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2717  switch(object.getType()) {
2718  case esObjectType::ETM: {
2719  objType[jj] = GlobalObject::gtETM;
2720  }
2721  break;
2722  case esObjectType::HTM: {
2723  objType[jj] = GlobalObject::gtHTM;
2724  }
2725  break;
2726 /* case esObjectType::ETM2: {
2727  objType[jj] = GlobalObject::gtETM2;
2728  }
2729  break; */
2730  default: {
2731  }
2732  break;
2733  }
2734  condCateg[jj] = CondEnergySum;
2735 
2736 
2737  } else {
2738 
2739  edm::LogError("TriggerMenuParser")
2740  << "Illegal Object Type "
2741  << " for the correlation condition " << name << std::endl;
2742  return false;
2743 
2744  } //if block on leg types
2745 
2746  } //loop over legs
2747 
2748 
2749  // get greater equal flag for the correlation condition
2750  bool gEq = true;
2751  if (intGEq[0] != intGEq[1]) {
2752  edm::LogError("TriggerMenuParser")
2753  << "Inconsistent GEq flags for sub-conditions "
2754  << " for the correlation condition " << name << std::endl;
2755  return false;
2756 
2757  }
2758  else {
2759  gEq = (intGEq[0] != 0);
2760 
2761  }
2762 
2763 
2764  // fill the correlation condition
2765  correlationCond.setCondType(cType);
2766  correlationCond.setObjectType(objType);
2767  correlationCond.setCondGEq(gEq);
2768  correlationCond.setCondChipNr(chipNr);
2769 
2770  correlationCond.setCond0Category(condCateg[0]);
2771  correlationCond.setCond1Category(condCateg[1]);
2772 
2773  correlationCond.setCond0Index(corrIndexVal[0]);
2774  correlationCond.setCond1Index(corrIndexVal[1]);
2775 
2776  correlationCond.setCorrelationParameter(corrParameter);
2777 
2778  if (edm::isDebugEnabled() ) {
2779 
2780  std::ostringstream myCoutStream;
2781  correlationCond.print(myCoutStream);
2782  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n"
2783  << std::endl;
2784 
2785  }
2786 
2787  // insert condition into the map
2788  // condition is not duplicate, check was done at the beginning
2789 
2790  (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond);
2791 
2792 
2793  //
2794  return true;
2795 }
#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
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
tuple size
Write out results.
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 843 of file TriggerMenuParser.cc.

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

844 {
845 
846  using namespace tmeventsetup;
847 
848  // First Delta Eta for this set
849  std::string scLabel1 = obj1;
850  scLabel1 += "-ETA";
851  std::string scLabel2 = obj2;
852  scLabel2 += "-ETA";
853  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
854  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
855  std::vector<double> val_delta_eta;
856  std::vector<long long> lut_delta_eta;
857  size_t n = getDeltaVector(val_delta_eta, scale1, scale2);
858  setLut(lut_delta_eta, val_delta_eta, prec1);
859  std::string lutName = obj1;
860  lutName += "-";
861  lutName += obj2;
862  m_gtScales.setLUT_DeltaEta(lutName,lut_delta_eta,prec1);
863 
864  // Second Get the Cosh for this delta Eta Set
865  std::vector<long long> lut_cosh;
866  applyCosh(val_delta_eta, n);
867  setLut(lut_cosh, val_delta_eta, prec2);
868  m_gtScales.setLUT_Cosh(lutName,lut_cosh,prec2);
869 
870 }
virtual void setLUT_DeltaEta(std::string lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:71
virtual void setLUT_Cosh(std::string lutName, std::vector< long long > lut, unsigned int precision)
void TriggerMenuParser::parseDeltaPhi_Cos_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
std::string  obj2,
unsigned int  prec1,
unsigned int  prec2 
)
private

Definition at line 872 of file TriggerMenuParser.cc.

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

873 {
874 
875  using namespace tmeventsetup;
876 
877  // First Delta phi for this set
878  std::string scLabel1 = obj1;
879  scLabel1 += "-PHI";
880  std::string scLabel2 = obj2;
881  scLabel2 += "-PHI";
882  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
883  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
884  std::vector<double> val_delta_phi;
885  std::vector<long long> lut_delta_phi;
886  size_t n = getDeltaVector(val_delta_phi, scale1, scale2);
887  setLut(lut_delta_phi, val_delta_phi, prec1);
888  std::string lutName = obj1;
889  lutName += "-";
890  lutName += obj2;
891  m_gtScales.setLUT_DeltaPhi(lutName,lut_delta_phi,prec1);
892 
893  // Second Get the Cosh for this delta phi Set
894  std::vector<long long> lut_cos;
895  applyCos(val_delta_phi, n);
896  setLut(lut_cos, val_delta_phi, prec2);
897  m_gtScales.setLUT_Cos(lutName,lut_cos,prec2);
898 
899 }
virtual void setLUT_Cos(std::string lutName, std::vector< long long > lut, unsigned int precision)
virtual void setLUT_DeltaPhi(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 1982 of file TriggerMenuParser.cc.

References GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), ora::GE, l1t::gtETM, l1t::gtETT, l1t::gtHTM, l1t::gtHTT, l1t::gtMinBiasHFM0, l1t::gtMinBiasHFM1, l1t::gtMinBiasHFP0, l1t::gtMinBiasHFP1, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, EnergySumTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, l1t::TypeETM, l1t::TypeETT, l1t::TypeHTM, l1t::TypeHTT, l1t::TypeMinBiasHFM0, l1t::TypeMinBiasHFM1, l1t::TypeMinBiasHFP0, and l1t::TypeMinBiasHFP1.

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

References GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), ETM, ora::GE, l1t::gtETM, l1t::gtHTM, HTM, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, EnergySumTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, l1t::TypeETM, and l1t::TypeHTM.

2220  {
2221 
2222 
2223 // XERCES_CPP_NAMESPACE_USE
2224  using namespace tmeventsetup;
2225 
2226  // get condition, particle name and type name
2227 
2228  std::string condition = "calo";
2229  std::string type = l1t2string( corrESum->getType() );
2230  std::string name = l1t2string( corrESum->getName() );
2231 
2232  LogDebug("TriggerMenuParser")
2233  << "\n ****************************************** "
2234  << "\n (in parseEnergySum) "
2235  << "\n condition = " << condition
2236  << "\n type = " << type
2237  << "\n name = " << name
2238  << std::endl;
2239 
2240 
2241 
2242  // determine object type type
2243  GlobalObject energySumObjType;
2244  GtConditionType cType;
2245 
2246  if( corrESum->getType()== esObjectType::ETM ){
2247  energySumObjType = GlobalObject::gtETM;
2248  cType = TypeETM;
2249  }
2250  else if( corrESum->getType()== esObjectType::HTM ){
2251  energySumObjType = GlobalObject::gtHTM;
2252  cType = TypeHTM;
2253  }
2254 /* else if( corrESum->getType()== esObjectType::ETM2 ){
2255  energySumObjType = GlobalObject::gtETM2;
2256  cType = TypeETM2;
2257  } */
2258  else {
2259  edm::LogError("TriggerMenuParser")
2260  << "Wrong type for energy-sum correclation condition (" << type
2261  << ")" << std::endl;
2262  return false;
2263  }
2264 
2265 
2266 
2267  // global object
2268  int nrObj = 1;
2269 
2270 // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
2271 
2272  // get values
2273 
2274  // temporary storage of the parameters
2275  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
2276 
2277 
2278  int cnt = 0;
2279 
2280 // BLW TO DO: These needs to the added to the object rather than the whole condition.
2281  int relativeBx = 0;
2282  bool gEq = false;
2283 
2284 // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2285 
2286 
2287  gEq = (corrESum->getComparisonOperator() == esComparisonOperator::GE);
2288 
2289 // BLW TO DO: This needs to be added to the Object Parameters
2290  relativeBx = corrESum->getBxOffset();
2291 
2292 // Loop over the cuts for this object
2293  int lowerThresholdInd = 0;
2294  int upperThresholdInd = -1;
2295  int cntPhi = 0;
2296  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
2297 
2298 
2299  const std::vector<esCut>& cuts = corrESum->getCuts();
2300  for (size_t kk = 0; kk < cuts.size(); kk++)
2301  {
2302  const esCut cut = cuts.at(kk);
2303 
2304  switch(cut.getCutType()){
2305  case esCutType::Threshold:
2306  lowerThresholdInd = cut.getMinimum().index;
2307  upperThresholdInd = cut.getMaximum().index;
2308  break;
2309 
2310  case esCutType::Eta:
2311  break;
2312 
2313  case esCutType::Phi: {
2314 
2315  if(cntPhi == 0) {
2316  phiWindow1Lower = cut.getMinimum().index;
2317  phiWindow1Upper = cut.getMaximum().index;
2318  } else if(cntPhi == 1) {
2319  phiWindow2Lower = cut.getMinimum().index;
2320  phiWindow2Upper = cut.getMaximum().index;
2321  } else {
2322  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition ("
2323  << type << ")" << std::endl;
2324  return false;
2325  }
2326  cntPhi++;
2327 
2328  }
2329  break;
2330 
2331  default:
2332  break;
2333  } //end switch
2334 
2335  } //end loop over cuts
2336 
2337 
2338 
2339  // Fill the object parameters
2340  objParameter[0].etLowThreshold = lowerThresholdInd;
2341  objParameter[0].etHighThreshold = upperThresholdInd;
2342  objParameter[0].phiWindow1Lower = phiWindow1Lower;
2343  objParameter[0].phiWindow1Upper = phiWindow1Upper;
2344  objParameter[0].phiWindow2Lower = phiWindow2Lower;
2345  objParameter[0].phiWindow2Upper = phiWindow2Upper;
2346 
2347 
2348  // Output for debugging
2349  LogDebug("TriggerMenuParser")
2350  << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2351  << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etLowThreshold
2352  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2353  << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
2354  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2355  << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper << std::dec
2356  << std::endl;
2357 
2358 
2359  // object types - all same energySumObjType
2360  std::vector<GlobalObject> objType(nrObj, energySumObjType);
2361 
2362  // now create a new energySum condition
2363 
2364  EnergySumTemplate energySumCond(name);
2365 
2366  energySumCond.setCondType(cType);
2367  energySumCond.setObjectType(objType);
2368  energySumCond.setCondGEq(gEq);
2369  energySumCond.setCondChipNr(chipNr);
2370  energySumCond.setCondRelativeBx(relativeBx);
2371 
2372  energySumCond.setConditionParameter(objParameter);
2373 
2374  if (edm::isDebugEnabled() ) {
2375 
2376  std::ostringstream myCoutStream;
2377  energySumCond.print(myCoutStream);
2378  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2379 
2380  }
2381 /*
2382  // insert condition into the map
2383  if ( !insertConditionIntoMap(energySumCond, chipNr)) {
2384 
2385  edm::LogError("TriggerMenuParser")
2386  << " Error: duplicate condition (" << name << ")"
2387  << std::endl;
2388 
2389  return false;
2390  }
2391  else {
2392 
2393  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2394 
2395  }
2396 */
2397  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2398 
2399 
2400  //
2401  return true;
2402 }
#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 2418 of file TriggerMenuParser.cc.

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

2419  {
2420 
2421 
2422  using namespace tmeventsetup;
2423 
2424 
2425  // get condition, particle name and type name
2426  std::string condition = "ext";
2427  std::string particle = "test-fix";
2428  std::string type = l1t2string( condExt.getType() );
2429  std::string name = l1t2string( condExt.getName() );
2430 
2431 
2432  LogDebug("TriggerMenuParser")
2433  << "\n ****************************************** "
2434  << "\n (in parseExternal) "
2435  << "\n condition = " << condition
2436  << "\n particle = " << particle
2437  << "\n type = " << type
2438  << "\n name = " << name
2439  << std::endl;
2440 
2441 
2442  // object type and condition type
2443  // object type - irrelevant for External conditions
2444  GtConditionType cType = TypeExternal;
2445 
2446  int relativeBx = 0;
2447  unsigned int channelID = 0;
2448 
2449  // Get object for External conditions
2450  const std::vector<esObject>& objects = condExt.getObjects();
2451  for (size_t jj = 0; jj < objects.size(); jj++) {
2452 
2453  const esObject object = objects.at(jj);
2454  if(object.getType() == esObjectType::EXT) {
2455  relativeBx = object.getBxOffset();
2456  channelID = object.getExternalChannelId();
2457  }
2458  }
2459 
2460 
2461  // set the boolean value for the ge_eq mode - irrelevant for External conditions
2462  bool gEq = false;
2463 
2464  // now create a new External condition
2465  ExternalTemplate externalCond(name);
2466 
2467  externalCond.setCondType(cType);
2468  externalCond.setCondGEq(gEq);
2469  externalCond.setCondChipNr(chipNr);
2470  externalCond.setCondRelativeBx(relativeBx);
2471  externalCond.setExternalChannel(channelID);
2472 
2473  LogTrace("TriggerMenuParser")
2474  << externalCond << "\n" << std::endl;
2475 
2476  // insert condition into the map
2477  if ( !insertConditionIntoMap(externalCond, chipNr)) {
2478 
2479  edm::LogError("TriggerMenuParser")
2480  << " Error: duplicate condition (" << name
2481  << ")" << std::endl;
2482 
2483  return false;
2484  } else {
2485 
2486  (m_vecExternalTemplate[chipNr]).push_back(externalCond);
2487 
2488  }
2489 
2490  return true;
2491 }
#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 912 of file TriggerMenuParser.cc.

References RecoTauCleanerPlugins::charge, GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, HLT_25ns10e33_v2_cff::DoubleMuon, reco::tau::disc::Eta(), ora::GE, l1t::gtMu, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, MuonTemplate::print(), GlobalCondition::setCondChipNr(), GlobalCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GlobalCondition::setCondRelativeBx(), GlobalCondition::setCondType(), GlobalCondition::setObjectType(), HLT_25ns10e33_v2_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

913  {
914 
915  using namespace tmeventsetup;
916 
917  // get condition, particle name (must be muon) and type name
918  std::string condition = "muon";
919  std::string particle = "muon";//l1t2string( condMu.objectType() );
920  std::string type = l1t2string( condMu.getType() );
921  std::string name = l1t2string( condMu.getName() );
922  int nrObj = -1;
923 
924 
925 
927 
928  if (condMu.getType() == esConditionType::SingleMuon) {
929  type = "1_s";
930  cType = l1t::Type1s;
931  nrObj = 1;
932  } else if (condMu.getType() == esConditionType::DoubleMuon) {
933  type = "2_s";
934  cType = l1t::Type2s;
935  nrObj = 2;
936  } else if (condMu.getType() == esConditionType::TripleMuon) {
937  type = "3";
938  cType = l1t::Type3s;
939  nrObj = 3;
940  } else if (condMu.getType() == esConditionType::QuadMuon) {
941  type = "4";
942  cType = l1t::Type4s;
943  nrObj = 4;
944  } else {
945  edm::LogError("TriggerMenuParser") << "Wrong type for muon-condition ("
946  << type << ")" << std::endl;
947  return false;
948  }
949 
950  if (nrObj < 0) {
951  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type
952  << ")" << "\nCan not determine number of trigger objects. " << std::endl;
953  return false;
954  }
955 
956  LogDebug("TriggerMenuParser")
957  << "\n ****************************************** "
958  << "\n parseMuon "
959  << "\n condition = " << condition
960  << "\n particle = " << particle
961  << "\n type = " << type
962  << "\n name = " << name
963  << std::endl;
964 
965 
966 
967 // // get values
968 
969  // temporary storage of the parameters
970  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
971 
972  // Do we need this?
974 
975  // need at least two values for deltaPhi
976  std::vector<boost::uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
977  tmpValues.reserve( nrObj );
978 
979  if( int(condMu.getObjects().size())!=nrObj ){
980  edm::LogError("TriggerMenuParser") << " condMu objects: nrObj = " << nrObj
981  << "condMu.getObjects().size() = "
982  << condMu.getObjects().size()
983  << std::endl;
984  return false;
985  }
986 
987 
988 // Look for cuts on the objects in the condition
989  unsigned int chargeCorrelation = 1;
990  const std::vector<esCut>& cuts = condMu.getCuts();
991  for (size_t jj = 0; jj < cuts.size(); jj++)
992  {
993  const esCut cut = cuts.at(jj);
994  if(cut.getCutType() == esCutType::ChargeCorrelation) {
995  if( cut.getData()=="ls" ) chargeCorrelation = 2;
996  else if( cut.getData()=="os" ) chargeCorrelation = 4;
997  else chargeCorrelation = 1; //ignore correlation
998  }
999  }
1000 
1001  //set charge correlation parameter
1002  corrParameter.chargeCorrelation = chargeCorrelation;//tmpValues[0];
1003 
1004 
1005  int cnt = 0;
1006 
1007 
1008 // BLW TO DO: These needs to the added to the object rather than the whole condition.
1009  int relativeBx = 0;
1010  bool gEq = false;
1011 
1012 // Loop over objects and extract the cuts on the objects
1013  const std::vector<esObject>& objects = condMu.getObjects();
1014  for (size_t jj = 0; jj < objects.size(); jj++) {
1015 
1016  const esObject object = objects.at(jj);
1017  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1018 
1019 // BLW TO DO: This needs to be added to the Object Parameters
1020  relativeBx = object.getBxOffset();
1021 
1022 // Loop over the cuts for this object
1023  int upperThresholdInd = -1;
1024  int lowerThresholdInd = 0;
1025  int cntEta = 0;
1026  unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1;
1027  int cntPhi = 0;
1028  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
1029  int isolationLUT = 0xF; //default is to ignore unless specified.
1030  int charge = -1; //default value is to ignore unless specified
1031  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1032 
1033  const std::vector<esCut>& cuts = object.getCuts();
1034  for (size_t kk = 0; kk < cuts.size(); kk++)
1035  {
1036  const esCut cut = cuts.at(kk);
1037 
1038  switch(cut.getCutType()){
1039  case esCutType::Threshold:
1040  lowerThresholdInd = cut.getMinimum().index;
1041  upperThresholdInd = cut.getMaximum().index;
1042  break;
1043 
1044  case esCutType::Eta: {
1045 
1046  if(cntEta == 0) {
1047  etaWindow1Lower = cut.getMinimum().index;
1048  etaWindow1Upper = cut.getMaximum().index;
1049  } else if(cntEta == 1) {
1050  etaWindow2Lower = cut.getMinimum().index;
1051  etaWindow2Upper = cut.getMaximum().index;
1052  } else {
1053  edm::LogError("TriggerMenuParser") << "Too Many Eta Cuts for muon-condition ("
1054  << particle << ")" << std::endl;
1055  return false;
1056  }
1057  cntEta++;
1058 
1059  } break;
1060 
1061  case esCutType::Phi: {
1062 
1063  if(cntPhi == 0) {
1064  phiWindow1Lower = cut.getMinimum().index;
1065  phiWindow1Upper = cut.getMaximum().index;
1066  } else if(cntPhi == 1) {
1067  phiWindow2Lower = cut.getMinimum().index;
1068  phiWindow2Upper = cut.getMaximum().index;
1069  } else {
1070  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for muon-condition ("
1071  << particle << ")" << std::endl;
1072  return false;
1073  }
1074  cntPhi++;
1075 
1076  }break;
1077 
1078  case esCutType::Charge:
1079  if( cut.getData()=="positive" ) charge = 0;
1080  else if( cut.getData()=="negative" ) charge = 1;
1081  else charge = -1;
1082  break;
1083  case esCutType::Quality:
1084 
1085  qualityLUT = l1tstr2int(cut.getData());
1086 
1087  break;
1088  case esCutType::Isolation: {
1089 
1090  isolationLUT = l1tstr2int(cut.getData());
1091 
1092  } break;
1093  default:
1094  break;
1095  } //end switch
1096 
1097  } //end loop over cuts
1098 
1099 
1100 // Set the parameter cuts
1101  objParameter[cnt].ptHighThreshold = upperThresholdInd;
1102  objParameter[cnt].ptLowThreshold = lowerThresholdInd;
1103 
1104  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1105  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1106  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1107  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1108 
1109  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1110  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1111  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1112  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1113 
1114 // BLW TO DO: Do we need these anymore? Drop them?
1115  objParameter[cnt].enableMip = false;//tmpMip[i];
1116  objParameter[cnt].enableIso = false;//tmpEnableIso[i];
1117  objParameter[cnt].requestIso = false;//tmpRequestIso[i];
1118 
1119  objParameter[cnt].charge = charge;
1120  objParameter[cnt].qualityLUT = qualityLUT;
1121  objParameter[cnt].isolationLUT = isolationLUT;
1122 
1123 
1124  cnt++;
1125  } //end loop over objects
1126 
1127 
1128  // object types - all muons
1129  std::vector<GlobalObject> objType(nrObj, gtMu);
1130 
1131 
1132 
1133  // now create a new CondMuonition
1134  MuonTemplate muonCond(name);
1135 
1136  muonCond.setCondType(cType);
1137  muonCond.setObjectType(objType);
1138  muonCond.setCondGEq(gEq);
1139  muonCond.setCondChipNr(chipNr);
1140  muonCond.setCondRelativeBx(relativeBx);
1141 
1142  muonCond.setConditionParameter(objParameter, corrParameter);
1143 
1144  if (edm::isDebugEnabled()) {
1145  std::ostringstream myCoutStream;
1146  muonCond.print(myCoutStream);
1147  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1148  }
1149 
1150  // insert condition into the map and into muon template vector
1151  if ( !insertConditionIntoMap(muonCond, chipNr)) {
1152  edm::LogError("TriggerMenuParser")
1153  << " Error: duplicate condition (" << name << ")"
1154  << std::endl;
1155  return false;
1156  }
1157  else {
1158  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1159  if (corrFlag) {
1160 
1161  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1162  }
1163  else {
1164  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the vecMuonTemplate vector" << std::endl;
1165  (m_vecMuonTemplate[chipNr]).push_back(muonCond);
1166  }
1167 
1168  }
1169 
1170  //
1171  return true;
1172 }
#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 1175 of file TriggerMenuParser.cc.

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

1176  {
1177 
1178 
1179 // XERCES_CPP_NAMESPACE_USE
1180  using namespace tmeventsetup;
1181 
1182  // get condition, particle name (must be muon) and type name
1183  std::string condition = "muon";
1184  std::string particle = "muon";//l1t2string( condMu.objectType() );
1185  std::string type = l1t2string( corrMu->getType() );
1186  std::string name = l1t2string( corrMu->getName() );
1187  int nrObj = 1;
1188  type = "1_s";
1189  GtConditionType cType = l1t::Type1s;
1190 
1191 
1192 
1193  if (nrObj < 0) {
1194  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type
1195  << ")" << "\nCan not determine number of trigger objects. " << std::endl;
1196  return false;
1197  }
1198 
1199  LogDebug("TriggerMenuParser")
1200  << "\n ****************************************** "
1201  << "\n parseMuon "
1202  << "\n condition = " << condition
1203  << "\n particle = " << particle
1204  << "\n type = " << type
1205  << "\n name = " << name
1206  << std::endl;
1207 
1208 
1209 
1210 // // get values
1211 
1212  // temporary storage of the parameters
1213  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1214 
1215  // Do we need this?
1216  MuonTemplate::CorrelationParameter corrParameter;
1217 
1218  // need at least two values for deltaPhi
1219  std::vector<boost::uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1220  tmpValues.reserve( nrObj );
1221 
1222 
1223 // BLW TO DO: How do we deal with these in the new format
1224 // std::string str_chargeCorrelation = l1t2string( condMu.requestedChargeCorr() );
1225  std::string str_chargeCorrelation = "ig";
1226  unsigned int chargeCorrelation = 0;
1227  if( str_chargeCorrelation=="ig" ) chargeCorrelation = 1;
1228  else if( str_chargeCorrelation=="ls" ) chargeCorrelation = 2;
1229  else if( str_chargeCorrelation=="os" ) chargeCorrelation = 4;
1230 
1231  //getXMLHexTextValue("1", dst);
1232  corrParameter.chargeCorrelation = chargeCorrelation;//tmpValues[0];
1233 
1234 
1235 
1236  // BLW TO DO: These needs to the added to the object rather than the whole condition.
1237  int relativeBx = 0;
1238  bool gEq = false;
1239 
1240 
1241  //const esObject* object = condMu;
1242  gEq = (corrMu->getComparisonOperator() == esComparisonOperator::GE);
1243 
1244  // BLW TO DO: This needs to be added to the Object Parameters
1245  relativeBx = corrMu->getBxOffset();
1246 
1247  // Loop over the cuts for this object
1248  int upperThresholdInd = -1;
1249  int lowerThresholdInd = 0;
1250  int cntEta = 0;
1251  unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1;
1252  int cntPhi = 0;
1253  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
1254  int isolationLUT = 0xF; //default is to ignore unless specified.
1255  int charge = -1; //defaut is to ignore unless specified
1256  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1257 
1258  const std::vector<esCut>& cuts = corrMu->getCuts();
1259  for (size_t kk = 0; kk < cuts.size(); kk++)
1260  {
1261  const esCut cut = cuts.at(kk);
1262 
1263  switch(cut.getCutType()){
1264  case esCutType::Threshold:
1265  lowerThresholdInd = cut.getMinimum().index;
1266  upperThresholdInd = cut.getMaximum().index;
1267  break;
1268 
1269  case esCutType::Eta: {
1270 
1271  if(cntEta == 0) {
1272  etaWindow1Lower = cut.getMinimum().index;
1273  etaWindow1Upper = cut.getMaximum().index;
1274  } else if(cntEta == 1) {
1275  etaWindow2Lower = cut.getMinimum().index;
1276  etaWindow2Upper = cut.getMaximum().index;
1277  } else {
1278  edm::LogError("TriggerMenuParser") << "Too Many Eta Cuts for muon-condition ("
1279  << particle << ")" << std::endl;
1280  return false;
1281  }
1282  cntEta++;
1283 
1284  } break;
1285 
1286  case esCutType::Phi: {
1287 
1288  if(cntPhi == 0) {
1289  phiWindow1Lower = cut.getMinimum().index;
1290  phiWindow1Upper = cut.getMaximum().index;
1291  } else if(cntPhi == 1) {
1292  phiWindow2Lower = cut.getMinimum().index;
1293  phiWindow2Upper = cut.getMaximum().index;
1294  } else {
1295  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for muon-condition ("
1296  << particle << ")" << std::endl;
1297  return false;
1298  }
1299  cntPhi++;
1300 
1301  }break;
1302 
1303  case esCutType::Charge:
1304  if( cut.getData()=="positive" ) charge = 0;
1305  else if( cut.getData()=="negative" ) charge = 1;
1306  else charge = -1;
1307  break;
1308  case esCutType::Quality:
1309 
1310  qualityLUT = l1tstr2int(cut.getData());
1311 
1312  break;
1313  case esCutType::Isolation: {
1314 
1315  isolationLUT = l1tstr2int(cut.getData());
1316 
1317  } break;
1318  default:
1319  break;
1320  } //end switch
1321 
1322  } //end loop over cuts
1323 
1324 
1325  // Set the parameter cuts
1326  objParameter[0].ptHighThreshold = upperThresholdInd;
1327  objParameter[0].ptLowThreshold = lowerThresholdInd;
1328 
1329  objParameter[0].etaWindow1Lower = etaWindow1Lower;
1330  objParameter[0].etaWindow1Upper = etaWindow1Upper;
1331  objParameter[0].etaWindow2Lower = etaWindow2Lower;
1332  objParameter[0].etaWindow2Upper = etaWindow2Upper;
1333 
1334  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1335  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1336  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1337  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1338 
1339  // BLW TO DO: Do we need these anymore? Drop them?
1340  objParameter[0].enableMip = false;//tmpMip[i];
1341  objParameter[0].enableIso = false;//tmpEnableIso[i];
1342  objParameter[0].requestIso = false;//tmpRequestIso[i];
1343 
1344  objParameter[0].charge = charge;
1345  objParameter[0].qualityLUT = qualityLUT;
1346  objParameter[0].isolationLUT = isolationLUT;
1347 
1348 
1349  // object types - all muons
1350  std::vector<GlobalObject> objType(nrObj, gtMu);
1351 
1352  // now create a new CondMuonition
1353  MuonTemplate muonCond(name);
1354 
1355  muonCond.setCondType(cType);
1356  muonCond.setObjectType(objType);
1357  muonCond.setCondGEq(gEq);
1358  muonCond.setCondChipNr(chipNr);
1359  muonCond.setCondRelativeBx(relativeBx);
1360  muonCond.setConditionParameter(objParameter, corrParameter);
1361 
1362  if (edm::isDebugEnabled()) {
1363  std::ostringstream myCoutStream;
1364  muonCond.print(myCoutStream);
1365  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1366  }
1367 
1368 /*
1369  // insert condition into the map and into muon template vector
1370  if ( !insertConditionIntoMap(muonCond, chipNr)) {
1371  edm::LogError("TriggerMenuParser")
1372  << " Error: duplicate condition (" << name << ")"
1373  << std::endl;
1374  return false;
1375  }
1376  else {
1377  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1378  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1379  }
1380 */
1381  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1382 
1383 
1384  //
1385  return true;
1386 }
#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::parsePt_LUTS ( std::map< std::string, tmeventsetup::esScale >  scaleMap,
std::string  obj1,
unsigned int  prec 
)
private

Definition at line 826 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

827 {
828 
829  using namespace tmeventsetup;
830 
831  // First Delta Eta for this set
832  std::string scLabel1 = obj1;
833  scLabel1 += "-ET";
834  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
835 
836  std::vector<long long> lut_pt;
837  getLut(lut_pt, scale1, prec);
838  m_gtScales.setLUT_Pt(scLabel1,lut_pt,prec);
839 
840 
841 }
virtual void setLUT_Pt(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 578 of file TriggerMenuParser.cc.

References newFWLiteAna::bin, 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, i, configurableAnalysis::Jet, configurableAnalysis::Muon, l1t::GlobalScales::ScaleParameters::phiBins, l1t::GlobalScales::ScaleParameters::phiMax, l1t::GlobalScales::ScaleParameters::phiMin, l1t::GlobalScales::ScaleParameters::phiStep, funct::pow(), and pileupReCalc_HLTpaths::scale.

578  {
579 
580  using namespace tmeventsetup;
581 
582 // Setup ScaleParameter to hold information from parsing
583  GlobalScales::ScaleParameters muScales;
584  GlobalScales::ScaleParameters egScales;
585  GlobalScales::ScaleParameters tauScales;
586  GlobalScales::ScaleParameters jetScales;
587  GlobalScales::ScaleParameters ettScales;
588  GlobalScales::ScaleParameters etmScales;
589  GlobalScales::ScaleParameters httScales;
590  GlobalScales::ScaleParameters htmScales;
591 
592 
593 // Start by parsing the Scale Map
594  for (std::map<std::string, esScale>::const_iterator cit = scaleMap.begin();
595  cit != scaleMap.end(); cit++)
596  {
597  const esScale& scale = cit->second;
598 
599  GlobalScales::ScaleParameters *scaleParam;
600  if (scale.getObjectType() == esObjectType::Muon) scaleParam = &muScales;
601  else if (scale.getObjectType() == esObjectType::Egamma) scaleParam = &egScales;
602  else if (scale.getObjectType() == esObjectType::Tau) scaleParam = &tauScales;
603  else if (scale.getObjectType() == esObjectType::Jet) scaleParam = &jetScales;
604  else if (scale.getObjectType() == esObjectType::ETT) scaleParam = &ettScales;
605  else if (scale.getObjectType() == esObjectType::ETM) scaleParam = &etmScales;
606  else if (scale.getObjectType() == esObjectType::HTT) scaleParam = &httScales;
607  else if (scale.getObjectType() == esObjectType::HTM) scaleParam = &htmScales;
608  else scaleParam = 0;
609 
610  if(scaleParam != 0) {
611  switch(scale.getScaleType()) {
612  case esScaleType::EtScale: {
613  scaleParam->etMin = scale.getMinimum();
614  scaleParam->etMax = scale.getMaximum();
615  scaleParam->etStep = scale.getStep();
616 
617  //Get bin edges
618  const std::vector<esBin> binsV = scale.getBins();
619  for(unsigned int i=0; i<binsV.size(); i++) {
620  const esBin& bin = binsV.at(i);
621  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
622  scaleParam->etBins.push_back(binLimits);
623  }
624 
625  // If this is an energy sum fill dummy values for eta and phi
626  // There are no scales for these in the XML so the other case statements will not be seen....do it here.
627  if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
628  scale.getObjectType() == esObjectType::ETM || scale.getObjectType() == esObjectType::HTM ) {
629 
630  scaleParam->etaMin = -1.;
631  scaleParam->etaMax = -1.;
632  scaleParam->etaStep = -1.;
633  if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT) {
634  scaleParam->phiMin = -1.;
635  scaleParam->phiMax = -1.;
636  scaleParam->phiStep = -1.;
637  }
638  }
639  }
640  break;
641  case esScaleType::EtaScale: {
642  scaleParam->etaMin = scale.getMinimum();
643  scaleParam->etaMax = scale.getMaximum();
644  scaleParam->etaStep = scale.getStep();
645 
646  //Get bin edges
647  const std::vector<esBin> binsV = scale.getBins();
648  scaleParam->etaBins.resize(pow(2,scale.getNbits()));
649  for(unsigned int i=0; i<binsV.size(); i++) {
650  const esBin& bin = binsV.at(i);
651  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
652  scaleParam->etaBins.at(bin.hw_index) = binLimits;
653  }
654  }
655  break;
656  case esScaleType::PhiScale: {
657  scaleParam->phiMin = scale.getMinimum();
658  scaleParam->phiMax = scale.getMaximum();
659  scaleParam->phiStep = scale.getStep();
660 
661  //Get bin edges
662  const std::vector<esBin> binsV = scale.getBins();
663  scaleParam->phiBins.resize(pow(2,scale.getNbits()));
664  for(unsigned int i=0; i<binsV.size(); i++) {
665  const esBin& bin = binsV.at(i);
666  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
667  scaleParam->phiBins.at(bin.hw_index) = binLimits;
668  }
669  }
670  break;
671  default:
672 
673  break;
674  } //end switch
675  } //end valid scale
676  } //end loop over scaleMap
677 
678  // put the ScaleParameters into the class
679  m_gtScales.setMuonScales(muScales);
680  m_gtScales.setEGScales(egScales);
681  m_gtScales.setTauScales(tauScales);
682  m_gtScales.setJetScales(jetScales);
683  m_gtScales.setETTScales(ettScales);
684  m_gtScales.setETMScales(etmScales);
685  m_gtScales.setHTTScales(httScales);
686  m_gtScales.setHTMScales(htmScales);
687 
688 
689 
690 // Setup the LUT for the Scale Conversions
691  bool hasPrecision = false;
692  std::map<std::string, unsigned int> precisions;
693  getPrecisions(precisions, scaleMap);
694  for (std::map<std::string, unsigned int>::const_iterator cit = precisions.begin(); cit != precisions.end(); cit++)
695  {
696  //std::cout << cit->first << " = " << cit->second << "\n";
697  hasPrecision = true;
698  }
699 
700 
701  if (hasPrecision)
702  {
703 
704  //Start with the Cal - Muon Eta LUTS
705  //----------------------------------
706  parseCalMuEta_LUTS(scaleMap, "EG", "MU");
707  parseCalMuEta_LUTS(scaleMap, "JET", "MU");
708  parseCalMuEta_LUTS(scaleMap, "TAU", "MU");
709 
710  //Now the Cal - Muon Phi LUTS
711  //-------------------------------------
712  parseCalMuPhi_LUTS(scaleMap, "EG", "MU");
713  parseCalMuPhi_LUTS(scaleMap, "JET", "MU");
714  parseCalMuPhi_LUTS(scaleMap, "TAU", "MU");
715  parseCalMuPhi_LUTS(scaleMap, "HTM", "MU");
716  parseCalMuPhi_LUTS(scaleMap, "ETM", "MU");
717 
718  // Now the Pt LUTs (??? more combinations needed ??)
719  // ---------------
720  parsePt_LUTS(scaleMap, "EG", precisions["PRECISION-EG-MU-MassPt"] );
721  parsePt_LUTS(scaleMap, "MU", precisions["PRECISION-EG-MU-MassPt"] );
722  parsePt_LUTS(scaleMap, "JET", precisions["PRECISION-EG-JET-MassPt"] );
723  parsePt_LUTS(scaleMap, "TAU", precisions["PRECISION-EG-TAU-MassPt"] );
724 
725  // Now the Delta Eta/Cosh LUTs (must be done in groups)
726  // ----------------------------------------------------
727  parseDeltaEta_Cosh_LUTS(scaleMap,"EG","EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
728  parseDeltaEta_Cosh_LUTS(scaleMap,"EG","JET",precisions["PRECISION-EG-JET-Delta"],precisions["PRECISION-EG-JET-Math"]);
729  parseDeltaEta_Cosh_LUTS(scaleMap,"EG","TAU",precisions["PRECISION-EG-TAU-Delta"],precisions["PRECISION-EG-TAU-Math"]);
730  parseDeltaEta_Cosh_LUTS(scaleMap,"EG","MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
731 
732  parseDeltaEta_Cosh_LUTS(scaleMap,"JET","JET",precisions["PRECISION-JET-JET-Delta"],precisions["PRECISION-JET-JET-Math"]);
733  parseDeltaEta_Cosh_LUTS(scaleMap,"JET","TAU",precisions["PRECISION-JET-TAU-Delta"],precisions["PRECISION-JET-TAU-Math"]);
734  parseDeltaEta_Cosh_LUTS(scaleMap,"JET","MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
735 
736  parseDeltaEta_Cosh_LUTS(scaleMap,"TAU","TAU",precisions["PRECISION-TAU-TAU-Delta"],precisions["PRECISION-TAU-TAU-Math"]);
737  parseDeltaEta_Cosh_LUTS(scaleMap,"TAU","MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
738 
739  parseDeltaEta_Cosh_LUTS(scaleMap,"MU","MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
740 
741 
742  // Now the Delta Phi/Cos LUTs (must be done in groups)
743  // ----------------------------------------------------
744  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","EG", precisions["PRECISION-EG-EG-Delta"], precisions["PRECISION-EG-EG-Math"]);
745  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","JET",precisions["PRECISION-EG-JET-Delta"],precisions["PRECISION-EG-JET-Math"]);
746  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","TAU",precisions["PRECISION-EG-TAU-Delta"],precisions["PRECISION-EG-TAU-Math"]);
747  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","ETM",precisions["PRECISION-EG-ETM-Delta"],precisions["PRECISION-EG-ETM-Math"]);
748  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","HTM",precisions["PRECISION-EG-HTM-Delta"],precisions["PRECISION-EG-HTM-Math"]);
749  parseDeltaPhi_Cos_LUTS(scaleMap,"EG","MU", precisions["PRECISION-EG-MU-Delta"], precisions["PRECISION-EG-MU-Math"]);
750 
751  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","JET",precisions["PRECISION-JET-JET-Delta"],precisions["PRECISION-JET-JET-Math"]);
752  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","TAU",precisions["PRECISION-JET-TAU-Delta"],precisions["PRECISION-JET-TAU-Math"]);
753  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","ETM",precisions["PRECISION-JET-ETM-Delta"],precisions["PRECISION-JET-ETM-Math"]);
754  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","HTM",precisions["PRECISION-JET-HTM-Delta"],precisions["PRECISION-JET-HTM-Math"]);
755  parseDeltaPhi_Cos_LUTS(scaleMap,"JET","MU", precisions["PRECISION-JET-MU-Delta"], precisions["PRECISION-JET-MU-Math"]);
756 
757  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","TAU",precisions["PRECISION-TAU-TAU-Delta"],precisions["PRECISION-TAU-TAU-Math"]);
758  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","ETM",precisions["PRECISION-TAU-ETM-Delta"],precisions["PRECISION-TAU-ETM-Math"]);
759  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","HTM",precisions["PRECISION-TAU-HTM-Delta"],precisions["PRECISION-TAU-HTM-Math"]);
760  parseDeltaPhi_Cos_LUTS(scaleMap,"TAU","MU", precisions["PRECISION-TAU-MU-Delta"], precisions["PRECISION-TAU-MU-Math"]);
761 
762  parseDeltaPhi_Cos_LUTS(scaleMap,"MU","ETM",precisions["PRECISION-MU-ETM-Delta"],precisions["PRECISION-MU-ETM-Math"]);
763  parseDeltaPhi_Cos_LUTS(scaleMap,"MU","HTM",precisions["PRECISION-MU-HTM-Delta"],precisions["PRECISION-MU-HTM-Math"]);
764  parseDeltaPhi_Cos_LUTS(scaleMap,"MU","MU", precisions["PRECISION-MU-MU-Delta"], precisions["PRECISION-MU-MU-Math"]);
765 
766  //m_gtScales.dumpAllLUTs(std::cout);
767  //m_gtScales.print(std::cout);
768 
769  }
770 
771 
772 
773 
774 
775  return true;
776 }
int i
Definition: DBlmapReader.cc:9
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:66
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
Definition: L1GtObject.h:36
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 parseDeltaPhi_Cos_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2, unsigned int prec1, unsigned int prec2)
void setMuonScales(ScaleParameters &scales)
Definition: GlobalScales.h:60
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:65
void parsePt_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, unsigned int prec)
void setHTMScales(ScaleParameters &scales)
Definition: GlobalScales.h:67
Definition: L1GtObject.h:37
void setETTScales(ScaleParameters &scales)
Definition: GlobalScales.h:64
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void TriggerMenuParser::setCorCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  corCaloTempl)

Definition at line 169 of file TriggerMenuParser.cc.

170  {
171 
172  m_corCaloTemplate = corCaloTempl;
173 }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
void TriggerMenuParser::setCorEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  corEnergySumTempl)

Definition at line 175 of file TriggerMenuParser.cc.

176  {
177 
178  m_corEnergySumTemplate = corEnergySumTempl;
179 }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
void TriggerMenuParser::setCorMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  corMuonTempl)

Definition at line 163 of file TriggerMenuParser.cc.

164  {
165 
166  m_corMuonTemplate = corMuonTempl;
167 }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
void TriggerMenuParser::setGtAlgorithmAliasMap ( const AlgorithmMap algoMap)

Definition at line 190 of file TriggerMenuParser.cc.

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

Definition at line 409 of file TriggerMenuParser.cc.

409  {
410 
412 
413 }
std::string m_algorithmImplementation
void TriggerMenuParser::setGtAlgorithmMap ( const AlgorithmMap algoMap)

Definition at line 185 of file TriggerMenuParser.cc.

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

Definition at line 100 of file TriggerMenuParser.cc.

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

Definition at line 67 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 91 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

92  {
93 
94  m_numberPhysTriggers = numberPhysTriggersValue;
95 
96 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
void TriggerMenuParser::setGtOrderConditionChip ( const std::vector< int > &  orderConditionChipValue)

Definition at line 83 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

84  {
85 
86  m_orderConditionChip = orderConditionChipValue;
87 
88 }
std::vector< int > m_orderConditionChip
void TriggerMenuParser::setGtPinsOnConditionChip ( const unsigned int &  pinsOnConditionChipValue)

Definition at line 75 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 123 of file TriggerMenuParser.cc.

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

Definition at line 397 of file TriggerMenuParser.cc.

397  {
398 
399  m_triggerMenuAuthor = val;
400 
401 }
void TriggerMenuParser::setGtTriggerMenuDate ( const std::string &  val)

Definition at line 391 of file TriggerMenuParser.cc.

391  {
392 
393  m_triggerMenuDate = val;
394 
395 }
void TriggerMenuParser::setGtTriggerMenuDescription ( const std::string &  val)

Definition at line 403 of file TriggerMenuParser.cc.

403  {
404 
406 
407 }
std::string m_triggerMenuDescription
void TriggerMenuParser::setGtTriggerMenuImplementation ( const unsigned long &  menuImplementation)

Definition at line 118 of file TriggerMenuParser.cc.

118  {
119  m_triggerMenuImplementation = menuImplementation;
120 }
unsigned long m_triggerMenuImplementation
void TriggerMenuParser::setGtTriggerMenuInterface ( const std::string &  menuInterface)

Definition at line 105 of file TriggerMenuParser.cc.

105  {
106  m_triggerMenuInterface = menuInterface;
107 }
std::string m_triggerMenuInterface
menu names
void TriggerMenuParser::setGtTriggerMenuInterfaceAuthor ( const std::string &  val)

Definition at line 378 of file TriggerMenuParser.cc.

378  {
379 
381 
382 }
std::string m_triggerMenuInterfaceAuthor
void TriggerMenuParser::setGtTriggerMenuInterfaceDate ( const std::string &  val)

Definition at line 372 of file TriggerMenuParser.cc.

372  {
373 
375 
376 }
std::string m_triggerMenuInterfaceDate
number of technical triggers
void TriggerMenuParser::setGtTriggerMenuInterfaceDescription ( const std::string &  val)

Definition at line 384 of file TriggerMenuParser.cc.

384  {
385 
387 
388 }
std::string m_triggerMenuInterfaceDescription
void TriggerMenuParser::setGtTriggerMenuName ( const std::string &  menuName)

Definition at line 114 of file TriggerMenuParser.cc.

114  {
115  m_triggerMenuName = menuName;
116 }
void TriggerMenuParser::setGtTriggerMenuUUID ( const int  uuid)

Definition at line 110 of file TriggerMenuParser.cc.

References createPayload::uuid.

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

Definition at line 134 of file TriggerMenuParser.cc.

135  {
136 
137  m_vecCaloTemplate = vecCaloTempl;
138 }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
void TriggerMenuParser::setVecCorrelationTemplate ( const std::vector< std::vector< CorrelationTemplate > > &  vecCorrelationTempl)

Definition at line 155 of file TriggerMenuParser.cc.

156  {
157 
158  m_vecCorrelationTemplate = vecCorrelationTempl;
159 }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
void TriggerMenuParser::setVecEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  vecEnergySumTempl)

Definition at line 140 of file TriggerMenuParser.cc.

141  {
142 
143  m_vecEnergySumTemplate = vecEnergySumTempl;
144 }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
void TriggerMenuParser::setVecExternalTemplate ( const std::vector< std::vector< ExternalTemplate > > &  vecExternalTempl)

Definition at line 148 of file TriggerMenuParser.cc.

149  {
150 
151  m_vecExternalTemplate = vecExternalTempl;
152 }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
void TriggerMenuParser::setVecMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  vecMuonTempl)

Definition at line 128 of file TriggerMenuParser.cc.

129  {
130 
131  m_vecMuonTemplate = vecMuonTempl;
132 }
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::vecCaloTemplate ( ) const
inline

Definition at line 145 of file TriggerMenuParser.h.

References m_vecCaloTemplate.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 172 of file TriggerMenuParser.h.

References m_vecCorrelationTemplate.

Referenced by L1TGlobalProducer::produce().

172  {
173 
175  }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
const std::vector<std::vector<EnergySumTemplate> >& l1t::TriggerMenuParser::vecEnergySumTemplate ( ) const
inline

Definition at line 152 of file TriggerMenuParser.h.

References m_vecEnergySumTemplate.

Referenced by L1TGlobalProducer::produce().

152  {
153 
154  return m_vecEnergySumTemplate;
155  }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
const std::vector<std::vector<ExternalTemplate> >& l1t::TriggerMenuParser::vecExternalTemplate ( ) const
inline

Definition at line 163 of file TriggerMenuParser.h.

References m_vecExternalTemplate.

Referenced by L1TGlobalProducer::produce().

163  {
164 
165  return m_vecExternalTemplate;
166  }
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 139 of file TriggerMenuParser.h.

References m_vecMuonTemplate.

Referenced by L1TGlobalProducer::produce().

139  {
140  return m_vecMuonTemplate;
141  }
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 446 of file TriggerMenuParser.h.

Referenced by gtAlgorithmAliasMap().

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

Definition at line 411 of file TriggerMenuParser.h.

Referenced by gtAlgorithmImplementation().

AlgorithmMap l1t::TriggerMenuParser::m_algorithmMap
private

map containing the physics algorithms (by name)

Definition at line 443 of file TriggerMenuParser.h.

Referenced by gtAlgorithmMap().

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

map containing the conditions (per condition chip) - transient

Definition at line 417 of file TriggerMenuParser.h.

Referenced by gtConditionMap().

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

Definition at line 439 of file TriggerMenuParser.h.

Referenced by corCaloTemplate().

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

Definition at line 440 of file TriggerMenuParser.h.

Referenced by corEnergySumTemplate().

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

Definition at line 438 of file TriggerMenuParser.h.

Referenced by corMuonTemplate().

GlobalScales l1t::TriggerMenuParser::m_gtScales
private

Definition at line 449 of file TriggerMenuParser.h.

Referenced by gtScales().

unsigned int l1t::TriggerMenuParser::m_numberConditionChips
private

hardware limits

number of condition chips

Definition at line 384 of file TriggerMenuParser.h.

Referenced by gtNumberConditionChips().

unsigned int l1t::TriggerMenuParser::m_numberPhysTriggers
private

number of physics trigger algorithms

Definition at line 394 of file TriggerMenuParser.h.

Referenced by gtNumberPhysTriggers().

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

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

Definition at line 391 of file TriggerMenuParser.h.

Referenced by gtOrderConditionChip().

unsigned int l1t::TriggerMenuParser::m_pinsOnConditionChip
private

number of pins on the GTL condition chips

Definition at line 387 of file TriggerMenuParser.h.

Referenced by gtPinsOnConditionChip().

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

menu associated scale key

Definition at line 428 of file TriggerMenuParser.h.

Referenced by gtScaleDbKey().

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

Definition at line 408 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuAuthor().

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

Definition at line 407 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDate().

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

Definition at line 409 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDescription().

unsigned long l1t::TriggerMenuParser::m_triggerMenuImplementation
private

Definition at line 424 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuImplementation().

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

menu names

Definition at line 422 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterface().

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

Definition at line 404 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceAuthor().

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

number of technical triggers

Definition at line 403 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDate().

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

Definition at line 405 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDescription().

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

Definition at line 423 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuName().

unsigned long l1t::TriggerMenuParser::m_triggerMenuUUID
private

Definition at line 425 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuUUID().

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

Definition at line 433 of file TriggerMenuParser.h.

Referenced by vecCaloTemplate().

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

Definition at line 437 of file TriggerMenuParser.h.

Referenced by vecCorrelationTemplate().

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

Definition at line 434 of file TriggerMenuParser.h.

Referenced by vecEnergySumTemplate().

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

Definition at line 435 of file TriggerMenuParser.h.

Referenced by vecExternalTemplate().

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

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

Definition at line 432 of file TriggerMenuParser.h.

Referenced by vecMuonTemplate().