CMS 3D CMS Logo

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

#include <HLTLevel1GTSeed.h>

Inheritance diagram for HLTLevel1GTSeed:
HLTStreamFilter edm::stream::EDFilter<> edm::stream::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) override
 filter the event More...
 
 HLTLevel1GTSeed (const edm::ParameterSet &)
 constructor More...
 
virtual ~HLTLevel1GTSeed ()
 destructor More...
 
- Public Member Functions inherited from HLTStreamFilter
 HLTStreamFilter (const edm::ParameterSet &config)
 
int module (edm::Event const &) const
 
const std::string * moduleLabel () const
 
int path (edm::Event const &) const
 
const std::string * pathName (edm::Event const &) const
 
std::pair< int, int > pmid (edm::Event const &) const
 
bool saveTags () const
 
virtual ~HLTStreamFilter ()
 
- Public Member Functions inherited from edm::stream::EDFilter<>
 EDFilter ()=default
 
- Public Member Functions inherited from edm::stream::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilterBase ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 parameter description More...
 
- Static Public Member Functions inherited from HLTStreamFilter
static void makeHLTFilterDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::stream::EDFilterBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void convertStringToBitNumber ()
 
void debugPrint (bool) const
 
void dumpTriggerFilterObjectWithRefs (trigger::TriggerFilterObjectWithRefs &) const
 detailed print of filter content More...
 
const std::vector< L1GtObject > * objectTypeVec (const int chipNumber, const std::string &cndName) const
 get the vector of object types for a condition cndName on the GTL chip chipNumber More...
 
bool seedsL1Extra (edm::Event &, trigger::TriggerFilterObjectWithRefs &) const
 
bool seedsL1TriggerObjectMaps (edm::Event &, trigger::TriggerFilterObjectWithRefs &, const L1GtTriggerMask *, const L1GlobalTriggerReadoutRecord *, const int physicsDaqPartition)
 seeding is done via L1 trigger object maps, considering the objects which fired in L1 More...
 
void updateAlgoLogicParser (const L1GtTriggerMenu *, const AlgorithmMap &)
 
void updateAlgoLogicParser (const std::vector< bool > &gtWord, const std::vector< unsigned int > &triggerMask, const int physicsDaqPartition)
 

Private Attributes

bool m_isDebugEnabled
 cache edm::isDebugEnabled() More...
 
L1GtLogicParser m_l1AlgoLogicParser
 logic parser for m_l1SeedsLogicalExpression More...
 
std::vector
< L1GtLogicParser::OperandToken
m_l1AlgoSeeds
 list of required algorithms for seeding More...
 
std::vector< std::vector
< const std::vector
< L1GtObject > * > > 
m_l1AlgoSeedsObjType
 vector of object-type vectors for each condition in the required algorithms for seeding More...
 
std::vector< const std::vector
< L1GtLogicParser::TokenRPN > * > 
m_l1AlgoSeedsRpn
 vector of Rpn vectors for the required algorithms for seeding More...
 
edm::InputTag m_l1CenJetTag
 
edm::EDGetTokenT
< l1extra::L1JetParticleCollection
m_l1CenJetToken
 
edm::InputTag m_l1CollectionsTag
 Meta InputTag for L1 particle collections (except muon) More...
 
edm::InputTag m_l1EtMissMETTag
 
edm::EDGetTokenT
< l1extra::L1EtMissParticleCollection
m_l1EtMissMETToken
 
edm::InputTag m_l1EtMissMHTTag
 
edm::EDGetTokenT
< l1extra::L1EtMissParticleCollection
m_l1EtMissMHTToken
 
edm::InputTag m_l1ExtraTag
 cached InputTags More...
 
edm::InputTag m_l1ForJetTag
 
edm::EDGetTokenT
< l1extra::L1JetParticleCollection
m_l1ForJetToken
 
bool m_l1GlobalDecision
 replace string "L1GlobalDecision" with bool to speed up the "if" More...
 
L1GtTriggerMenum_l1GtMenu
 trigger menu More...
 
unsigned long long m_l1GtMenuCacheID
 
edm::InputTag m_l1GtObjectMapTag
 InputTag for L1 Global Trigger object maps. More...
 
edm::EDGetTokenT
< L1GlobalTriggerObjectMapRecord
m_l1GtObjectMapToken
 
edm::InputTag m_l1GtReadoutRecordTag
 InputTag for the L1 Global Trigger DAQ readout record. More...
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
m_l1GtReadoutRecordToken
 
edm::InputTag m_l1IsoEGTag
 
edm::EDGetTokenT
< l1extra::L1EmParticleCollection
m_l1IsoEGToken
 
edm::InputTag m_l1MuonCollectionTag
 Meta InputTag for L1 muon collection. More...
 
edm::InputTag m_l1MuonTag
 
edm::EDGetTokenT
< l1extra::L1MuonParticleCollection
m_l1MuonToken
 
edm::InputTag m_l1NoIsoEGTag
 
edm::EDGetTokenT
< l1extra::L1EmParticleCollection
m_l1NoIsoEGToken
 
int m_l1NrBxInEvent
 
std::string m_l1SeedsLogicalExpression
 
edm::InputTag m_l1TauJetTag
 
edm::EDGetTokenT
< l1extra::L1JetParticleCollection
m_l1TauJetToken
 
bool m_l1TechTriggerSeeding
 seeding done via technical trigger bits, if value is "true" More...
 
bool m_l1UseAliasesForSeeding
 seeding uses algorithm aliases instead of algorithm names, if value is "true" More...
 
bool m_l1UseL1TriggerObjectMaps
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDFilter<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDFilterBase
typedef EDFilterAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: filter L1 bits and extract seed objects from L1 GT for HLT algorithms.

Implementation: This class is an HLTStreamFilter (-> stream::EDFilter). It implements:

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 52 of file HLTLevel1GTSeed.h.

Constructor & Destructor Documentation

HLTLevel1GTSeed::HLTLevel1GTSeed ( const edm::ParameterSet parSet)
explicit

constructor

Definition at line 76 of file HLTLevel1GTSeed.cc.

References convertStringToBitNumber(), L1GtLogicParser::expressionSeedsOperandList(), LogDebug, m_l1AlgoLogicParser, m_l1AlgoSeeds, m_l1AlgoSeedsObjType, m_l1AlgoSeedsRpn, m_l1CollectionsTag, m_l1GlobalDecision, m_l1GtMenu, m_l1GtMenuCacheID, m_l1GtObjectMapTag, m_l1GtReadoutRecordTag, m_l1MuonCollectionTag, m_l1NrBxInEvent, m_l1SeedsLogicalExpression, m_l1TechTriggerSeeding, m_l1UseAliasesForSeeding, m_l1UseL1TriggerObjectMaps, L1GtLogicParser::operandTokenVector(), and findQualityFiles::size.

76  : HLTStreamFilter(parSet),
77  // seeding done via L1 trigger object maps, with objects that fired
79  "L1UseL1TriggerObjectMaps")),
80 
81  // option used forL1UseL1TriggerObjectMaps = False only
82  m_l1NrBxInEvent(parSet.getParameter<int> (
83  "L1NrBxInEvent")),
84 
85  // seeding done via technical trigger bits, if value is "true"
87  "L1TechTriggerSeeding")),
88 
89  // seeding uses algorithm aliases instead of algorithm names, if value is "true";
91  "L1UseAliasesForSeeding")),
92 
93  // logical expression for the required L1 algorithms
95  "L1SeedsLogicalExpression")),
96 
97  // InputTag for the L1 Global Trigger DAQ readout record
99  "L1GtReadoutRecordTag")),
100  m_l1GtReadoutRecordToken(consumes<L1GlobalTriggerReadoutRecord>(m_l1GtReadoutRecordTag)),
101 
102  // InputTag for L1 Global Trigger object maps
104  "L1GtObjectMapTag")),
105  m_l1GtObjectMapToken(consumes<L1GlobalTriggerObjectMapRecord>(m_l1GtObjectMapTag)),
106 
107  // InputTag for L1 particle collections (except muon)
109  "L1CollectionsTag")),
110 
111  // InputTag for L1 muon collection
113  "L1MuonCollectionTag")),
114 
118  m_l1MuonToken(consumes<l1extra::L1MuonParticleCollection>(m_l1MuonTag)),
120  m_l1IsoEGToken(consumes<l1extra::L1EmParticleCollection>(m_l1IsoEGTag)),
122  m_l1NoIsoEGToken(consumes<l1extra::L1EmParticleCollection>(m_l1NoIsoEGTag)),
124  m_l1CenJetToken(consumes<l1extra::L1JetParticleCollection>(m_l1CenJetTag)),
126  m_l1ForJetToken(consumes<l1extra::L1JetParticleCollection>(m_l1ForJetTag)),
128  m_l1TauJetToken(consumes<l1extra::L1JetParticleCollection>(m_l1TauJetTag)),
130  m_l1EtMissMETToken(consumes<l1extra::L1EtMissParticleCollection>(m_l1EtMissMETTag)),
132  m_l1EtMissMHTToken(consumes<l1extra::L1EtMissParticleCollection>(m_l1EtMissMHTTag)),
133  m_l1GlobalDecision(false),
135 
136  if (m_l1SeedsLogicalExpression != "L1GlobalDecision") {
137 
138  // check also the logical expression - add/remove spaces if needed
140 
141  // list of required algorithms for seeding
142  // dummy values for tokenNumber and tokenResult
145  size_t l1AlgoSeedsSize = m_l1AlgoSeeds.size();
146 
147  //
148  m_l1AlgoSeedsRpn.reserve(l1AlgoSeedsSize);
149  m_l1AlgoSeedsObjType.reserve(l1AlgoSeedsSize);
150  } else {
151  m_l1GlobalDecision = true;
152  }
153 
154  // for seeding via technical triggers, convert the "name" to tokenNumber
155  // (seeding via bit numbers)
158  }
159 
160  LogDebug("HLTLevel1GTSeed") << "\n"
161  << "L1 Seeding using L1 trigger object maps: "
162  << m_l1UseL1TriggerObjectMaps << "\n"
163  << " if false: seeding with L1Extra\n"
164  << "Number of BxInEvent when seeding with L1Extra: "
165  << m_l1NrBxInEvent << "\n"
166  << " aka w/o object maps\n " << "\n"
167  << "L1 Seeding via Technical Triggers: "
168  << m_l1TechTriggerSeeding << "\n"
169  << "L1 Seeding uses algorithm aliases: "
170  << m_l1UseAliasesForSeeding << "\n"
171  << "L1 Seeds Logical Expression: " << "\n "
172  << m_l1SeedsLogicalExpression << "\n"
173  << "Input tag for L1 GT DAQ record: "
174  << m_l1GtReadoutRecordTag << " \n"
175  << "Input tag for L1 GT object map record: "
176  << m_l1GtObjectMapTag << " \n"
177  << "Input tag for L1 extra collections: "
178  << m_l1CollectionsTag << " \n"
179  << "Input tag for L1 muon collections: "
180  << m_l1MuonCollectionTag << " \n" << std::endl;
181 
182  // initialize cache
183  m_l1GtMenu = nullptr;
184  m_l1GtMenuCacheID = 0ULL;
185 }
#define LogDebug(id)
std::vector< L1GtLogicParser::OperandToken > expressionSeedsOperandList()
T getParameter(std::string const &) const
bool isDebugEnabled()
bool m_l1UseL1TriggerObjectMaps
edm::InputTag m_l1EtMissMETTag
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMHTToken
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
bool m_l1UseAliasesForSeeding
seeding uses algorithm aliases instead of algorithm names, if value is &quot;true&quot;
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1ForJetToken
edm::InputTag m_l1ExtraTag
cached InputTags
bool m_l1TechTriggerSeeding
seeding done via technical trigger bits, if value is &quot;true&quot;
edm::InputTag m_l1EtMissMHTTag
edm::InputTag m_l1GtObjectMapTag
InputTag for L1 Global Trigger object maps.
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMETToken
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtReadoutRecordToken
std::vector< std::vector< const std::vector< L1GtObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
HLTStreamFilter(const edm::ParameterSet &config)
edm::InputTag m_l1CollectionsTag
Meta InputTag for L1 particle collections (except muon)
edm::InputTag m_l1MuonCollectionTag
Meta InputTag for L1 muon collection.
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1CenJetToken
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1IsoEGToken
std::string m_l1SeedsLogicalExpression
edm::InputTag m_l1IsoEGTag
unsigned long long m_l1GtMenuCacheID
edm::InputTag m_l1ForJetTag
bool m_isDebugEnabled
cache edm::isDebugEnabled()
edm::InputTag m_l1CenJetTag
std::vector< const std::vector< L1GtLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
edm::InputTag m_l1NoIsoEGTag
void convertStringToBitNumber()
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1TauJetToken
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > m_l1GtObjectMapToken
std::string const & label() const
Definition: InputTag.h:42
edm::InputTag m_l1GtReadoutRecordTag
InputTag for the L1 Global Trigger DAQ readout record.
bool m_l1GlobalDecision
replace string &quot;L1GlobalDecision&quot; with bool to speed up the &quot;if&quot;
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > m_l1MuonToken
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1NoIsoEGToken
edm::InputTag m_l1MuonTag
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
edm::InputTag m_l1TauJetTag
tuple size
Write out results.
L1GtTriggerMenu * m_l1GtMenu
trigger menu
HLTLevel1GTSeed::~HLTLevel1GTSeed ( )
virtual

