CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HLTL1TSeed Class Reference

#include <HLTL1TSeed.h>

Inheritance diagram for HLTL1TSeed:
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...
 
 HLTL1TSeed (const edm::ParameterSet &)
 constructor More...
 
 ~HLTL1TSeed () 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 dumpTriggerFilterObjectWithRefs (trigger::TriggerFilterObjectWithRefs &) const
 detailed print of filter content More...
 
bool seedsL1TriggerObjectMaps (edm::Event &, trigger::TriggerFilterObjectWithRefs &)
 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...
 
GlobalLogicParser m_l1AlgoLogicParser
 logic parser for m_l1SeedsLogicalExpression More...
 
std::vector< GlobalLogicParser::OperandTokenm_l1AlgoSeeds
 list of required algorithms for seeding More...
 
std::vector< std::vector< const std::vector< l1t::GlobalObject > * > > m_l1AlgoSeedsObjType
 vector of object-type vectors for each condition in the required algorithms for seeding More...
 
std::vector< const std::vector< GlobalLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
 vector of Rpn vectors for the required algorithms for seeding More...
 
edm::InputTag m_l1EGammaCollectionsTag
 Meta InputTag for L1 Egamma collection. More...
 
edm::InputTag m_l1EGammaTag
 
edm::EDGetTokenT< l1t::EGammaBxCollectionm_l1EGammaToken
 
edm::InputTag m_l1EtSumCollectionsTag
 Meta InputTag for L1 Egamma collection. More...
 
edm::InputTag m_l1EtSumTag
 
edm::EDGetTokenT< l1t::EtSumBxCollectionm_l1EtSumToken
 
bool m_l1GlobalDecision
 flag to pass if L1TGlobal accept More...
 
edm::InputTag m_l1GlobalTag
 InputTag for L1 Global Trigger. More...
 
edm::EDGetTokenT< GlobalAlgBlkBxCollectionm_l1GlobalToken
 
edm::InputTag m_l1GtObjectMapTag
 InputTag for L1 Global Trigger object maps. This is done per menu. Should be part of Run. More...
 
edm::EDGetTokenT< GlobalObjectMapRecordm_l1GtObjectMapToken
 
edm::InputTag m_l1JetCollectionsTag
 Meta InputTag for L1 Egamma collection. More...
 
edm::InputTag m_l1JetTag
 
edm::EDGetTokenT< l1t::JetBxCollectionm_l1JetToken
 
edm::InputTag m_l1MuonCollectionsTag
 Meta InputTag for L1 Muon collection. More...
 
edm::InputTag m_l1MuonTag
 
edm::EDGetTokenT< l1t::MuonBxCollectionm_l1MuonToken
 
int m_l1NrBxInEvent
 
std::string m_l1SeedsLogicalExpression
 
edm::InputTag m_l1TauCollectionsTag
 Meta InputTag for L1 Egamma collection. More...
 
edm::InputTag m_l1TauTag
 
edm::EDGetTokenT< l1t::TauBxCollectionm_l1TauToken
 

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:

Definition at line 46 of file HLTL1TSeed.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 33 of file HLTL1TSeed.cc.

References Exception, GlobalLogicParser::expressionSeedsOperandList(), m_l1AlgoLogicParser, m_l1AlgoSeeds, m_l1AlgoSeedsObjType, m_l1AlgoSeedsRpn, m_l1GlobalDecision, m_l1SeedsLogicalExpression, GlobalLogicParser::operandTokenVector(), and findQualityFiles::size.

33  :
34  HLTStreamFilter(parSet),
35  //useObjectMaps_(parSet.getParameter<bool>("L1UseL1TriggerObjectMaps")),
36  m_l1SeedsLogicalExpression(parSet.getParameter<string>("L1SeedsLogicalExpression")),
37  m_l1GtObjectMapTag(parSet.getParameter<edm::InputTag> ("L1ObjectMapInputTag")),
38  m_l1GtObjectMapToken(consumes<GlobalObjectMapRecord>(m_l1GtObjectMapTag)),
39  m_l1GlobalTag(parSet.getParameter<edm::InputTag> ("L1GlobalInputTag")),
40  m_l1GlobalToken(consumes<GlobalAlgBlkBxCollection>(m_l1GlobalTag)),
41  m_l1MuonCollectionsTag(parSet.getParameter<edm::InputTag>("L1MuonInputTag")), // FIX WHEN UNPACKERS ADDED
43  m_l1MuonToken(consumes<l1t::MuonBxCollection>(m_l1MuonTag)),
44  m_l1EGammaCollectionsTag(parSet.getParameter<edm::InputTag>("L1EGammaInputTag")), // FIX WHEN UNPACKERS ADDED
46  m_l1EGammaToken(consumes<l1t::EGammaBxCollection>(m_l1EGammaTag)),
47  m_l1JetCollectionsTag(parSet.getParameter<edm::InputTag>("L1JetInputTag")), // FIX WHEN UNPACKERS ADDED
49  m_l1JetToken(consumes<l1t::JetBxCollection>(m_l1JetTag)),
50  m_l1TauCollectionsTag(parSet.getParameter<edm::InputTag>("L1TauInputTag")), // FIX WHEN UNPACKERS ADDED
52  m_l1TauToken(consumes<l1t::TauBxCollection>(m_l1TauTag)),
53  m_l1EtSumCollectionsTag(parSet.getParameter<edm::InputTag>("L1EtSumInputTag")), // FIX WHEN UNPACKERS ADDED
55  m_l1EtSumToken(consumes<l1t::EtSumBxCollection>(m_l1EtSumTag)),
56  m_l1GlobalDecision(false),
58 {
59 
60  if (m_l1SeedsLogicalExpression == "") {
61 
62  throw cms::Exception("FailModule") << "\nTrying to seed with an empty L1SeedsLogicalExpression.\n" << std::endl;
63 
64  }
65  else if (m_l1SeedsLogicalExpression != "L1GlobalDecision") {
66 
67  // check also the logical expression - add/remove spaces if needed
69 
70  // list of required algorithms for seeding
71  // dummy values for tokenNumber and tokenResult
74  size_t l1AlgoSeedsSize = m_l1AlgoSeeds.size();
75 
76  m_l1AlgoSeedsRpn.reserve(l1AlgoSeedsSize);
77  m_l1AlgoSeedsObjType.reserve(l1AlgoSeedsSize);
78 
79  }
80  else {
81 
82  m_l1GlobalDecision = true;
83 
84  }
85 
86 }
size
Write out results.
std::string m_l1SeedsLogicalExpression
Definition: HLTL1TSeed.h:104
T getParameter(std::string const &) const
bool isDebugEnabled()
edm::EDGetTokenT< l1t::EtSumBxCollection > m_l1EtSumToken
Definition: HLTL1TSeed.h:138
std::vector< std::vector< const std::vector< l1t::GlobalObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
Definition: HLTL1TSeed.h:93
edm::InputTag m_l1MuonTag
Definition: HLTL1TSeed.h:117
edm::InputTag m_l1EGammaCollectionsTag
Meta InputTag for L1 Egamma collection.
Definition: HLTL1TSeed.h:121
edm::InputTag m_l1JetCollectionsTag
Meta InputTag for L1 Egamma collection.
Definition: HLTL1TSeed.h:126
std::vector< GlobalLogicParser::OperandToken > expressionSeedsOperandList()
edm::InputTag m_l1JetTag
Definition: HLTL1TSeed.h:127
edm::InputTag m_l1GtObjectMapTag
InputTag for L1 Global Trigger object maps. This is done per menu. Should be part of Run...
Definition: HLTL1TSeed.h:107
edm::EDGetTokenT< l1t::JetBxCollection > m_l1JetToken
Definition: HLTL1TSeed.h:128
HLTStreamFilter(const edm::ParameterSet &config)
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
GlobalLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
Definition: HLTL1TSeed.h:84
edm::EDGetTokenT< l1t::EGammaBxCollection > m_l1EGammaToken
Definition: HLTL1TSeed.h:123
edm::InputTag m_l1EtSumTag
Definition: HLTL1TSeed.h:137
std::vector< const std::vector< GlobalLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
Definition: HLTL1TSeed.h:90
edm::InputTag m_l1TauTag
Definition: HLTL1TSeed.h:132
edm::InputTag m_l1EtSumCollectionsTag
Meta InputTag for L1 Egamma collection.
Definition: HLTL1TSeed.h:136
edm::InputTag m_l1TauCollectionsTag
Meta InputTag for L1 Egamma collection.
Definition: HLTL1TSeed.h:131
bool m_isDebugEnabled
cache edm::isDebugEnabled()
Definition: HLTL1TSeed.h:144
std::vector< GlobalLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
Definition: HLTL1TSeed.h:87
edm::InputTag m_l1EGammaTag
Definition: HLTL1TSeed.h:122
edm::InputTag m_l1GlobalTag
InputTag for L1 Global Trigger.
Definition: HLTL1TSeed.h:111
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1GlobalToken
Definition: HLTL1TSeed.h:112
edm::InputTag m_l1MuonCollectionsTag
Meta InputTag for L1 Muon collection.
Definition: HLTL1TSeed.h:116
bool m_l1GlobalDecision
flag to pass if L1TGlobal accept
Definition: HLTL1TSeed.h:141
edm::EDGetTokenT< l1t::MuonBxCollection > m_l1MuonToken
Definition: HLTL1TSeed.h:118
edm::EDGetTokenT< l1t::TauBxCollection > m_l1TauToken
Definition: HLTL1TSeed.h:133
edm::EDGetTokenT< GlobalObjectMapRecord > m_l1GtObjectMapToken
Definition: HLTL1TSeed.h:108
HLTL1TSeed::~HLTL1TSeed ( )
override

