#include <RecoTauTag/RecoTau/interface/PFRecoTauDiscriminationByLeadingTrackPtCut.h>
Public Member Functions | |
PFRecoTauDiscriminationByLeadingTrackPtCut (const ParameterSet &iConfig) | |
virtual void | produce (Event &, const EventSetup &) |
~PFRecoTauDiscriminationByLeadingTrackPtCut () | |
Private Attributes | |
double | minPtLeadTrack_ |
InputTag | PFTauProducer_ |
Definition at line 26 of file PFRecoTauDiscriminationByLeadingTrackPtCut.h.
PFRecoTauDiscriminationByLeadingTrackPtCut::PFRecoTauDiscriminationByLeadingTrackPtCut | ( | const ParameterSet & | iConfig | ) | [inline, explicit] |
Definition at line 28 of file PFRecoTauDiscriminationByLeadingTrackPtCut.h.
References edm::ParameterSet::getParameter(), minPtLeadTrack_, and PFTauProducer_.
00028 { 00029 PFTauProducer_ = iConfig.getParameter<InputTag>("PFTauProducer"); 00030 minPtLeadTrack_ = iConfig.getParameter<double>("MinPtLeadingTrack"); 00031 produces<PFTauDiscriminator>(); 00032 }
PFRecoTauDiscriminationByLeadingTrackPtCut::~PFRecoTauDiscriminationByLeadingTrackPtCut | ( | ) | [inline] |
void PFRecoTauDiscriminationByLeadingTrackPtCut::produce | ( | Event & | iEvent, | |
const EventSetup & | iEventSetup | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 2 of file PFRecoTauDiscriminationByLeadingTrackPtCut.cc.
References edm::Event::getByLabel(), reco::PFTau::leadPFChargedHadrCand(), minPtLeadTrack_, PFTauProducer_, and edm::Event::put().
00002 { 00003 Handle<PFTauCollection> thePFTauCollection; 00004 iEvent.getByLabel(PFTauProducer_,thePFTauCollection); 00005 00006 00007 auto_ptr<PFTauDiscriminator> thePFTauDiscriminatorByLeadingTrackPtCut(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.leadPFChargedHadrCand()) 00016 { 00017 theleadTrackPtCutDiscriminator=0.; 00018 }else if(thePFTau.leadPFChargedHadrCand()->pt() > minPtLeadTrack_) theleadTrackPtCutDiscriminator=1.; 00019 00020 thePFTauDiscriminatorByLeadingTrackPtCut->setValue(iPFTau,theleadTrackPtCutDiscriminator); 00021 } 00022 00023 iEvent.put(thePFTauDiscriminatorByLeadingTrackPtCut); 00024 00025 }
double PFRecoTauDiscriminationByLeadingTrackPtCut::minPtLeadTrack_ [private] |
Definition at line 37 of file PFRecoTauDiscriminationByLeadingTrackPtCut.h.
Referenced by PFRecoTauDiscriminationByLeadingTrackPtCut(), and produce().
Definition at line 36 of file PFRecoTauDiscriminationByLeadingTrackPtCut.h.
Referenced by PFRecoTauDiscriminationByLeadingTrackPtCut(), and produce().