CMS 3D CMS Logo

Public Member Functions | Private Attributes

PFRecoTauDiscriminationByCharge Class Reference

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

List of all members.

Public Member Functions

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

Private Attributes

uint32_t chargeReq_
bool oneOrThreeProng_

Detailed Description

Definition at line 14 of file PFRecoTauDiscriminationByCharge.cc.


Constructor & Destructor Documentation

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

Definition at line 16 of file PFRecoTauDiscriminationByCharge.cc.

References edm::ParameterSet::getParameter().

                                                                              :PFTauDiscriminationProducerBase(iConfig){   
         chargeReq_        = iConfig.getParameter<uint32_t>("AbsChargeReq");
         oneOrThreeProng_  = iConfig.getParameter<bool>("ApplyOneOrThreeProngCut");
      }
PFRecoTauDiscriminationByCharge::~PFRecoTauDiscriminationByCharge ( ) [inline]

Definition at line 20 of file PFRecoTauDiscriminationByCharge.cc.

{} 

Member Function Documentation

double PFRecoTauDiscriminationByCharge::discriminate ( const PFTauRef pfTau)

Definition at line 27 of file PFRecoTauDiscriminationByCharge.cc.

References abs.

{
   uint16_t nSigTk        =  thePFTauRef->signalPFChargedHadrCands().size();
   bool chargeok          =  (std::abs(thePFTauRef->charge()) == int(chargeReq_));
   bool oneOrThreeProngOK =  ( (nSigTk==1) || (nSigTk==3) || !oneOrThreeProng_ );

   return ( (chargeok && oneOrThreeProngOK) ? 1. : 0. );
}

Member Data Documentation

Definition at line 23 of file PFRecoTauDiscriminationByCharge.cc.

Definition at line 24 of file PFRecoTauDiscriminationByCharge.cc.