00001 /* class CaloRecoTauDiscriminationByIsolation 00002 * created : Jul 23 2007, 00003 * revised : Sep 5 2007, 00004 * contributors : Ludovic Houchu (Ludovic.Houchu@cern.ch ; IPHC, Strasbourg), Christian Veelken (veelken@fnal.gov ; UC Davis), Evan Friis (UC Davis) 00005 */ 00006 00007 #include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h" 00008 00009 using namespace reco; 00010 00011 class CaloRecoTauDiscriminationByIsolation : public CaloTauDiscriminationProducerBase { 00012 public: 00013 explicit CaloRecoTauDiscriminationByIsolation(const edm::ParameterSet& iConfig):CaloTauDiscriminationProducerBase(iConfig){ 00014 applyDiscriminationByTrackerIsolation_ = iConfig.getParameter<bool>("ApplyDiscriminationByTrackerIsolation"); 00015 TrackerIsolAnnulus_maximumOccupancy_ = iConfig.getParameter<unsigned>("TrackerIsolAnnulus_maximumOccupancy"); 00016 00017 applyDiscriminationByECALIsolation_ = iConfig.getParameter<bool>("ApplyDiscriminationByECALIsolation"); 00018 EcalIsolAnnulus_maximumSumEtCut_ = iConfig.getParameter<double>("ECALisolAnnulus_maximumSumEtCut"); 00019 } 00020 ~CaloRecoTauDiscriminationByIsolation(){} 00021 double discriminate(const CaloTauRef&); 00022 private: 00023 bool applyDiscriminationByTrackerIsolation_; 00024 unsigned TrackerIsolAnnulus_maximumOccupancy_; 00025 bool applyDiscriminationByECALIsolation_; 00026 double EcalIsolAnnulus_maximumSumEtCut_; 00027 }; 00028 00029 double CaloRecoTauDiscriminationByIsolation::discriminate(const CaloTauRef& caloTau) 00030 { 00031 if ( applyDiscriminationByTrackerIsolation_ ){ 00032 if ( caloTau->isolationTracks().size() > TrackerIsolAnnulus_maximumOccupancy_ ) return 0.; 00033 } 00034 00035 if ( applyDiscriminationByECALIsolation_ ) { 00036 if ( caloTau->isolationECALhitsEtSum() > EcalIsolAnnulus_maximumSumEtCut_ ) return 0.; 00037 } 00038 00039 // N.B. the lead track requirement must be included in the discriminants 00040 return 1.; 00041 } 00042 00043 DEFINE_FWK_MODULE(CaloRecoTauDiscriminationByIsolation);