#include <HLTJetL1MatchProducer.h>
Public Member Functions | |
virtual void | beginJob () |
HLTJetL1MatchProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~HLTJetL1MatchProducer () | |
Private Attributes | |
double | DeltaR_ |
edm::InputTag | jetsInput_ |
edm::InputTag | L1CenJets_ |
edm::InputTag | L1ForJets_ |
edm::InputTag | L1TauJets_ |
Definition at line 9 of file HLTJetL1MatchProducer.h.
HLTJetL1MatchProducer::HLTJetL1MatchProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 9 of file HLTJetL1MatchProducer.cc.
References DeltaR_, edm::ParameterSet::getParameter(), jetsInput_, L1CenJets_, L1ForJets_, and L1TauJets_.
{ jetsInput_ = iConfig.getParameter<edm::InputTag>("jetsInput"); L1TauJets_ = iConfig.getParameter<edm::InputTag>("L1TauJets"); L1CenJets_ = iConfig.getParameter<edm::InputTag>("L1CenJets"); L1ForJets_ = iConfig.getParameter<edm::InputTag>("L1ForJets"); DeltaR_ = iConfig.getParameter<double>("DeltaR"); produces< reco::CaloJetCollection > (); }
HLTJetL1MatchProducer::~HLTJetL1MatchProducer | ( | ) |
Definition at line 26 of file HLTJetL1MatchProducer.cc.
{ }
void HLTJetL1MatchProducer::beginJob | ( | void | ) | [virtual] |
void HLTJetL1MatchProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 31 of file HLTJetL1MatchProducer.cc.
References Geom::deltaPhi(), DeltaR_, edm::Event::getByLabel(), jetsInput_, L1CenJets_, L1ForJets_, L1TauJets_, edm::Event::put(), query::result, and mathSSE::sqrt().
{ edm::Handle<reco::CaloJetCollection> calojets; iEvent.getByLabel(jetsInput_, calojets); std::auto_ptr<reco::CaloJetCollection> result (new reco::CaloJetCollection); edm::Handle<l1extra::L1JetParticleCollection> l1TauJets; iEvent.getByLabel(L1TauJets_,l1TauJets); edm::Handle<l1extra::L1JetParticleCollection> l1CenJets; iEvent.getByLabel(L1CenJets_,l1CenJets); edm::Handle<l1extra::L1JetParticleCollection> l1ForJets; iEvent.getByLabel(L1ForJets_,l1ForJets); for (reco::CaloJetCollection::const_iterator calojetc = calojets->begin(); calojetc != calojets->end(); ++calojetc) { bool isMatched=false; //std::cout << "FL: l1TauJets.size = " << l1TauJets->size() << std::endl; for (unsigned int jetc=0;jetc<l1TauJets->size();++jetc) { const double deltaeta=calojetc->eta()-(*l1TauJets)[jetc].eta(); const double deltaphi=deltaPhi(calojetc->phi(),(*l1TauJets)[jetc].phi()); //std::cout << "FL: sqrt(2) = " << sqrt(2) << std::endl; if (sqrt(deltaeta*deltaeta+deltaphi*deltaphi) < DeltaR_) isMatched=true; } for (unsigned int jetc=0;jetc<l1CenJets->size();++jetc) { const double deltaeta=calojetc->eta()-(*l1CenJets)[jetc].eta(); const double deltaphi=deltaPhi(calojetc->phi(),(*l1CenJets)[jetc].phi()); if (sqrt(deltaeta*deltaeta+deltaphi*deltaphi) < DeltaR_) isMatched=true; } for (unsigned int jetc=0;jetc<l1ForJets->size();++jetc) { const double deltaeta=calojetc->eta()-(*l1ForJets)[jetc].eta(); const double deltaphi=deltaPhi(calojetc->phi(),(*l1ForJets)[jetc].phi()); if (sqrt(deltaeta*deltaeta+deltaphi*deltaphi) < DeltaR_) isMatched=true; } if (isMatched==true) result->push_back(*calojetc); } // calojetc iEvent.put( result); }
double HLTJetL1MatchProducer::DeltaR_ [private] |
Definition at line 20 of file HLTJetL1MatchProducer.h.
Referenced by HLTJetL1MatchProducer(), and produce().
Definition at line 16 of file HLTJetL1MatchProducer.h.
Referenced by HLTJetL1MatchProducer(), and produce().
Definition at line 18 of file HLTJetL1MatchProducer.h.
Referenced by HLTJetL1MatchProducer(), and produce().
Definition at line 19 of file HLTJetL1MatchProducer.h.
Referenced by HLTJetL1MatchProducer(), and produce().
Definition at line 17 of file HLTJetL1MatchProducer.h.
Referenced by HLTJetL1MatchProducer(), and produce().