CMS 3D CMS Logo

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

bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) override
 filter the event More...
 
 HLTLevel1GTSeed (const edm::ParameterSet &)
 constructor More...
 
 ~HLTLevel1GTSeed () override
 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
 
 ~HLTStreamFilter () override
 
- Public Member Functions inherited from edm::stream::EDFilter<>
 EDFilter ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
- Public Member Functions inherited from edm::stream::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilterBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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::OperandTokenm_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::L1JetParticleCollectionm_l1CenJetToken
 
edm::InputTag m_l1CollectionsTag
 Meta InputTag for L1 particle collections (except muon) More...
 
edm::InputTag m_l1EtMissMETTag
 
edm::EDGetTokenT< l1extra::L1EtMissParticleCollectionm_l1EtMissMETToken
 
edm::InputTag m_l1EtMissMHTTag
 
edm::EDGetTokenT< l1extra::L1EtMissParticleCollectionm_l1EtMissMHTToken
 
edm::InputTag m_l1ExtraTag
 cached InputTags More...
 
edm::InputTag m_l1ForJetTag
 
edm::EDGetTokenT< l1extra::L1JetParticleCollectionm_l1ForJetToken
 
bool m_l1GlobalDecision
 replace string "L1GlobalDecision" with bool to speed up the "if" More...
 
const L1GtTriggerMenum_l1GtMenu
 trigger menu More...
 
unsigned long long m_l1GtMenuCacheID
 
edm::InputTag m_l1GtObjectMapTag
 InputTag for L1 Global Trigger object maps. More...
 
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecordm_l1GtObjectMapToken
 
edm::InputTag m_l1GtReadoutRecordTag
 InputTag for the L1 Global Trigger DAQ readout record. More...
 
edm::EDGetTokenT< L1GlobalTriggerReadoutRecordm_l1GtReadoutRecordToken
 
edm::InputTag m_l1IsoEGTag
 
edm::EDGetTokenT< l1extra::L1EmParticleCollectionm_l1IsoEGToken
 
edm::InputTag m_l1IsoTauJetTag
 
edm::EDGetTokenT< l1extra::L1JetParticleCollectionm_l1IsoTauJetToken
 
edm::InputTag m_l1MuonCollectionTag
 Meta InputTag for L1 muon collection. More...
 
edm::InputTag m_l1MuonTag
 
edm::EDGetTokenT< l1extra::L1MuonParticleCollectionm_l1MuonToken
 
edm::InputTag m_l1NoIsoEGTag
 
edm::EDGetTokenT< l1extra::L1EmParticleCollectionm_l1NoIsoEGToken
 
int m_l1NrBxInEvent
 
std::string m_l1SeedsLogicalExpression
 
edm::InputTag m_l1TauJetTag
 
edm::EDGetTokenT< l1extra::L1JetParticleCollectionm_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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDFilterBase
typedef EDFilterAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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_l1GtObjectMapTag, m_l1GtReadoutRecordTag, m_l1MuonCollectionTag, m_l1NrBxInEvent, m_l1SeedsLogicalExpression, m_l1TechTriggerSeeding, m_l1UseAliasesForSeeding, m_l1UseL1TriggerObjectMaps, L1GtLogicParser::operandTokenVector(), and findQualityFiles::size.

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

destructor

Definition at line 190 of file HLTLevel1GTSeed.cc.

