CMS 3D CMS Logo

PFRecoTauDiscriminationByLeadingPionPtCut Class Reference

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

Inheritance diagram for PFRecoTauDiscriminationByLeadingPionPtCut:

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

List of all members.

Public Member Functions

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

Private Attributes

double minPtLeadTrack_
InputTag PFTauProducer_


Detailed Description

Definition at line 26 of file PFRecoTauDiscriminationByLeadingPionPtCut.h.


Constructor & Destructor Documentation

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]

Definition at line 33 of file PFRecoTauDiscriminationByLeadingPionPtCut.h.

00033 {} 


Member Function Documentation

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 }


Member Data Documentation

double PFRecoTauDiscriminationByLeadingPionPtCut::minPtLeadTrack_ [private]

Definition at line 37 of file PFRecoTauDiscriminationByLeadingPionPtCut.h.

Referenced by PFRecoTauDiscriminationByLeadingPionPtCut(), and produce().

InputTag PFRecoTauDiscriminationByLeadingPionPtCut::PFTauProducer_ [private]

Definition at line 36 of file PFRecoTauDiscriminationByLeadingPionPtCut.h.

Referenced by PFRecoTauDiscriminationByLeadingPionPtCut(), 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