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

virtual bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) override
 filter the event More...
 
 HLTL1TSeed (const edm::ParameterSet &)
 constructor More...
 
virtual ~HLTL1TSeed ()
 destructor More...
 
- Public Member Functions inherited from HLTStreamFilter
 HLTStreamFilter (const edm::ParameterSet &config)
 
int module (edm::Event const &) const
 
const std::string * moduleLabel () const
 
int path (edm::Event const &) const
 
const std::string * pathName (edm::Event const &) const
 
std::pair< int, int > pmid (edm::Event const &) const
 
bool saveTags () const
 
virtual ~HLTStreamFilter ()
 
- Public Member Functions inherited from edm::stream::EDFilter<>
 EDFilter ()=default
 
- Public Member Functions inherited from edm::stream::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilterBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
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
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 44 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:102
T getParameter(std::string const &) const
bool isDebugEnabled()
edm::EDGetTokenT< l1t::EtSumBxCollection > m_l1EtSumToken
Definition: HLTL1TSeed.h:136
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:91
edm::InputTag m_l1MuonTag
Definition: HLTL1TSeed.h:115
edm::InputTag m_l1EGammaCollectionsTag
Meta InputTag for L1 Egamma collection.
Definition: HLTL1TSeed.h:119
edm::InputTag m_l1JetCollectionsTag
Meta InputTag for L1 Egamma collection.
Definition: HLTL1TSeed.h:124
std::vector< GlobalLogicParser::OperandToken > expressionSeedsOperandList()
edm::InputTag m_l1JetTag
Definition: HLTL1TSeed.h:125
edm::InputTag m_l1GtObjectMapTag
InputTag for L1 Global Trigger object maps. This is done per menu. Should be part of Run...
Definition: HLTL1TSeed.h:105
edm::EDGetTokenT< l1t::JetBxCollection > m_l1JetToken
Definition: HLTL1TSeed.h:126
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:82
edm::EDGetTokenT< l1t::EGammaBxCollection > m_l1EGammaToken
Definition: HLTL1TSeed.h:121
edm::InputTag m_l1EtSumTag
Definition: HLTL1TSeed.h:135
std::vector< const std::vector< GlobalLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
Definition: HLTL1TSeed.h:88
edm::InputTag m_l1TauTag
Definition: HLTL1TSeed.h:130
edm::InputTag m_l1EtSumCollectionsTag
Meta InputTag for L1 Egamma collection.
Definition: HLTL1TSeed.h:134
edm::InputTag m_l1TauCollectionsTag
Meta InputTag for L1 Egamma collection.
Definition: HLTL1TSeed.h:129
bool m_isDebugEnabled
cache edm::isDebugEnabled()
Definition: HLTL1TSeed.h:142
std::vector< GlobalLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
Definition: HLTL1TSeed.h:85
edm::InputTag m_l1EGammaTag
Definition: HLTL1TSeed.h:120
edm::InputTag m_l1GlobalTag
InputTag for L1 Global Trigger.
Definition: HLTL1TSeed.h:109
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1GlobalToken
Definition: HLTL1TSeed.h:110
edm::InputTag m_l1MuonCollectionsTag
Meta InputTag for L1 Muon collection.
Definition: HLTL1TSeed.h:114
bool m_l1GlobalDecision
flag to pass if L1TGlobal accept
Definition: HLTL1TSeed.h:139
edm::EDGetTokenT< l1t::MuonBxCollection > m_l1MuonToken
Definition: HLTL1TSeed.h:116
edm::EDGetTokenT< l1t::TauBxCollection > m_l1TauToken
Definition: HLTL1TSeed.h:131
edm::EDGetTokenT< GlobalObjectMapRecord > m_l1GtObjectMapToken
Definition: HLTL1TSeed.h:106
HLTL1TSeed::~HLTL1TSeed ( )
virtual

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, MuonAssociatorByHits_cfi::obj, trigger::TriggerL1EG, trigger::TriggerL1ETM, 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> seedsL1EtSumHTM;
280  filterproduct.getObjects(trigger::TriggerL1HTM, seedsL1EtSumHTM);
281  const size_t sizeSeedsL1EtSumHTM = seedsL1EtSumHTM.size();
282  LogTrace("HLTL1TSeed")
283  << "\n L1EtSum HTM seeds: " << sizeSeedsL1EtSumHTM << endl << endl;
284 
285  for (size_t i = 0; i != sizeSeedsL1EtSumHTM; i++) {
286  l1t::EtSumRef obj = l1t::EtSumRef( seedsL1EtSumHTM[i]);
287 
288  LogTrace("HLTL1TSeed")
289  << "\tL1EtSum HTM" << "\t" << "pt = "
290  << obj->pt() << "\t" << "eta = " << obj->eta()
291  << "\t" << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
292  }
293 
294  LogTrace("HLTL1TSeed") << " \n\n" << endl;
295 
296 }
std::string m_l1SeedsLogicalExpression
Definition: HLTL1TSeed.h:102
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
edm::Ref< TauBxCollection > TauRef
Definition: Tau.h:12
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:12
edm::Ref< JetBxCollection > JetRef
Definition: Jet.h:12
#define LogTrace(id)
edm::Ref< EtSumBxCollection > EtSumRef
Definition: EtSum.h:12
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:115
bool seedsL1TriggerObjectMaps(edm::Event &, trigger::TriggerFilterObjectWithRefs &)
seeding is done via L1 trigger object maps, considering the objects which fired in L1 ...
Definition: HLTL1TSeed.cc:299
edm::InputTag m_l1JetTag
Definition: HLTL1TSeed.h:125
edm::InputTag m_l1EtSumTag
Definition: HLTL1TSeed.h:135
edm::InputTag m_l1TauTag
Definition: HLTL1TSeed.h:130
bool m_isDebugEnabled
cache edm::isDebugEnabled()
Definition: HLTL1TSeed.h:142
edm::InputTag m_l1EGammaTag
Definition: HLTL1TSeed.h:120
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 299 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::gtETT, l1t::gtHTM, l1t::gtHTT, l1t::gtJet, l1t::gtMu, GlobalObjectMapRecord::gtObjectMap(), l1t::gtTau, mps_fire::i, diffTreeTool::index, edm::HandleBase::isValid(), fwrapper::jets, BXVector< T >::key(), l1t::EtSum::kMissingEt, 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, electronCleaner_cfi::muons, GlobalObjectMap::objectTypeVector(), GlobalObjectMap::operandTokenVector(), GlobalLogicParser::operandTokenVector(), BXVector< T >::size(), AlCaHLTBitMon_QueryRunRegistry::string, jetCleaner_cfi::taus, trigger::TriggerL1EG, trigger::TriggerL1ETM, trigger::TriggerL1ETT, trigger::TriggerL1HTM, trigger::TriggerL1HTT, trigger::TriggerL1Jet, trigger::TriggerL1Mu, and trigger::TriggerL1Tau.

