CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
HLTJetL1MatchProducer< T > Class Template Reference

#include <HLTJetL1MatchProducer.h>

Inheritance diagram for HLTJetL1MatchProducer< T >:
edm::stream::EDProducer<>

Public Member Functions

virtual void beginJob ()
 
 HLTJetL1MatchProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HLTJetL1MatchProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

double DeltaR_
 
edm::InputTag jetsInput_
 
edm::InputTag L1CenJets_
 
edm::InputTag L1ForJets_
 
edm::InputTag L1TauJets_
 
edm::EDGetTokenT< std::vector< T > > m_theJetToken
 
edm::EDGetTokenT< l1extra::L1JetParticleCollectionm_theL1CenJetToken
 
edm::EDGetTokenT< l1extra::L1JetParticleCollectionm_theL1ForJetToken
 
edm::EDGetTokenT< l1extra::L1JetParticleCollectionm_theL1TauJetToken
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
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
 

Detailed Description

template<typename T>
class HLTJetL1MatchProducer< T >

Definition at line 20 of file HLTJetL1MatchProducer.h.

Constructor & Destructor Documentation

◆ HLTJetL1MatchProducer()

template<typename T >
HLTJetL1MatchProducer< T >::HLTJetL1MatchProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 13 of file HLTJetL1MatchProducer.cc.

13  {
14  jetsInput_ = iConfig.template getParameter<edm::InputTag>("jetsInput");
15  L1TauJets_ = iConfig.template getParameter<edm::InputTag>("L1TauJets");
16  L1CenJets_ = iConfig.template getParameter<edm::InputTag>("L1CenJets");
17  L1ForJets_ = iConfig.template getParameter<edm::InputTag>("L1ForJets");
18  DeltaR_ = iConfig.template getParameter<double>("DeltaR");
19 
20  typedef std::vector<T> TCollection;
21  m_theJetToken = consumes<TCollection>(jetsInput_);
22  m_theL1TauJetToken = consumes<l1extra::L1JetParticleCollection>(L1TauJets_);
23  m_theL1CenJetToken = consumes<l1extra::L1JetParticleCollection>(L1CenJets_);
24  m_theL1ForJetToken = consumes<l1extra::L1JetParticleCollection>(L1ForJets_);
25  produces<TCollection>();
26 }

◆ ~HLTJetL1MatchProducer()

template<typename T >
HLTJetL1MatchProducer< T >::~HLTJetL1MatchProducer ( )
overridedefault

Member Function Documentation

◆ beginJob()

template<typename T >
void HLTJetL1MatchProducer< T >::beginJob ( void  )
virtual

Definition at line 29 of file HLTJetL1MatchProducer.cc.

29 {}

◆ fillDescriptions()

template<typename T >
void HLTJetL1MatchProducer< T >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 35 of file HLTJetL1MatchProducer.cc.

35  {
37  desc.add<edm::InputTag>("jetsInput", edm::InputTag("hltAntiKT5PFJets"));
38  desc.add<edm::InputTag>("L1TauJets", edm::InputTag("hltL1extraParticles", "Tau"));
39  desc.add<edm::InputTag>("L1CenJets", edm::InputTag("hltL1extraParticles", "Central"));
40  desc.add<edm::InputTag>("L1ForJets", edm::InputTag("hltL1extraParticles", "Forward"));
41  desc.add<double>("DeltaR", 0.5);
43 }

References edm::ConfigurationDescriptions::add(), defaultModuleLabel(), submitPVResolutionJobs::desc, and HLT_FULL_cff::InputTag.

◆ produce()

template<typename T >
void HLTJetL1MatchProducer< T >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 46 of file HLTJetL1MatchProducer.cc.

46  {
47  typedef std::vector<T> TCollection;
48 
50  iEvent.getByToken(m_theJetToken, jets);
51 
52  std::unique_ptr<TCollection> result(new TCollection);
53 
55  iEvent.getByToken(m_theL1TauJetToken, l1TauJets);
56 
58  iEvent.getByToken(m_theL1CenJetToken, l1CenJets);
59 
61  iEvent.getByToken(m_theL1ForJetToken, l1ForJets);
62 
63  typename TCollection::const_iterator jet_iter;
64  for (jet_iter = jets->begin(); jet_iter != jets->end(); ++jet_iter) {
65  bool isMatched = false;
66 
67  //std::cout << "FL: l1TauJets.size = " << l1TauJets->size() << std::endl;
68  for (unsigned int jetc = 0; jetc < l1TauJets->size(); ++jetc) {
69  const double deltaeta = jet_iter->eta() - (*l1TauJets)[jetc].eta();
70  const double deltaphi = deltaPhi(jet_iter->phi(), (*l1TauJets)[jetc].phi());
71  //std::cout << "FL: sqrt(2) = " << sqrt(2) << std::endl;
72  if (sqrt(deltaeta * deltaeta + deltaphi * deltaphi) < DeltaR_)
73  isMatched = true;
74  }
75 
76  for (unsigned int jetc = 0; jetc < l1CenJets->size(); ++jetc) {
77  const double deltaeta = jet_iter->eta() - (*l1CenJets)[jetc].eta();
78  const double deltaphi = deltaPhi(jet_iter->phi(), (*l1CenJets)[jetc].phi());
79  if (sqrt(deltaeta * deltaeta + deltaphi * deltaphi) < DeltaR_)
80  isMatched = true;
81  }
82 
83  for (unsigned int jetc = 0; jetc < l1ForJets->size(); ++jetc) {
84  const double deltaeta = jet_iter->eta() - (*l1ForJets)[jetc].eta();
85  const double deltaphi = deltaPhi(jet_iter->phi(), (*l1ForJets)[jetc].phi());
86  if (sqrt(deltaeta * deltaeta + deltaphi * deltaphi) < DeltaR_)
87  isMatched = true;
88  }
89 
90  if (isMatched == true)
91  result->push_back(*jet_iter);
92 
93  } // jet_iter
94 
95  iEvent.put(std::move(result));
96 }

