CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PFRecoTauDiscriminationByCharge Class Reference
Inheritance diagram for PFRecoTauDiscriminationByCharge:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::stream::EDProducer<>

Public Member Functions

double discriminate (const PFTauRef &pfTau) const override
 
 PFRecoTauDiscriminationByCharge (const edm::ParameterSet &iConfig)
 
 ~PFRecoTauDiscriminationByCharge () override
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual void beginEvent (const edm::Event &, const edm::EventSetup &)
 
virtual double discriminate (const TauRef &tau) const =0
 
virtual void endEvent (edm::Event &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 TauDiscriminationProducerBase ()
 
 ~TauDiscriminationProducerBase () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Attributes

uint32_t chargeReq_
 
bool oneOrThreeProng_
 

Additional Inherited Members

- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd< TauCollectionTauRefProd
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
std::string moduleLabel_
 
double prediscriminantFailValue_
 
edm::EDGetTokenT< TauCollectionTau_token
 
size_t tauIndex_
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 14 of file PFRecoTauDiscriminationByCharge.cc.

Constructor & Destructor Documentation

PFRecoTauDiscriminationByCharge::PFRecoTauDiscriminationByCharge ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 16 of file PFRecoTauDiscriminationByCharge.cc.

References edm::ParameterSet::getParameter().

17  chargeReq_ = iConfig.getParameter<uint32_t>("AbsChargeReq");
18  oneOrThreeProng_ = iConfig.getParameter<bool>("ApplyOneOrThreeProngCut");
19  }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
PFRecoTauDiscriminationByCharge::~PFRecoTauDiscriminationByCharge ( )
inlineoverride

Definition at line 20 of file PFRecoTauDiscriminationByCharge.cc.

20 {}

Member Function Documentation

double PFRecoTauDiscriminationByCharge::discriminate ( const PFTauRef pfTau) const
override

Definition at line 27 of file PFRecoTauDiscriminationByCharge.cc.

References funct::abs(), and DEFINE_FWK_MODULE.

28 {
29  uint16_t nSigTk = thePFTauRef->signalPFChargedHadrCands().size();
30  bool chargeok = (std::abs(thePFTauRef->charge()) == int(chargeReq_));
31  bool oneOrThreeProngOK = ( (nSigTk==1) || (nSigTk==3) || !oneOrThreeProng_ );
32 
33  return ( (chargeok && oneOrThreeProngOK) ? 1. : 0. );
34 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

uint32_t PFRecoTauDiscriminationByCharge::chargeReq_
private

Definition at line 23 of file PFRecoTauDiscriminationByCharge.cc.

bool PFRecoTauDiscriminationByCharge::oneOrThreeProng_
private

Definition at line 24 of file PFRecoTauDiscriminationByCharge.cc.