destructor

Definition at line 188 of file HLTLevel1GTSeed.cc.

188  {
189  // empty now
190 }

Member Function Documentation

void HLTLevel1GTSeed::convertStringToBitNumber ( )
private

for seeding via technical triggers, convert the "name" to tokenNumber (seeding via bit numbers) - done once in constructor

Definition at line 556 of file HLTLevel1GTSeed.cc.

References edm::hlt::Exception, cmsPerfPublish::fail(), i, m_l1AlgoLogicParser, m_l1AlgoSeeds, m_l1SeedsLogicalExpression, L1GtLogicParser::operandTokenVector(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by HLTLevel1GTSeed().

556  {
557 
558  std::vector<L1GtLogicParser::OperandToken> & algOpTokenVector =
560 
561  for (size_t i = 0; i < algOpTokenVector.size(); ++i) {
562 
563  std::string bitString = (algOpTokenVector[i]).tokenName;
564  std::istringstream bitStream(bitString);
565  int bitInt;
566 
567  if ((bitStream >> bitInt).fail()) {
568 
569  throw cms::Exception("FailModule")
570  << "\nL1 Seeds Logical Expression: = '"
572  << "\n Conversion to integer failed for " << bitString
573  << std::endl;
574  }
575 
576  (algOpTokenVector[i]).tokenNumber = bitInt;
577 
578  }
579 
580  for (size_t i = 0; i < m_l1AlgoSeeds.size(); ++i) {
581 
582  std::string bitString = (m_l1AlgoSeeds[i]).tokenName;
583  std::istringstream bitStream(bitString);
584  int bitInt;
585 
586  if ((bitStream >> bitInt).fail()) {
587 
588  throw cms::Exception("FailModule")
589  << "\nL1 Seeds Logical Expression: = '"
591  << "\n Conversion to integer failed for " << bitString
592  << std::endl;
593  }
594 
595  (m_l1AlgoSeeds[i]).tokenNumber = bitInt;
596  }
597 
598 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
std::string m_l1SeedsLogicalExpression
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
void HLTLevel1GTSeed::debugPrint ( bool  newMenu) const
private

debug print grouped in a single function can be called for a new menu (bool "true") or for a new event

Definition at line 602 of file HLTLevel1GTSeed.cc.

References L1GtTriggerMenu::gtTriggerMenuName(), i, j, gen::k, LogDebug, LogTrace, m_l1AlgoLogicParser, m_l1AlgoSeeds, m_l1AlgoSeedsObjType, m_l1AlgoSeedsRpn, m_l1GtMenu, m_l1TechTriggerSeeding, getGTfromDQMFile::obj, L1GtLogicParser::operandTokenVector(), and findQualityFiles::size.

Referenced by updateAlgoLogicParser().

603 {
604 
606  LogDebug("HLTLevel1GTSeed")
607  << "\n\nupdateAlgoLogicParser: seeding via technical trigger"
608  << "\n update event quantities." << std::endl;
609 
610  } else {
611 
612  if (newMenu) {
613  LogDebug("HLTLevel1GTSeed")
614  << "\n\nupdateAlgoLogicParser: L1 trigger menu changed to "
615  << m_l1GtMenu->gtTriggerMenuName() << std::endl;
616  } else {
617  LogDebug("HLTLevel1GTSeed")
618  << "\n\nupdateAlgoLogicParser: L1 trigger menu unchanged ("
620  << ")\n update event quantities." << std::endl;
621  }
622  }
623 
624  std::vector<L1GtLogicParser::OperandToken> const & algOpTokenVector =
626 
627  LogTrace("HLTLevel1GTSeed")
628  << "\n\nupdateAlgoLogicParser: algOpTokenVector.size() = "
629  << algOpTokenVector.size() << std::endl;
630 
631  for (size_t i = 0; i < algOpTokenVector.size(); ++i) {
632 
633  LogTrace("HLTLevel1GTSeed") << " " << std::setw(5)
634  << (algOpTokenVector[i]).tokenNumber << "\t" << std::setw(25)
635  << (algOpTokenVector[i]).tokenName << "\t"
636  << (algOpTokenVector[i]).tokenResult << std::endl;
637  }
638 
639  LogTrace("HLTLevel1GTSeed") << std::endl;
640 
641  LogTrace("HLTLevel1GTSeed")
642  << "\nupdateAlgoLogicParser: m_l1AlgoSeeds.size() = "
643  << m_l1AlgoSeeds.size() << std::endl;
644 
645  for (size_t i = 0; i < m_l1AlgoSeeds.size(); ++i) {
646 
647  LogTrace("HLTLevel1GTSeed") << " " << std::setw(5)
648  << (m_l1AlgoSeeds[i]).tokenNumber << "\t" << std::setw(25)
649  << (m_l1AlgoSeeds[i]).tokenName << "\t"
650  << (m_l1AlgoSeeds[i]).tokenResult << std::endl;
651  }
652 
653  LogTrace("HLTLevel1GTSeed") << std::endl;
654 
655  if (!newMenu) {
656  return;
657  }
658 
659  LogTrace("HLTLevel1GTSeed")
660  << "\nupdateAlgoLogicParser: m_l1AlgoSeedsRpn.size() = "
661  << m_l1AlgoSeedsRpn.size() << std::endl;
662 
663  for (size_t i = 0; i < m_l1AlgoSeedsRpn.size(); ++i) {
664 
665  LogTrace("HLTLevel1GTSeed") << " Rpn vector size: "
666  << (m_l1AlgoSeedsRpn[i])->size() << std::endl;
667 
668  for (size_t j = 0; j < (m_l1AlgoSeedsRpn[i])->size(); ++j) {
669 
670  LogTrace("HLTLevel1GTSeed") << " ( "
671  << (*(m_l1AlgoSeedsRpn[i]))[j].operation << ", "
672  << (*(m_l1AlgoSeedsRpn[i]))[j].operand << " )" << std::endl;
673 
674  }
675  }
676 
677  LogTrace("HLTLevel1GTSeed") << std::endl;
678 
679  LogTrace("HLTLevel1GTSeed") << "\nupdateAlgoLogicParser: "
680  << "algorithms in seed expression: m_l1AlgoSeedsObjType.size() = "
681  << m_l1AlgoSeedsObjType.size() << std::endl;
682 
683  for (size_t i = 0; i < m_l1AlgoSeedsObjType.size(); ++i) {
684 
685  LogTrace("HLTLevel1GTSeed")
686  << " Conditions for an algorithm: vector size: "
687  << (m_l1AlgoSeedsObjType[i]).size() << std::endl;
688 
689  for (size_t j = 0; j < (m_l1AlgoSeedsObjType[i]).size(); ++j) {
690 
691  LogTrace("HLTLevel1GTSeed")
692  << " Condition object type vector: size: "
693  << ((m_l1AlgoSeedsObjType[i])[j])->size() << std::endl;
694 
695  for (size_t k = 0; k < ((m_l1AlgoSeedsObjType[i])[j])->size(); ++k) {
696 
697  L1GtObject obj = (*((m_l1AlgoSeedsObjType[i])[j]))[k];
698  LogTrace("HLTLevel1GTSeed") << " " << obj << " ";
699 
700  }
701 
702  LogTrace("HLTLevel1GTSeed") << std::endl;
703 
704  }
705  }
706 
707  LogTrace("HLTLevel1GTSeed") << std::endl;
708 
709 }
#define LogDebug(id)
const std::string & gtTriggerMenuName() const
int i
Definition: DBlmapReader.cc:9
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
bool m_l1TechTriggerSeeding
seeding done via technical trigger bits, if value is &quot;true&quot;
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
std::vector< std::vector< const std::vector< L1GtObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
int j
Definition: DBlmapReader.cc:9
#define LogTrace(id)
int k[5][pyjets_maxn]
std::vector< const std::vector< L1GtLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
tuple size
Write out results.
L1GtTriggerMenu * m_l1GtMenu
trigger menu
void HLTLevel1GTSeed::dumpTriggerFilterObjectWithRefs ( trigger::TriggerFilterObjectWithRefs filterproduct) const
private

detailed print of filter content

Definition at line 1824 of file HLTLevel1GTSeed.cc.

References trigger::TriggerRefsCollections::getObjects(), i, LogDebug, LogTrace, getGTfromDQMFile::obj, trigger::TriggerL1CenJet, trigger::TriggerL1ETM, trigger::TriggerL1ETT, trigger::TriggerL1ForJet, trigger::TriggerL1HTM, trigger::TriggerL1HTT, trigger::TriggerL1IsoEG, trigger::TriggerL1Mu, trigger::TriggerL1NoIsoEG, and trigger::TriggerL1TauJet.

Referenced by hltFilter().

1825 {
1826  LogDebug("HLTLevel1GTSeed") << "\nHLTLevel1GTSeed::hltFilter "
1827  << "\n Dump TriggerFilterObjectWithRefs\n" << std::endl;
1828 
1829  std::vector<l1extra::L1MuonParticleRef> seedsL1Mu;
1830 
1831  std::vector<l1extra::L1EmParticleRef> seedsL1IsoEG;
1832  std::vector<l1extra::L1EmParticleRef> seedsL1NoIsoEG;
1833 
1834  std::vector<l1extra::L1JetParticleRef> seedsL1CenJet;
1835  std::vector<l1extra::L1JetParticleRef> seedsL1ForJet;
1836  std::vector<l1extra::L1JetParticleRef> seedsL1TauJet;
1837 
1838  std::vector<l1extra::L1EtMissParticleRef> seedsL1ETM;
1839  std::vector<l1extra::L1EtMissParticleRef> seedsL1ETT;
1840  std::vector<l1extra::L1EtMissParticleRef> seedsL1HTT;
1841  std::vector<l1extra::L1EtMissParticleRef> seedsL1HTM;
1842 
1843  filterproduct.getObjects(trigger::TriggerL1Mu, seedsL1Mu);
1844  const size_t sizeSeedsL1Mu = seedsL1Mu.size();
1845 
1846  filterproduct.getObjects(trigger::TriggerL1IsoEG, seedsL1IsoEG);
1847  const size_t sizeSeedsL1IsoEG = seedsL1IsoEG.size();
1848 
1849  filterproduct.getObjects(trigger::TriggerL1NoIsoEG, seedsL1NoIsoEG);
1850  const size_t sizeSeedsL1NoIsoEG = seedsL1NoIsoEG.size();
1851 
1852  filterproduct.getObjects(trigger::TriggerL1CenJet, seedsL1CenJet);
1853  const size_t sizeSeedsL1CenJet = seedsL1CenJet.size();
1854 
1855  filterproduct.getObjects(trigger::TriggerL1ForJet, seedsL1ForJet);
1856  const size_t sizeSeedsL1ForJet = seedsL1ForJet.size();
1857 
1858  filterproduct.getObjects(trigger::TriggerL1TauJet, seedsL1TauJet);
1859  const size_t sizeSeedsL1TauJet = seedsL1TauJet.size();
1860 
1861  filterproduct.getObjects(trigger::TriggerL1ETM, seedsL1ETM);
1862  const size_t sizeSeedsL1ETM = seedsL1ETM.size();
1863 
1864  filterproduct.getObjects(trigger::TriggerL1ETT, seedsL1ETT);
1865  const size_t sizeSeedsL1ETT = seedsL1ETT.size();
1866 
1867  filterproduct.getObjects(trigger::TriggerL1HTT, seedsL1HTT);
1868  const size_t sizeSeedsL1HTT = seedsL1HTT.size();
1869 
1870  filterproduct.getObjects(trigger::TriggerL1HTM, seedsL1HTM);
1871  const size_t sizeSeedsL1HTM = seedsL1HTM.size();
1872 
1873  LogTrace("HLTLevel1GTSeed") << " L1Mu seeds: " << sizeSeedsL1Mu << "\n"
1874  << " L1IsoEG seeds: " << sizeSeedsL1IsoEG << "\n"
1875  << " L1NoIsoEG seeds: " << sizeSeedsL1NoIsoEG << "\n"
1876  << " L1CenJet seeds: " << sizeSeedsL1CenJet << "\n"
1877  << " L1ForJet seeds: " << sizeSeedsL1ForJet << "\n"
1878  << " L1TauJet seeds: " << sizeSeedsL1TauJet << "\n"
1879  << " L1ETM seeds: " << sizeSeedsL1ETM << "\n"
1880  << " L1ETT seeds: " << sizeSeedsL1ETT << "\n"
1881  << " L1HTT seeds: " << sizeSeedsL1HTT << "\n"
1882  << " L1HTM seeds: " << sizeSeedsL1HTM << "\n" << std::endl;
1883 
1884  for (size_t i = 0; i != sizeSeedsL1Mu; i++) {
1885 
1887  seedsL1Mu[i]);
1888 
1889  LogTrace("HLTLevel1GTSeed") << "L1Mu " << "\t" << "q*PT = "
1890  << obj->charge() * obj->pt() << "\t" << "eta = " << obj->eta()
1891  << "\t" << "phi = " << obj->phi() << "\t" << "BX = "
1892  << obj->bx();
1893  }
1894 
1895  for (size_t i = 0; i != sizeSeedsL1IsoEG; i++) {
1896 
1898  l1extra::L1EmParticleRef(seedsL1IsoEG[i]);
1899 
1900  LogTrace("HLTLevel1GTSeed") << "L1IsoEG " << "\t" << "ET = "
1901  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
1902  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
1903  ;
1904  }
1905 
1906  for (size_t i = 0; i != sizeSeedsL1NoIsoEG; i++) {
1907 
1909  seedsL1NoIsoEG[i]);
1910 
1911  LogTrace("HLTLevel1GTSeed") << "L1NoIsoEG" << "\t" << "ET = "
1912  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
1913  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
1914  }
1915 
1916  for (size_t i = 0; i != sizeSeedsL1CenJet; i++) {
1917 
1919  seedsL1CenJet[i]);
1920 
1921  LogTrace("HLTLevel1GTSeed") << "L1CenJet " << "\t" << "ET = "
1922  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
1923  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
1924  }
1925 
1926  for (size_t i = 0; i != sizeSeedsL1ForJet; i++) {
1927 
1929  seedsL1ForJet[i]);
1930 
1931  LogTrace("HLTLevel1GTSeed") << "L1ForJet " << "\t" << "ET = "
1932  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
1933  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
1934  }
1935 
1936  for (size_t i = 0; i != sizeSeedsL1TauJet; i++) {
1937 
1939  seedsL1TauJet[i]);
1940 
1941  LogTrace("HLTLevel1GTSeed") << "L1TauJet " << "\t" << "ET = "
1942  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
1943  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
1944  }
1945 
1946  for (size_t i = 0; i != sizeSeedsL1ETM; i++) {
1947 
1949  seedsL1ETM[i]);
1950 
1951  LogTrace("HLTLevel1GTSeed") << "L1ETM " << "\t" << "ET = "
1952  << obj->etMiss() << "\t" << "phi = " << obj->phi() << "BX = "
1953  << obj->bx();
1954  }
1955 
1956  for (size_t i = 0; i != sizeSeedsL1ETT; i++) {
1957 
1959  seedsL1ETT[i]);
1960 
1961  LogTrace("HLTLevel1GTSeed") << "L1ETT " << "\t" << "ET = "
1962  << obj->etTotal() << "\t" << "BX = " << obj->bx();
1963  }
1964 
1965  for (size_t i = 0; i != sizeSeedsL1HTT; i++) {
1966 
1968  seedsL1HTT[i]);
1969 
1970  LogTrace("HLTLevel1GTSeed") << "L1HTT " << "\t" << "ET = "
1971  << obj->etTotal() << "\t" << "BX = " << obj->bx();
1972  }
1973 
1974  for (size_t i = 0; i != sizeSeedsL1HTM; i++) {
1975 
1977  seedsL1HTM[i]);
1978 
1979  LogTrace("HLTLevel1GTSeed") << "L1HTM " << "\t" << "ET = "
1980  << obj->etMiss() << "\t" << "phi = " << obj->phi() << "BX = "
1981  << obj->bx();
1982  }
1983 
1984  LogTrace("HLTLevel1GTSeed") << " \n\n" << std::endl;
1985 
1986 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
enum start value shifted to 81 so as to avoid clashes with PDG codes
edm::Ref< L1JetParticleCollection > L1JetParticleRef
#define LogTrace(id)
edm::Ref< L1MuonParticleCollection > L1MuonParticleRef
edm::Ref< L1EtMissParticleCollection > L1EtMissParticleRef
edm::Ref< L1EmParticleCollection > L1EmParticleRef
void HLTLevel1GTSeed::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

