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

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

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

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

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

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

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

554  {
555  std::stringstream ss;
556  ss << data;
557  return ss.str();
558 }
int TriggerMenuParser::l1tstr2int ( const std::string  data)
private

Definition at line 559 of file TriggerMenuParser.cc.

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

559  {
560  std::stringstream ss;
561  ss << data;
562  int value;
563  ss >> value;
564  return value;
565 }
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 2789 of file TriggerMenuParser.cc.

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

2790  {
2791 
2792 
2793  using namespace tmeventsetup;
2794  //using namespace Algorithm;
2795 
2796 
2797  // get alias
2798  std::string algAlias = algorithm.getName();
2799  std::string algName = algorithm.getName();
2800 
2801  if (algAlias == "") {
2802  algAlias = algName;
2803  LogDebug("TriggerMenuParser")
2804  << "\n No alias defined for algorithm. Alias set to algorithm name."
2805  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
2806  << std::endl;
2807  } else {
2808  //LogDebug("TriggerMenuParser")
2809  LogDebug("TriggerMenuParser") << "\n Alias defined for algorithm."
2810  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
2811  << std::endl;
2812  }
2813 
2814  // get the logical expression
2815  std::string logExpression = algorithm.getExpressionInCondition();
2816 
2817  LogDebug("TriggerMenuParser")
2818  << " Logical expression: " << logExpression
2819  << " Chip number: " << chipNr
2820  << std::endl;
2821 
2822  // determine output pin
2823  int outputPin = algorithm.getIndex();
2824 
2825 
2826  //LogTrace("TriggerMenuParser")
2827  LogDebug("TriggerMenuParser") << " Output pin: " << outputPin
2828  << std::endl;
2829 
2830 
2831  // compute the bit number from chip number, output pin and order of the chips
2832  // pin numbering start with 1, bit numbers with 0
2833  int bitNumber = outputPin;// + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1;
2834 
2835  //LogTrace("TriggerMenuParser")
2836  LogDebug("TriggerMenuParser") << " Bit number: " << bitNumber
2837  << std::endl;
2838 
2839  // create a new algorithm and insert it into algorithm map
2840  GlobalAlgorithm alg(algName, logExpression, bitNumber);
2841  alg.setAlgoChipNumber(static_cast<int>(chipNr));
2842  alg.setAlgoAlias(algAlias);
2843 
2844  if (edm::isDebugEnabled() ) {
2845 
2846  std::ostringstream myCoutStream;
2847  alg.print(myCoutStream);
2848  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2849 
2850  }
2851 
2852  // insert algorithm into the map
2853  if ( !insertAlgorithmIntoMap(alg)) {
2854  return false;
2855  }
2856 
2857  return true;
2858 
2859 }
#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 775 of file TriggerMenuParser.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

References AlCaHLTBitMon_QueryRunRegistry::string.

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

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

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

References CorrelationTemplate::CorrelationParameter::chargeCorrelation, l1t::CondCalo, l1t::CondEnergySum, l1t::CondMuon, GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, HLT_FULL_cff::DeltaEta, HLT_FULL_cff::DeltaPhi, HLT_FULL_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_FULL_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.

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

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

841 {
842 
843  using namespace tmeventsetup;
844 
845  // First Delta Eta for this set
846  std::string scLabel1 = obj1;
847  scLabel1 += "-ETA";
848  std::string scLabel2 = obj2;
849  scLabel2 += "-ETA";
850  const esScale* scale1 = &scaleMap.find(scLabel1)->second;
851  const esScale* scale2 = &scaleMap.find(scLabel2)->second;
852  std::vector<double> val_delta_eta;
853  std::vector<long long> lut_delta_eta;
854  size_t n = getDeltaVector(val_delta_eta, scale1, scale2);
855  setLut(lut_delta_eta, val_delta_eta, prec1);
856  std::string lutName = obj1;
857  lutName += "-";
858  lutName += obj2;
859  m_gtScales.setLUT_DeltaEta(lutName,lut_delta_eta,prec1);
860 
861  // Second Get the Cosh for this delta Eta Set
862  std::vector<long long> lut_cosh;
863  applyCosh(val_delta_eta, n);
864  setLut(lut_cosh, val_delta_eta, prec2);
865  m_gtScales.setLUT_Cosh(lutName,lut_cosh,prec2);
866 
867 }
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 869 of file TriggerMenuParser.cc.

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

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

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

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

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

Definition at line 2199 of file TriggerMenuParser.cc.

References 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.

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

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

References RecoTauCleanerPlugins::charge, GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, HLT_FULL_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_FULL_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

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

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

References AlCaHLTBitMon_QueryRunRegistry::string.

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

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

406  {
407 
409 
410 }
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 394 of file TriggerMenuParser.cc.

394  {
395 
396  m_triggerMenuAuthor = val;
397 
398 }
void TriggerMenuParser::setGtTriggerMenuDate ( const std::string &  val)

Definition at line 388 of file TriggerMenuParser.cc.

388  {
389 
390  m_triggerMenuDate = val;
391 
392 }
void TriggerMenuParser::setGtTriggerMenuDescription ( const std::string &  val)

Definition at line 400 of file TriggerMenuParser.cc.

400  {
401 
403 
404 }
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 375 of file TriggerMenuParser.cc.

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

Definition at line 369 of file TriggerMenuParser.cc.

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

Definition at line 381 of file TriggerMenuParser.cc.

381  {
382 
384 
385 }
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().