#include <EMIsolatedTauJetsSelector.h>
Public Member Functions | |
EMIsolatedTauJetsSelector (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) override |
~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 | ||
) | [override, virtual] |
Implements edm::EDProducer.
Definition at line 20 of file EMIsolatedTauJetsSelector.cc.
References edm::Event::getByLabel(), i, edm::Event::put(), L1Trigger_dataformats::reco, alignCSCRings::s, and tauSrc.
{ using namespace reco; using namespace edm; using namespace std; typedef std::vector<edm::InputTag> vtag; std::auto_ptr<reco::CaloJetCollection> isolatedTaus(new CaloJetCollection); std::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().