parameter description

Definition at line 195 of file HLTLevel1GTSeed.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), HLTStreamFilter::makeHLTFilterDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

195  {
198 
199  // # default: true
200  // # seeding done via L1 trigger object maps, with objects that fired
201  // # only objects from the central BxInEvent (L1A) are used
202  // # if false:
203  // # seeding is done ignoring if a L1 object fired or not,
204  // # adding all L1EXtra objects corresponding to the object types
205  // # used in all conditions from the algorithms in logical expression
206  // # for a given number of BxInEvent
207  desc.add<bool>("L1UseL1TriggerObjectMaps",true);
208 
209  // # option used forL1UseL1TriggerObjectMaps = False only
210  // # number of BxInEvent: 1: L1A=0; 3: -1, L1A=0, 1; 5: -2, -1, L1A=0, 1, 2
211  desc.add<int>("L1NrBxInEvent",3);
212 
213  // # seeding done via technical trigger bits, if value is "true";
214  // # default: false (seeding via physics algorithms)
215  desc.add<bool>("L1TechTriggerSeeding",false);
216 
217  // # seeding done with aliases for physics algorithms
218  desc.add<bool>("L1UseAliasesForSeeding",true);
219 
220  // # logical expression for the required L1 algorithms;
221  // # the algorithms are specified by name
222  // # allowed operators: "AND", "OR", "NOT", "(", ")"
223  // #
224  // # by convention, "L1GlobalDecision" logical expression means global decision
225  desc.add<std::string>("L1SeedsLogicalExpression","");
226 
227  // # InputTag for the L1 Global Trigger DAQ readout record
228  // # GT Emulator = gtDigis
229  // # GT Unpacker = l1GtUnpack
230  // #
231  // # cloned GT unpacker in HLT = gtDigis
232  desc.add<edm::InputTag>("L1GtReadoutRecordTag",edm::InputTag("gtDigis"));
233 
234  // # InputTag for L1 Global Trigger object maps
235  // # only the emulator produces the object maps
236  // # GT Emulator = gtDigis
237  // #
238  // # cloned GT emulator in HLT = l1GtObjectMap
239  desc.add<edm::InputTag>("L1GtObjectMapTag",edm::InputTag("l1GtObjectMap"));
240 
241  // # InputTag for L1 particle collections (except muon)
242  // # L1 Extra = l1extraParticles
243  desc.add<edm::InputTag>("L1CollectionsTag",edm::InputTag("l1extraParticles"));
244 
245  // # InputTag for L1 muon collection
246  // # L1 Extra = l1extraParticles
247  desc.add<edm::InputTag>("L1MuonCollectionTag",edm::InputTag("l1extraParticles"));
248 
249  descriptions.add("hltLevel1GTSeed", desc);
250 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
bool HLTLevel1GTSeed::hltFilter ( edm::Event iEvent,
const edm::EventSetup evSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
)
overridevirtual

filter the event

Implements HLTStreamFilter.

Definition at line 252 of file HLTLevel1GTSeed.cc.

References trigger::TriggerFilterObjectWithRefs::addCollectionTag(), L1GtTriggerMenu::buildGtConditionMap(), dumpTriggerFilterObjectWithRefs(), L1GtLogicParser::expressionResult(), edm::EventSetup::get(), edm::Event::getByToken(), edm::HandleBase::isValid(), LogTrace, m_isDebugEnabled, m_l1AlgoLogicParser, m_l1CenJetTag, m_l1EtMissMETTag, m_l1EtMissMHTTag, m_l1ExtraTag, m_l1ForJetTag, m_l1GlobalDecision, m_l1GtMenu, m_l1GtMenuCacheID, m_l1GtReadoutRecordTag, m_l1GtReadoutRecordToken, m_l1IsoEGTag, m_l1MuonTag, m_l1NoIsoEGTag, m_l1TauJetTag, m_l1TechTriggerSeeding, m_l1UseAliasesForSeeding, m_l1UseL1TriggerObjectMaps, edm::Handle< T >::product(), edm::ESHandle< class >::product(), HLTStreamFilter::saveTags(), seedsL1Extra(), seedsL1TriggerObjectMaps(), and updateAlgoLogicParser().

252  {
253 
254  // all HLT filters must create and fill a HLT filter object,
255  // recording any reconstructed physics objects satisfying
256  // this HLT filter, and place it in the event.
257 
258  // the filter object
259  if (saveTags()) {
260  filterproduct.addCollectionTag(m_l1MuonTag);
261  filterproduct.addCollectionTag(m_l1ExtraTag);
262  filterproduct.addCollectionTag(m_l1IsoEGTag);
263  filterproduct.addCollectionTag(m_l1NoIsoEGTag);
264  filterproduct.addCollectionTag(m_l1CenJetTag);
265  filterproduct.addCollectionTag(m_l1ForJetTag);
266  filterproduct.addCollectionTag(m_l1TauJetTag);
267  filterproduct.addCollectionTag(m_l1EtMissMETTag);
268  filterproduct.addCollectionTag(m_l1EtMissMHTTag);
269  }
270 
271  // get the trigger mask from the EventSetup
273  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo);
274 
275  // get L1GlobalTriggerReadoutRecord and GT decision
277  iEvent.getByToken(m_l1GtReadoutRecordToken, gtReadoutRecord);
278  const L1GlobalTriggerReadoutRecord* gtReadoutRecordPtr =
279  gtReadoutRecord.product();
280 
281  if (!gtReadoutRecord.isValid()) {
282  edm::LogWarning("HLTLevel1GTSeed")
283  << "\nWarning: L1GlobalTriggerReadoutRecord with input tag "
285  << "\nrequested in configuration, but not found in the event."
286  << std::endl;
287  return false;
288  }
289 
290  //
291  boost::uint16_t gtFinalOR = gtReadoutRecord->finalOR();
292  int physicsDaqPartition = 0;
293  bool gtDecision =
294  static_cast<bool> (gtFinalOR & (1 << physicsDaqPartition));
295 
296  // GT global decision "false" possible only when running on MC or on random triggers
297  if (!gtDecision) {
298 
299  return false;
300 
301  } else {
302 
303  // by convention, "L1GlobalDecision" logical expression means global decision
304  if (m_l1GlobalDecision) {
305 
306  // return the full L1GlobalTriggerObjectMapRecord in filter format FIXME
307  return true;
308 
309  }
310 
311  }
312 
313  // seeding done via technical trigger bits
315 
316  // get the technical trigger mask from the EventSetup
318  evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech);
319 
320  // get Global Trigger technical trigger word, update the tokenResult members
321  // from m_l1AlgoLogicParser and get the result for the logical expression
322  const std::vector<bool>& gtTechTrigWord = gtReadoutRecord->technicalTriggerWord();
323  updateAlgoLogicParser(gtTechTrigWord, l1GtTmTech->gtTriggerMask(), physicsDaqPartition);
324 
325  // always empty filter - GT not aware of objects for technical triggers
326  bool seedsResult = m_l1AlgoLogicParser.expressionResult();
327 
328  if (seedsResult) {
329  return true;
330  } else {
331  return false;
332  }
333 
334  }
335 
336  // seeding via physics algorithms
337 
338  // get / update the trigger menu from the EventSetup
339  // local cache & check on cacheIdentifier
340 
341  unsigned long long l1GtMenuCacheID =
342  evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
343 
344  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
345 
347  evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu);
348  // make a copy of the L1GtTriggerMenu in order to call buildGtConditionMap() (FIXME - is this really needed ?)
349  delete m_l1GtMenu;
350  m_l1GtMenu = new L1GtTriggerMenu(* l1GtMenu.product());
352  m_l1GtMenuCacheID = l1GtMenuCacheID;
353 
354  const AlgorithmMap& algorithmMap = l1GtMenu->gtAlgorithmMap();
355  const AlgorithmMap& algorithmAliasMap = l1GtMenu->gtAlgorithmAliasMap();
356 
357  LogTrace("HLTLevel1GTSeed") << "\n L1 trigger menu "
358  << l1GtMenu->gtTriggerMenuInterface()
359  << "\n Number of algorithm names: "
360  << (algorithmMap.size())
361  << "\n Number of algorithm aliases: "
362  << (algorithmAliasMap.size()) << "\n" << std::endl;
363 
364  // update also the tokenNumber members (holding the bit numbers) from m_l1AlgoLogicParser
366  updateAlgoLogicParser(m_l1GtMenu, algorithmAliasMap);
367  } else {
368  updateAlgoLogicParser(m_l1GtMenu, algorithmMap);
369  }
370  }
371 
372  // FinalOR is true, it was tested before
374  if (not seedsL1TriggerObjectMaps(iEvent, filterproduct, l1GtTmAlgo.product(), gtReadoutRecordPtr, physicsDaqPartition))
375  return false;
376  } else {
377  if (not seedsL1Extra(iEvent, filterproduct))
378  return false;
379  }
380 
381  if (m_isDebugEnabled) {
382  dumpTriggerFilterObjectWithRefs(filterproduct);
383  }
384 
385  return true;
386 
387 }
bool m_l1UseL1TriggerObjectMaps
void dumpTriggerFilterObjectWithRefs(trigger::TriggerFilterObjectWithRefs &) const
detailed print of filter content
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
bool seedsL1Extra(edm::Event &, trigger::TriggerFilterObjectWithRefs &) const
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
edm::InputTag m_l1EtMissMETTag
bool m_l1UseAliasesForSeeding
seeding uses algorithm aliases instead of algorithm names, if value is &quot;true&quot;
edm::InputTag m_l1ExtraTag
cached InputTags
bool m_l1TechTriggerSeeding
seeding done via technical trigger bits, if value is &quot;true&quot;
edm::InputTag m_l1EtMissMHTTag
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtReadoutRecordToken
void updateAlgoLogicParser(const L1GtTriggerMenu *, const AlgorithmMap &)
edm::InputTag m_l1IsoEGTag
unsigned long long m_l1GtMenuCacheID
bool isValid() const
Definition: HandleBase.h:76
edm::InputTag m_l1ForJetTag
#define LogTrace(id)
bool m_isDebugEnabled
cache edm::isDebugEnabled()
edm::InputTag m_l1CenJetTag
edm::InputTag m_l1NoIsoEGTag
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
T const * product() const
Definition: Handle.h:81
edm::InputTag m_l1GtReadoutRecordTag
InputTag for the L1 Global Trigger DAQ readout record.
bool m_l1GlobalDecision
replace string &quot;L1GlobalDecision&quot; with bool to speed up the &quot;if&quot;
bool seedsL1TriggerObjectMaps(edm::Event &, trigger::TriggerFilterObjectWithRefs &, const L1GtTriggerMask *, const L1GlobalTriggerReadoutRecord *, const int physicsDaqPartition)
seeding is done via L1 trigger object maps, considering the objects which fired in L1 ...
edm::InputTag m_l1MuonTag
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
edm::InputTag m_l1TauJetTag
L1GtTriggerMenu * m_l1GtMenu
trigger menu
bool saveTags() const
virtual const bool expressionResult() const
const std::vector< L1GtObject > * HLTLevel1GTSeed::objectTypeVec ( const int  chipNumber,
const std::string &  cndName 
) const
private

