CMS 3D CMS Logo

Public Member Functions | Private Attributes

CaloRecoTauDiscriminationByCharge Class Reference

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

List of all members.

Public Member Functions

 CaloRecoTauDiscriminationByCharge (const edm::ParameterSet &iConfig)
double discriminate (const reco::CaloTauRef &pfTau)
 ~CaloRecoTauDiscriminationByCharge ()

Private Attributes

uint32_t chargeReq_
bool oneOrThreeProng_

Detailed Description

Definition at line 11 of file CaloRecoTauDiscriminationByCharge.cc.


Constructor & Destructor Documentation

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

Definition at line 13 of file CaloRecoTauDiscriminationByCharge.cc.

References chargeReq_, edm::ParameterSet::getParameter(), and oneOrThreeProng_.

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

Definition at line 19 of file CaloRecoTauDiscriminationByCharge.cc.

{}

Member Function Documentation

double CaloRecoTauDiscriminationByCharge::discriminate ( const reco::CaloTauRef pfTau) [virtual]

Implements TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 26 of file CaloRecoTauDiscriminationByCharge.cc.

References abs, chargeReq_, and oneOrThreeProng_.

                                     {
  uint16_t nSigTk =  theTauRef->signalTracks().size();
  bool chargeok = (abs(theTauRef->charge()) == int(chargeReq_));
  bool oneOrThreeProngOK =  ( (nSigTk==1) || (nSigTk==3) || !oneOrThreeProng_ );

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

Member Data Documentation