#include <L1HLTJetsMatching.h>
Public Member Functions | |
L1HLTJetsMatching (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~L1HLTJetsMatching () | |
Private Attributes | |
std::vector < l1extra::L1JetParticleRef > | jetCandRefVec |
edm::InputTag | jetSrc |
double | mEt_Min |
std::vector < l1extra::L1JetParticleRef > | objL1CandRefVec |
l1extra::L1JetParticleRef | tauCandRef |
std::vector < l1extra::L1JetParticleRef > | tauCandRefVec |
edm::InputTag | tauTrigger |
Definition at line 21 of file L1HLTJetsMatching.h.
L1HLTJetsMatching::L1HLTJetsMatching | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 15 of file L1HLTJetsMatching.cc.
References edm::ParameterSet::getParameter(), and PatBasicFWLiteJetAnalyzer_Selector_cfg::jetSrc.
{ jetSrc = iConfig.getParameter<InputTag>("JetSrc"); tauTrigger = iConfig.getParameter<InputTag>("L1TauTrigger"); mEt_Min = iConfig.getParameter<double>("EtMin"); produces<CaloJetCollection>(); }
L1HLTJetsMatching::~L1HLTJetsMatching | ( | ) |
Definition at line 24 of file L1HLTJetsMatching.cc.
{ }
void L1HLTJetsMatching::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iES | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 26 of file L1HLTJetsMatching.cc.
References a, reco::deltaR(), f, edm::Event::getByLabel(), PatBasicFWLiteJetAnalyzer_Selector_cfg::jetSrc, reco::Candidate::p4(), reco::Candidate::pt(), edm::Event::put(), dt_offlineAnalysis_common_cff::reco, trigger::TriggerL1CenJet, and trigger::TriggerL1TauJet.
{ using namespace edm; using namespace std; using namespace reco; using namespace trigger; using namespace l1extra; typedef std::vector<LeafCandidate> LeafCandidateCollection; auto_ptr<CaloJetCollection> tauL2jets(new CaloJetCollection); double deltaR = 1.0; double matchingR = 0.5; //Getting HLT jets to be matched edm::Handle<edm::View<Candidate> > tauJets; iEvent.getByLabel( jetSrc, tauJets ); // std::cout <<"Size of input jet collection "<<tauJets->size()<<std::endl; edm::Handle<trigger::TriggerFilterObjectWithRefs> l1TriggeredTaus; iEvent.getByLabel(tauTrigger,l1TriggeredTaus); tauCandRefVec.clear(); jetCandRefVec.clear(); l1TriggeredTaus->getObjects( trigger::TriggerL1TauJet,tauCandRefVec); l1TriggeredTaus->getObjects( trigger::TriggerL1CenJet,jetCandRefVec); math::XYZPoint a(0.,0.,0.); CaloJet::Specific f; for( unsigned int iL1Tau=0; iL1Tau <tauCandRefVec.size();iL1Tau++) { for(unsigned int iJet=0;iJet<tauJets->size();iJet++) { //Find the relative L2TauJets, to see if it has been reconstructed const Candidate & myJet = (*tauJets)[iJet]; deltaR = ROOT::Math::VectorUtil::DeltaR(myJet.p4().Vect(), (tauCandRefVec[iL1Tau]->p4()).Vect()); if(deltaR < matchingR ) { // LeafCandidate myLC(myJet); CaloJet myCaloJet(myJet.p4(),a,f); if(myJet.pt() > mEt_Min) { // tauL2LC->push_back(myLC); tauL2jets->push_back(myCaloJet); } break; } } } for(unsigned int iL1Tau=0; iL1Tau <jetCandRefVec.size();iL1Tau++) { for(unsigned int iJet=0;iJet<tauJets->size();iJet++) { const Candidate & myJet = (*tauJets)[iJet]; //Find the relative L2TauJets, to see if it has been reconstructed deltaR = ROOT::Math::VectorUtil::DeltaR(myJet.p4().Vect(), (jetCandRefVec[iL1Tau]->p4()).Vect()); if(deltaR < matchingR ) { // LeafCandidate myLC(myJet); CaloJet myCaloJet(myJet.p4(),a,f); if(myJet.pt() > mEt_Min) { //tauL2LC->push_back(myLC); tauL2jets->push_back(myCaloJet); } break; } } } //std::cout <<"Size of L1HLT matched jets "<<tauL2jets->size()<<std::endl; iEvent.put(tauL2jets); // iEvent.put(tauL2LC); }
std::vector<l1extra::L1JetParticleRef> L1HLTJetsMatching::jetCandRefVec [private] |
Definition at line 29 of file L1HLTJetsMatching.h.
edm::InputTag L1HLTJetsMatching::jetSrc [private] |
Definition at line 33 of file L1HLTJetsMatching.h.
double L1HLTJetsMatching::mEt_Min [private] |
Definition at line 35 of file L1HLTJetsMatching.h.
std::vector<l1extra::L1JetParticleRef> L1HLTJetsMatching::objL1CandRefVec [private] |
Definition at line 30 of file L1HLTJetsMatching.h.
Definition at line 31 of file L1HLTJetsMatching.h.
std::vector<l1extra::L1JetParticleRef> L1HLTJetsMatching::tauCandRefVec [private] |
Definition at line 28 of file L1HLTJetsMatching.h.
edm::InputTag L1HLTJetsMatching::tauTrigger [private] |
Definition at line 34 of file L1HLTJetsMatching.h.