get the vector of object types for a condition cndName on the GTL chip chipNumber

Definition at line 389 of file HLTLevel1GTSeed.cc.

References asciidump::at, edm::hlt::Exception, L1GtTriggerMenu::gtConditionMap(), and m_l1GtMenu.

Referenced by updateAlgoLogicParser().

390  {
391 
392  const ConditionMap& conditionMap =
393  (m_l1GtMenu->gtConditionMap()).at(chipNr);
394 
395  CItCond itCond = conditionMap.find(cndName);
396  if (itCond != conditionMap.end())
397  return (&((itCond->second)->objectType()));
398 
399  // this should never be happen, all conditions are in the maps
400  throw cms::Exception("FailModule") << "\nCondition " << cndName << " not found in the condition map" << " for chip number " << chipNr;
401 }
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
const std::vector< ConditionMap > & gtConditionMap() const
get / set / build the condition maps
L1GtTriggerMenu * m_l1GtMenu
trigger menu
list at
Definition: asciidump.py:428
bool HLTLevel1GTSeed::seedsL1Extra ( edm::Event iEvent,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
private

seeding is done ignoring if a L1 object fired or not if the event is selected at L1, fill all the L1 objects of types corresponding to the L1 conditions from the seeding logical expression for bunch crosses F, 0, 1 directly from L1Extra and use them as seeds at HLT method and filter return true if at least an object is filled

Definition at line 1289 of file HLTLevel1GTSeed.cc.

References trigger::TriggerRefsCollections::addObject(), CenJet, ETM, ETT, ForJet, edm::Event::getByToken(), HTM, HTT, IsoEG, edm::HandleBase::isValid(), JetCounts, LogDebug, LogTrace, m_l1AlgoSeeds, m_l1AlgoSeedsObjType, m_l1CenJetTag, m_l1CenJetToken, m_l1EtMissMETTag, m_l1EtMissMETToken, m_l1EtMissMHTTag, m_l1EtMissMHTToken, m_l1ForJetTag, m_l1ForJetToken, m_l1IsoEGTag, m_l1IsoEGToken, m_l1MuonTag, m_l1MuonToken, m_l1NoIsoEGTag, m_l1NoIsoEGToken, m_l1NrBxInEvent, m_l1TauJetTag, m_l1TauJetToken, Mu, NoIsoEG, AlCaHLTBitMon_QueryRunRegistry::string, TauJet, trigger::TriggerL1CenJet, trigger::TriggerL1ETM, trigger::TriggerL1ETT, trigger::TriggerL1ForJet, trigger::TriggerL1HTM, trigger::TriggerL1HTT, trigger::TriggerL1IsoEG, trigger::TriggerL1Mu, trigger::TriggerL1NoIsoEG, and trigger::TriggerL1TauJet.

Referenced by hltFilter().

1289  {
1290 
1291 
1292 
1293  // if (m_isDebugEnabled) {
1294  //
1295  // LogTrace("HLTLevel1GTSeed") << "\n Printing muons from gtDigis\n " << std::endl;
1296  //
1297  // edm::Handle<std::vector<L1MuGMTCand> > muonData;
1298  // iEvent.getByToken("gtDigis", muonData);
1299  //
1300  // if (!muonData.isValid()) {
1301  // edm::LogWarning("HLTLevel1GTSeed")
1302  // << "\nWarning: std::vector<L1MuGMTCand> with input tag "
1303  // << "gtDigis"
1304  // << "\nrequested in configuration, but not found in the event.\n"
1305  // << std::endl;
1306  // } else {
1307  //
1308  // std::vector<L1MuGMTCand>::const_iterator itMuon;
1309  // for (itMuon = muonData->begin(); itMuon != muonData->end(); itMuon++) {
1310  //
1311  // LogTrace("HLTLevel1GTSeed") << (*itMuon) << std::endl;
1312  //
1313  // }
1314  //
1315  // }
1316  // }
1317 
1318  // define bools to prevent entering more copies of the objects
1319  bool includeMuon = true;
1320 
1321  bool includeIsoEG = true;
1322  bool includeNoIsoEG = true;
1323 
1324  bool includeCenJet = true;
1325  bool includeForJet = true;
1326  bool includeTauJet = true;
1327 
1328  bool includeETM = true;
1329  bool includeETT = true;
1330  bool includeHTT = true;
1331  bool includeHTM = true;
1332 
1333  bool includeJetCounts = true;
1334 
1335  //
1336  bool objectsInFilter = false;
1337 
1338  // loop over the list of required algorithms for seeding
1339  int iAlgo = -1;
1340 
1341  for (std::vector<L1GtLogicParser::OperandToken>::const_iterator itSeed =
1342  m_l1AlgoSeeds.begin(); itSeed != m_l1AlgoSeeds.end(); ++itSeed) {
1343 
1344  //
1345  iAlgo++;
1346  //
1347  int algBit = (*itSeed).tokenNumber;
1348  std::string algName = (*itSeed).tokenName;
1349  bool algResult = (*itSeed).tokenResult;
1350 
1351  LogTrace("HLTLevel1GTSeed") << "\nHLTLevel1GTSeed::hltFilter "
1352  << "\n Algorithm " << algName << " with bit number " << algBit
1353  << " in the object map seed list" << "\n Algorithm result = "
1354  << algResult << std::endl;
1355 
1356  const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
1357  m_l1AlgoSeedsObjType[iAlgo];
1358 
1359  int minBxInEvent = (m_l1NrBxInEvent + 1)/2 - m_l1NrBxInEvent;
1360  int maxBxInEvent = (m_l1NrBxInEvent + 1)/2 - 1;
1361 
1362  // loop over all object types found for an algorithm and fill the lists
1363  //
1364  for (std::vector<const std::vector<L1GtObject>*>::const_iterator itVec =
1365  algoSeedsObjTypeVec.begin(); itVec != algoSeedsObjTypeVec.end(); ++itVec) {
1366 
1367  const std::vector<L1GtObject>* condObj = *itVec;
1368  for (std::vector<L1GtObject>::const_iterator itObj =
1369  (*condObj).begin(); itObj != (*condObj).end(); ++itObj) {
1370 
1371  LogTrace("HLTLevel1GTSeed")
1372  << " Object type in conditions from this algorithm = "
1373  << (*itObj) << std::endl;
1374 
1375  switch (*itObj) {
1376  case Mu: {
1377  if (includeMuon) {
1378 
1380  iEvent.getByToken(m_l1MuonToken, l1Muon);
1381 
1382  if (!l1Muon.isValid()) {
1383  edm::LogWarning("HLTLevel1GTSeed")
1384  << "\nWarning: L1MuonParticleCollection with input tag "
1385  << m_l1MuonTag
1386  << "\nrequested in configuration, but not found in the event."
1387  << "\nNo muon added to filterproduct."
1388  << std::endl;
1389 
1390  } else {
1391  int iObj = -1;
1392  for (l1extra::L1MuonParticleCollection::const_iterator
1393  objIter = l1Muon->begin(); objIter
1394  != l1Muon->end(); ++objIter) {
1395 
1396  iObj++;
1397 
1398  int bxNr = objIter->bx();
1399  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1400 
1401  objectsInFilter = true;
1402  filterproduct.addObject(
1405  l1Muon, iObj));
1406  }
1407 
1408  }
1409  }
1410  includeMuon = false;
1411  }
1412  }
1413 
1414  break;
1415  case IsoEG: {
1416  if (includeIsoEG) {
1418  iEvent.getByToken(m_l1IsoEGToken, l1IsoEG);
1419 
1420  if (!l1IsoEG.isValid()) {
1421  edm::LogWarning("HLTLevel1GTSeed")
1422  << "\nWarning: L1EmParticleCollection with input tag "
1423  << m_l1IsoEGTag
1424  << "\nrequested in configuration, but not found in the event."
1425  << "\nNo IsoEG added to filterproduct."
1426  << std::endl;
1427 
1428  } else {
1429  int iObj = -1;
1430  for (l1extra::L1EmParticleCollection::const_iterator
1431  objIter = l1IsoEG->begin(); objIter
1432  != l1IsoEG->end(); ++objIter) {
1433 
1434  iObj++;
1435 
1436  int bxNr = objIter->bx();
1437  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1438 
1439  objectsInFilter = true;
1440  filterproduct.addObject(
1443  l1IsoEG, iObj));
1444 
1445  }
1446  }
1447  }
1448  includeIsoEG = false;
1449  }
1450 
1451  }
1452  break;
1453  case NoIsoEG: {
1454  if (includeNoIsoEG) {
1456  iEvent.getByToken(m_l1NoIsoEGToken, l1NoIsoEG);
1457 
1458  if (!l1NoIsoEG.isValid()) {
1459  edm::LogWarning("HLTLevel1GTSeed")
1460  << "\nWarning: L1EmParticleCollection with input tag "
1461  << m_l1NoIsoEGTag
1462  << "\nrequested in configuration, but not found in the event."
1463  << "\nNo NoIsoEG added to filterproduct."
1464  << std::endl;
1465 
1466  } else {
1467  int iObj = -1;
1468  for (l1extra::L1EmParticleCollection::const_iterator
1469  objIter = l1NoIsoEG->begin(); objIter
1470  != l1NoIsoEG->end(); ++objIter) {
1471 
1472  iObj++;
1473 
1474  int bxNr = objIter->bx();
1475  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1476 
1477  objectsInFilter = true;
1478  filterproduct.addObject(
1481  l1NoIsoEG, iObj));
1482 
1483  }
1484  }
1485  }
1486  includeNoIsoEG = false;
1487  }
1488 
1489  }
1490  break;
1491  case CenJet: {
1492  if (includeCenJet) {
1494  iEvent.getByToken(m_l1CenJetToken, l1CenJet);
1495 
1496  if (!l1CenJet.isValid()) {
1497  edm::LogWarning("HLTLevel1GTSeed")
1498  << "\nWarning: L1JetParticleCollection with input tag "
1499  << m_l1CenJetTag
1500  << "\nrequested in configuration, but not found in the event."
1501  << "\nNo CenJet added to filterproduct."
1502  << std::endl;
1503 
1504  } else {
1505  int iObj = -1;
1506  for (l1extra::L1JetParticleCollection::const_iterator
1507  objIter = l1CenJet->begin(); objIter
1508  != l1CenJet->end(); ++objIter) {
1509 
1510  iObj++;
1511 
1512  int bxNr = objIter->bx();
1513  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1514 
1515  objectsInFilter = true;
1516  filterproduct.addObject(
1519  l1CenJet, iObj));
1520 
1521  }
1522  }
1523  }
1524  includeCenJet = false;
1525  }
1526 
1527  }
1528 
1529  break;
1530  case ForJet: {
1531  if (includeForJet) {
1533  iEvent.getByToken(m_l1ForJetToken, l1ForJet);
1534 
1535  if (!l1ForJet.isValid()) {
1536  edm::LogWarning("HLTLevel1GTSeed")
1537  << "\nWarning: L1JetParticleCollection with input tag "
1538  << m_l1ForJetTag
1539  << "\nrequested in configuration, but not found in the event."
1540  << "\nNo ForJet added to filterproduct."
1541  << std::endl;
1542 
1543  } else {
1544  int iObj = -1;
1545  for (l1extra::L1JetParticleCollection::const_iterator
1546  objIter = l1ForJet->begin(); objIter
1547  != l1ForJet->end(); ++objIter) {
1548 
1549  iObj++;
1550 
1551  int bxNr = objIter->bx();
1552  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1553 
1554  objectsInFilter = true;
1555  filterproduct.addObject(
1558  l1ForJet, iObj));
1559 
1560  }
1561  }
1562  }
1563  includeForJet = false;
1564  }
1565 
1566  }
1567 
1568  break;
1569  case TauJet: {
1570  if (includeTauJet) {
1572  iEvent.getByToken(m_l1TauJetToken, l1TauJet);
1573 
1574  if (!l1TauJet.isValid()) {
1575  edm::LogWarning("HLTLevel1GTSeed")
1576  << "\nWarning: L1JetParticleCollection with input tag "
1577  << m_l1TauJetTag
1578  << "\nrequested in configuration, but not found in the event."
1579  << "\nNo TauJet added to filterproduct."
1580  << std::endl;
1581 
1582  } else {
1583  int iObj = -1;
1584  for (l1extra::L1JetParticleCollection::const_iterator
1585  objIter = l1TauJet->begin(); objIter
1586  != l1TauJet->end(); ++objIter) {
1587 
1588  iObj++;
1589 
1590  int bxNr = objIter->bx();
1591  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1592 
1593  objectsInFilter = true;
1594  filterproduct.addObject(
1597  l1TauJet, iObj));
1598 
1599  }
1600  }
1601  }
1602  includeTauJet = false;
1603  }
1604 
1605  }
1606 
1607  break;
1608  case ETM: {
1609  if (includeETM) {
1611  iEvent.getByToken(m_l1EtMissMETToken, l1EnergySums);
1612 
1613  if (!l1EnergySums.isValid()) {
1614  edm::LogWarning("HLTLevel1GTSeed")
1615  << "\nWarning: L1EtMissParticleCollection with input tag "
1616  << m_l1EtMissMETTag
1617  << "\nrequested in configuration, but not found in the event."
1618  << "\nNo ETM added to filterproduct."
1619  << std::endl;
1620 
1621  } else if (l1EnergySums->size() == 0) {
1622  edm::LogWarning("HLTLevel1GTSeed")
1623  << "\nWarning: L1EtMissParticleCollection with input tag "
1624  << m_l1EtMissMETTag
1625  << "\nfound in the event but with 0 size."
1626  << "\nNo ETM added to filterproduct."
1627  << std::endl;
1628 
1629  } else {
1630  int iObj = -1;
1631  for (l1extra::L1EtMissParticleCollection::const_iterator
1632  objIter = l1EnergySums->begin(); objIter
1633  != l1EnergySums->end(); ++objIter) {
1634 
1635  iObj++;
1636 
1637  int bxNr = objIter->bx();
1638  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1639 
1640  objectsInFilter = true;
1641  filterproduct.addObject(
1644  l1EnergySums, iObj));
1645 
1646  }
1647  }
1648  }
1649  includeETM = false;
1650  }
1651 
1652  }
1653 
1654  break;
1655  case ETT: {
1656  if (includeETT) {
1658  iEvent.getByToken(m_l1EtMissMETToken, l1EnergySums);
1659 
1660  if (!l1EnergySums.isValid()) {
1661  edm::LogWarning("HLTLevel1GTSeed")
1662  << "\nWarning: L1EtMissParticleCollection with input tag "
1663  << m_l1EtMissMETTag
1664  << "\nrequested in configuration, but not found in the event."
1665  << "\nNo ETT added to filterproduct."
1666  << std::endl;
1667 
1668  } else if (l1EnergySums->size() == 0) {
1669  edm::LogWarning("HLTLevel1GTSeed")
1670  << "\nWarning: L1EtMissParticleCollection with input tag "
1671  << m_l1EtMissMETTag
1672  << "\nfound in the event but with 0 size."
1673  << "\nNo ETT added to filterproduct."
1674  << std::endl;
1675 
1676  } else {
1677  int iObj = -1;
1678  for (l1extra::L1EtMissParticleCollection::const_iterator
1679  objIter = l1EnergySums->begin(); objIter
1680  != l1EnergySums->end(); ++objIter) {
1681 
1682  iObj++;
1683 
1684  int bxNr = objIter->bx();
1685  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1686 
1687  objectsInFilter = true;
1688  filterproduct.addObject(
1691  l1EnergySums, iObj));
1692 
1693  }
1694  }
1695  }
1696  includeETT = false;
1697  }
1698 
1699  }
1700 
1701  break;
1702  case HTT: {
1703  if (includeHTT) {
1705  iEvent.getByToken(m_l1EtMissMHTToken, l1EnergySums);
1706 
1707  if (!l1EnergySums.isValid()) {
1708  edm::LogWarning("HLTLevel1GTSeed")
1709  << "\nWarning: L1EtMissParticleCollection with input tag "
1710  << m_l1EtMissMHTTag
1711  << "\nrequested in configuration, but not found in the event."
1712  << "\nNo HTT added to filterproduct."
1713  << std::endl;
1714 
1715  } else if (l1EnergySums->size() == 0) {
1716  edm::LogWarning("HLTLevel1GTSeed")
1717  << "\nWarning: L1EtMissParticleCollection with input tag "
1718  << m_l1EtMissMHTTag
1719  << "\nfound in the event but with 0 size."
1720  << "\nNo HTT added to filterproduct."
1721  << std::endl;
1722 
1723  } else {
1724  int iObj = -1;
1725  for (l1extra::L1EtMissParticleCollection::const_iterator
1726  objIter = l1EnergySums->begin(); objIter
1727  != l1EnergySums->end(); ++objIter) {
1728 
1729  iObj++;
1730 
1731  int bxNr = objIter->bx();
1732  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1733 
1734  objectsInFilter = true;
1735  filterproduct.addObject(
1738  l1EnergySums, iObj));
1739 
1740  }
1741  }
1742  }
1743  includeHTT = false;
1744  }
1745  }
1746 
1747  break;
1748  case HTM: {
1749  if (includeHTM) {
1751  iEvent.getByToken(m_l1EtMissMHTToken, l1EnergySums);
1752 
1753  if (!l1EnergySums.isValid()) {
1754  edm::LogWarning("HLTLevel1GTSeed")
1755  << "\nWarning: L1EtMissParticleCollection with input tag "
1756  << m_l1EtMissMHTTag
1757  << "\nrequested in configuration, but not found in the event."
1758  << "\nNo HTM added to filterproduct."
1759  << std::endl;
1760 
1761  } else if (l1EnergySums->size() == 0) {
1762  edm::LogWarning("HLTLevel1GTSeed")
1763  << "\nWarning: L1EtMissParticleCollection with input tag "
1764  << m_l1EtMissMHTTag
1765  << "\nfound in the event but with 0 size."
1766  << "\nNo HTM added to filterproduct."
1767  << std::endl;
1768 
1769  } else {
1770  int iObj = -1;
1771  for (l1extra::L1EtMissParticleCollection::const_iterator
1772  objIter = l1EnergySums->begin(); objIter
1773  != l1EnergySums->end(); ++objIter) {
1774 
1775  iObj++;
1776 
1777  int bxNr = objIter->bx();
1778  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1779 
1780  objectsInFilter = true;
1781  filterproduct.addObject(
1784  l1EnergySums, iObj));
1785 
1786  }
1787  }
1788  }
1789  includeHTM = false;
1790  }
1791  }
1792 
1793  break;
1794  case JetCounts: {
1795  if (includeJetCounts) {
1796  // do nothing, JetCounts do not exist now
1797  }
1798  }
1799 
1800  break;
1801  default: {
1802  // should not arrive here
1803 
1804  LogDebug("HLTLevel1GTSeed")
1805  << "\n HLTLevel1GTSeed::hltFilter "
1806  << "\n Unknown object of type " << *itObj
1807  << " in the seed list." << std::endl;
1808  }
1809  break;
1810  }
1811 
1812  }
1813 
1814  }
1815 
1816  LogTrace("HLTLevel1GTSeed") << std::endl;
1817  }
1818 
1819  return objectsInFilter;
1820 
1821 }
#define LogDebug(id)
Definition: L1GtObject.h:39
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
enum start value shifted to 81 so as to avoid clashes with PDG codes
Definition: L1GtObject.h:36
edm::InputTag m_l1EtMissMETTag
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMHTToken
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1ForJetToken
Definition: L1GtObject.h:38
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref&lt;C&gt;)
edm::InputTag m_l1EtMissMHTTag
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMETToken
std::vector< std::vector< const std::vector< L1GtObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1CenJetToken
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1IsoEGToken
edm::InputTag m_l1IsoEGTag
bool isValid() const
Definition: HandleBase.h:76
edm::InputTag m_l1ForJetTag
#define LogTrace(id)
edm::InputTag m_l1CenJetTag
edm::InputTag m_l1NoIsoEGTag
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1TauJetToken
Definition: L1GtObject.h:30
Definition: L1GtObject.h:37
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > m_l1MuonToken
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1NoIsoEGToken
edm::InputTag m_l1MuonTag
edm::InputTag m_l1TauJetTag
bool HLTLevel1GTSeed::seedsL1TriggerObjectMaps ( edm::Event iEvent,
trigger::TriggerFilterObjectWithRefs filterproduct,
const L1GtTriggerMask l1GtTmAlgo,
const L1GlobalTriggerReadoutRecord gtReadoutRecordPtr,
const int  physicsDaqPartition 
)
private

