CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
static void fillProducerDescriptions (edm::ParameterSetDescription &desc)
 

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 17 of file PFRecoTauDiscriminationByCharge.cc.

Constructor & Destructor Documentation

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

Definition at line 19 of file PFRecoTauDiscriminationByCharge.cc.

References edm::ParameterSet::getParameter().

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

Definition at line 23 of file PFRecoTauDiscriminationByCharge.cc.

References fillDescriptions().

23 {}

Member Function Documentation

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

Definition at line 31 of file PFRecoTauDiscriminationByCharge.cc.

References funct::abs().

32 {
33  uint16_t nSigTk = thePFTauRef->signalChargedHadrCands().size();
34  bool chargeok = (std::abs(thePFTauRef->charge()) == int(chargeReq_));
35  bool oneOrThreeProngOK = ( (nSigTk==1) || (nSigTk==3) || !oneOrThreeProng_ );
36 
37  return ( (chargeok && oneOrThreeProngOK) ? 1. : 0. );
38 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void PFRecoTauDiscriminationByCharge::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 41 of file PFRecoTauDiscriminationByCharge.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, and AlCaHLTBitMon_QueryRunRegistry::string.

41  {
42  // pfRecoTauDiscriminationByCharge
44  desc.add<unsigned int>("AbsChargeReq", 1);
45  desc.add<bool>("ApplyOneOrThreeProngCut", false);
46  {
48  psd0.add<std::string>("BooleanOperator", "and");
49  desc.add<edm::ParameterSetDescription>("Prediscriminants", psd0);
50  }
51  desc.add<edm::InputTag>("PFTauProducer", edm::InputTag("pfRecoTauProducerHighEfficiency"));
52  descriptions.add("pfRecoTauDiscriminationByCharge", desc);
53 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

uint32_t PFRecoTauDiscriminationByCharge::chargeReq_
private

Definition at line 27 of file PFRecoTauDiscriminationByCharge.cc.

bool PFRecoTauDiscriminationByCharge::oneOrThreeProng_
private

Definition at line 28 of file PFRecoTauDiscriminationByCharge.cc.