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 > 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 >
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)
 
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 >
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 PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

Constructor & Destructor Documentation

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

Definition at line 16 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

References edm::ParameterSet::getParameter().

17  chargedOnly_ = iConfig.getParameter<bool>("UseOnlyChargedHadrons");
18  minPtLeadObject_ = iConfig.getParameter<double>("MinPtLeadingObject");
19  }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
PFRecoTauDiscriminationByLeadingObjectPtCut::~PFRecoTauDiscriminationByLeadingObjectPtCut ( )
inlineoverride

Definition at line 20 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

References fillDescriptions().

20 {}

Member Function Documentation

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

Definition at line 28 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

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

29 {
30  double leadObjectPt = -1.;
31  if( chargedOnly_ )
32  {
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  {
37  leadObjectPt = thePFTauRef->leadChargedHadrCand()->pt();
38  }
39  }
40  else
41  {
42  // If using the 'leading pion' option, require that:
43  // 1) at least one charged hadron exists above threshold (thePFTauRef->leadChargedHadrCand().isNonnull())
44  // 2) the lead PFCand exists. In the case that the highest pt charged hadron is above the PFRecoTauProducer threshold
45  // (typically 5 GeV), the leadCand and the leadChargedHadrCand are the same object. If the leadChargedHadrCand
46  // is below 5GeV, but there exists a neutral PF particle > 5 GeV, it is set to be the leadCand
47  if( thePFTauRef->leadCand().isNonnull() && thePFTauRef->leadChargedHadrCand().isNonnull() )
48  {
49  leadObjectPt = thePFTauRef->leadCand()->pt();
50  }
51  }
52 
53  return ( leadObjectPt > minPtLeadObject_ ? 1. : 0. );
54 }
void PFRecoTauDiscriminationByLeadingObjectPtCut::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 57 of file PFRecoTauDiscriminationByLeadingObjectPtCut.cc.

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

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

Member Data Documentation

bool PFRecoTauDiscriminationByLeadingObjectPtCut::chargedOnly_
private
double PFRecoTauDiscriminationByLeadingObjectPtCut::minPtLeadObject_
private