00001 /* 00002 * class CaloRecoTauDiscriminationAgainstHadronicJets 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 using namespace edm; 00013 00014 class CaloRecoTauDiscriminationAgainstHadronicJets : public CaloTauDiscriminationProducerBase { 00015 public: 00016 explicit CaloRecoTauDiscriminationAgainstHadronicJets( 00017 const edm::ParameterSet& iConfig) 00018 :CaloTauDiscriminationProducerBase(iConfig){ 00019 tcTauAlgorithm = new TCTauAlgorithm(iConfig); 00020 } 00021 ~CaloRecoTauDiscriminationAgainstHadronicJets(){} 00022 double discriminate(const CaloTauRef& theCaloTauRef); 00023 void beginEvent(const edm::Event&, const edm::EventSetup&); 00024 00025 private: 00026 TCTauAlgorithm* tcTauAlgorithm; 00027 }; 00028 00029 void CaloRecoTauDiscriminationAgainstHadronicJets::beginEvent( 00030 const edm::Event& iEvent, const edm::EventSetup& iSetup){ 00031 tcTauAlgorithm->eventSetup(iEvent,iSetup); 00032 } 00033 00034 00035 double CaloRecoTauDiscriminationAgainstHadronicJets::discriminate( 00036 const CaloTauRef& theCaloTauRef){ 00037 math::XYZTLorentzVector p4 = 00038 tcTauAlgorithm->recalculateEnergy(*theCaloTauRef); 00039 return ((tcTauAlgorithm->algoComponent() != 00040 TCTauAlgorithm::TCAlgoHadronicJet) ? 1. : 0.); 00041 } 00042 00043 DEFINE_FWK_MODULE(CaloRecoTauDiscriminationAgainstHadronicJets);