CMS 3D CMS Logo

PFRecoTauDiscriminationByNeutralHadrons.cc

Go to the documentation of this file.
00001 #include "RecoTauTag/RecoTau/interface/PFRecoTauDiscriminationByNeutralHadrons.h"
00002 
00003 void PFRecoTauDiscriminationByNeutralHadrons::produce(Event& iEvent,const EventSetup& iEventSetup){
00004   Handle<PFTauCollection> thePFTauCollection;
00005   iEvent.getByLabel(PFTauProducer_,thePFTauCollection);
00006   
00007   // fill the AssociationVector object
00008   auto_ptr<PFTauDiscriminator> thePFTauDiscriminatorByNeutralHadrons(new PFTauDiscriminator(PFTauRefProd(thePFTauCollection)));
00009   
00010   for(size_t iPFTau=0;iPFTau<thePFTauCollection->size();++iPFTau) {
00011     PFTauRef thePFTauRef(thePFTauCollection,iPFTau);
00012     PFTau thePFTau=*thePFTauRef;
00013     if(thePFTau.signalPFNeutrHadrCands().size() > neutralHadrons_){
00014       thePFTauDiscriminatorByNeutralHadrons->setValue(iPFTau,0);
00015     }else thePFTauDiscriminatorByNeutralHadrons->setValue(iPFTau,1);
00016   }    
00017   
00018   iEvent.put(thePFTauDiscriminatorByNeutralHadrons);
00019   
00020 }
00021 
00022 

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