destructor

Definition at line 89 of file HLTL1TSeed.cc.

89  {
90  // empty now
91 }

Member Function Documentation

void HLTL1TSeed::dumpTriggerFilterObjectWithRefs ( trigger::TriggerFilterObjectWithRefs filterproduct) const
private

detailed print of filter content

Definition at line 153 of file HLTL1TSeed.cc.

References trigger::TriggerRefsCollections::getObjects(), mps_fire::i, LogTrace, m_l1SeedsLogicalExpression, GetRecoTauVFromDQM_MC_cff::obj, trigger::TriggerL1EG, trigger::TriggerL1ETM, trigger::TriggerL1ETMHF, trigger::TriggerL1ETT, trigger::TriggerL1HTM, trigger::TriggerL1HTT, trigger::TriggerL1Jet, trigger::TriggerL1Mu, and trigger::TriggerL1Tau.

Referenced by hltFilter().

154 {
155 
156  LogTrace("HLTL1TSeed")
157  << "\nHLTL1TSeed::hltFilter "
158  << "\n Dump TriggerFilterObjectWithRefs\n" << endl;
159 
160  vector<l1t::MuonRef> seedsL1Mu;
161  filterproduct.getObjects(trigger::TriggerL1Mu, seedsL1Mu);
162  const size_t sizeSeedsL1Mu = seedsL1Mu.size();
163 
164  LogTrace("HLTL1TSeed")
165  << "\n HLTL1TSeed: seed logical expression = " << m_l1SeedsLogicalExpression << endl;
166 
167  LogTrace("HLTL1TSeed")
168  << "\n L1Mu seeds: " << sizeSeedsL1Mu << endl << endl;
169 
170  for (size_t i = 0; i != sizeSeedsL1Mu; i++) {
171 
172 
173  l1t::MuonRef obj = l1t::MuonRef( seedsL1Mu[i]);
174 
175  LogTrace("HLTL1TSeed")
176  << "\tL1Mu " << "\t" << "q = " << obj->hwCharge() // TEMP get hwCharge insead of charge which is not yet set NEED FIX.
177  << "\t" << "pt = " << obj->pt() << "\t" << "eta = " << obj->eta()
178  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
179  }
180 
181  vector<l1t::EGammaRef> seedsL1EG;
182  filterproduct.getObjects(trigger::TriggerL1EG, seedsL1EG);
183  const size_t sizeSeedsL1EG = seedsL1EG.size();
184 
185  LogTrace("HLTL1TSeed")
186  << "\n L1EG seeds: " << sizeSeedsL1EG << endl << endl;
187 
188  for (size_t i = 0; i != sizeSeedsL1EG; i++) {
189 
190 
191  l1t::EGammaRef obj = l1t::EGammaRef( seedsL1EG[i]);
192 
193  LogTrace("HLTL1TSeed")
194  << "\tL1EG " << "\t" << "pt = "
195  << obj->pt() << "\t" << "eta = " << obj->eta()
196  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
197  }
198 
199  vector<l1t::JetRef> seedsL1Jet;
200  filterproduct.getObjects(trigger::TriggerL1Jet, seedsL1Jet);
201  const size_t sizeSeedsL1Jet = seedsL1Jet.size();
202 
203  LogTrace("HLTL1TSeed")
204  << "\n L1Jet seeds: " << sizeSeedsL1Jet << endl << endl;
205 
206  for (size_t i = 0; i != sizeSeedsL1Jet; i++) {
207 
208 
209  l1t::JetRef obj = l1t::JetRef( seedsL1Jet[i]);
210 
211  LogTrace("HLTL1TSeed") << "\tL1Jet " << "\t" << "pt = "
212  << obj->pt() << "\t" << "eta = " << obj->eta()
213  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
214  }
215 
216  vector<l1t::TauRef> seedsL1Tau;
217  filterproduct.getObjects(trigger::TriggerL1Tau, seedsL1Tau);
218  const size_t sizeSeedsL1Tau = seedsL1Tau.size();
219 
220  LogTrace("HLTL1TSeed")
221  << "\n L1Tau seeds: " << sizeSeedsL1Tau << endl << endl;
222 
223  for (size_t i = 0; i != sizeSeedsL1Tau; i++) {
224 
225 
226  l1t::TauRef obj = l1t::TauRef( seedsL1Tau[i]);
227 
228  LogTrace("HLTL1TSeed")
229  << "\tL1Tau " << "\t" << "pt = "
230  << obj->pt() << "\t" << "eta = " << obj->eta()
231  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
232  }
233 
234  vector<l1t::EtSumRef> seedsL1EtSumETT;
235  filterproduct.getObjects(trigger::TriggerL1ETT, seedsL1EtSumETT);
236  const size_t sizeSeedsL1EtSumETT = seedsL1EtSumETT.size();
237  LogTrace("HLTL1TSeed")
238  << "\n L1EtSum ETT seeds: " << sizeSeedsL1EtSumETT << endl << endl;
239 
240  for (size_t i = 0; i != sizeSeedsL1EtSumETT; i++) {
241  l1t::EtSumRef obj = l1t::EtSumRef( seedsL1EtSumETT[i]);
242 
243  LogTrace("HLTL1TSeed")
244  << "\tL1EtSum ETT" << "\t" << "pt = "
245  << obj->pt() << "\t" << "eta = " << obj->eta()
246  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
247  }
248 
249  vector<l1t::EtSumRef> seedsL1EtSumHTT;
250  filterproduct.getObjects(trigger::TriggerL1HTT, seedsL1EtSumHTT);
251  const size_t sizeSeedsL1EtSumHTT = seedsL1EtSumHTT.size();
252  LogTrace("HLTL1TSeed")
253  << "\n L1EtSum HTT seeds: " << sizeSeedsL1EtSumHTT << endl << endl;
254 
255  for (size_t i = 0; i != sizeSeedsL1EtSumHTT; i++) {
256  l1t::EtSumRef obj = l1t::EtSumRef( seedsL1EtSumHTT[i]);
257 
258  LogTrace("HLTL1TSeed")
259  << "\tL1EtSum HTT" << "\t" << "pt = "
260  << obj->pt() << "\t" << "eta = " << obj->eta()
261  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
262  }
263 
264  vector<l1t::EtSumRef> seedsL1EtSumETM;
265  filterproduct.getObjects(trigger::TriggerL1ETM, seedsL1EtSumETM);
266  const size_t sizeSeedsL1EtSumETM = seedsL1EtSumETM.size();
267  LogTrace("HLTL1TSeed")
268  << "\n L1EtSum ETM seeds: " << sizeSeedsL1EtSumETM << endl << endl;
269 
270  for (size_t i = 0; i != sizeSeedsL1EtSumETM; i++) {
271  l1t::EtSumRef obj = l1t::EtSumRef( seedsL1EtSumETM[i]);
272 
273  LogTrace("HLTL1TSeed")
274  << "\tL1EtSum ETM" << "\t" << "pt = "
275  << obj->pt() << "\t" << "eta = " << obj->eta()
276  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
277  }
278 
279  vector<l1t::EtSumRef> seedsL1EtSumETMHF;
280  filterproduct.getObjects(trigger::TriggerL1ETMHF, seedsL1EtSumETMHF);
281  const size_t sizeSeedsL1EtSumETMHF = seedsL1EtSumETMHF.size();
282  LogTrace("HLTL1TSeed")
283  << "\n L1EtSum ETMHF seeds: " << sizeSeedsL1EtSumETMHF << endl << endl;
284 
285  for (size_t i = 0; i != sizeSeedsL1EtSumETMHF; i++) {
286  l1t::EtSumRef obj = l1t::EtSumRef( seedsL1EtSumETMHF[i]);
287 
288  LogTrace("HLTL1TSeed")
289  << "\tL1EtSum ETMHF" << "\t" << "pt = "
290  << obj->pt() << "\t" << "eta = " << obj->eta()
291  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
292  }
293 
294  vector<l1t::EtSumRef> seedsL1EtSumHTM;
295  filterproduct.getObjects(trigger::TriggerL1HTM, seedsL1EtSumHTM);
296  const size_t sizeSeedsL1EtSumHTM = seedsL1EtSumHTM.size();
297  LogTrace("HLTL1TSeed")
298  << "\n L1EtSum HTM seeds: " << sizeSeedsL1EtSumHTM << endl << endl;
299 
300  for (size_t i = 0; i != sizeSeedsL1EtSumHTM; i++) {
301  l1t::EtSumRef obj = l1t::EtSumRef( seedsL1EtSumHTM[i]);
302 
303  LogTrace("HLTL1TSeed")
304  << "\tL1EtSum HTM" << "\t" << "pt = "
305  << obj->pt() << "\t" << "eta = " << obj->eta()
306  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
307  }
308 
309  LogTrace("HLTL1TSeed") << " \n\n" << endl;
310 
311 }
std::string m_l1SeedsLogicalExpression
Definition: HLTL1TSeed.h:104
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
edm::Ref< TauBxCollection > TauRef
Definition: Tau.h:13
edm::Ref< EGammaBxCollection > EGammaRef
Definition: EGamma.h:13
enum start value shifted to 81 so as to avoid clashes with PDG codes
edm::Ref< MuonBxCollection > MuonRef
Definition: Muon.h:13
edm::Ref< JetBxCollection > JetRef
Definition: Jet.h:13
#define LogTrace(id)
edm::Ref< EtSumBxCollection > EtSumRef
Definition: EtSum.h:13
void HLTL1TSeed::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

