CMS 3D CMS Logo

Public Member Functions | Private Attributes

PFRecoTauDiscriminationAgainstMuon Class Reference

Inheritance diagram for PFRecoTauDiscriminationAgainstMuon:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

double discriminate (const PFTauRef &pfTau)
 PFRecoTauDiscriminationAgainstMuon (const edm::ParameterSet &iConfig)
 ~PFRecoTauDiscriminationAgainstMuon ()

Private Attributes

double a
double b
double c
std::string discriminatorOption_
double hop_

Detailed Description

Definition at line 20 of file PFRecoTauDiscriminationAgainstMuon.cc.


Constructor & Destructor Documentation

PFRecoTauDiscriminationAgainstMuon::PFRecoTauDiscriminationAgainstMuon ( const edm::ParameterSet iConfig) [inline, explicit]

Definition at line 22 of file PFRecoTauDiscriminationAgainstMuon.cc.

References a, b, trackerHits::c, and edm::ParameterSet::getParameter().

                                                                                 :PFTauDiscriminationProducerBase(iConfig) {   
         discriminatorOption_  = iConfig.getParameter<std::string>("discriminatorOption");  
         hop_  = iConfig.getParameter<double>("HoPMin");  
         a  = iConfig.getParameter<double>("a");  
         b  = iConfig.getParameter<double>("b");  
         c  = iConfig.getParameter<double>("c");  
         
      }
PFRecoTauDiscriminationAgainstMuon::~PFRecoTauDiscriminationAgainstMuon ( ) [inline]

Definition at line 31 of file PFRecoTauDiscriminationAgainstMuon.cc.

{} 

Member Function Documentation

double PFRecoTauDiscriminationAgainstMuon::discriminate ( const PFTauRef pfTau)

Definition at line 43 of file PFRecoTauDiscriminationAgainstMuon.cc.

References a, muon::AllArbitrated, b, trackerHits::c, Exception, muon::isGoodMuon(), muon::segmentCompatibility(), and edm::errors::UnimplementedFeature.

{
   bool decision = true;

   if((*thePFTauRef).hasMuonReference() ){

      MuonRef muonref = (*thePFTauRef).leadPFChargedHadrCand()->muonRef();
      if (discriminatorOption_ == "noSegMatch") {
         if ( muonref ->numberOfMatches() > 0 ) {
            decision = false;
         }
      }
      else if (discriminatorOption_ == "twoDCut") {
         double seg = muon::segmentCompatibility(*muonref);
         double calo= muonref->caloCompatibility(); 
         double border = calo * a + seg * b +c;
         if ( border > 0 ) {
            decision = false; 
         } 
      }
      else if (discriminatorOption_ == "merePresence") decision = false;
      else if (discriminatorOption_ == "combined") { // testing purpose only
         unsigned int muType = 0;
         if(muonref->isGlobalMuon()) muType = 1;
         else if(muonref->isCaloMuon()) muType = 2;
         else if(muonref->isTrackerMuon()) muType = 3;
         double muonEnergyFraction = (*thePFTauRef).pfTauTagInfoRef()->pfjetRef()->chargedMuEnergyFraction();
         bool eta_veto = false;
         bool phi_veto = false;
         if(fabs(muonref->eta()) > 2.3 || (fabs(muonref->eta()) > 1.4 && fabs(muonref->eta()) < 1.6)) eta_veto = true;
         if(muonref->phi() < 0.1 && muonref->phi() > -0.1) phi_veto = true;
         if( muType != 1 || muonref ->numberOfMatches() > 0 || eta_veto || phi_veto || muonEnergyFraction > 0.9 ) decision = false; // as place holder
      }
      else if (discriminatorOption_ == "noAllArbitrated" ||discriminatorOption_ == "noAllArbitratedWithHOP" ) { // One used in H->tautau 2010
        if(muon::isGoodMuon(*muonref,muon::AllArbitrated))
          decision = false;
      }
      else{
         throw edm::Exception(edm::errors::UnimplementedFeature) << " Invalid Discriminator Option! Please check cfi file \n";
      }
   } // valid muon ref


   //Additional : Apply HOP cut for one prongs only
   if((*thePFTauRef).leadPFChargedHadrCand().isNonnull() && discriminatorOption_ == "noAllArbitratedWithHOP" ) {
     if(thePFTauRef->decayMode()==0 && ((*thePFTauRef).leadPFChargedHadrCand()->hcalEnergy()+(*thePFTauRef).leadPFChargedHadrCand()->ecalEnergy())/(*thePFTauRef).leadPFChargedHadrCand()->p()<hop_)
       decision=false;
   }




   return (decision ? 1. : 0.);
} 

Member Data Documentation

Definition at line 38 of file PFRecoTauDiscriminationAgainstMuon.cc.

Definition at line 39 of file PFRecoTauDiscriminationAgainstMuon.cc.

Definition at line 40 of file PFRecoTauDiscriminationAgainstMuon.cc.

Definition at line 36 of file PFRecoTauDiscriminationAgainstMuon.cc.

Definition at line 37 of file PFRecoTauDiscriminationAgainstMuon.cc.