CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/JetMETCorrections/TauJet/plugins/TCRecoTauDiscriminationAgainstHadronicJets.cc

Go to the documentation of this file.
00001 /* 
00002  * class TCRecoTauDiscriminationAgainstHadronicJets
00003  * created : April 21 2010,
00004  * revised : ,
00005  * Authors : Sami Lehti (HIP)
00006  */
00007 
00008 #include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h"
00009 #include "RecoTauTag/RecoTau/interface/TCTauAlgorithm.h"
00010 
00011 using namespace reco;
00012 
00013 class TCRecoTauDiscriminationAgainstHadronicJets : public CaloTauDiscriminationProducerBase {
00014     public:
00015         explicit TCRecoTauDiscriminationAgainstHadronicJets(const edm::ParameterSet& iConfig):CaloTauDiscriminationProducerBase(iConfig){   
00016                 tcTauAlgorithm = new TCTauAlgorithm(iConfig);
00017         }
00018         ~TCRecoTauDiscriminationAgainstHadronicJets(){} 
00019         double discriminate(const CaloTauRef& theCaloTauRef);
00020         void beginEvent(const edm::Event&, const edm::EventSetup&);
00021 
00022     private:
00023         TCTauAlgorithm*  tcTauAlgorithm;
00024 };
00025 
00026 void TCRecoTauDiscriminationAgainstHadronicJets::beginEvent(const edm::Event& iEvent, const edm::EventSetup& iSetup){
00027         tcTauAlgorithm->eventSetup(iEvent,iSetup);
00028 }
00029 
00030 
00031 double TCRecoTauDiscriminationAgainstHadronicJets::discriminate(const CaloTauRef& theCaloTauRef){
00032         tcTauAlgorithm->recalculateEnergy(*theCaloTauRef);
00033         return ((tcTauAlgorithm->algoComponent() != TCTauAlgorithm::TCAlgoHadronicJet) ? 1. : 0.);
00034 }
00035 
00036 DEFINE_FWK_MODULE(TCRecoTauDiscriminationAgainstHadronicJets);