190  {
191  // empty now
192 }

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 Exception, cmsPerfPublish::fail(), mps_fire::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 (auto & i : algOpTokenVector) {
562 
563  std::string bitString = 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  i.tokenNumber = bitInt;
577 
578  }
579 
580  for (auto & m_l1AlgoSeed : m_l1AlgoSeeds) {
581 
582  std::string bitString = m_l1AlgoSeed.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_l1AlgoSeed.tokenNumber = bitInt;
596  }
597 
598 }
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
def fail(errstr="")
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(), mps_fire::i, gen::k, LogDebug, LogTrace, m_l1AlgoLogicParser, m_l1AlgoSeeds, m_l1AlgoSeedsObjType, m_l1AlgoSeedsRpn, m_l1GtMenu, m_l1TechTriggerSeeding, GetRecoTauVFromDQM_MC_cff::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 (auto const & i : algOpTokenVector) {
632 
633  LogTrace("HLTLevel1GTSeed") << " " << std::setw(5)
634  << i.tokenNumber << "\t" << std::setw(25)
635  << i.tokenName << "\t"
636  << 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 (auto const & m_l1AlgoSeed : m_l1AlgoSeeds) {
646 
647  LogTrace("HLTLevel1GTSeed") << " " << std::setw(5)
648  << m_l1AlgoSeed.tokenNumber << "\t" << std::setw(25)
649  << m_l1AlgoSeed.tokenName << "\t"
650  << m_l1AlgoSeed.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 (auto i : m_l1AlgoSeedsRpn) {
664 
665  LogTrace("HLTLevel1GTSeed") << " Rpn vector size: "
666  << i->size() << std::endl;
667 
668  for (size_t j = 0; j < i->size(); ++j) {
669 
670  LogTrace("HLTLevel1GTSeed") << " ( "
671  << (*i)[j].operation << ", "
672  << (*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 (auto const & i : m_l1AlgoSeedsObjType) {
684 
685  LogTrace("HLTLevel1GTSeed")
686  << " Conditions for an algorithm: vector size: "
687  << i.size() << std::endl;
688 
689  for (size_t j = 0; j < i.size(); ++j) {
690 
691  LogTrace("HLTLevel1GTSeed")
692  << " Condition object type vector: size: "
693  << (i[j])->size() << std::endl;
694 
695  for (size_t k = 0; k < (i[j])->size(); ++k) {
696 
697  L1GtObject obj = (*(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)
size
Write out results.
const std::string & gtTriggerMenuName() const
const L1GtTriggerMenu * m_l1GtMenu
trigger menu
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
bool m_l1TechTriggerSeeding
seeding done via technical trigger bits, if value is "true"
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 ...
#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
void HLTLevel1GTSeed::dumpTriggerFilterObjectWithRefs ( trigger::TriggerFilterObjectWithRefs filterproduct) const
private

detailed print of filter content

Definition at line 1902 of file HLTLevel1GTSeed.cc.

References DEFINE_FWK_MODULE, trigger::TriggerRefsCollections::getObjects(), mps_fire::i, LogDebug, LogTrace, GetRecoTauVFromDQM_MC_cff::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().

1903 {
1904  LogDebug("HLTLevel1GTSeed") << "\nHLTLevel1GTSeed::hltFilter "
1905  << "\n Dump TriggerFilterObjectWithRefs\n" << std::endl;
1906 
1907  std::vector<l1extra::L1MuonParticleRef> seedsL1Mu;
1908 
1909  std::vector<l1extra::L1EmParticleRef> seedsL1IsoEG;
1910  std::vector<l1extra::L1EmParticleRef> seedsL1NoIsoEG;
1911 
1912  std::vector<l1extra::L1JetParticleRef> seedsL1CenJet;
1913  std::vector<l1extra::L1JetParticleRef> seedsL1ForJet;
1914  std::vector<l1extra::L1JetParticleRef> seedsL1TauJet;
1915  std::vector<l1extra::L1JetParticleRef> seedsL1IsoTauJet;
1916 
1917  std::vector<l1extra::L1EtMissParticleRef> seedsL1ETM;
1918  std::vector<l1extra::L1EtMissParticleRef> seedsL1ETT;
1919  std::vector<l1extra::L1EtMissParticleRef> seedsL1HTT;
1920  std::vector<l1extra::L1EtMissParticleRef> seedsL1HTM;
1921 
1922  filterproduct.getObjects(trigger::TriggerL1Mu, seedsL1Mu);
1923  const size_t sizeSeedsL1Mu = seedsL1Mu.size();
1924 
1925  filterproduct.getObjects(trigger::TriggerL1IsoEG, seedsL1IsoEG);
1926  const size_t sizeSeedsL1IsoEG = seedsL1IsoEG.size();
1927 
1928  filterproduct.getObjects(trigger::TriggerL1NoIsoEG, seedsL1NoIsoEG);
1929  const size_t sizeSeedsL1NoIsoEG = seedsL1NoIsoEG.size();
1930 
1931  filterproduct.getObjects(trigger::TriggerL1CenJet, seedsL1CenJet);
1932  const size_t sizeSeedsL1CenJet = seedsL1CenJet.size();
1933 
1934  filterproduct.getObjects(trigger::TriggerL1ForJet, seedsL1ForJet);
1935  const size_t sizeSeedsL1ForJet = seedsL1ForJet.size();
1936 
1937  filterproduct.getObjects(trigger::TriggerL1TauJet, seedsL1TauJet);
1938  const size_t sizeSeedsL1TauJet = seedsL1TauJet.size();
1939 
1940  filterproduct.getObjects(trigger::TriggerL1TauJet, seedsL1IsoTauJet);
1941  const size_t sizeSeedsL1IsoTauJet = seedsL1IsoTauJet.size();
1942 
1943  filterproduct.getObjects(trigger::TriggerL1ETM, seedsL1ETM);
1944  const size_t sizeSeedsL1ETM = seedsL1ETM.size();
1945 
1946  filterproduct.getObjects(trigger::TriggerL1ETT, seedsL1ETT);
1947  const size_t sizeSeedsL1ETT = seedsL1ETT.size();
1948 
1949  filterproduct.getObjects(trigger::TriggerL1HTT, seedsL1HTT);
1950  const size_t sizeSeedsL1HTT = seedsL1HTT.size();
1951 
1952  filterproduct.getObjects(trigger::TriggerL1HTM, seedsL1HTM);
1953  const size_t sizeSeedsL1HTM = seedsL1HTM.size();
1954 
1955  LogTrace("HLTLevel1GTSeed") << " L1Mu seeds: " << sizeSeedsL1Mu << "\n"
1956  << " L1IsoEG seeds: " << sizeSeedsL1IsoEG << "\n"
1957  << " L1NoIsoEG seeds: " << sizeSeedsL1NoIsoEG << "\n"
1958  << " L1CenJet seeds: " << sizeSeedsL1CenJet << "\n"
1959  << " L1ForJet seeds: " << sizeSeedsL1ForJet << "\n"
1960  << " L1TauJet seeds: " << sizeSeedsL1TauJet << "\n"
1961  << " L1IsoTauJet seeds: " << sizeSeedsL1IsoTauJet << "\n"
1962  << " L1ETM seeds: " << sizeSeedsL1ETM << "\n"
1963  << " L1ETT seeds: " << sizeSeedsL1ETT << "\n"
1964  << " L1HTT seeds: " << sizeSeedsL1HTT << "\n"
1965  << " L1HTM seeds: " << sizeSeedsL1HTM << "\n" << std::endl;
1966 
1967  for (size_t i = 0; i != sizeSeedsL1Mu; i++) {
1968 
1970  seedsL1Mu[i]);
1971 
1972  LogTrace("HLTLevel1GTSeed") << "L1Mu " << "\t" << "q*PT = "
1973  << obj->charge() * obj->pt() << "\t" << "eta = " << obj->eta()
1974  << "\t" << "phi = " << obj->phi() << "\t" << "BX = "
1975  << obj->bx();
1976  }
1977 
1978  for (size_t i = 0; i != sizeSeedsL1IsoEG; i++) {
1979 
1981  l1extra::L1EmParticleRef(seedsL1IsoEG[i]);
1982 
1983  LogTrace("HLTLevel1GTSeed") << "L1IsoEG " << "\t" << "ET = "
1984  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
1985  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
1986  ;
1987  }
1988 
1989  for (size_t i = 0; i != sizeSeedsL1NoIsoEG; i++) {
1990 
1992  seedsL1NoIsoEG[i]);
1993 
1994  LogTrace("HLTLevel1GTSeed") << "L1NoIsoEG" << "\t" << "ET = "
1995  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
1996  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
1997  }
1998 
1999  for (size_t i = 0; i != sizeSeedsL1CenJet; i++) {
2000 
2002  seedsL1CenJet[i]);
2003 
2004  LogTrace("HLTLevel1GTSeed") << "L1CenJet " << "\t" << "ET = "
2005  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
2006  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
2007  }
2008 
2009  for (size_t i = 0; i != sizeSeedsL1ForJet; i++) {
2010 
2012  seedsL1ForJet[i]);
2013 
2014  LogTrace("HLTLevel1GTSeed") << "L1ForJet " << "\t" << "ET = "
2015  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
2016  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
2017  }
2018 
2019  for (size_t i = 0; i != sizeSeedsL1TauJet; i++) {
2020 
2022  seedsL1TauJet[i]);
2023 
2024  LogTrace("HLTLevel1GTSeed") << "L1TauJet " << "\t" << "ET = "
2025  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
2026  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
2027  }
2028 
2029  for (size_t i = 0; i != sizeSeedsL1IsoTauJet; i++) {
2030 
2032  seedsL1IsoTauJet[i]);
2033 
2034  LogTrace("HLTLevel1GTSeed") << "L1IsoTauJet " << "\t" << "ET = "
2035  << obj->et() << "\t" << "eta = " << obj->eta() << "\t"
2036  << "phi = " << obj->phi() << "\t" << "BX = " << obj->bx();
2037  }
2038 
2039  for (size_t i = 0; i != sizeSeedsL1ETM; i++) {
2040 
2042  seedsL1ETM[i]);
2043 
2044  LogTrace("HLTLevel1GTSeed") << "L1ETM " << "\t" << "ET = "
2045  << obj->etMiss() << "\t" << "phi = " << obj->phi() << "BX = "
2046  << obj->bx();
2047  }
2048 
2049  for (size_t i = 0; i != sizeSeedsL1ETT; i++) {
2050 
2052  seedsL1ETT[i]);
2053 
2054  LogTrace("HLTLevel1GTSeed") << "L1ETT " << "\t" << "ET = "
2055  << obj->etTotal() << "\t" << "BX = " << obj->bx();
2056  }
2057 
2058  for (size_t i = 0; i != sizeSeedsL1HTT; i++) {
2059 
2061  seedsL1HTT[i]);
2062 
2063  LogTrace("HLTLevel1GTSeed") << "L1HTT " << "\t" << "ET = "
2064  << obj->etTotal() << "\t" << "BX = " << obj->bx();
2065  }
2066 
2067  for (size_t i = 0; i != sizeSeedsL1HTM; i++) {
2068 
2070  seedsL1HTM[i]);
2071 
2072  LogTrace("HLTLevel1GTSeed") << "L1HTM " << "\t" << "ET = "
2073  << obj->etMiss() << "\t" << "phi = " << obj->phi() << "BX = "
2074  << obj->bx();
2075  }
2076 
2077  LogTrace("HLTLevel1GTSeed") << " \n\n" << std::endl;
2078 
2079 }
#define LogDebug(id)
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 197 of file HLTLevel1GTSeed.cc.

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

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