seeding is done via L1 trigger object maps, considering the objects which fired in L1

Definition at line 713 of file HLTLevel1GTSeed.cc.

References trigger::TriggerRefsCollections::addObject(), CenJet, L1GlobalTriggerReadoutRecord::decisionWord(), ETM, ETT, L1GtLogicParser::expressionResult(), L1GtLogicParser::expressionSeedsOperandList(), ForJet, edm::Event::getByToken(), L1GlobalTriggerObjectMap::getCombinationsInCond(), L1GtTriggerMask::gtTriggerMask(), HTM, HTT, i, IsoEG, edm::HandleBase::isValid(), JetCounts, LogDebug, LogTrace, m_isDebugEnabled, m_l1AlgoLogicParser, m_l1AlgoSeeds, m_l1AlgoSeedsObjType, m_l1AlgoSeedsRpn, m_l1CenJetTag, m_l1CenJetToken, m_l1EtMissMETTag, m_l1EtMissMETToken, m_l1EtMissMHTTag, m_l1EtMissMHTToken, m_l1ForJetTag, m_l1ForJetToken, m_l1GtObjectMapToken, m_l1GtReadoutRecordTag, m_l1IsoEGTag, m_l1IsoEGToken, m_l1MuonTag, m_l1MuonToken, m_l1NoIsoEGTag, m_l1NoIsoEGToken, m_l1SeedsLogicalExpression, m_l1TauJetTag, m_l1TauJetToken, Mu, NoIsoEG, L1GlobalTriggerObjectMap::operandTokenVector(), L1GlobalTriggerReadoutRecord::printGtDecision(), AlCaHLTBitMon_QueryRunRegistry::string, TauJet, trigger::TriggerL1CenJet, trigger::TriggerL1ETM, trigger::TriggerL1ETT, trigger::TriggerL1ForJet, trigger::TriggerL1HTM, trigger::TriggerL1HTT, trigger::TriggerL1IsoEG, trigger::TriggerL1Mu, trigger::TriggerL1NoIsoEG, trigger::TriggerL1TauJet, and updateAlgoLogicParser().