References SiPixelRawToDigiRegional_cfi::deltaPhi, iEvent, trackerHitRTTI::isMatched(), singleTopDQM_cfi::jets, eostools::move(), mps_fire::result, and mathSSE::sqrt().

Member Data Documentation

◆ DeltaR_

template<typename T >
double HLTJetL1MatchProducer< T >::DeltaR_
private

Definition at line 38 of file HLTJetL1MatchProducer.h.

◆ jetsInput_

template<typename T >
edm::InputTag HLTJetL1MatchProducer< T >::jetsInput_
private

Definition at line 33 of file HLTJetL1MatchProducer.h.

◆ L1CenJets_

template<typename T >
edm::InputTag HLTJetL1MatchProducer< T >::L1CenJets_
private

Definition at line 35 of file HLTJetL1MatchProducer.h.

◆ L1ForJets_

template<typename T >
edm::InputTag HLTJetL1MatchProducer< T >::L1ForJets_
private

Definition at line 36 of file HLTJetL1MatchProducer.h.

◆ L1TauJets_

template<typename T >
edm::InputTag HLTJetL1MatchProducer< T >::L1TauJets_
private

Definition at line 34 of file HLTJetL1MatchProducer.h.

◆ m_theJetToken

template<typename T >
edm::EDGetTokenT<std::vector<T> > HLTJetL1MatchProducer< T >::m_theJetToken
private

Definition at line 29 of file HLTJetL1MatchProducer.h.

◆ m_theL1CenJetToken

template<typename T >
edm::EDGetTokenT<l1extra::L1JetParticleCollection> HLTJetL1MatchProducer< T >::m_theL1CenJetToken
private

Definition at line 31 of file HLTJetL1MatchProducer.h.

◆ m_theL1ForJetToken

template<typename T >
edm::EDGetTokenT<l1extra::L1JetParticleCollection> HLTJetL1MatchProducer< T >::m_theL1ForJetToken
private

Definition at line 32 of file HLTJetL1MatchProducer.h.

◆ m_theL1TauJetToken

template<typename T >
edm::EDGetTokenT<l1extra::L1JetParticleCollection> HLTJetL1MatchProducer< T >::m_theL1TauJetToken
private

Definition at line 30 of file HLTJetL1MatchProducer.h.

HLTJetL1MatchProducer
Definition: HLTJetL1MatchProducer.h:20
HLTJetL1MatchProducer::DeltaR_
double DeltaR_
Definition: HLTJetL1MatchProducer.h:38
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HLTJetL1MatchProducer::L1CenJets_
edm::InputTag L1CenJets_
Definition: HLTJetL1MatchProducer.h:35
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
edm::Handle
Definition: AssociativeIterator.h:50
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HLTJetL1MatchProducer::L1TauJets_
edm::InputTag L1TauJets_
Definition: HLTJetL1MatchProducer.h:34
HLTJetL1MatchProducer::m_theL1TauJetToken
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_theL1TauJetToken
Definition: HLTJetL1MatchProducer.h:30
HLTJetL1MatchProducer::m_theJetToken
edm::EDGetTokenT< std::vector< T > > m_theJetToken
Definition: HLTJetL1MatchProducer.h:29
trackerHitRTTI::isMatched
bool isMatched(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:33
defaultModuleLabel
std::string defaultModuleLabel()
Definition: defaultModuleLabel.h:16
HLTJetL1MatchProducer::L1ForJets_
edm::InputTag L1ForJets_
Definition: HLTJetL1MatchProducer.h:36
iEvent
int iEvent
Definition: GenABIO.cc:224
HLTJetL1MatchProducer::m_theL1CenJetToken
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_theL1CenJetToken
Definition: HLTJetL1MatchProducer.h:31
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
HLTJetL1MatchProducer::jetsInput_
edm::InputTag jetsInput_
Definition: HLTJetL1MatchProducer.h:33
mps_fire.result
result
Definition: mps_fire.py:311
edm::InputTag
Definition: InputTag.h:15
HLTJetL1MatchProducer::m_theL1ForJetToken
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_theL1ForJetToken
Definition: HLTJetL1MatchProducer.h:32