References trigger::TriggerFilterObjectWithRefs::addCollectionTag(), dumpTriggerFilterObjectWithRefs(), L1GtLogicParser::expressionResult(), L1GlobalTriggerReadoutRecord::finalOR(), edm::EventSetup::get(), edm::Event::getByToken(), L1GtTriggerMenu::gtAlgorithmAliasMap(), L1GtTriggerMenu::gtAlgorithmMap(), L1GtTriggerMask::gtTriggerMask(), L1GtTriggerMenu::gtTriggerMenuInterface(), 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_l1IsoTauJetTag, m_l1MuonTag, m_l1NoIsoEGTag, m_l1TauJetTag, m_l1TechTriggerSeeding, m_l1UseAliasesForSeeding, m_l1UseL1TriggerObjectMaps, edm::Handle< T >::product(), edm::ESHandle< T >::product(), HLTStreamFilter::saveTags(), seedsL1Extra(), seedsL1TriggerObjectMaps(), L1GlobalTriggerReadoutRecord::technicalTriggerWord(), and updateAlgoLogicParser().

254  {
255 
256  // all HLT filters must create and fill a HLT filter object,
257  // recording any reconstructed physics objects satisfying
258  // this HLT filter, and place it in the event.
259 
260  // the filter object
261  if (saveTags()) {
262  filterproduct.addCollectionTag(m_l1MuonTag);
263  filterproduct.addCollectionTag(m_l1ExtraTag);
264  filterproduct.addCollectionTag(m_l1IsoEGTag);
265  filterproduct.addCollectionTag(m_l1NoIsoEGTag);
266  filterproduct.addCollectionTag(m_l1CenJetTag);
267  filterproduct.addCollectionTag(m_l1ForJetTag);
268  filterproduct.addCollectionTag(m_l1TauJetTag);
269  filterproduct.addCollectionTag(m_l1IsoTauJetTag);
270  filterproduct.addCollectionTag(m_l1EtMissMETTag);
271  filterproduct.addCollectionTag(m_l1EtMissMHTTag);
272  }
273 
274  // get the trigger mask from the EventSetup
276  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo);
277 
278  // get L1GlobalTriggerReadoutRecord and GT decision
280  iEvent.getByToken(m_l1GtReadoutRecordToken, gtReadoutRecord);
281  const L1GlobalTriggerReadoutRecord* gtReadoutRecordPtr =
282  gtReadoutRecord.product();
283 
284  if (!gtReadoutRecord.isValid()) {
285  edm::LogWarning("HLTLevel1GTSeed")
286  << "\nWarning: L1GlobalTriggerReadoutRecord with input tag "
288  << "\nrequested in configuration, but not found in the event."
289  << std::endl;
290  return false;
291  }
292 
293  //
294  boost::uint16_t gtFinalOR = gtReadoutRecord->finalOR();
295  int physicsDaqPartition = 0;
296  bool gtDecision =
297  static_cast<bool> (gtFinalOR & (1 << physicsDaqPartition));
298 
299  // GT global decision "false" possible only when running on MC or on random triggers
300  if (!gtDecision) {
301 
302  return false;
303 
304  } else {
305 
306  // by convention, "L1GlobalDecision" logical expression means global decision
307  if (m_l1GlobalDecision) {
308 
309  // return the full L1GlobalTriggerObjectMapRecord in filter format FIXME
310  return true;
311 
312  }
313 
314  }
315 
316  // seeding done via technical trigger bits
318 
319  // get the technical trigger mask from the EventSetup
321  evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech);
322 
323  // get Global Trigger technical trigger word, update the tokenResult members
324  // from m_l1AlgoLogicParser and get the result for the logical expression
325  const std::vector<bool>& gtTechTrigWord = gtReadoutRecord->technicalTriggerWord();
326  updateAlgoLogicParser(gtTechTrigWord, l1GtTmTech->gtTriggerMask(), physicsDaqPartition);
327 
328  // always empty filter - GT not aware of objects for technical triggers
329  bool seedsResult = m_l1AlgoLogicParser.expressionResult();
330 
331  if (seedsResult) {
332  return true;
333  } else {
334  return false;
335  }
336 
337  }
338 
339  // seeding via physics algorithms
340 
341  // get / update the trigger menu from the EventSetup
342  // local cache & check on cacheIdentifier
343 
344  unsigned long long l1GtMenuCacheID =
345  evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
346 
347  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
348 
350  evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu);
351  m_l1GtMenu = 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
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
const L1GtTriggerMenu * m_l1GtMenu
trigger menu
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
bool seedsL1Extra(edm::Event &, trigger::TriggerFilterObjectWithRefs &) const
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
edm::InputTag m_l1EtMissMETTag
const cms_uint16_t finalOR(int bxInEventValue) const
bool m_l1UseAliasesForSeeding
seeding uses algorithm aliases instead of algorithm names, if value is "true"
edm::InputTag m_l1IsoTauJetTag
edm::InputTag m_l1ExtraTag
cached InputTags
bool m_l1TechTriggerSeeding
seeding done via technical trigger bits, if value is "true"
edm::InputTag m_l1EtMissMHTTag
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
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:74
edm::InputTag m_l1ForJetTag
#define LogTrace(id)
bool m_isDebugEnabled
cache edm::isDebugEnabled()
edm::InputTag m_l1CenJetTag
edm::InputTag m_l1NoIsoEGTag
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
T const * product() const
Definition: Handle.h:81
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
edm::InputTag m_l1GtReadoutRecordTag
InputTag for the L1 Global Trigger DAQ readout record.
bool m_l1GlobalDecision
replace string "L1GlobalDecision" with bool to speed up the "if"
T get() const
Definition: EventSetup.h:63
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
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
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
edm::InputTag m_l1TauJetTag
T const * product() const
Definition: ESHandle.h:86
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 Exception, L1GtTriggerMenu::gtConditionMap(), and m_l1GtMenu.

Referenced by updateAlgoLogicParser().

390  {
391 
392  const ConditionMap& conditionMap =
393  (m_l1GtMenu->gtConditionMap()).at(chipNr);
394 
395  auto 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 }
const L1GtTriggerMenu * m_l1GtMenu
trigger menu
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
const std::vector< ConditionMap > & gtConditionMap() const
get / set / build the condition maps
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 1332 of file HLTLevel1GTSeed.cc.

References trigger::TriggerRefsCollections::addObject(), CenJet, ETM, ETT, ForJet, edm::Event::getByToken(), HfRingEtSums, HTM, HTT, IsoEG, edm::HandleBase::isValid(), JetCounts, triggerObjects_cff::l1Muon, 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_l1IsoTauJetTag, m_l1IsoTauJetToken, 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().

