Public Member Functions | |
void | produce (edm::Event &evt, const edm::EventSetup &es) |
RecoTauPiZeroFlattener (const edm::ParameterSet &pset) | |
~RecoTauPiZeroFlattener () | |
Private Attributes | |
edm::InputTag | jetSrc_ |
edm::InputTag | piZeroSrc_ |
Definition at line 28 of file RecoTauPiZeroFlattener.cc.
RecoTauPiZeroFlattener::RecoTauPiZeroFlattener | ( | const edm::ParameterSet & | pset | ) | [explicit] |
Definition at line 38 of file RecoTauPiZeroFlattener.cc.
References edm::ParameterSet::getParameter(), jetSrc_, and piZeroSrc_.
{ jetSrc_ = pset.getParameter<edm::InputTag>("jetSrc"); piZeroSrc_ = pset.getParameter<edm::InputTag>("piZeroSrc"); produces<std::vector<reco::RecoTauPiZero> >(); }
RecoTauPiZeroFlattener::~RecoTauPiZeroFlattener | ( | ) | [inline] |
Definition at line 31 of file RecoTauPiZeroFlattener.cc.
{}
void RecoTauPiZeroFlattener::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 45 of file RecoTauPiZeroFlattener.cc.
References edm::Event::getByLabel(), analyzePatCleaning_cfg::jets, jetSrc_, convertSQLitetoXML_cfg::output, piZeroSrc_, and edm::Event::put().
{ // Get the jet input collection via a view of Candidates edm::Handle<reco::CandidateView> jetView; evt.getByLabel(jetSrc_, jetView); // Convert to a vector of PFJetRefs reco::PFJetRefVector jets = reco::tau::castView<reco::PFJetRefVector>(jetView); // Get the pizero input collection edm::Handle<reco::JetPiZeroAssociation> piZeroAssoc; evt.getByLabel(piZeroSrc_, piZeroAssoc); // Create output collection std::auto_ptr<std::vector<reco::RecoTauPiZero> > output( new std::vector<reco::RecoTauPiZero>()); // Loop over the jets and append the pizeros for each jet to our output // collection. BOOST_FOREACH(reco::PFJetRef jetRef, jets) { const std::vector<reco::RecoTauPiZero>& pizeros = (*piZeroAssoc)[jetRef]; output->reserve(output->size() + pizeros.size()); output->insert(output->end(), pizeros.begin(), pizeros.end()); } evt.put(output); }
edm::InputTag RecoTauPiZeroFlattener::jetSrc_ [private] |
Definition at line 34 of file RecoTauPiZeroFlattener.cc.
Referenced by produce(), and RecoTauPiZeroFlattener().
Definition at line 35 of file RecoTauPiZeroFlattener.cc.
Referenced by produce(), and RecoTauPiZeroFlattener().