#include <RecoTauTag/RecoTau/interface/PFRecoTauDiscriminationByLeadingPionPtCut.h>
Public Member Functions | |
PFRecoTauDiscriminationByLeadingPionPtCut (const ParameterSet &iConfig) | |
virtual void | produce (Event &, const EventSetup &) |
~PFRecoTauDiscriminationByLeadingPionPtCut () | |
Private Attributes | |
double | minPtLeadTrack_ |
InputTag | PFTauProducer_ |
Definition at line 26 of file PFRecoTauDiscriminationByLeadingPionPtCut.h.
PFRecoTauDiscriminationByLeadingPionPtCut::PFRecoTauDiscriminationByLeadingPionPtCut | ( | const ParameterSet & | iConfig | ) | [inline, explicit] |
Definition at line 28 of file PFRecoTauDiscriminationByLeadingPionPtCut.h.
References edm::ParameterSet::getParameter(), minPtLeadTrack_, and PFTauProducer_.
00028 { 00029 PFTauProducer_ = iConfig.getParameter<InputTag>("PFTauProducer"); 00030 minPtLeadTrack_ = iConfig.getParameter<double>("MinPtLeadingPion"); 00031 produces<PFTauDiscriminator>(); 00032 }
PFRecoTauDiscriminationByLeadingPionPtCut::~PFRecoTauDiscriminationByLeadingPionPtCut | ( | ) | [inline] |
void PFRecoTauDiscriminationByLeadingPionPtCut::produce | ( | Event & | iEvent, | |
const EventSetup & | iEventSetup | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 2 of file PFRecoTauDiscriminationByLeadingPionPtCut.cc.
References edm::Event::getByLabel(), reco::PFTau::leadPFCand(), minPtLeadTrack_, PFTauProducer_, and edm::Event::put().
00002 { 00003 Handle<PFTauCollection> thePFTauCollection; 00004 iEvent.getByLabel(PFTauProducer_,thePFTauCollection); 00005 00006 00007 auto_ptr<PFTauDiscriminator> thePFTauDiscriminatorByLeadingPionPtCut(new PFTauDiscriminator(PFTauRefProd(thePFTauCollection))); 00008 00009 //loop over the PFTau candidates 00010 for(size_t iPFTau=0;iPFTau<thePFTauCollection->size();++iPFTau) { 00011 PFTauRef thePFTauRef(thePFTauCollection,iPFTau); 00012 PFTau thePFTau=*thePFTauRef; 00013 double theleadTrackPtCutDiscriminator = 0.; 00014 // fill the AssociationVector object 00015 if (!thePFTau.leadPFCand()) 00016 { 00017 theleadTrackPtCutDiscriminator=0.; 00018 }else if(thePFTau.leadPFCand()->pt() > minPtLeadTrack_) theleadTrackPtCutDiscriminator=1.; 00019 00020 thePFTauDiscriminatorByLeadingPionPtCut->setValue(iPFTau,theleadTrackPtCutDiscriminator); 00021 } 00022 00023 iEvent.put(thePFTauDiscriminatorByLeadingPionPtCut); 00024 00025 }
double PFRecoTauDiscriminationByLeadingPionPtCut::minPtLeadTrack_ [private] |
Definition at line 37 of file PFRecoTauDiscriminationByLeadingPionPtCut.h.
Referenced by PFRecoTauDiscriminationByLeadingPionPtCut(), and produce().
Definition at line 36 of file PFRecoTauDiscriminationByLeadingPionPtCut.h.
Referenced by PFRecoTauDiscriminationByLeadingPionPtCut(), and produce().