#include <EMIsolatedTauJetsSelector.h>
Public Member Functions | |
EMIsolatedTauJetsSelector (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~EMIsolatedTauJetsSelector () | |
Private Attributes | |
std::vector< edm::InputTag > | tauSrc |
Definition at line 18 of file EMIsolatedTauJetsSelector.h.
EMIsolatedTauJetsSelector::EMIsolatedTauJetsSelector | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 10 of file EMIsolatedTauJetsSelector.cc.
References edm::ParameterSet::getParameter(), and tauSrc.
{ tauSrc = iConfig.getParameter<std::vector< edm::InputTag > >("TauSrc"); produces<reco::CaloJetCollection>("Isolated"); produces<reco::CaloJetCollection>("NotIsolated"); }
EMIsolatedTauJetsSelector::~EMIsolatedTauJetsSelector | ( | ) |
Definition at line 18 of file EMIsolatedTauJetsSelector.cc.
{ }
void EMIsolatedTauJetsSelector::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iES | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 20 of file EMIsolatedTauJetsSelector.cc.
References edm::Event::getByLabel(), i, edm::Event::put(), dt_offlineAnalysis_common_cff::reco, asciidump::s, and tauSrc.
{ using namespace reco; using namespace edm; using namespace std; typedef std::vector<edm::InputTag> vtag; auto_ptr<reco::CaloJetCollection> isolatedTaus(new CaloJetCollection); auto_ptr<reco::CaloJetCollection> notIsolatedTaus(new CaloJetCollection); for( vtag::const_iterator s = tauSrc.begin(); s != tauSrc.end(); ++ s ) { edm::Handle<EMIsolatedTauTagInfoCollection> tauJets; iEvent.getByLabel( * s, tauJets ); EMIsolatedTauTagInfoCollection::const_iterator i = tauJets->begin(); for(;i !=tauJets->end(); i++ ) { double discriminator = (*i).discriminator(); if(discriminator > 0) { const CaloJet* pippo = dynamic_cast<const CaloJet*>(i->jet().get()); isolatedTaus->push_back(*pippo ); }else{ const CaloJet* notPippo =dynamic_cast<const CaloJet*>(i->jet().get()); notIsolatedTaus->push_back(*notPippo ); } } } iEvent.put(isolatedTaus, "Isolated"); iEvent.put(notIsolatedTaus,"NotIsolated"); }
std::vector<edm::InputTag> EMIsolatedTauJetsSelector::tauSrc [private] |
Definition at line 25 of file EMIsolatedTauJetsSelector.h.
Referenced by EMIsolatedTauJetsSelector(), and produce().