CMS 3D CMS Logo

PFRecoTauDiscriminationByLeadingTrackPtCut Class Reference

#include <RecoTauTag/RecoTau/interface/PFRecoTauDiscriminationByLeadingTrackPtCut.h>

Inheritance diagram for PFRecoTauDiscriminationByLeadingTrackPtCut:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 PFRecoTauDiscriminationByLeadingTrackPtCut (const ParameterSet &iConfig)
virtual void produce (Event &, const EventSetup &)
 ~PFRecoTauDiscriminationByLeadingTrackPtCut ()

Private Attributes

double minPtLeadTrack_
InputTag PFTauProducer_


Detailed Description

Definition at line 26 of file PFRecoTauDiscriminationByLeadingTrackPtCut.h.


Constructor & Destructor Documentation

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]

Definition at line 33 of file PFRecoTauDiscriminationByLeadingTrackPtCut.h.

00033 {} 


Member Function Documentation

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 }


Member Data Documentation

double PFRecoTauDiscriminationByLeadingTrackPtCut::minPtLeadTrack_ [private]

Definition at line 37 of file PFRecoTauDiscriminationByLeadingTrackPtCut.h.

Referenced by PFRecoTauDiscriminationByLeadingTrackPtCut(), and produce().

InputTag PFRecoTauDiscriminationByLeadingTrackPtCut::PFTauProducer_ [private]

Definition at line 36 of file PFRecoTauDiscriminationByLeadingTrackPtCut.h.

Referenced by PFRecoTauDiscriminationByLeadingTrackPtCut(), and produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:29:45 2009 for CMSSW by  doxygen 1.5.4