Referenced by hltFilter().

717  {
718 
719  // get Global Trigger decision word, update the tokenResult members
720  // from m_l1AlgoLogicParser and get the result for the logical expression
721  const std::vector<bool>& gtDecisionWord = gtReadoutRecordPtr->decisionWord();
722  updateAlgoLogicParser(gtDecisionWord, l1GtTmAlgo->gtTriggerMask(), physicsDaqPartition);
723 
724  bool seedsResult = m_l1AlgoLogicParser.expressionResult();
725 
726  if (m_isDebugEnabled ) {
727  // define an output stream to print into
728  // it can then be directed to whatever log level is desired
729  std::ostringstream myCoutStream;
730  gtReadoutRecordPtr->printGtDecision(myCoutStream);
731 
732  LogTrace("HLTLevel1GTSeed")
733  << myCoutStream.str()
734  << "\nHLTLevel1GTSeed::hltFilter "
735  << "\nLogical expression (names) = '" << m_l1SeedsLogicalExpression << "'"
736  << "\n Result for logical expression: " << seedsResult << "\n"
737  << std::endl;
738  }
739 
740  // the evaluation of the logical expression is false - skip event
741  if ( !seedsResult) {
742 
743  return false;
744 
745  }
746 
747  // define index lists for all particle types
748 
749  std::list<int> listMuon;
750 
751  std::list<int> listIsoEG;
752  std::list<int> listNoIsoEG;
753 
754  std::list<int> listCenJet;
755  std::list<int> listForJet;
756  std::list<int> listTauJet;
757 
758  std::list<int> listETM;
759  std::list<int> listETT;
760  std::list<int> listHTT;
761  std::list<int> listHTM;
762 
763  std::list<int> listJetCounts;
764 
765  // get handle to object maps (one object map per algorithm)
767  iEvent.getByToken(m_l1GtObjectMapToken, gtObjectMapRecord);
768 
769  if (!gtObjectMapRecord.isValid()) {
770  edm::LogWarning("HLTLevel1GTSeed")
771  << "\nWarning: L1GlobalTriggerObjectMapRecord with input tag "
773  << "\nrequested in configuration, but not found in the event." << std::endl;
774 
775  return false;
776  }
777 
778  // TODO check that the L1GlobalTriggerObjectMapRecord corresponds to the same menu as
779  // the menu run by HLTLevel1GTSeed
780  // true normally online (they are run in the same job)
781  // can be false offline, when re-running HLT without re-running the object map producer
782 
783  // loop over the list of required algorithms for seeding
784  int iAlgo = -1;
785 
786  for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
787  itSeed = m_l1AlgoSeeds.begin(); itSeed != m_l1AlgoSeeds.end(); ++itSeed) {
788 
789  //
790  iAlgo++;
791  //
792  int algBit = (*itSeed).tokenNumber;
793  std::string algName = (*itSeed).tokenName;
794  bool algResult = (*itSeed).tokenResult;
795 
796  LogTrace("HLTLevel1GTSeed")
797  << "\nHLTLevel1GTSeed::hltFilter "
798  << "\n Algorithm " << algName << " with bit number " << algBit
799  << " in the object map seed list"
800  << "\n Algorithm result = " << algResult << "\n"
801  << std::endl;
802 
803  // algorithm result is false - no seeds
804  if ( !algResult) {
805  continue;
806  }
807 
808  // algorithm result is true - get object map, loop over conditions in the algorithm
809  const L1GlobalTriggerObjectMap* objMap = gtObjectMapRecord->getObjectMap(algBit);
810 
811  if (objMap == 0) {
812  edm::LogWarning("HLTLevel1GTSeed")
813  << "\nWarning: L1GlobalTriggerObjectMap for algorithm " << algName
814  << " (bit number " << algBit << ") does not exist.\nReturn false.\n"
815  << std::endl;
816  return false;
817  }
818 
819  const std::vector<L1GtLogicParser::OperandToken>& opTokenVecObjMap =
820  objMap->operandTokenVector();
821 
822  const std::vector<L1GtLogicParser::TokenRPN>& algoSeedsRpn =
823  * ( m_l1AlgoSeedsRpn.at(iAlgo) );
824 
825  const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
826  m_l1AlgoSeedsObjType[iAlgo];
827 
828  //
829  L1GtLogicParser logicParserConditions(algoSeedsRpn, opTokenVecObjMap);
830 
831  // get list of required conditions for seeding - loop over
832  std::vector<L1GtLogicParser::OperandToken> condSeeds =
833  logicParserConditions.expressionSeedsOperandList();
834 
835  if (m_isDebugEnabled ) {
836 
837  LogTrace("HLTLevel1GTSeed")
838  << "\n HLTLevel1GTSeed::hltFilter "
839  << "\n condSeeds.size() = "
840  << condSeeds.size()
841  << std::endl;
842 
843  for (size_t i = 0; i < condSeeds.size(); ++i) {
844 
845  LogTrace("HLTLevel1GTSeed")
846  << " " << std::setw(5) << (condSeeds[i]).tokenNumber << "\t"
847  << std::setw(25) << (condSeeds[i]).tokenName << "\t"
848  << (condSeeds[i]).tokenResult
849  << std::endl;
850  }
851 
852  LogTrace("HLTLevel1GTSeed")
853  << std::endl;
854  }
855 
856  for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
857  itCond = condSeeds.begin(); itCond != condSeeds.end(); itCond++) {
858 
859  std::string cndName = (*itCond).tokenName;
860  int cndNumber = (*itCond).tokenNumber;
861  bool cndResult = (*itCond).tokenResult;
862 
863  const std::vector<L1GtObject>* cndObjTypeVec = algoSeedsObjTypeVec.at(cndNumber);
864 
865  //LogTrace("HLTLevel1GTSeed")
866  // << "\n HLTLevel1GTSeed::hltFilter "
867  // << "\n Condition " << cndName << " with number " << cndNumber
868  // << " in the seed list"
869  // << "\n Condition result = " << cndResult << "\n"
870  // << std::endl;
871 
872  if ( !cndResult) {
873  continue;
874  }
875 
876  // loop over combinations for a given condition
877 
878  const CombinationsInCond* cndComb = objMap->getCombinationsInCond(cndNumber);
879 
880  for (std::vector<SingleCombInCond>::const_iterator
881  itComb = (*cndComb).begin(); itComb != (*cndComb).end(); itComb++) {
882 
883  // loop over objects in a combination for a given condition
884  int iObj = 0;
885  for (SingleCombInCond::const_iterator
886  itObject = (*itComb).begin(); itObject != (*itComb).end(); itObject++) {
887 
888  // get object type and push indices on the list
889  const L1GtObject objTypeVal = (*cndObjTypeVec).at(iObj);
890 
891  //LogTrace("HLTLevel1GTSeed")
892  // << "\n HLTLevel1GTSeed::hltFilter "
893  // << "\n Add object of type " << objTypeVal
894  // << " and index " << (*itObject) << " to the seed list."
895  // << std::endl;
896 
897  switch (objTypeVal) {
898  case Mu: {
899  listMuon.push_back(*itObject);
900  }
901 
902  break;
903  case NoIsoEG: {
904  listNoIsoEG.push_back(*itObject);
905  }
906 
907  break;
908  case IsoEG: {
909  listIsoEG.push_back(*itObject);
910  }
911 
912  break;
913  case CenJet: {
914  listCenJet.push_back(*itObject);
915  }
916 
917  break;
918  case ForJet: {
919  listForJet.push_back(*itObject);
920  }
921 
922  break;
923  case TauJet: {
924  listTauJet.push_back(*itObject);
925  }
926 
927  break;
928  case ETM: {
929  listETM.push_back(*itObject);
930 
931  }
932 
933  break;
934  case ETT: {
935  listETT.push_back(*itObject);
936 
937  }
938 
939  break;
940  case HTT: {
941  listHTT.push_back(*itObject);
942 
943  }
944 
945  break;
946  case HTM: {
947  listHTM.push_back(*itObject);
948 
949  }
950 
951  break;
952  case JetCounts: {
953  listJetCounts.push_back(*itObject);
954  }
955 
956  break;
957  default: {
958  // should not arrive here
959 
960  LogDebug("HLTLevel1GTSeed")
961  << "\n HLTLevel1GTSeed::hltFilter "
962  << "\n Unknown object of type " << objTypeVal
963  << " and index " << (*itObject) << " in the seed list."
964  << std::endl;
965  }
966  break;
967  }
968 
969  iObj++;
970 
971  }
972 
973  }
974 
975  }
976 
977  }
978 
979  // eliminate duplicates
980 
981  listMuon.sort();
982  listMuon.unique();
983 
984  listIsoEG.sort();
985  listIsoEG.unique();
986 
987  listNoIsoEG.sort();
988  listNoIsoEG.unique();
989 
990  listCenJet.sort();
991  listCenJet.unique();
992 
993  listForJet.sort();
994  listForJet.unique();
995 
996  listTauJet.sort();
997  listTauJet.unique();
998 
999  listETM.sort();
1000  listETM.unique();
1001 
1002  listETT.sort();
1003  listETT.unique();
1004 
1005  listHTT.sort();
1006  listHTT.unique();
1007 
1008  listHTM.sort();
1009  listHTM.unique();
1010 
1011  listJetCounts.sort();
1012  listJetCounts.unique();
1013 
1014  //
1015  // record the L1 physics objects in the HLT filterproduct
1016  //
1017 
1018  // muon
1019  if (!listMuon.empty()) {
1020 
1022  iEvent.getByToken(m_l1MuonToken, l1Muon);
1023 
1024  if (!l1Muon.isValid()) {
1025  edm::LogWarning("HLTLevel1GTSeed")
1026  << "\nWarning: L1MuonParticleCollection with input tag " << m_l1MuonTag
1027  << "\nrequested in configuration, but not found in the event."
1028  << "\nNo muon added to filterproduct." << std::endl;
1029 
1030  } else {
1031 
1032  for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
1033 
1035  l1Muon, *itObj));
1036 
1037  }
1038  }
1039 
1040  }
1041 
1042  // EG (isolated)
1043  if (!listIsoEG.empty()) {
1045  iEvent.getByToken(m_l1IsoEGToken, l1IsoEG);
1046 
1047  if (!l1IsoEG.isValid()) {
1048  edm::LogWarning("HLTLevel1GTSeed")
1049  << "\nWarning: L1EmParticleCollection with input tag " << m_l1IsoEGTag
1050  << "\nrequested in configuration, but not found in the event."
1051  << "\nNo IsoEG added to filterproduct." << std::endl;
1052 
1053  } else {
1054  for (std::list<int>::const_iterator itObj = listIsoEG.begin(); itObj != listIsoEG.end(); ++itObj) {
1055 
1057  l1IsoEG, *itObj));
1058 
1059  }
1060  }
1061  }
1062 
1063  // EG (no isolation)
1064  if (!listNoIsoEG.empty()) {
1066  iEvent.getByToken(m_l1NoIsoEGToken, l1NoIsoEG);
1067 
1068  if (!l1NoIsoEG.isValid()) {
1069  edm::LogWarning("HLTLevel1GTSeed")
1070  << "\nWarning: L1EmParticleCollection with input tag " << m_l1NoIsoEGTag
1071  << "\nrequested in configuration, but not found in the event."
1072  << "\nNo NoIsoEG added to filterproduct." << std::endl;
1073 
1074  } else {
1075  for (std::list<int>::const_iterator itObj = listNoIsoEG.begin(); itObj
1076  != listNoIsoEG.end(); ++itObj) {
1077 
1079  l1NoIsoEG, *itObj));
1080 
1081  }
1082  }
1083  }
1084 
1085  // central jets
1086  if (!listCenJet.empty()) {
1088  iEvent.getByToken(m_l1CenJetToken, l1CenJet);
1089 
1090  if (!l1CenJet.isValid()) {
1091  edm::LogWarning("HLTLevel1GTSeed")
1092  << "\nWarning: L1JetParticleCollection with input tag " << m_l1CenJetTag
1093  << "\nrequested in configuration, but not found in the event."
1094  << "\nNo CenJet added to filterproduct." << std::endl;
1095 
1096  } else {
1097  for (std::list<int>::const_iterator itObj = listCenJet.begin(); itObj
1098  != listCenJet.end(); ++itObj) {
1099 
1101  l1CenJet, *itObj));
1102 
1103  }
1104  }
1105  }
1106 
1107  // forward jets
1108  if (!listForJet.empty()) {
1110  iEvent.getByToken(m_l1ForJetToken, l1ForJet);
1111 
1112  if (!l1ForJet.isValid()) {
1113  edm::LogWarning("HLTLevel1GTSeed")
1114  << "\nWarning: L1JetParticleCollection with input tag " << m_l1ForJetTag
1115  << "\nrequested in configuration, but not found in the event."
1116  << "\nNo ForJet added to filterproduct." << std::endl;
1117 
1118  } else {
1119  for (std::list<int>::const_iterator itObj = listForJet.begin(); itObj
1120  != listForJet.end(); ++itObj) {
1121 
1123  l1ForJet, *itObj));
1124 
1125  }
1126  }
1127  }
1128 
1129  // tau jets
1130  if (!listTauJet.empty()) {
1132  iEvent.getByToken(m_l1TauJetToken, l1TauJet);
1133 
1134  if (!l1TauJet.isValid()) {
1135  edm::LogWarning("HLTLevel1GTSeed")
1136  << "\nWarning: L1JetParticleCollection with input tag " << m_l1TauJetTag
1137  << "\nrequested in configuration, but not found in the event."
1138  << "\nNo TauJet added to filterproduct." << std::endl;
1139 
1140  } else {
1141  for (std::list<int>::const_iterator itObj = listTauJet.begin(); itObj
1142  != listTauJet.end(); ++itObj) {
1143 
1145  l1TauJet, *itObj));
1146 
1147  }
1148  }
1149  }
1150 
1151  // energy sums
1152  if (!listETM.empty()) {
1154  iEvent.getByToken(m_l1EtMissMETToken, l1EnergySums);
1155 
1156  if (!l1EnergySums.isValid()) {
1157  edm::LogWarning("HLTLevel1GTSeed")
1158  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMETTag
1159  << "\nrequested in configuration, but not found in the event."
1160  << "\nNo ETM added to filterproduct." << std::endl;
1161  } else if (l1EnergySums->size() == 0) {
1162  edm::LogWarning("HLTLevel1GTSeed")
1163  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMETTag
1164  << "\nfound in the event but with 0 size." << "\nNo ETM added to filterproduct."
1165  << std::endl;
1166 
1167  } else {
1168 
1169  for (std::list<int>::const_iterator itObj = listETM.begin(); itObj != listETM.end(); ++itObj) {
1170 
1172  l1EnergySums, *itObj));
1173 
1174  }
1175 
1176  }
1177 
1178  }
1179 
1180  if (!listETT.empty()) {
1182  iEvent.getByToken(m_l1EtMissMETToken, l1EnergySums);
1183 
1184  if (!l1EnergySums.isValid()) {
1185  edm::LogWarning("HLTLevel1GTSeed")
1186  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMETTag
1187  << "\nrequested in configuration, but not found in the event."
1188  << "\nNo ETT added to filterproduct." << std::endl;
1189  } else if (l1EnergySums->size() == 0) {
1190  edm::LogWarning("HLTLevel1GTSeed")
1191  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMETTag
1192  << "\nfound in the event but with 0 size." << "\nNo ETT added to filterproduct."
1193  << std::endl;
1194 
1195  } else {
1196 
1197  for (std::list<int>::const_iterator itObj = listETT.begin(); itObj != listETT.end(); ++itObj) {
1198 
1200  l1EnergySums, *itObj));
1201 
1202  }
1203 
1204  }
1205 
1206  }
1207 
1208  if (!listHTT.empty()) {
1210  iEvent.getByToken(m_l1EtMissMHTToken, l1EnergySums);
1211 
1212  if (!l1EnergySums.isValid()) {
1213  edm::LogWarning("HLTLevel1GTSeed")
1214  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMHTTag
1215  << "\nrequested in configuration, but not found in the event."
1216  << "\nNo HTT added to filterproduct." << std::endl;
1217 
1218  } else if (l1EnergySums->size() == 0) {
1219  edm::LogWarning("HLTLevel1GTSeed")
1220  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMHTTag
1221  << "\nfound in the event but with 0 size." << "\nNo HTT added to filterproduct."
1222  << std::endl;
1223 
1224  } else {
1225 
1226  for (std::list<int>::const_iterator itObj = listHTT.begin(); itObj != listHTT.end(); ++itObj) {
1227 
1229  l1EnergySums, *itObj));
1230 
1231  }
1232 
1233  }
1234  }
1235 
1236  if (!listHTM.empty()) {
1238  iEvent.getByToken(m_l1EtMissMHTToken, l1EnergySums);
1239 
1240  if (!l1EnergySums.isValid()) {
1241  edm::LogWarning("HLTLevel1GTSeed")
1242  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMHTTag
1243  << "\nrequested in configuration, but not found in the event."
1244  << "\nNo HTM added to filterproduct." << std::endl;
1245 
1246  } else if (l1EnergySums->size() == 0) {
1247  edm::LogWarning("HLTLevel1GTSeed")
1248  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMHTTag
1249  << "\nfound in the event but with 0 size." << "\nNo HTM added to filterproduct."
1250  << std::endl;
1251 
1252  } else {
1253 
1254  for (std::list<int>::const_iterator itObj = listHTM.begin(); itObj != listHTM.end(); ++itObj) {
1255 
1257  l1EnergySums, *itObj));
1258 
1259  }
1260  }
1261  }
1262 
1263  // TODO FIXME uncomment if block when JetCounts implemented
1264 
1265  // // jet counts
1266  // if (!listJetCounts.empty()) {
1267  // edm::Handle<l1extra::L1JetCounts> l1JetCounts;
1268  // iEvent.getByToken(m_l1CollectionsToken.label(), l1JetCounts);
1269  //
1270  // for (std::list<int>::const_iterator itObj = listJetCounts.begin();
1271  // itObj != listJetCounts.end(); ++itObj) {
1272  //
1273  // filterproduct.addObject(trigger::TriggerL1JetCounts,l1extra::L1JetCountsRefProd(l1JetCounts));
1274  // // FIXME: RefProd!
1275  //
1276  // }
1277  //
1278  // }
1279 
1280  return seedsResult;
1281 
1282 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
Definition: L1GtObject.h:39
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
enum start value shifted to 81 so as to avoid clashes with PDG codes
Definition: L1GtObject.h:36
const std::vector< L1GtLogicParser::OperandToken > & operandTokenVector() const
edm::InputTag m_l1EtMissMETTag
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMHTToken
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
void printGtDecision(std::ostream &myCout, int bxInEventValue) const
print global decision and algorithm decision word
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1ForJetToken
Definition: L1GtObject.h:38
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref&lt;C&gt;)
edm::InputTag m_l1EtMissMHTTag
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMETToken
const CombinationsInCond * getCombinationsInCond(const std::string &condNameVal) const
return all the combinations passing the requirements imposed in condition condNameVal ...
std::vector< std::vector< const std::vector< L1GtObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1CenJetToken
void updateAlgoLogicParser(const L1GtTriggerMenu *, const AlgorithmMap &)
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1IsoEGToken
std::string m_l1SeedsLogicalExpression
edm::InputTag m_l1IsoEGTag
bool isValid() const
Definition: HandleBase.h:76
edm::InputTag m_l1ForJetTag
#define LogTrace(id)
const DecisionWord & decisionWord(int bxInEventValue) const
bool m_isDebugEnabled
cache edm::isDebugEnabled()
edm::InputTag m_l1CenJetTag
std::vector< const std::vector< L1GtLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
edm::InputTag m_l1NoIsoEGTag
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1TauJetToken
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > m_l1GtObjectMapToken
Definition: L1GtObject.h:30
edm::InputTag m_l1GtReadoutRecordTag
InputTag for the L1 Global Trigger DAQ readout record.
Definition: L1GtObject.h:37
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > m_l1MuonToken
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1NoIsoEGToken
edm::InputTag m_l1MuonTag
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
edm::InputTag m_l1TauJetTag
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
virtual const bool expressionResult() const
void HLTLevel1GTSeed::updateAlgoLogicParser ( const L1GtTriggerMenu l1GtMenu,
const AlgorithmMap algorithmMap 
)
private

