CMS 3D CMS Logo

PFRecoTauDiscriminationByLeadingObjectPtCut.cc
Go to the documentation of this file.
4 
5 /*
6  * class PFRecoTauDiscriminationByLeadingObjectPtCut
7  * created : October 08 2008,
8  * revised : Wed Aug 19 17:13:04 PDT 2009
9  * Authors : Simone Gennai (SNS), Evan Friis (UC Davis)
10  */
11 
12 using namespace reco;
13 
15 public:
18  chargedOnly_ = iConfig.getParameter<bool>("UseOnlyChargedHadrons");
19  minPtLeadObject_ = iConfig.getParameter<double>("MinPtLeadingObject");
20  }
22  double discriminate(const PFTauRef& pfTau) const override;
23  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
24 
25 private:
28 };
29 
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 }
51 
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 }
65 
ConfigurationDescriptions.h
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
TauDiscriminationProducerBase.h
PFRecoTauDiscriminationByLeadingObjectPtCut::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PFRecoTauDiscriminationByLeadingObjectPtCut.cc:52
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PFRecoTauDiscriminationByLeadingObjectPtCut::chargedOnly_
bool chargedOnly_
Definition: PFRecoTauDiscriminationByLeadingObjectPtCut.cc:26
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Ref< PFTauCollection >
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TauDiscriminationProducerBase
Definition: TauDiscriminationProducerBase.h:55
HLT_FULL_cff.leadObjectPt
leadObjectPt
Definition: HLT_FULL_cff.py:32711
ParameterSetDescription.h
PFRecoTauDiscriminationByLeadingObjectPtCut::discriminate
double discriminate(const PFTauRef &pfTau) const override
Definition: PFRecoTauDiscriminationByLeadingObjectPtCut.cc:30
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PFRecoTauDiscriminationByLeadingObjectPtCut::minPtLeadObject_
double minPtLeadObject_
Definition: PFRecoTauDiscriminationByLeadingObjectPtCut.cc:27
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
PFRecoTauDiscriminationByLeadingObjectPtCut::~PFRecoTauDiscriminationByLeadingObjectPtCut
~PFRecoTauDiscriminationByLeadingObjectPtCut() override
Definition: PFRecoTauDiscriminationByLeadingObjectPtCut.cc:21
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFRecoTauDiscriminationByLeadingObjectPtCut::PFRecoTauDiscriminationByLeadingObjectPtCut
PFRecoTauDiscriminationByLeadingObjectPtCut(const edm::ParameterSet &iConfig)
Definition: PFRecoTauDiscriminationByLeadingObjectPtCut.cc:16
PFRecoTauDiscriminationByLeadingObjectPtCut
Definition: PFRecoTauDiscriminationByLeadingObjectPtCut.cc:14
edm::InputTag
Definition: InputTag.h:15