CMS 3D CMS Logo

PFRecoTauDiscriminationByLeadingTrackPtCut.cc

Go to the documentation of this file.
00001 #include "RecoTauTag/RecoTau/interface/PFRecoTauDiscriminationByLeadingTrackPtCut.h"
00002 void PFRecoTauDiscriminationByLeadingTrackPtCut::produce(Event& iEvent,const EventSetup& iEventSetup){
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 }
00026    

Generated on Tue Jun 9 17:45:02 2009 for CMSSW by  doxygen 1.5.4