update the tokenNumber (holding the bit numbers) from m_l1AlgoLogicParser for a new L1 Trigger menu

Definition at line 405 of file HLTLevel1GTSeed.cc.

References debugPrint(), edm::hlt::Exception, L1GtTriggerMenu::gtTriggerMenuName(), i, m_isDebugEnabled, m_l1AlgoLogicParser, m_l1AlgoSeeds, m_l1AlgoSeedsObjType, m_l1AlgoSeedsRpn, objectTypeVec(), L1GtLogicParser::operandTokenVector(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

405  {
406 
407  std::vector<L1GtLogicParser::OperandToken>& algOpTokenVector = m_l1AlgoLogicParser.operandTokenVector();
408 
409  size_t jSeed = 0;
410  size_t l1AlgoSeedsSize = m_l1AlgoSeeds.size();
411 
412  // clear the content from the previous menu for the vector of RPN vectors m_l1AlgoSeedsRpn
413  // and for the the vector of object-type vectors m_l1AlgoSeedsObjType
414  m_l1AlgoSeedsRpn.clear();
415  m_l1AlgoSeedsObjType.clear();
416 
417  //
418 
419  for (size_t i = 0; i < algOpTokenVector.size(); ++i) {
420 
421  CItAlgo itAlgo = algorithmMap.find((algOpTokenVector[i]).tokenName);
422  if (itAlgo != algorithmMap.end()) {
423 
424  int bitNr = (itAlgo->second).algoBitNumber();
425  int chipNr = (itAlgo->second).algoChipNumber();
426 
427  (algOpTokenVector[i]).tokenNumber = bitNr;
428 
429  // algOpTokenVector and m_l1AlgoSeeds must have the same ordering
430  // of the algorithms
431  if (jSeed < l1AlgoSeedsSize) {
432 
433  //LogTrace("HLTLevel1GTSeed") << "(m_l1AlgoSeeds[jSeed]).tokenName: "
434  // << (m_l1AlgoSeeds[jSeed]).tokenName
435  // << std::endl;
436 
437  if ((m_l1AlgoSeeds[jSeed]).tokenName
438  == (algOpTokenVector[i]).tokenName) {
439 
440  (m_l1AlgoSeeds[jSeed]).tokenNumber = bitNr;
441 
442  const std::vector<L1GtLogicParser::TokenRPN>& aRpnVector =
443  (itAlgo->second).algoRpnVector();
444  size_t aRpnVectorSize = aRpnVector.size();
445 
446  m_l1AlgoSeedsRpn.push_back(&aRpnVector);
447 
448  // loop over RpnVector to fill for each condition the object type
449  std::vector<const std::vector<L1GtObject>*> tmpObjTypeVec;
450  tmpObjTypeVec.reserve(aRpnVectorSize);
451 
452  for (size_t opI = 0; opI < aRpnVectorSize; ++opI) {
453 
454  std::string cName = (aRpnVector[opI]).operand;
455 
456  if (!cName.empty()) {
457 
458  tmpObjTypeVec.push_back(
459  objectTypeVec(chipNr, cName));
460 
461  //LogTrace("HLTLevel1GTSeed")
462  // << " Push object vector for condition: " << cName
463  // << std::endl;
464  }
465  }
466 
467  m_l1AlgoSeedsObjType.push_back(tmpObjTypeVec);
468 
469  jSeed++;
470  }
471  }
472  } else {
473 
474  throw cms::Exception("FailModule") << "\nAlgorithm "
475  << (algOpTokenVector[i]).tokenName
476  << ", requested as seed by a HLT path, not found in the L1 trigger menu\n "
477  << l1GtMenu->gtTriggerMenuName()
478  << "\nIncompatible L1 and HLT menus.\n" << std::endl;
479 
480  }
481 
482  }
483 
484  //
485  if (m_isDebugEnabled) {
486  bool newMenu = true;
487  debugPrint(newMenu);
488  }
489 
490 }
const std::string & gtTriggerMenuName() const
int i
Definition: DBlmapReader.cc:9
void debugPrint(bool) const
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
std::vector< std::vector< const std::vector< L1GtObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
bool m_isDebugEnabled
cache edm::isDebugEnabled()
std::vector< const std::vector< L1GtLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
const std::vector< L1GtObject > * objectTypeVec(const int chipNumber, const std::string &cndName) const
get the vector of object types for a condition cndName on the GTL chip chipNumber ...
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
void HLTLevel1GTSeed::updateAlgoLogicParser ( const std::vector< bool > &  gtWord,
const std::vector< unsigned int > &  triggerMask,
const int  physicsDaqPartition 
)
private

update the tokenResult members from m_l1AlgoLogicParser for a new event

Definition at line 494 of file HLTLevel1GTSeed.cc.

References debugPrint(), i, m_isDebugEnabled, m_l1AlgoLogicParser, m_l1AlgoSeeds, and L1GtLogicParser::operandTokenVector().

496  {
497 
498  std::vector<L1GtLogicParser::OperandToken>& algOpTokenVector =
500 
501  for (size_t i = 0; i < algOpTokenVector.size(); ++i) {
502  int iBit = (algOpTokenVector[i]).tokenNumber;
503  bool iResult = gtWord.at(iBit);
504 
505  int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
506  //LogTrace("HLTLevel1GTSeed")
507  //<< "\nTrigger bit: " << iBit
508  //<< " mask = " << triggerMaskBit
509  //<< " DAQ partition " << physicsDaqPartition
510  //<< std::endl;
511 
512  if (triggerMaskBit) {
513  iResult = false;
514 
515  //LogTrace("HLTLevel1GTSeed")
516  //<< "\nMasked trigger: " << iBit << ". Result set to false\n"
517  //<< std::endl;
518  }
519 
520  (algOpTokenVector[i]).tokenResult = iResult;
521 
522  }
523 
524  for (size_t i = 0; i < m_l1AlgoSeeds.size(); ++i) {
525  int iBit = (m_l1AlgoSeeds[i]).tokenNumber;
526  bool iResult = gtWord.at(iBit);
527 
528  int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
529  //LogTrace("HLTLevel1GTSeed")
530  //<< "\nTrigger bit: " << iBit
531  //<< " mask = " << triggerMaskBit
532  //<< " DAQ partition " << physicsDaqPartition
533  //<< std::endl;
534 
535  if (triggerMaskBit) {
536  iResult = false;
537 
538  //LogTrace("HLTLevel1GTSeed")
539  //<< "\nMasked trigger: " << iBit << ". Result set to false\n"
540  //<< std::endl;
541  }
542 
543  (m_l1AlgoSeeds[i]).tokenResult = iResult;
544 
545  }
546 
547  if (m_isDebugEnabled) {
548  bool newMenu = false;
549  debugPrint(newMenu);
550  }
551 
552 }
int i
Definition: DBlmapReader.cc:9
void debugPrint(bool) const
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
bool m_isDebugEnabled
cache edm::isDebugEnabled()
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression

Member Data Documentation

bool HLTLevel1GTSeed::m_isDebugEnabled
private
L1GtLogicParser HLTLevel1GTSeed::m_l1AlgoLogicParser
private

logic parser for m_l1SeedsLogicalExpression

Definition at line 119 of file HLTLevel1GTSeed.h.

Referenced by convertStringToBitNumber(), debugPrint(), hltFilter(), HLTLevel1GTSeed(), seedsL1TriggerObjectMaps(), and updateAlgoLogicParser().

std::vector<L1GtLogicParser::OperandToken> HLTLevel1GTSeed::m_l1AlgoSeeds
private

list of required algorithms for seeding

Definition at line 122 of file HLTLevel1GTSeed.h.

Referenced by convertStringToBitNumber(), debugPrint(), HLTLevel1GTSeed(), seedsL1Extra(), seedsL1TriggerObjectMaps(), and updateAlgoLogicParser().

std::vector< std::vector< const std::vector<L1GtObject>* > > HLTLevel1GTSeed::m_l1AlgoSeedsObjType
private

vector of object-type vectors for each condition in the required algorithms for seeding

Definition at line 128 of file HLTLevel1GTSeed.h.

Referenced by debugPrint(), HLTLevel1GTSeed(), seedsL1Extra(), seedsL1TriggerObjectMaps(), and updateAlgoLogicParser().

std::vector< const std::vector<L1GtLogicParser::TokenRPN>* > HLTLevel1GTSeed::m_l1AlgoSeedsRpn
private

vector of Rpn vectors for the required algorithms for seeding

Definition at line 125 of file HLTLevel1GTSeed.h.

Referenced by debugPrint(), HLTLevel1GTSeed(), seedsL1TriggerObjectMaps(), and updateAlgoLogicParser().

edm::InputTag HLTLevel1GTSeed::m_l1CenJetTag
private

Definition at line 179 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1extra::L1JetParticleCollection> HLTLevel1GTSeed::m_l1CenJetToken
private

Definition at line 180 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTLevel1GTSeed::m_l1CollectionsTag
private

Meta InputTag for L1 particle collections (except muon)

Definition at line 166 of file HLTLevel1GTSeed.h.

Referenced by HLTLevel1GTSeed().

edm::InputTag HLTLevel1GTSeed::m_l1EtMissMETTag
private

Definition at line 185 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1extra::L1EtMissParticleCollection> HLTLevel1GTSeed::m_l1EtMissMETToken
private

Definition at line 186 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTLevel1GTSeed::m_l1EtMissMHTTag
private

Definition at line 187 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1extra::L1EtMissParticleCollection> HLTLevel1GTSeed::m_l1EtMissMHTToken
private

Definition at line 188 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTLevel1GTSeed::m_l1ExtraTag
private

cached InputTags

Definition at line 172 of file HLTLevel1GTSeed.h.

Referenced by hltFilter().

edm::InputTag HLTLevel1GTSeed::m_l1ForJetTag
private

Definition at line 181 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1extra::L1JetParticleCollection> HLTLevel1GTSeed::m_l1ForJetToken
private

Definition at line 182 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

bool HLTLevel1GTSeed::m_l1GlobalDecision
private

replace string "L1GlobalDecision" with bool to speed up the "if"

Definition at line 191 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), and HLTLevel1GTSeed().