1332  {
1333 
1334 
1335 
1336  // if (m_isDebugEnabled) {
1337  //
1338  // LogTrace("HLTLevel1GTSeed") << "\n Printing muons from gtDigis\n " << std::endl;
1339  //
1340  // edm::Handle<std::vector<L1MuGMTCand> > muonData;
1341  // iEvent.getByToken("gtDigis", muonData);
1342  //
1343  // if (!muonData.isValid()) {
1344  // edm::LogWarning("HLTLevel1GTSeed")
1345  // << "\nWarning: std::vector<L1MuGMTCand> with input tag "
1346  // << "gtDigis"
1347  // << "\nrequested in configuration, but not found in the event.\n"
1348  // << std::endl;
1349  // } else {
1350  //
1351  // std::vector<L1MuGMTCand>::const_iterator itMuon;
1352  // for (itMuon = muonData->begin(); itMuon != muonData->end(); itMuon++) {
1353  //
1354  // LogTrace("HLTLevel1GTSeed") << (*itMuon) << std::endl;
1355  //
1356  // }
1357  //
1358  // }
1359  // }
1360 
1361  // define bools to prevent entering more copies of the objects
1362  bool includeMuon = true;
1363 
1364  bool includeIsoEG = true;
1365  bool includeNoIsoEG = true;
1366 
1367  bool includeCenJet = true;
1368  bool includeForJet = true;
1369  bool includeTauJet = true;
1370  bool includeIsoTauJet = true;
1371 
1372  bool includeETM = true;
1373  bool includeETT = true;
1374  bool includeHTT = true;
1375  bool includeHTM = true;
1376 
1377  bool includeJetCounts = true;
1378 
1379  //
1380  bool objectsInFilter = false;
1381 
1382  // loop over the list of required algorithms for seeding
1383  int iAlgo = -1;
1384 
1385  for (auto const & m_l1AlgoSeed : m_l1AlgoSeeds) {
1386 
1387  //
1388  iAlgo++;
1389  //
1390  int algBit = m_l1AlgoSeed.tokenNumber;
1391  std::string algName = m_l1AlgoSeed.tokenName;
1392  bool algResult = m_l1AlgoSeed.tokenResult;
1393 
1394  LogTrace("HLTLevel1GTSeed") << "\nHLTLevel1GTSeed::hltFilter "
1395  << "\n Algorithm " << algName << " with bit number " << algBit
1396  << " in the object map seed list" << "\n Algorithm result = "
1397  << algResult << std::endl;
1398 
1399  const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
1400  m_l1AlgoSeedsObjType[iAlgo];
1401 
1402  int minBxInEvent = (m_l1NrBxInEvent + 1)/2 - m_l1NrBxInEvent;
1403  int maxBxInEvent = (m_l1NrBxInEvent + 1)/2 - 1;
1404 
1405  // loop over all object types found for an algorithm and fill the lists
1406  //
1407  for (auto condObj : algoSeedsObjTypeVec) {
1408 
1409  for (auto itObj : (*condObj)) {
1410 
1411  LogTrace("HLTLevel1GTSeed")
1412  << " Object type in conditions from this algorithm = "
1413  << itObj << std::endl;
1414 
1415  switch (itObj) {
1416  case Mu: {
1417  if (includeMuon) {
1418 
1420  iEvent.getByToken(m_l1MuonToken, l1Muon);
1421 
1422  if (!l1Muon.isValid()) {
1423  edm::LogWarning("HLTLevel1GTSeed")
1424  << "\nWarning: L1MuonParticleCollection with input tag "
1425  << m_l1MuonTag
1426  << "\nrequested in configuration, but not found in the event."
1427  << "\nNo muon added to filterproduct."
1428  << std::endl;
1429 
1430  } else {
1431  int iObj = -1;
1432  for (auto
1433  objIter = l1Muon->begin(); objIter
1434  != l1Muon->end(); ++objIter) {
1435 
1436  iObj++;
1437 
1438  int bxNr = objIter->bx();
1439  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1440 
1441  objectsInFilter = true;
1442  filterproduct.addObject(
1445  l1Muon, iObj));
1446  }
1447 
1448  }
1449  }
1450  includeMuon = false;
1451  }
1452  }
1453 
1454  break;
1455  case IsoEG: {
1456  if (includeIsoEG) {
1458  iEvent.getByToken(m_l1IsoEGToken, l1IsoEG);
1459 
1460  if (!l1IsoEG.isValid()) {
1461  edm::LogWarning("HLTLevel1GTSeed")
1462  << "\nWarning: L1EmParticleCollection with input tag "
1463  << m_l1IsoEGTag
1464  << "\nrequested in configuration, but not found in the event."
1465  << "\nNo IsoEG added to filterproduct."
1466  << std::endl;
1467 
1468  } else {
1469  int iObj = -1;
1470  for (auto
1471  objIter = l1IsoEG->begin(); objIter
1472  != l1IsoEG->end(); ++objIter) {
1473 
1474  iObj++;
1475 
1476  int bxNr = objIter->bx();
1477  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1478 
1479  objectsInFilter = true;
1480  filterproduct.addObject(
1483  l1IsoEG, iObj));
1484 
1485  }
1486  }
1487  }
1488  includeIsoEG = false;
1489  }
1490 
1491  }
1492  break;
1493  case NoIsoEG: {
1494  if (includeNoIsoEG) {
1496  iEvent.getByToken(m_l1NoIsoEGToken, l1NoIsoEG);
1497 
1498  if (!l1NoIsoEG.isValid()) {
1499  edm::LogWarning("HLTLevel1GTSeed")
1500  << "\nWarning: L1EmParticleCollection with input tag "
1501  << m_l1NoIsoEGTag
1502  << "\nrequested in configuration, but not found in the event."
1503  << "\nNo NoIsoEG added to filterproduct."
1504  << std::endl;
1505 
1506  } else {
1507  int iObj = -1;
1508  for (auto
1509  objIter = l1NoIsoEG->begin(); objIter
1510  != l1NoIsoEG->end(); ++objIter) {
1511 
1512  iObj++;
1513 
1514  int bxNr = objIter->bx();
1515  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1516 
1517  objectsInFilter = true;
1518  filterproduct.addObject(
1521  l1NoIsoEG, iObj));
1522 
1523  }
1524  }
1525  }
1526  includeNoIsoEG = false;
1527  }
1528 
1529  }
1530  break;
1531  case CenJet: {
1532  if (includeCenJet) {
1534  iEvent.getByToken(m_l1CenJetToken, l1CenJet);
1535 
1536  if (!l1CenJet.isValid()) {
1537  edm::LogWarning("HLTLevel1GTSeed")
1538  << "\nWarning: L1JetParticleCollection with input tag "
1539  << m_l1CenJetTag
1540  << "\nrequested in configuration, but not found in the event."
1541  << "\nNo CenJet added to filterproduct."
1542  << std::endl;
1543 
1544  } else {
1545  int iObj = -1;
1546  for (auto
1547  objIter = l1CenJet->begin(); objIter
1548  != l1CenJet->end(); ++objIter) {
1549 
1550  iObj++;
1551 
1552  int bxNr = objIter->bx();
1553  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1554 
1555  objectsInFilter = true;
1556  filterproduct.addObject(
1559  l1CenJet, iObj));
1560 
1561  }
1562  }
1563  }
1564  includeCenJet = false;
1565  }
1566 
1567  }
1568 
1569  break;
1570  case ForJet: {
1571  if (includeForJet) {
1573  iEvent.getByToken(m_l1ForJetToken, l1ForJet);
1574 
1575  if (!l1ForJet.isValid()) {
1576  edm::LogWarning("HLTLevel1GTSeed")
1577  << "\nWarning: L1JetParticleCollection with input tag "
1578  << m_l1ForJetTag
1579  << "\nrequested in configuration, but not found in the event."
1580  << "\nNo ForJet added to filterproduct."
1581  << std::endl;
1582 
1583  } else {
1584  int iObj = -1;
1585  for (auto
1586  objIter = l1ForJet->begin(); objIter
1587  != l1ForJet->end(); ++objIter) {
1588 
1589  iObj++;
1590 
1591  int bxNr = objIter->bx();
1592  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1593 
1594  objectsInFilter = true;
1595  filterproduct.addObject(
1598  l1ForJet, iObj));
1599 
1600  }
1601  }
1602  }
1603  includeForJet = false;
1604  }
1605 
1606  }
1607 
1608  break;
1609  case TauJet: {
1610  if (includeTauJet) {
1612  iEvent.getByToken(m_l1TauJetToken, l1TauJet);
1613 
1614  if (!l1TauJet.isValid()) {
1615  edm::LogWarning("HLTLevel1GTSeed")
1616  << "\nWarning: L1JetParticleCollection with input tag "
1617  << m_l1TauJetTag
1618  << "\nrequested in configuration, but not found in the event."
1619  << "\nNo TauJet added to filterproduct."
1620  << std::endl;
1621 
1622  } else {
1623  int iObj = -1;
1624  for (auto
1625  objIter = l1TauJet->begin(); objIter
1626  != l1TauJet->end(); ++objIter) {
1627 
1628  iObj++;
1629 
1630  int bxNr = objIter->bx();
1631  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1632 
1633  objectsInFilter = true;
1634  filterproduct.addObject(
1637  l1TauJet, iObj));
1638 
1639  }
1640  }
1641  }
1642  includeTauJet = false;
1643  }
1644 
1645  }
1646 
1647  case HfRingEtSums: {
1648  if (includeIsoTauJet) {
1650  iEvent.getByToken(m_l1IsoTauJetToken, l1IsoTauJet);
1651 
1652  if (!l1IsoTauJet.isValid()) {
1653  edm::LogWarning("HLTLevel1GTSeed")
1654  << "\nWarning: L1JetParticleCollection with input tag "
1655  << m_l1IsoTauJetTag
1656  << "\nrequested in configuration, but not found in the event."
1657  << "\nNo IsoTauJet added to filterproduct."
1658  << std::endl;
1659 
1660  } else {
1661  int iObj = -1;
1662  for (auto
1663  objIter = l1IsoTauJet->begin(); objIter
1664  != l1IsoTauJet->end(); ++objIter) {
1665 
1666  iObj++;
1667 
1668  int bxNr = objIter->bx();
1669  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1670 
1671  objectsInFilter = true;
1672  filterproduct.addObject(
1675  l1IsoTauJet, iObj));
1676 
1677  }
1678  }
1679  }
1680  includeIsoTauJet = false;
1681  }
1682 
1683  }
1684 
1685  break;
1686  case ETM: {
1687  if (includeETM) {
1689  iEvent.getByToken(m_l1EtMissMETToken, l1EnergySums);
1690 
1691  if (!l1EnergySums.isValid()) {
1692  edm::LogWarning("HLTLevel1GTSeed")
1693  << "\nWarning: L1EtMissParticleCollection with input tag "
1694  << m_l1EtMissMETTag
1695  << "\nrequested in configuration, but not found in the event."
1696  << "\nNo ETM added to filterproduct."
1697  << std::endl;
1698 
1699  } else if (l1EnergySums->empty()) {
1700  edm::LogWarning("HLTLevel1GTSeed")
1701  << "\nWarning: L1EtMissParticleCollection with input tag "
1702  << m_l1EtMissMETTag
1703  << "\nfound in the event but with 0 size."
1704  << "\nNo ETM added to filterproduct."
1705  << std::endl;
1706 
1707  } else {
1708  int iObj = -1;
1709  for (auto
1710  objIter = l1EnergySums->begin(); objIter
1711  != l1EnergySums->end(); ++objIter) {
1712 
1713  iObj++;
1714 
1715  int bxNr = objIter->bx();
1716  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1717 
1718  objectsInFilter = true;
1719  filterproduct.addObject(
1722  l1EnergySums, iObj));
1723 
1724  }
1725  }
1726  }
1727  includeETM = false;
1728  }
1729 
1730  }
1731 
1732  break;
1733  case ETT: {
1734  if (includeETT) {
1736  iEvent.getByToken(m_l1EtMissMETToken, l1EnergySums);
1737 
1738  if (!l1EnergySums.isValid()) {
1739  edm::LogWarning("HLTLevel1GTSeed")
1740  << "\nWarning: L1EtMissParticleCollection with input tag "
1741  << m_l1EtMissMETTag
1742  << "\nrequested in configuration, but not found in the event."
1743  << "\nNo ETT added to filterproduct."
1744  << std::endl;
1745 
1746  } else if (l1EnergySums->empty()) {
1747  edm::LogWarning("HLTLevel1GTSeed")
1748  << "\nWarning: L1EtMissParticleCollection with input tag "
1749  << m_l1EtMissMETTag
1750  << "\nfound in the event but with 0 size."
1751  << "\nNo ETT added to filterproduct."
1752  << std::endl;
1753 
1754  } else {
1755  int iObj = -1;
1756  for (auto
1757  objIter = l1EnergySums->begin(); objIter
1758  != l1EnergySums->end(); ++objIter) {
1759 
1760  iObj++;
1761 
1762  int bxNr = objIter->bx();
1763  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1764 
1765  objectsInFilter = true;
1766  filterproduct.addObject(
1769  l1EnergySums, iObj));
1770 
1771  }
1772  }
1773  }
1774  includeETT = false;
1775  }
1776 
1777  }
1778 
1779  break;
1780  case HTT: {
1781  if (includeHTT) {
1783  iEvent.getByToken(m_l1EtMissMHTToken, l1EnergySums);
1784 
1785  if (!l1EnergySums.isValid()) {
1786  edm::LogWarning("HLTLevel1GTSeed")
1787  << "\nWarning: L1EtMissParticleCollection with input tag "
1788  << m_l1EtMissMHTTag
1789  << "\nrequested in configuration, but not found in the event."
1790  << "\nNo HTT added to filterproduct."
1791  << std::endl;
1792 
1793  } else if (l1EnergySums->empty()) {
1794  edm::LogWarning("HLTLevel1GTSeed")
1795  << "\nWarning: L1EtMissParticleCollection with input tag "
1796  << m_l1EtMissMHTTag
1797  << "\nfound in the event but with 0 size."
1798  << "\nNo HTT added to filterproduct."
1799  << std::endl;
1800 
1801  } else {
1802  int iObj = -1;
1803  for (auto
1804  objIter = l1EnergySums->begin(); objIter
1805  != l1EnergySums->end(); ++objIter) {
1806 
1807  iObj++;
1808 
1809  int bxNr = objIter->bx();
1810  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1811 
1812  objectsInFilter = true;
1813  filterproduct.addObject(
1816  l1EnergySums, iObj));
1817 
1818  }
1819  }
1820  }
1821  includeHTT = false;
1822  }
1823  }
1824 
1825  break;
1826  case HTM: {
1827  if (includeHTM) {
1829  iEvent.getByToken(m_l1EtMissMHTToken, l1EnergySums);
1830 
1831  if (!l1EnergySums.isValid()) {
1832  edm::LogWarning("HLTLevel1GTSeed")
1833  << "\nWarning: L1EtMissParticleCollection with input tag "
1834  << m_l1EtMissMHTTag
1835  << "\nrequested in configuration, but not found in the event."
1836  << "\nNo HTM added to filterproduct."
1837  << std::endl;
1838 
1839  } else if (l1EnergySums->empty()) {
1840  edm::LogWarning("HLTLevel1GTSeed")
1841  << "\nWarning: L1EtMissParticleCollection with input tag "
1842  << m_l1EtMissMHTTag
1843  << "\nfound in the event but with 0 size."
1844  << "\nNo HTM added to filterproduct."
1845  << std::endl;
1846 
1847  } else {
1848  int iObj = -1;
1849  for (auto
1850  objIter = l1EnergySums->begin(); objIter
1851  != l1EnergySums->end(); ++objIter) {
1852 
1853  iObj++;
1854 
1855  int bxNr = objIter->bx();
1856  if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1857 
1858  objectsInFilter = true;
1859  filterproduct.addObject(
1862  l1EnergySums, iObj));
1863 
1864  }
1865  }
1866  }
1867  includeHTM = false;
1868  }
1869  }
1870 
1871  break;
1872  case JetCounts: {
1873  if (includeJetCounts) {
1874  // do nothing, JetCounts do not exist now
1875  }
1876  }
1877 
1878  break;
1879  default: {
1880  // should not arrive here
1881 
1882  LogDebug("HLTLevel1GTSeed")
1883  << "\n HLTLevel1GTSeed::hltFilter "
1884  << "\n Unknown object of type " << itObj
1885  << " in the seed list." << std::endl;
1886  }
1887  break;
1888  }
1889 
1890  }
1891 
1892  }
1893 
1894  LogTrace("HLTLevel1GTSeed") << std::endl;
1895  }
1896 
1897  return objectsInFilter;
1898 
1899 }
#define LogDebug(id)
Definition: L1GtObject.h:39
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
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::InputTag m_l1IsoTauJetTag
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<C>)
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_l1IsoTauJetToken
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1CenJetToken
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1IsoEGToken
edm::InputTag m_l1IsoEGTag
bool isValid() const
Definition: HandleBase.h:74
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(), L1GlobalTriggerObjectMapRecord::getObjectMap(), L1GtTriggerMask::gtTriggerMask(), HfRingEtSums, HTM, HTT, IsoEG, edm::HandleBase::isValid(), JetCounts, triggerObjects_cff::l1Muon, 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_l1IsoTauJetTag, m_l1IsoTauJetToken, 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  std::list<int> listIsoTauJet;
758 
759  std::list<int> listETM;
760  std::list<int> listETT;
761  std::list<int> listHTT;
762  std::list<int> listHTM;
763 
764  std::list<int> listJetCounts;
765 
766  // get handle to object maps (one object map per algorithm)
768  iEvent.getByToken(m_l1GtObjectMapToken, gtObjectMapRecord);
769 
770  if (!gtObjectMapRecord.isValid()) {
771  edm::LogWarning("HLTLevel1GTSeed")
772  << "\nWarning: L1GlobalTriggerObjectMapRecord with input tag "
774  << "\nrequested in configuration, but not found in the event." << std::endl;
775 
776  return false;
777  }
778 
779  // TODO check that the L1GlobalTriggerObjectMapRecord corresponds to the same menu as
780  // the menu run by HLTLevel1GTSeed
781  // true normally online (they are run in the same job)
782  // can be false offline, when re-running HLT without re-running the object map producer
783 
784  // loop over the list of required algorithms for seeding
785  int iAlgo = -1;
786 
787  for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
788  itSeed = m_l1AlgoSeeds.begin(); itSeed != m_l1AlgoSeeds.end(); ++itSeed) {
789 
790  //
791  iAlgo++;
792  //
793  int algBit = (*itSeed).tokenNumber;
794  std::string algName = (*itSeed).tokenName;
795  bool algResult = (*itSeed).tokenResult;
796 
797  LogTrace("HLTLevel1GTSeed")
798  << "\nHLTLevel1GTSeed::hltFilter "
799  << "\n Algorithm " << algName << " with bit number " << algBit
800  << " in the object map seed list"
801  << "\n Algorithm result = " << algResult << "\n"
802  << std::endl;
803 
804  // algorithm result is false - no seeds
805  if ( !algResult) {
806  continue;
807  }
808 
809  // algorithm result is true - get object map, loop over conditions in the algorithm
810  const L1GlobalTriggerObjectMap* objMap = gtObjectMapRecord->getObjectMap(algBit);
811 
812  if (objMap == nullptr) {
813  edm::LogWarning("HLTLevel1GTSeed")
814  << "\nWarning: L1GlobalTriggerObjectMap for algorithm " << algName
815  << " (bit number " << algBit << ") does not exist.\nReturn false.\n"
816  << std::endl;
817  return false;
818  }
819 
820  const std::vector<L1GtLogicParser::OperandToken>& opTokenVecObjMap =
821  objMap->operandTokenVector();
822 
823  const std::vector<L1GtLogicParser::TokenRPN>& algoSeedsRpn =
824  * ( m_l1AlgoSeedsRpn.at(iAlgo) );
825 
826  const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
827  m_l1AlgoSeedsObjType[iAlgo];
828 
829  //
830  L1GtLogicParser logicParserConditions(algoSeedsRpn, opTokenVecObjMap);
831 
832  // get list of required conditions for seeding - loop over
833  std::vector<L1GtLogicParser::OperandToken> condSeeds =
834  logicParserConditions.expressionSeedsOperandList();
835 
836  if (m_isDebugEnabled ) {
837 
838  LogTrace("HLTLevel1GTSeed")
839  << "\n HLTLevel1GTSeed::hltFilter "
840  << "\n condSeeds.size() = "
841  << condSeeds.size()
842  << std::endl;
843 
844  for (auto & condSeed : condSeeds) {
845 
846  LogTrace("HLTLevel1GTSeed")
847  << " " << std::setw(5) << condSeed.tokenNumber << "\t"
848  << std::setw(25) << condSeed.tokenName << "\t"
849  << condSeed.tokenResult
850  << std::endl;
851  }
852 
853  LogTrace("HLTLevel1GTSeed")
854  << std::endl;
855  }
856 
857  for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
858  itCond = condSeeds.begin(); itCond != condSeeds.end(); itCond++) {
859 
860  std::string cndName = (*itCond).tokenName;
861  int cndNumber = (*itCond).tokenNumber;
862  bool cndResult = (*itCond).tokenResult;
863 
864  const std::vector<L1GtObject>* cndObjTypeVec = algoSeedsObjTypeVec.at(cndNumber);
865 
866  //LogTrace("HLTLevel1GTSeed")
867  // << "\n HLTLevel1GTSeed::hltFilter "
868  // << "\n Condition " << cndName << " with number " << cndNumber
869  // << " in the seed list"
870  // << "\n Condition result = " << cndResult << "\n"
871  // << std::endl;
872 
873  if ( !cndResult) {
874  continue;
875  }
876 
877  // loop over combinations for a given condition
878 
879  const CombinationsInCond* cndComb = objMap->getCombinationsInCond(cndNumber);
880 
881  for (auto const & itComb : (*cndComb)) {
882 
883  // loop over objects in a combination for a given condition
884  int iObj = 0;
885  for (auto
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 HfRingEtSums: {
929  // Special treatment needed to match HFRingEtSums index (Ind) with corresponding l1extra item
930  // Same ranking (Et) is assumed for both HFRingEtSums indexes and items in l1extra IsoTau collection
931  // Each HFRingEtSums_IndN corresponds with one object (with (*itObject)=0);
932  // its index (hfInd) encodded by parsing algorithm name
933  int hfInd = (*itObject);
934  if(cndName.find("Ind0")!=std::string::npos)
935  hfInd = 0;
936  else if(cndName.find("Ind1")!=std::string::npos)
937  hfInd = 1;
938  else if(cndName.find("Ind2")!=std::string::npos)
939  hfInd = 2;
940  else if(cndName.find("Ind3")!=std::string::npos)
941  hfInd = 3;
942  listIsoTauJet.push_back(hfInd);
943  }
944 
945  break;
946  case ETM: {
947  listETM.push_back(*itObject);
948 
949  }
950 
951  break;
952  case ETT: {
953  listETT.push_back(*itObject);
954 
955  }
956 
957  break;
958  case HTT: {
959  listHTT.push_back(*itObject);
960 
961  }
962 
963  break;
964  case HTM: {
965  listHTM.push_back(*itObject);
966 
967  }
968 
969  break;
970  case JetCounts: {
971  listJetCounts.push_back(*itObject);
972  }
973 
974  break;
975  default: {
976  // should not arrive here
977 
978  LogDebug("HLTLevel1GTSeed")
979  << "\n HLTLevel1GTSeed::hltFilter "
980  << "\n Unknown object of type " << objTypeVal
981  << " and index " << (*itObject) << " in the seed list."
982  << std::endl;
983  }
984  break;
985  }
986 
987  iObj++;
988 
989  }
990 
991  }
992 
993  }
994 
995  }
996 
997  // eliminate duplicates
998 
999  listMuon.sort();
1000  listMuon.unique();
1001 
1002  listIsoEG.sort();
1003  listIsoEG.unique();
1004 
1005  listNoIsoEG.sort();
1006  listNoIsoEG.unique();
1007 
1008  listCenJet.sort();
1009  listCenJet.unique();
1010 
1011  listForJet.sort();
1012  listForJet.unique();
1013 
1014  listTauJet.sort();
1015  listTauJet.unique();
1016 
1017  listIsoTauJet.sort();
1018  listIsoTauJet.unique();
1019 
1020  listETM.sort();
1021  listETM.unique();
1022 
1023  listETT.sort();
1024  listETT.unique();
1025 
1026  listHTT.sort();
1027  listHTT.unique();
1028 
1029  listHTM.sort();
1030  listHTM.unique();
1031 
1032  listJetCounts.sort();
1033  listJetCounts.unique();
1034 
1035  //
1036  // record the L1 physics objects in the HLT filterproduct
1037  //
1038 
1039  // muon
1040  if (!listMuon.empty()) {
1041 
1043  iEvent.getByToken(m_l1MuonToken, l1Muon);
1044 
1045  if (!l1Muon.isValid()) {
1046  edm::LogWarning("HLTLevel1GTSeed")
1047  << "\nWarning: L1MuonParticleCollection with input tag " << m_l1MuonTag
1048  << "\nrequested in configuration, but not found in the event."
1049  << "\nNo muon added to filterproduct." << std::endl;
1050 
1051  } else {
1052 
1053  for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
1054 
1056  l1Muon, *itObj));
1057 
1058  }
1059  }
1060 
1061  }
1062 
1063  // EG (isolated)
1064  if (!listIsoEG.empty()) {
1066  iEvent.getByToken(m_l1IsoEGToken, l1IsoEG);
1067 
1068  if (!l1IsoEG.isValid()) {
1069  edm::LogWarning("HLTLevel1GTSeed")
1070  << "\nWarning: L1EmParticleCollection with input tag " << m_l1IsoEGTag
1071  << "\nrequested in configuration, but not found in the event."
1072  << "\nNo IsoEG added to filterproduct." << std::endl;
1073 
1074  } else {
1075  for (std::list<int>::const_iterator itObj = listIsoEG.begin(); itObj != listIsoEG.end(); ++itObj) {
1076 
1078  l1IsoEG, *itObj));
1079 
1080  }
1081  }
1082  }
1083 
1084  // EG (no isolation)
1085  if (!listNoIsoEG.empty()) {
1087  iEvent.getByToken(m_l1NoIsoEGToken, l1NoIsoEG);
1088 
1089  if (!l1NoIsoEG.isValid()) {
1090  edm::LogWarning("HLTLevel1GTSeed")
1091  << "\nWarning: L1EmParticleCollection with input tag " << m_l1NoIsoEGTag
1092  << "\nrequested in configuration, but not found in the event."
1093  << "\nNo NoIsoEG added to filterproduct." << std::endl;
1094 
1095  } else {
1096  for (std::list<int>::const_iterator itObj = listNoIsoEG.begin(); itObj
1097  != listNoIsoEG.end(); ++itObj) {
1098 
1100  l1NoIsoEG, *itObj));
1101 
1102  }
1103  }
1104  }
1105 
1106  // central jets
1107  if (!listCenJet.empty()) {
1109  iEvent.getByToken(m_l1CenJetToken, l1CenJet);
1110 
1111  if (!l1CenJet.isValid()) {
1112  edm::LogWarning("HLTLevel1GTSeed")
1113  << "\nWarning: L1JetParticleCollection with input tag " << m_l1CenJetTag
1114  << "\nrequested in configuration, but not found in the event."
1115  << "\nNo CenJet added to filterproduct." << std::endl;
1116 
1117  } else {
1118  for (std::list<int>::const_iterator itObj = listCenJet.begin(); itObj
1119  != listCenJet.end(); ++itObj) {
1120 
1122  l1CenJet, *itObj));
1123 
1124  }
1125  }
1126  }
1127 
1128  // forward jets
1129  if (!listForJet.empty()) {
1131  iEvent.getByToken(m_l1ForJetToken, l1ForJet);
1132 
1133  if (!l1ForJet.isValid()) {
1134  edm::LogWarning("HLTLevel1GTSeed")
1135  << "\nWarning: L1JetParticleCollection with input tag " << m_l1ForJetTag
1136  << "\nrequested in configuration, but not found in the event."
1137  << "\nNo ForJet added to filterproduct." << std::endl;
1138 
1139  } else {
1140  for (std::list<int>::const_iterator itObj = listForJet.begin(); itObj
1141  != listForJet.end(); ++itObj) {
1142 
1144  l1ForJet, *itObj));
1145 
1146  }
1147  }
1148  }
1149 
1150  // tau jets
1151  if (!listTauJet.empty()) {
1153  iEvent.getByToken(m_l1TauJetToken, l1TauJet);
1154 
1155  if (!l1TauJet.isValid()) {
1156  edm::LogWarning("HLTLevel1GTSeed")
1157  << "\nWarning: L1JetParticleCollection with input tag " << m_l1TauJetTag
1158  << "\nrequested in configuration, but not found in the event."
1159  << "\nNo TauJet added to filterproduct." << std::endl;
1160 
1161  } else {
1162  for (std::list<int>::const_iterator itObj = listTauJet.begin(); itObj
1163  != listTauJet.end(); ++itObj) {
1164 
1166  l1TauJet, *itObj));
1167 
1168  }
1169  }
1170  }
1171 
1172  // isotau jets
1173  if (!listIsoTauJet.empty()) {
1175  iEvent.getByToken(m_l1IsoTauJetToken, l1IsoTauJet);
1176 
1177  if (!l1IsoTauJet.isValid()) {
1178  edm::LogWarning("HLTLevel1GTSeed")
1179  << "\nWarning: L1JetParticleCollection with input tag " << m_l1IsoTauJetTag
1180  << "\nrequested in configuration, but not found in the event."
1181  << "\nNo IsoTauJet added to filterproduct." << std::endl;
1182 
1183  } else {
1184  for (std::list<int>::const_iterator itObj = listIsoTauJet.begin(); itObj
1185  != listIsoTauJet.end(); ++itObj) {
1186 
1188  l1IsoTauJet, *itObj));
1189 
1190  }
1191  }
1192  }
1193 
1194  // energy sums
1195  if (!listETM.empty()) {
1197  iEvent.getByToken(m_l1EtMissMETToken, l1EnergySums);
1198 
1199  if (!l1EnergySums.isValid()) {
1200  edm::LogWarning("HLTLevel1GTSeed")
1201  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMETTag
1202  << "\nrequested in configuration, but not found in the event."
1203  << "\nNo ETM added to filterproduct." << std::endl;
1204  } else if (l1EnergySums->empty()) {
1205  edm::LogWarning("HLTLevel1GTSeed")
1206  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMETTag
1207  << "\nfound in the event but with 0 size." << "\nNo ETM added to filterproduct."
1208  << std::endl;
1209 
1210  } else {
1211 
1212  for (std::list<int>::const_iterator itObj = listETM.begin(); itObj != listETM.end(); ++itObj) {
1213 
1215  l1EnergySums, *itObj));
1216 
1217  }
1218 
1219  }
1220 
1221  }
1222 
1223  if (!listETT.empty()) {
1225  iEvent.getByToken(m_l1EtMissMETToken, l1EnergySums);
1226 
1227  if (!l1EnergySums.isValid()) {
1228  edm::LogWarning("HLTLevel1GTSeed")
1229  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMETTag
1230  << "\nrequested in configuration, but not found in the event."
1231  << "\nNo ETT added to filterproduct." << std::endl;
1232  } else if (l1EnergySums->empty()) {
1233  edm::LogWarning("HLTLevel1GTSeed")
1234  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMETTag
1235  << "\nfound in the event but with 0 size." << "\nNo ETT added to filterproduct."
1236  << std::endl;
1237 
1238  } else {
1239 
1240  for (std::list<int>::const_iterator itObj = listETT.begin(); itObj != listETT.end(); ++itObj) {
1241 
1243  l1EnergySums, *itObj));
1244 
1245  }
1246 
1247  }
1248 
1249  }
1250 
1251  if (!listHTT.empty()) {
1253  iEvent.getByToken(m_l1EtMissMHTToken, l1EnergySums);
1254 
1255  if (!l1EnergySums.isValid()) {
1256  edm::LogWarning("HLTLevel1GTSeed")
1257  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMHTTag
1258  << "\nrequested in configuration, but not found in the event."
1259  << "\nNo HTT added to filterproduct." << std::endl;
1260 
1261  } else if (l1EnergySums->empty()) {
1262  edm::LogWarning("HLTLevel1GTSeed")
1263  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMHTTag
1264  << "\nfound in the event but with 0 size." << "\nNo HTT added to filterproduct."
1265  << std::endl;
1266 
1267  } else {
1268 
1269  for (std::list<int>::const_iterator itObj = listHTT.begin(); itObj != listHTT.end(); ++itObj) {
1270 
1272  l1EnergySums, *itObj));
1273 
1274  }
1275 
1276  }
1277  }
1278 
1279  if (!listHTM.empty()) {
1281  iEvent.getByToken(m_l1EtMissMHTToken, l1EnergySums);
1282 
1283  if (!l1EnergySums.isValid()) {
1284  edm::LogWarning("HLTLevel1GTSeed")
1285  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMHTTag
1286  << "\nrequested in configuration, but not found in the event."
1287  << "\nNo HTM added to filterproduct." << std::endl;
1288 
1289  } else if (l1EnergySums->empty()) {
1290  edm::LogWarning("HLTLevel1GTSeed")
1291  << "\nWarning: L1EtMissParticleCollection with input tag " << m_l1EtMissMHTTag
1292  << "\nfound in the event but with 0 size." << "\nNo HTM added to filterproduct."
1293  << std::endl;
1294 
1295  } else {
1296 
1297  for (std::list<int>::const_iterator itObj = listHTM.begin(); itObj != listHTM.end(); ++itObj) {
1298 
1300  l1EnergySums, *itObj));
1301 
1302  }
1303  }
1304  }
1305 
1306  // TODO FIXME uncomment if block when JetCounts implemented
1307 
1308  // // jet counts
1309  // if (!listJetCounts.empty()) {
1310  // edm::Handle<l1extra::L1JetCounts> l1JetCounts;
1311  // iEvent.getByToken(m_l1CollectionsToken.label(), l1JetCounts);
1312  //
1313  // for (std::list<int>::const_iterator itObj = listJetCounts.begin();
1314  // itObj != listJetCounts.end(); ++itObj) {
1315  //
1316  // filterproduct.addObject(trigger::TriggerL1JetCounts,l1extra::L1JetCountsRefProd(l1JetCounts));
1317  // // FIXME: RefProd!
1318  //
1319  // }
1320  //
1321  // }
1322 
1323  return seedsResult;
1324 
1325 }
#define LogDebug(id)
Definition: L1GtObject.h:39
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
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
edm::InputTag m_l1IsoTauJetTag
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<C>)
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_l1IsoTauJetToken
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:74
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
const L1GlobalTriggerObjectMap * getObjectMap(const std::string &algoNameVal) const
return the object map for the algorithm algoNameVal
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(), Exception, L1GtTriggerMenu::gtTriggerMenuName(), mps_fire::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 (auto & i : algOpTokenVector) {
420 
421  auto itAlgo = algorithmMap.find(i.tokenName);
422  if (itAlgo != algorithmMap.end()) {
423 
424  int bitNr = (itAlgo->second).algoBitNumber();
425  int chipNr = (itAlgo->second).algoChipNumber();
426 
427  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  == 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  << 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
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
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(), mps_fire::i, m_isDebugEnabled, m_l1AlgoLogicParser, m_l1AlgoSeeds, and L1GtLogicParser::operandTokenVector().

496  {
497 
498  std::vector<L1GtLogicParser::OperandToken>& algOpTokenVector =
500 
501  for (auto & i : algOpTokenVector) {
502  int iBit = 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  i.tokenResult = iResult;
521 
522  }
523 
524  for (auto & m_l1AlgoSeed : m_l1AlgoSeeds) {
525  int iBit = m_l1AlgoSeed.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_l1AlgoSeed.tokenResult = iResult;
544 
545  }
546 
547  if (m_isDebugEnabled) {
548  bool newMenu = false;
549  debugPrint(newMenu);
550  }
551 
552 }
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 187 of file HLTLevel1GTSeed.h.

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

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

Definition at line 188 of file HLTLevel1GTSeed.h.

Referenced by seedsL1Extra(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTLevel1GTSeed::m_l1EtMissMHTTag
private

Definition at line 189 of file HLTLevel1GTSeed.h.

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

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

Definition at line 190 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 193 of file HLTLevel1GTSeed.h.

Referenced by hltFilter(), and HLTLevel1GTSeed().

const L1GtTriggerMenu* HLTLevel1GTSeed::m_l1GtMenu
private

trigger menu

Definition at line 115 of file HLTLevel1GTSeed.h.

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

unsigned long long HLTLevel1GTSeed::m_l1GtMenuCacheID
private

Definition at line 116 of file HLTLevel1GTSeed.h.

Referenced by hltFilter().

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_l1IsoTauJetTag
private

Definition at line 185 of file HLTLevel1GTSeed.h.

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

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

Definition at line 186 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().