CMS 3D CMS Logo

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

Public Member Functions

double discriminate (const PFTauRef &pfTau) const override
 
 PFRecoTauDiscriminationByLeadingObjectPtCut (const edm::ParameterSet &iConfig)
 
 ~PFRecoTauDiscriminationByLeadingObjectPtCut () override
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator, TauDiscriminatorDataType, ConsumeType >
virtual void beginEvent (const edm::Event &, const edm::EventSetup &)
 
virtual TauDiscriminatorDataType 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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator, TauDiscriminatorDataType, ConsumeType >
static void fillProducerDescriptions (edm::ParameterSetDescription &desc)
 
static std::string getTauTypeString ()
 helper method to retrieve tau type name, e.g. to build correct cfi getter More...
 

Private Attributes

bool chargedOnly_
 
double minPtLeadObject_
 

Additional Inherited Members

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

Detailed Description

Definition at line 14 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

Constructor & Destructor Documentation

◆ PFRecoTauDiscriminationByLeadingObjectPtCut()

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

Definition at line 16 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

References edm::ParameterSet::getParameter().

18  chargedOnly_ = iConfig.getParameter<bool>("UseOnlyChargedHadrons");
19  minPtLeadObject_ = iConfig.getParameter<double>("MinPtLeadingObject");
20  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase

◆ ~PFRecoTauDiscriminationByLeadingObjectPtCut()

PFRecoTauDiscriminationByLeadingObjectPtCut::~PFRecoTauDiscriminationByLeadingObjectPtCut ( )
inlineoverride

Definition at line 21 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

21 {}

Member Function Documentation

◆ discriminate()

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

Definition at line 30 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

References edm::Ref< C, T, F >::isNonnull(), and HLT_2022v15_cff::leadObjectPt.

30  {
31  double leadObjectPt = -1.;
32  if (chargedOnly_) {
33  // consider only charged hadrons. note that the leadChargedHadrCand is the highest pt
34  // charged signal cone object above the quality cut level (typically 0.5 GeV).
35  if (thePFTauRef->leadChargedHadrCand().isNonnull()) {
36  leadObjectPt = thePFTauRef->leadChargedHadrCand()->pt();
37  }
38  } else {
39  // If using the 'leading pion' option, require that:
40  // 1) at least one charged hadron exists above threshold (thePFTauRef->leadChargedHadrCand().isNonnull())
41  // 2) the lead PFCand exists. In the case that the highest pt charged hadron is above the PFRecoTauProducer threshold
42  // (typically 5 GeV), the leadCand and the leadChargedHadrCand are the same object. If the leadChargedHadrCand
43  // is below 5GeV, but there exists a neutral PF particle > 5 GeV, it is set to be the leadCand
44  if (thePFTauRef->leadCand().isNonnull() && thePFTauRef->leadChargedHadrCand().isNonnull()) {
45  leadObjectPt = thePFTauRef->leadCand()->pt();
46  }
47  }
48 
49  return (leadObjectPt > minPtLeadObject_ ? 1. : 0.);
50 }

◆ fillDescriptions()

void PFRecoTauDiscriminationByLeadingObjectPtCut::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 52 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, HLT_2022v15_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

52  {
53  // pfRecoTauDiscriminationByLeadingObjectPtCut
55  desc.add<double>("MinPtLeadingObject", 5.0);
56  {
58  psd0.add<std::string>("BooleanOperator", "and");
59  desc.add<edm::ParameterSetDescription>("Prediscriminants", psd0);
60  }
61  desc.add<bool>("UseOnlyChargedHadrons", false);
62  desc.add<edm::InputTag>("PFTauProducer", edm::InputTag("pfRecoTauProducer"));
63  descriptions.add("pfRecoTauDiscriminationByLeadingObjectPtCut", desc);
64 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ chargedOnly_

bool PFRecoTauDiscriminationByLeadingObjectPtCut::chargedOnly_
private

◆ minPtLeadObject_

double PFRecoTauDiscriminationByLeadingObjectPtCut::minPtLeadObject_
private