parameter description

Definition at line 96 of file HLTL1TSeed.cc.

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

96  {
99 
100 
101  // # logical expression for the required L1 algorithms;
102  // # the algorithms are specified by name
103  // # allowed operators: "AND", "OR", "NOT", "(", ")"
104  // #
105  // # by convention, "L1GlobalDecision" logical expression means global decision
106  desc.add<string>("L1SeedsLogicalExpression","");
107  desc.add<edm::InputTag>("L1ObjectMapInputTag",edm::InputTag("hltGtStage2ObjectMap"));
108  desc.add<edm::InputTag>("L1GlobalInputTag",edm::InputTag("hltGtStage2Digis"));
109  desc.add<edm::InputTag>("L1MuonInputTag",edm::InputTag("hltGmtStage2Digis:Muon"));
110  desc.add<edm::InputTag>("L1EGammaInputTag",edm::InputTag("hltCaloStage2Digis:EGamma"));
111  desc.add<edm::InputTag>("L1JetInputTag",edm::InputTag("hltCaloStage2Digis:Jet"));
112  desc.add<edm::InputTag>("L1TauInputTag",edm::InputTag("hltCaloStage2Digis:Tau"));
113  desc.add<edm::InputTag>("L1EtSumInputTag",edm::InputTag("hltCaloStage2Digis:EtSum"));
114  descriptions.add("hltL1TSeed", desc);
115 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
bool HLTL1TSeed::hltFilter ( edm::Event iEvent,
const edm::EventSetup evSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
)
overridevirtual

filter the event

Implements HLTStreamFilter.

Definition at line 117 of file HLTL1TSeed.cc.

References trigger::TriggerFilterObjectWithRefs::addCollectionTag(), dumpTriggerFilterObjectWithRefs(), m_isDebugEnabled, m_l1EGammaTag, m_l1EtSumTag, m_l1JetTag, m_l1MuonTag, m_l1TauTag, HLTStreamFilter::saveTags(), and seedsL1TriggerObjectMaps().

117  {
118 
119  bool rc = false;
120 
121  // the filter object
122  if (saveTags()) {
123 
124  // muons
125  filterproduct.addCollectionTag(m_l1MuonTag);
126 
127  // egamma
128  filterproduct.addCollectionTag(m_l1EGammaTag);
129 
130  // jet
131  filterproduct.addCollectionTag(m_l1JetTag);
132 
133  // tau
134  filterproduct.addCollectionTag(m_l1TauTag);
135 
136  // etsum
137  filterproduct.addCollectionTag(m_l1EtSumTag);
138  }
139 
140  // Get all the seeding from iEvent (i.e. L1TriggerObjectMapRecord)
141  //
142  rc = seedsL1TriggerObjectMaps(iEvent, filterproduct);
143 
144  if (m_isDebugEnabled) {
145  dumpTriggerFilterObjectWithRefs(filterproduct);
146  }
147 
148  return rc;
149 
150 }
edm::InputTag m_l1MuonTag
Definition: HLTL1TSeed.h:117
bool seedsL1TriggerObjectMaps(edm::Event &, trigger::TriggerFilterObjectWithRefs &)
seeding is done via L1 trigger object maps, considering the objects which fired in L1 ...
Definition: HLTL1TSeed.cc:314
edm::InputTag m_l1JetTag
Definition: HLTL1TSeed.h:127
edm::InputTag m_l1EtSumTag
Definition: HLTL1TSeed.h:137
edm::InputTag m_l1TauTag
Definition: HLTL1TSeed.h:132
bool m_isDebugEnabled
cache edm::isDebugEnabled()
Definition: HLTL1TSeed.h:144
edm::InputTag m_l1EGammaTag
Definition: HLTL1TSeed.h:122
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void dumpTriggerFilterObjectWithRefs(trigger::TriggerFilterObjectWithRefs &) const
detailed print of filter content
Definition: HLTL1TSeed.cc:153
bool saveTags() const
bool HLTL1TSeed::seedsL1TriggerObjectMaps ( edm::Event iEvent,
trigger::TriggerFilterObjectWithRefs filterproduct 
)
private

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

Loop over the list of required algorithms for seeding /////////////////////////////////////////////////////

Unpacked GT result of algorithm is false after masks and prescales - no seeds ////////////////////////////////////////////////////////////////////////////////

Emulated GT result of algorithm is false - no seeds - but still save the event

Definition at line 314 of file HLTL1TSeed.cc.

References trigger::TriggerRefsCollections::addObject(), GlobalObjectMap::algoBitNumber(), GlobalObjectMap::algoGtlResult(), HIPAlignmentAlgorithm_cfi::algoName, GlobalObjectMap::algoName(), BXVector< T >::at(), BXVector< T >::begin(), GlobalObjectMap::combinationVector(), DEFINE_FWK_MODULE, SoftLeptonByDistance_cfi::distance, BXVector< T >::end(), Exception, GlobalLogicParser::expressionResult(), GlobalAlgBlk::getAlgoDecisionFinal(), edm::Event::getByToken(), GlobalObjectMap::getCombinationsInCond(), GlobalObjectMapRecord::getObjectMap(), l1t::gtEG, l1t::gtETM, l1t::gtETMHF, l1t::gtETT, l1t::gtHTM, l1t::gtHTT, l1t::gtJet, l1t::gtMu, GlobalObjectMapRecord::gtObjectMap(), l1t::gtTau, mps_fire::i, edm::HandleBase::isValid(), fwrapper::jets, BXVector< T >::key(), l1t::EtSum::kMissingEt, l1t::EtSum::kMissingEtHF, l1t::EtSum::kMissingHt, l1t::EtSum::kTotalEt, l1t::EtSum::kTotalHt, LogTrace, m_isDebugEnabled, m_l1AlgoLogicParser, m_l1AlgoSeeds, m_l1EGammaTag, m_l1EGammaToken, m_l1EtSumTag, m_l1EtSumToken, m_l1GlobalDecision, m_l1GlobalTag, m_l1GlobalToken, m_l1GtObjectMapTag, m_l1GtObjectMapToken, m_l1JetTag, m_l1JetToken, m_l1MuonTag, m_l1MuonToken, m_l1SeedsLogicalExpression, m_l1TauTag, m_l1TauToken, extraflags_cff::muons, GlobalObjectMap::objectTypeVector(), GlobalObjectMap::operandTokenVector(), GlobalLogicParser::operandTokenVector(), BXVector< T >::size(), AlCaHLTBitMon_QueryRunRegistry::string, nano_cff::taus, trigger::TriggerL1EG, trigger::TriggerL1ETM, trigger::TriggerL1ETMHF, trigger::TriggerL1ETT, trigger::TriggerL1HTM, trigger::TriggerL1HTT, trigger::TriggerL1Jet, trigger::TriggerL1Mu, and trigger::TriggerL1Tau.

Referenced by hltFilter().

316  {
317 
318  // Two GT objects are obtained from the Event: (1) the unpacked GT and (2) the emulated GT.
319  // Return value of the function is the score of seeding logical expression, evaluated using (1).
320  // Seeding is performed (per l1_algo) if ACCEPT both in (1) and (2). Seed objects are identified
321  // and only available from ObjectMaps created in (2).
322 
323 
324  // define index lists for all particle types
325 
326  std::list<int> listMuon;
327 
328  std::list<int> listEG;
329 
330  std::list<int> listJet;
331  std::list<int> listTau;
332 
333  std::list<int> listETM;
334  std::list<int> listETT;
335  std::list<int> listHTT;
336  std::list<int> listHTM;
337  std::list<int> listETMHF;
338 
339  std::list<int> listJetCounts;
340 
341  // get handle to unpacked GT
343  iEvent.getByToken(m_l1GlobalToken, uGtAlgoBlocks);
344 
345  if (!uGtAlgoBlocks.isValid()) {
346 
347  edm::LogWarning("HLTL1TSeed")
348  << " Warning: GlobalAlgBlkBxCollection with input tag "
349  << m_l1GlobalTag
350  << " requested in configuration, but not found in the event." << std::endl;
351 
352  return false;
353  }
354 
355  // check size
356  if(uGtAlgoBlocks->size() == 0) {
357 
358  edm::LogWarning("HLTL1TSeed")
359  << " Warning: GlobalAlgBlkBxCollection with input tag "
360  << m_l1GlobalTag
361  << " is empty." << std::endl;
362 
363  return false;
364  }
365 
366  // get handle to object maps from emulator (one object map per algorithm)
367  edm::Handle<GlobalObjectMapRecord> gtObjectMapRecord;
368  iEvent.getByToken(m_l1GtObjectMapToken, gtObjectMapRecord);
369 
370  if (!gtObjectMapRecord.isValid()) {
371 
372  edm::LogWarning("HLTL1TSeed")
373  << " Warning: GlobalObjectMapRecord with input tag "
375  << " requested in configuration, but not found in the event." << std::endl;
376 
377  return false;
378  }
379 
380  if (m_isDebugEnabled) {
381 
382  const std::vector<GlobalObjectMap>& objMaps = gtObjectMapRecord->gtObjectMap();
383 
384  LogTrace("HLTL1TSeed")
385  << "\nHLTL1Seed"
386  << "\n---------------------------------------------------------------------------------------------------------------------";
387 
388  LogTrace("HLTL1TSeed")
389  << "\n\tAlgorithms in L1TriggerObjectMapRecord and GT results ( emulated | initial | prescaled | final ) " << endl;
390 
391  LogTrace("HLTL1TSeed")
392  << "\n\tmap" <<"\tAlgoBit" << std::setw(40) << "algoName" << "\t (emul|ini|pre|fin)" << endl;
393 
394  LogTrace("HLTL1TSeed")
395  << "---------------------------------------------------------------------------------------------------------------------";
396 
397  for (size_t imap =0; imap < objMaps.size(); imap++) {
398 
399  int bit = objMaps[imap].algoBitNumber(); // same as bit from L1T Menu
400 
401  int emulDecision = objMaps[imap].algoGtlResult();
402 
403  // For bx=0 , get 0th AlgoBlock, so in BXvector at(bx=0,i=0)
404  int initDecision = (uGtAlgoBlocks->at(0,0)).getAlgoDecisionInitial(bit);
405  int presDecision = (uGtAlgoBlocks->at(0,0)).getAlgoDecisionInterm(bit);
406  int finlDecision = (uGtAlgoBlocks->at(0,0)).getAlgoDecisionFinal(bit);
407 
408  if(emulDecision != initDecision) {
409 
410  LogTrace("HLTL1TSeed")
411  << "L1T decision (emulated vs. unpacked initial) is not the same:"
412  << "\n\tbit = " << std::setw(3) << bit
413  << std::setw(40) << objMaps[imap].algoName()
414  << "\t emulated decision = " << emulDecision << "\t unpacked initial decision = " << initDecision
415  << "\nThis should not happen. Include the L1TGtEmulCompare module in the sequence."<< endl;
416 
417  }
418 
419 
420  LogTrace("HLTL1TSeed")
421  << "\t" << std::setw(3) << imap
422  << "\tbit = " << std::setw(3) << bit
423  << std::setw(40) << objMaps[imap].algoName()
424  << "\t ( " << emulDecision << " | " << initDecision << " | " << presDecision << " | " << finlDecision << " ) ";
425 
426 
427  }
428  LogTrace("HLTL1TSeed") << endl;
429 
430  }
431 
432  // Filter decision in case of "L1GlobalDecision" logical expression.
433  // By convention, it means global decision.
434  // /////////////////////////////////////////////////////////////////
435  if (m_l1GlobalDecision) {
436 
437  // For bx=0 , get 0th AlgoBlock, so in BXvector at(bx=0,i=0)
438  return (uGtAlgoBlocks->at(0,0)).getFinalOR();
439 
440  }
441 
442 
443  // Update/Reset m_l1AlgoLogicParser by reseting token result
444  // /////////////////////////////////////////////////////////
445  std::vector<GlobalLogicParser::OperandToken>& algOpTokenVector =
447 
448  for (auto & i : algOpTokenVector) {
449 
450  // rest token result
451  //
452  i.tokenResult = false;
453 
454  }
455 
456  // Update m_l1AlgoLogicParser and store emulator results for algOpTokens
457  // /////////////////////////////////////////////////////////////////////
458  for (auto & i : algOpTokenVector) {
459 
460  std::string algoName = i.tokenName;
461 
462  const GlobalObjectMap* objMap = gtObjectMapRecord->getObjectMap(algoName);
463 
464  if(objMap == nullptr) {
465 
466  throw cms::Exception("FailModule") << "\nAlgorithm " << algoName
467  << ", requested as seed by a HLT path, cannot be matched to a L1 algo name in any GlobalObjectMap\n"
468  << "Please check if algorithm " << algoName << " is present in the L1 menu\n" << std::endl;
469 
470  }
471  else {
472 
473  //(algOpTokenVector[i]).tokenResult = objMap->algoGtlResult();
474 
475  int bit = objMap->algoBitNumber();
476  bool finalAlgoDecision = (uGtAlgoBlocks->at(0,0)).getAlgoDecisionFinal(bit);
477  i.tokenResult = finalAlgoDecision;
478 
479  }
480 
481  }
482 
483  // Filter decision
484  // ///////////////
485  bool seedsResult = m_l1AlgoLogicParser.expressionResult();
486 
487  if (m_isDebugEnabled ) {
488 
489  LogTrace("HLTL1TSeed")
490  << "\nHLTL1TSeed: l1SeedsLogicalExpression (names) = '" << m_l1SeedsLogicalExpression << "'"
491  << "\n Result for logical expression after update of algOpTokens: " << seedsResult << "\n"
492  << std::endl;
493  }
494 
497 
498  for (std::vector<GlobalLogicParser::OperandToken>::const_iterator
499  itSeed = m_l1AlgoSeeds.begin(); itSeed != m_l1AlgoSeeds.end(); ++itSeed) {
500 
501  std::string algoSeedName = (*itSeed).tokenName;
502 
503  LogTrace("HLTL1TSeed")
504  << "\n ---------------- algo seed name = " << algoSeedName << endl;
505 
506  const GlobalObjectMap* objMap = gtObjectMapRecord->getObjectMap(algoSeedName);
507 
508  if(objMap == nullptr) {
509 
510  // Should not get here
511  //
512  throw cms::Exception("FailModule") << "\nAlgorithm " << algoSeedName
513  << ", requested as seed by a HLT path, cannot be matched to a L1 algo name in any GlobalObjectMap\n"
514  << "Please check if algorithm " << algoSeedName << " is present in the L1 menu\n" << std::endl;
515 
516  }
517 
518  int algoSeedBitNumber = objMap->algoBitNumber();
519  bool algoSeedResult = objMap->algoGtlResult();
520 
521  // unpacked GT results: uGtAlgoBlock has decisions initial, prescaled, and final after masks
522  bool algoSeedResultMaskAndPresc = uGtAlgoBlocks->at(0,0).getAlgoDecisionFinal(algoSeedBitNumber);
523 
524  LogTrace("HLTL1TSeed")
525  << "\n\tAlgo seed " << algoSeedName << " result emulated | final = " << algoSeedResult << " | " << algoSeedResultMaskAndPresc << endl;
526 
529  if(!algoSeedResultMaskAndPresc) continue;
530 
532  // This should not happen if the emulated and unpacked GT are consistent
534  if(!algoSeedResult) continue;
535 
536  const std::vector<GlobalLogicParser::OperandToken>& opTokenVecObjMap = objMap->operandTokenVector();
537  const std::vector<L1TObjectTypeInCond>& condObjTypeVec = objMap->objectTypeVector();
538  const std::vector<CombinationsInCond>& condCombinations = objMap->combinationVector();
539 
540  LogTrace("HLTL1TSeed")
541  << "\n\talgoName =" << objMap->algoName()
542  << "\talgoBitNumber = " << algoSeedBitNumber
543  << "\talgoGtlResult = " << algoSeedResult << endl << endl;
544 
545 
546  if (opTokenVecObjMap.size() != condObjTypeVec.size() ) {
547  edm::LogWarning("HLTL1TSeed")
548  << "\nWarning: GlobalObjectMapRecord with input tag "
550  << "\nhas object map for bit number " << algoSeedBitNumber << " which contains different size vectors of operand tokens and of condition object types!" << std::endl;
551 
552  assert(opTokenVecObjMap.size() == condObjTypeVec.size());
553  }
554 
555  if (opTokenVecObjMap.size() != condCombinations.size()) {
556  edm::LogWarning("HLTL1TSeed")
557  << "\nWarning: GlobalObjectMapRecord with input tag "
559  << "\nhas object map for bit number " << algoSeedBitNumber << " which contains different size vectors of operand tokens and of condition object combinations!" << std::endl;
560 
561  assert(opTokenVecObjMap.size() == condCombinations.size());
562  }
563 
564  // operands are conditions of L1 algo
565  //
566  for (size_t condNumber = 0; condNumber < opTokenVecObjMap.size(); condNumber++) {
567 
568  std::vector<l1t::GlobalObject> condObjType = condObjTypeVec[condNumber];
569 
570  for (auto & jOb : condObjType) {
571 
572  LogTrace("HLTL1TSeed")
573  << setw(15) << "\tcondObjType = " << jOb << endl;
574 
575  }
576 
577  const std::string condName = opTokenVecObjMap[condNumber].tokenName;
578  bool condResult = opTokenVecObjMap[condNumber].tokenResult;
579 
580  // only procede for conditions that passed
581  //
582  if ( !condResult) {
583  continue;
584  }
585 
586  // loop over combinations for a given condition
587  //
588  const CombinationsInCond* condComb = objMap->getCombinationsInCond(condNumber);
589 
590  LogTrace("HLTL1TSeed")
591  << setw(15) << "\tcondCombinations = " << condComb->size() << endl;
592 
593  for (auto const & itComb : (*condComb)) {
594 
595  LogTrace("HLTL1TSeed")
596  << setw(15) << "\tnew combination" << endl;
597 
598  // loop over objects in a combination for a given condition
599  //
600  for (auto itObject = itComb.begin(); itObject != itComb.end(); itObject++) {
601 
602  // in case of object-less triggers (e.g. L1_ZeroBias) condObjType vector is empty, so don't seed!
603  //
604  if(condObjType.empty()) {
605 
606  LogTrace("HLTL1TSeed")
607  << "\talgoName = " << objMap->algoName() << " is object-less L1 algorithm, so do not attempt to store any objects to the list of seeds.\n"
608  << std::endl;
609  continue;
610 
611  }
612 
613  // the index of the object type is the same as the index of the object
614  size_t iType = std::distance(itComb.begin(), itObject);
615 
616  // get object type and push indices on the list
617  //
618  const l1t::GlobalObject objTypeVal = condObjType.at(iType);
619 
620  LogTrace("HLTL1TSeed")
621  << "\tAdd object of type " << objTypeVal << " and index " << (*itObject) << " to the seed list."
622  << std::endl;
623 
624 
625  // THESE OBJECT CASES ARE CURRENTLY MISSING:
626  //gtMinBias,
627  //gtExternal,
628  //ObjNull
629 
630  switch (objTypeVal) {
631  case l1t::gtMu: {
632  listMuon.push_back(*itObject);
633  }
634 
635  break;
636  case l1t::gtEG: {
637  listEG.push_back(*itObject);
638  }
639  break;
640  case l1t::gtJet: {
641  listJet.push_back(*itObject);
642  }
643  break;
644  case l1t::gtTau: {
645  listTau.push_back(*itObject);
646  }
647  break;
648  case l1t::gtETM: {
649  listETM.push_back(*itObject);
650  }
651  break;
652  case l1t::gtETT: {
653  listETT.push_back(*itObject);
654  }
655  break;
656  case l1t::gtHTT: {
657  listHTT.push_back(*itObject);
658  }
659  break;
660  case l1t::gtHTM: {
661  listHTM.push_back(*itObject);
662  }
663  break;
664  case l1t::gtETMHF: {
665  listETMHF.push_back(*itObject);
666  }
667  break;
668 
669  //case JetCounts: {
670  // listJetCounts.push_back(*itObject);
671  //}
672 
673  break;
674  default: {
675  // should not arrive here
676 
677  LogTrace("HLTL1TSeed")
678  << "\n HLTL1TSeed::hltFilter "
679  << "\n Unknown object of type " << objTypeVal
680  << " and index " << (*itObject) << " in the seed list."
681  << std::endl;
682  }
683  break;
684 
685  } // end switch objTypeVal
686 
687  } // end for itObj
688 
689  } // end for itComb
690 
691  } // end for condition
692 
693  } // end for itSeed
694 
695 
696  // eliminate duplicates
697 
698  listMuon.sort();
699  listMuon.unique();
700 
701  listEG.sort();
702  listEG.unique();
703 
704  listJet.sort();
705  listJet.unique();
706 
707  listTau.sort();
708  listTau.unique();
709 
710  listETM.sort();
711  listETM.unique();
712 
713  listETT.sort();
714  listETT.unique();
715 
716  listHTT.sort();
717  listHTT.unique();
718 
719  listHTM.sort();
720  listHTM.unique();
721 
722  listETMHF.sort();
723  listETMHF.unique();
724 
725  listJetCounts.sort();
726  listJetCounts.unique();
727 
728 
729  // record the L1 physics objects in the HLT filterproduct
730  // //////////////////////////////////////////////////////
731 
732  // Muon
733  if (!listMuon.empty()) {
734 
736  iEvent.getByToken(m_l1MuonToken, muons);
737 
738  if (!muons.isValid()){
739  edm::LogWarning("HLTL1TSeed")
740  << "\nWarning: L1MuonBxCollection with input tag "
741  << m_l1MuonTag
742  << "\nrequested in configuration, but not found in the event."
743  << "\nNo muons added to filterproduct."
744  << endl;
745  }
746  else {
747 
748  for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
749 
750 
751  // Transform to index for Bx = 0 to begin of BxVector
752  unsigned int index = muons->begin(0) - muons->begin() + *itObj;
753 
754  l1t::MuonRef myref(muons, index);
755  filterproduct.addObject(trigger::TriggerL1Mu, myref);
756 
757  }
758 
759  }
760 
761  }
762 
763  // EG (isolated)
764  if (!listEG.empty()) {
765 
767  iEvent.getByToken(m_l1EGammaToken, egammas);
768  if (!egammas.isValid()){
769  edm::LogWarning("HLTL1TSeed")
770  << "\nWarning: L1EGammaBxCollection with input tag " << m_l1EGammaTag
771  << "\nrequested in configuration, but not found in the event."
772  << "\nNo egammas added to filterproduct."
773  << endl;
774  }
775  else {
776 
777  for (std::list<int>::const_iterator itObj = listEG.begin(); itObj != listEG.end(); ++itObj) {
778 
779  // Transform to begin of BxVector
780  unsigned int index = egammas->begin(0) - egammas->begin() + *itObj;
781 
782  l1t::EGammaRef myref(egammas, index);
783  filterproduct.addObject(trigger::TriggerL1EG, myref);
784 
785  }
786 
787  }
788 
789  }
790 
791  // Jet
792  if (!listJet.empty()) {
793 
795  iEvent.getByToken(m_l1JetToken, jets);
796 
797  if (!jets.isValid()){
798  edm::LogWarning("HLTL1TSeed")
799  << "\nWarning: L1JetBxCollection with input tag " << m_l1JetTag
800  << "\nrequested in configuration, but not found in the event."
801  << "\nNo jets added to filterproduct."
802  << endl;
803  }
804  else {
805 
806  for (std::list<int>::const_iterator itObj = listJet.begin(); itObj != listJet.end(); ++itObj) {
807 
808  // Transform to begin of BxVector
809  unsigned int index = jets->begin(0) - jets->begin() + *itObj;
810 
811  l1t::JetRef myref(jets, index);
812  filterproduct.addObject(trigger::TriggerL1Jet, myref);
813 
814  }
815 
816  }
817 
818  }
819 
820  // Tau
821  if (!listTau.empty()) {
822 
824  iEvent.getByToken(m_l1TauToken, taus);
825 
826  if (!taus.isValid()){
827  edm::LogWarning("HLTL1TSeed")
828  << "\nWarning: L1TauBxCollection with input tag " << m_l1TauTag
829  << "\nrequested in configuration, but not found in the event."
830  << "\nNo taus added to filterproduct."
831  << endl;
832  }
833  else {
834 
835  for (std::list<int>::const_iterator itObj = listTau.begin(); itObj != listTau.end(); ++itObj) {
836 
837  // Transform to begin of BxVector
838  unsigned int index = taus->begin(0) - taus->begin() + *itObj;
839 
840  l1t::TauRef myref(taus, index);
841  filterproduct.addObject(trigger::TriggerL1Tau, myref);
842 
843  }
844 
845  }
846 
847  }
848 
849  // ETT, HTT, ETM, HTM
851  iEvent.getByToken(m_l1EtSumToken, etsums);
852  if (!etsums.isValid()){
853  edm::LogWarning("HLTL1TSeed")
854  << "\nWarning: L1EtSumBxCollection with input tag "
855  << m_l1EtSumTag
856  << "\nrequested in configuration, but not found in the event."
857  << "\nNo etsums added to filterproduct."
858  << endl;
859  } else {
860 
862 
863  for (iter = etsums->begin(0); iter != etsums->end(0); ++iter){
864 
865  l1t::EtSumRef myref(etsums, etsums->key(iter));
866 
867  switch(iter->getType()) {
868 
869  case l1t::EtSum::kTotalEt :
870  if(!listETT.empty())
871  filterproduct.addObject(trigger::TriggerL1ETT, myref);
872  break;
873  case l1t::EtSum::kTotalHt :
874  if(!listHTT.empty())
875  filterproduct.addObject(trigger::TriggerL1HTT, myref);
876  break;
878  if(!listETM.empty())
879  filterproduct.addObject(trigger::TriggerL1ETM, myref);
880  break;
882  if(!listHTM.empty())
883  filterproduct.addObject(trigger::TriggerL1HTM, myref);
884  break;
886  if(!listETMHF.empty())
887  filterproduct.addObject(trigger::TriggerL1ETMHF, myref);
888  break;
889  default:
890  LogTrace("HLTL1TSeed") << " L1EtSum seed of currently unsuported HLT TriggerType. l1t::EtSum type: " << iter->getType() << "\n";
891 
892  } // end switch
893 
894  } // end for
895 
896  } // end else
897 
898 
899  // TODO FIXME uncomment if block when JetCounts implemented
900 
901  // // jet counts
902  // if (!listJetCounts.empty()) {
903  // edm::Handle<l1extra::L1JetCounts> l1JetCounts;
904  // iEvent.getByToken(m_l1CollectionsToken.label(), l1JetCounts);
905  //
906  // for (std::list<int>::const_iterator itObj = listJetCounts.begin();
907  // itObj != listJetCounts.end(); ++itObj) {
908  //
909  // filterproduct.addObject(trigger::TriggerL1JetCounts,l1extra::L1JetCountsRefProd(l1JetCounts));
910  // // FIXME: RefProd!
911  //
912  // }
913  //
914  // }
915 
916 
917  LogTrace("HLTL1TSeed")
918  << "\nHLTL1Seed:seedsL1TriggerObjectMaps returning " << seedsResult << endl << endl;
919 
920  return seedsResult;
921 
922 }
const_iterator end(int bx) const
std::string m_l1SeedsLogicalExpression
Definition: HLTL1TSeed.h:104
virtual const bool expressionResult() const
edm::EDGetTokenT< l1t::EtSumBxCollection > m_l1EtSumToken
Definition: HLTL1TSeed.h:138
unsigned size(int bx) const
const GlobalObjectMap * getObjectMap(const std::string &algoNameVal) const
return the object map for the algorithm algoNameVal
const std::vector< L1TObjectTypeInCond > & objectTypeVector() const
std::vector< bool > const & getAlgoDecisionFinal() const
Definition: GlobalAlgBlk.h:90
edm::InputTag m_l1MuonTag
Definition: HLTL1TSeed.h:117
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
GlobalObject
Definition: GlobalObject.h:16
unsigned int key(const_iterator &iter) const
Definition: BXVector.h:104
bool algoGtlResult() const
const std::vector< GlobalObjectMap > & gtObjectMap() const
get / set the vector of object maps
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
edm::InputTag m_l1JetTag
Definition: HLTL1TSeed.h:127
edm::InputTag m_l1GtObjectMapTag
InputTag for L1 Global Trigger object maps. This is done per menu. Should be part of Run...
Definition: HLTL1TSeed.h:107
vector< PseudoJet > jets
edm::EDGetTokenT< l1t::JetBxCollection > m_l1JetToken
Definition: HLTL1TSeed.h:128
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
GlobalLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
Definition: HLTL1TSeed.h:84
edm::EDGetTokenT< l1t::EGammaBxCollection > m_l1EGammaToken
Definition: HLTL1TSeed.h:123
edm::InputTag m_l1EtSumTag
Definition: HLTL1TSeed.h:137
edm::InputTag m_l1TauTag
Definition: HLTL1TSeed.h:132
int algoBitNumber() const
get / set bit number for algorithm in the object map
bool isValid() const
Definition: HandleBase.h:74
const std::vector< CombinationsInCond > & combinationVector() const
#define LogTrace(id)
const std::vector< GlobalLogicParser::OperandToken > & operandTokenVector() const
bool m_isDebugEnabled
cache edm::isDebugEnabled()
Definition: HLTL1TSeed.h:144
std::vector< GlobalLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
Definition: HLTL1TSeed.h:87
const std::string & algoName() const
destructor
edm::InputTag m_l1EGammaTag
Definition: HLTL1TSeed.h:122
edm::InputTag m_l1GlobalTag
InputTag for L1 Global Trigger.
Definition: HLTL1TSeed.h:111
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1GlobalToken
Definition: HLTL1TSeed.h:112
const CombinationsInCond * getCombinationsInCond(const std::string &condNameVal) const
return all the combinations passing the requirements imposed in condition condNameVal ...
bool m_l1GlobalDecision
flag to pass if L1TGlobal accept
Definition: HLTL1TSeed.h:141
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
const_iterator begin(int bx) const
edm::EDGetTokenT< l1t::MuonBxCollection > m_l1MuonToken
Definition: HLTL1TSeed.h:118
std::vector< EtSum >::const_iterator const_iterator
Definition: BXVector.h:20
edm::EDGetTokenT< l1t::TauBxCollection > m_l1TauToken
Definition: HLTL1TSeed.h:133
edm::EDGetTokenT< GlobalObjectMapRecord > m_l1GtObjectMapToken
Definition: HLTL1TSeed.h:108
const T & at(int bx, unsigned i) const
void HLTL1TSeed::updateAlgoLogicParser ( const L1GtTriggerMenu ,
const AlgorithmMap  
)
inlineprivate

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