L1GtTriggerMenu* HLTLevel1GTSeed::m_l1GtMenu
private

trigger menu

Definition at line 115 of file HLTLevel1GTSeed.h.

Referenced by debugPrint(), hltFilter(), HLTLevel1GTSeed(), and objectTypeVec().

unsigned long long HLTLevel1GTSeed::m_l1GtMenuCacheID
private

Definition at line 116 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), and HLTLevel1GTSeed().

edm::InputTag HLTLevel1GTSeed::m_l1GtObjectMapTag
private

InputTag for L1 Global Trigger object maps.

Definition at line 162 of file HLTLevel1GTSeed.h.

Referenced by HLTLevel1GTSeed().

edm::EDGetTokenT<L1GlobalTriggerObjectMapRecord> HLTLevel1GTSeed::m_l1GtObjectMapToken
private

Definition at line 163 of file HLTLevel1GTSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::InputTag HLTLevel1GTSeed::m_l1GtReadoutRecordTag
private

InputTag for the L1 Global Trigger DAQ readout record.

Definition at line 158 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), HLTLevel1GTSeed(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> HLTLevel1GTSeed::m_l1GtReadoutRecordToken
private

Definition at line 159 of file HLTLevel1GTSeed.h.

Referenced by hltFilter().

edm::InputTag HLTLevel1GTSeed::m_l1IsoEGTag
private

Definition at line 175 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1extra::L1EmParticleCollection> HLTLevel1GTSeed::m_l1IsoEGToken
private

Definition at line 176 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTLevel1GTSeed::m_l1MuonCollectionTag
private

Meta InputTag for L1 muon collection.

Definition at line 169 of file HLTLevel1GTSeed.h.

Referenced by HLTLevel1GTSeed().

edm::InputTag HLTLevel1GTSeed::m_l1MuonTag
private

Definition at line 173 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1extra::L1MuonParticleCollection> HLTLevel1GTSeed::m_l1MuonToken
private

Definition at line 174 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTLevel1GTSeed::m_l1NoIsoEGTag
private

Definition at line 177 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1extra::L1EmParticleCollection> HLTLevel1GTSeed::m_l1NoIsoEGToken
private

Definition at line 178 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

int HLTLevel1GTSeed::m_l1NrBxInEvent
private

option used forL1UseL1TriggerObjectMaps = False only number of BxInEvent: 1: L1A=0; 3: -1, L1A=0, 1; 5: -2, -1, L1A=0, 1, 2

Definition at line 145 of file HLTLevel1GTSeed.h.

Referenced by HLTLevel1GTSeed(), and seedsL1Extra().

std::string HLTLevel1GTSeed::m_l1SeedsLogicalExpression
private

logical expression for the required L1 algorithms the algorithms are specified by name

Definition at line 155 of file HLTLevel1GTSeed.h.

Referenced by convertStringToBitNumber(), HLTLevel1GTSeed(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTLevel1GTSeed::m_l1TauJetTag
private

Definition at line 183 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1extra::L1JetParticleCollection> HLTLevel1GTSeed::m_l1TauJetToken
private

Definition at line 184 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

bool HLTLevel1GTSeed::m_l1TechTriggerSeeding
private

seeding done via technical trigger bits, if value is "true"

Definition at line 148 of file HLTLevel1GTSeed.h.

Referenced by debugPrint(), hltFilter(), and HLTLevel1GTSeed().

bool HLTLevel1GTSeed::m_l1UseAliasesForSeeding
private

seeding uses algorithm aliases instead of algorithm names, if value is "true"

Definition at line 151 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), and HLTLevel1GTSeed().

bool HLTLevel1GTSeed::m_l1UseL1TriggerObjectMaps
private

if true: seeding done via L1 trigger object maps, with objects that fired only objects from the central BxInEvent (L1A) are used if false: seeding is done ignoring if a L1 object fired or not, adding all L1EXtra objects corresponding to the object types used in all conditions from the algorithms in logical expression for a given number of BxInEvent

Definition at line 141 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), and HLTLevel1GTSeed().