CMS 3D CMS Logo

CaloRecoTauDiscriminationByLeadingTrackFinding Class Reference

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

Inheritance diagram for CaloRecoTauDiscriminationByLeadingTrackFinding:

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

List of all members.

Public Member Functions

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

Private Attributes

InputTag CaloTauProducer_


Detailed Description

Definition at line 26 of file CaloRecoTauDiscriminationByLeadingTrackFinding.h.


Constructor & Destructor Documentation

CaloRecoTauDiscriminationByLeadingTrackFinding::CaloRecoTauDiscriminationByLeadingTrackFinding ( const ParameterSet iConfig  )  [inline, explicit]

Definition at line 28 of file CaloRecoTauDiscriminationByLeadingTrackFinding.h.

References CaloTauProducer_, and edm::ParameterSet::getParameter().

00028                                                                                       {   
00029     CaloTauProducer_        = iConfig.getParameter<InputTag>("CaloTauProducer");
00030     //    matchingCone__ = iConfig.getParameter<double>("LeadingTrackMatchingCone");
00031     produces<CaloTauDiscriminator>();
00032   }

CaloRecoTauDiscriminationByLeadingTrackFinding::~CaloRecoTauDiscriminationByLeadingTrackFinding (  )  [inline]

Definition at line 33 of file CaloRecoTauDiscriminationByLeadingTrackFinding.h.

00033 {} 


Member Function Documentation

void CaloRecoTauDiscriminationByLeadingTrackFinding::produce ( Event iEvent,
const EventSetup iEventSetup 
) [virtual]

Implements edm::EDProducer.

Definition at line 2 of file CaloRecoTauDiscriminationByLeadingTrackFinding.cc.

References CaloTauProducer_, edm::Event::getByLabel(), edm::Ref< C, T, F >::isNonnull(), reco::BaseTau::leadTrack(), and edm::Event::put().

00002                                                                                                        {
00003   
00004   Handle<CaloTauCollection> theCaloTauCollection;
00005   iEvent.getByLabel(CaloTauProducer_,theCaloTauCollection);
00006  
00007  auto_ptr<CaloTauDiscriminator> theCaloTauDiscriminatorByLeadingTrackFinding(new CaloTauDiscriminator(CaloTauRefProd(theCaloTauCollection)));
00008  double theleadTrackFindingDiscriminator = 0.;
00009 
00010  //loop over the CaloTau candidates
00011  for(size_t iCaloTau=0;iCaloTau<theCaloTauCollection->size();++iCaloTau) {
00012    CaloTauRef theCaloTauRef(theCaloTauCollection,iCaloTau);
00013    CaloTau theCaloTau=*theCaloTauRef;
00014    
00015    // fill the AssociationVector object
00016    if (theCaloTau.leadTrack().isNonnull()) 
00017      theleadTrackFindingDiscriminator=1.;
00018 
00019 
00020    theCaloTauDiscriminatorByLeadingTrackFinding->setValue(iCaloTau,theleadTrackFindingDiscriminator);
00021  }
00022 
00023  iEvent.put(theCaloTauDiscriminatorByLeadingTrackFinding);
00024   
00025 }


Member Data Documentation

InputTag CaloRecoTauDiscriminationByLeadingTrackFinding::CaloTauProducer_ [private]

Definition at line 36 of file CaloRecoTauDiscriminationByLeadingTrackFinding.h.

Referenced by CaloRecoTauDiscriminationByLeadingTrackFinding(), and produce().


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