#include <RecoTauTag/RecoTau/interface/CaloRecoTauDiscriminationByLeadingTrackFinding.h>
Public Member Functions | |
CaloRecoTauDiscriminationByLeadingTrackFinding (const ParameterSet &iConfig) | |
virtual void | produce (Event &, const EventSetup &) |
~CaloRecoTauDiscriminationByLeadingTrackFinding () | |
Private Attributes | |
InputTag | CaloTauProducer_ |
Definition at line 26 of file CaloRecoTauDiscriminationByLeadingTrackFinding.h.
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] |
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 }
Definition at line 36 of file CaloRecoTauDiscriminationByLeadingTrackFinding.h.
Referenced by CaloRecoTauDiscriminationByLeadingTrackFinding(), and produce().