Definition at line 67 of file HLTL1TSeed.h.

67 { };
void HLTL1TSeed::updateAlgoLogicParser ( const std::vector< bool > &  gtWord,
const std::vector< unsigned int > &  triggerMask,
const int  physicsDaqPartition 
)
inlineprivate

update the tokenResult members from m_l1AlgoLogicParser for a new event

Definition at line 71 of file HLTL1TSeed.h.

72  { };

Member Data Documentation

bool HLTL1TSeed::m_isDebugEnabled
private

cache edm::isDebugEnabled()

Definition at line 144 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

GlobalLogicParser HLTL1TSeed::m_l1AlgoLogicParser
private

logic parser for m_l1SeedsLogicalExpression

Definition at line 84 of file HLTL1TSeed.h.

Referenced by HLTL1TSeed(), and seedsL1TriggerObjectMaps().

std::vector<GlobalLogicParser::OperandToken> HLTL1TSeed::m_l1AlgoSeeds
private

list of required algorithms for seeding

Definition at line 87 of file HLTL1TSeed.h.

Referenced by HLTL1TSeed(), and seedsL1TriggerObjectMaps().

std::vector< std::vector< const std::vector<l1t::GlobalObject>* > > HLTL1TSeed::m_l1AlgoSeedsObjType
private

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