Referenced by hltFilter().

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

65 { };
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 69 of file HLTL1TSeed.h.

70  { };

Member Data Documentation

bool HLTL1TSeed::m_isDebugEnabled
private

cache edm::isDebugEnabled()

Definition at line 142 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

GlobalLogicParser HLTL1TSeed::m_l1AlgoLogicParser
private

logic parser for m_l1SeedsLogicalExpression

Definition at line 82 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 85 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 91 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 88 of file HLTL1TSeed.h.

Referenced by HLTL1TSeed().

edm::InputTag HLTL1TSeed::m_l1EGammaCollectionsTag
private

Meta InputTag for L1 Egamma collection.

Definition at line 119 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1EGammaTag
private

Definition at line 120 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

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

Definition at line 121 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1EtSumCollectionsTag
private

Meta InputTag for L1 Egamma collection.

Definition at line 134 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1EtSumTag
private

Definition at line 135 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

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

Definition at line 136 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

bool HLTL1TSeed::m_l1GlobalDecision
private

flag to pass if L1TGlobal accept

Definition at line 139 of file HLTL1TSeed.h.

Referenced by HLTL1TSeed(), and seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1GlobalTag
private

InputTag for L1 Global Trigger.

Definition at line 109 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

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

Definition at line 110 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 105 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

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

Definition at line 106 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1JetCollectionsTag
private

Meta InputTag for L1 Egamma collection.

Definition at line 124 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1JetTag
private

Definition at line 125 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

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

Definition at line 126 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().

edm::InputTag HLTL1TSeed::m_l1MuonCollectionsTag
private

Meta InputTag for L1 Muon collection.

Definition at line 114 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1MuonTag
private

Definition at line 115 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

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

Definition at line 116 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 98 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 102 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 129 of file HLTL1TSeed.h.

edm::InputTag HLTL1TSeed::m_l1TauTag
private

Definition at line 130 of file HLTL1TSeed.h.

Referenced by hltFilter(), and seedsL1TriggerObjectMaps().

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

Definition at line 131 of file HLTL1TSeed.h.

Referenced by seedsL1TriggerObjectMaps().