Definition at line 93 of file HLTL1TSeed.h.

Referenced by HLTL1TSeed().

std::vector< const std::vector<GlobalLogicParser::TokenRPN>* > HLTL1TSeed::m_l1AlgoSeedsRpn
private

vector of Rpn vectors for the required algorithms for seeding

Definition at line 90 of file HLTL1TSeed.h.

Referenced by HLTL1TSeed().

edm::InputTag HLTL1TSeed::m_l1EGammaCollectionsTag
private

Meta InputTag for L1 Egamma collection.

Definition at line 121 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1EGammaTag
private

Definition at line 122 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1t::EGammaBxCollection> HLTL1TSeed::m_l1EGammaToken
private

Definition at line 123 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1EtSumCollectionsTag
private

Meta InputTag for L1 Egamma collection.

Definition at line 136 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1EtSumTag
private

Definition at line 137 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1t::EtSumBxCollection> HLTL1TSeed::m_l1EtSumToken
private

Definition at line 138 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

bool HLTL1TSeed::m_l1GlobalDecision
private

flag to pass if L1TGlobal accept

Definition at line 141 of file HLTL1TSeed.h.

Referenced by HLTL1TSeed(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1GlobalTag
private

InputTag for L1 Global Trigger.

Definition at line 111 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::EDGetTokenT<GlobalAlgBlkBxCollection> HLTL1TSeed::m_l1GlobalToken
private

Definition at line 112 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1GtObjectMapTag
private

InputTag for L1 Global Trigger object maps. This is done per menu. Should be part of Run.

Definition at line 107 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::EDGetTokenT<GlobalObjectMapRecord> HLTL1TSeed::m_l1GtObjectMapToken
private

Definition at line 108 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1JetCollectionsTag
private

Meta InputTag for L1 Egamma collection.

Definition at line 126 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1JetTag
private

Definition at line 127 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1t::JetBxCollection> HLTL1TSeed::m_l1JetToken
private

Definition at line 128 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1MuonCollectionsTag
private

Meta InputTag for L1 Muon collection.

Definition at line 116 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1MuonTag
private

Definition at line 117 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1t::MuonBxCollection> HLTL1TSeed::m_l1MuonToken
private

Definition at line 118 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

int HLTL1TSeed::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 100 of file HLTL1TSeed.h.

std::string HLTL1TSeed::m_l1SeedsLogicalExpression
private

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

Definition at line 104 of file HLTL1TSeed.h.

Referenced by dumpTriggerFilterObjectWithRefs(), HLTL1TSeed(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1TauCollectionsTag
private

Meta InputTag for L1 Egamma collection.

Definition at line 131 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1TauTag
private

Definition at line 132 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

edm::EDGetTokenT<l1t::TauBxCollection> HLTL1TSeed::m_l1TauToken
private

Definition at line 133 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().