CMS 3D CMS Logo

PFTauDiscriminatorLogicalAndProducer.cc
Go to the documentation of this file.
4 
5 /*
6  * class PFRecoTauDiscriminatioLogicalAndProducer
7  *
8  * Applies a boolean operator (AND or OR) to a set
9  * of PFTauDiscriminators. Note that the set of PFTauDiscriminators
10  * is accessed/combined in the base class (the Prediscriminants).
11  *
12  * This class merely exposes this behavior directly by
13  * returning true for all taus that pass the prediscriminants
14  *
15  * revised : Mon Aug 31 12:59:50 PDT 2009
16  * Authors : Michele Pioppi, Evan Friis (UC Davis)
17  */
18 
19 using namespace reco;
20 
22 public:
25  double discriminate(const PFTauRef& pfTau) const override;
26  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
27 
28 private:
29  double passResult_;
30 };
31 
34  passResult_ = iConfig.getParameter<double>("PassValue");
35  prediscriminantFailValue_ = iConfig.getParameter<double>("FailValue"); //defined in base class
36 }
37 
39  // if this function is called on a tau, it is has passed (in the base class)
40  // the set of prediscriminants, using the prescribed boolean operation. thus
41  // we only need to return TRUE
42  return passResult_;
43 }
44 
46  // PFTauDiscriminatorLogicalAndProducer
48 
49  {
51  psd0.add<std::string>("BooleanOperator", "and");
52  {
54  psd1.add<double>("cut", 0.5);
55  psd1.add<edm::InputTag>("Producer", edm::InputTag("pfRecoTauDiscriminationAgainstElectron"));
56  psd0.add<edm::ParameterSetDescription>("discr2", psd1);
57  }
58  {
60  psd1.add<double>("cut", 0.5);
61  psd1.add<edm::InputTag>("Producer", edm::InputTag("pfRecoTauDiscriminationByIsolation"));
62  psd0.add<edm::ParameterSetDescription>("discr1", psd1);
63  }
64  desc.add<edm::ParameterSetDescription>("Prediscriminants", psd0);
65  }
66 
67  desc.add<double>("PassValue", 1.0);
68  desc.add<double>("FailValue", 0.0);
69  desc.add<edm::InputTag>("PFTauProducer", edm::InputTag("pfRecoTauProducer"));
70  descriptions.add("PFTauDiscriminatorLogicalAndProducer", desc);
71 }
72 
ConfigurationDescriptions.h
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
TauDiscriminationProducerBase.h
PFTauDiscriminatorLogicalAndProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PFTauDiscriminatorLogicalAndProducer.cc:45
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
PFTauDiscriminatorLogicalAndProducer::~PFTauDiscriminatorLogicalAndProducer
~PFTauDiscriminatorLogicalAndProducer() override
Definition: PFTauDiscriminatorLogicalAndProducer.cc:24
edm::Ref< PFTauCollection >
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
PFTauDiscriminatorLogicalAndProducer_cfi.PFTauDiscriminatorLogicalAndProducer
PFTauDiscriminatorLogicalAndProducer
Definition: PFTauDiscriminatorLogicalAndProducer_cfi.py:10
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
PFTauDiscriminatorLogicalAndProducer::passResult_
double passResult_
Definition: PFTauDiscriminatorLogicalAndProducer.cc:29
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
PFTauDiscriminatorLogicalAndProducer
Definition: PFTauDiscriminatorLogicalAndProducer.cc:21
PFTauDiscriminatorLogicalAndProducer::PFTauDiscriminatorLogicalAndProducer
PFTauDiscriminatorLogicalAndProducer(const edm::ParameterSet &)
Definition: PFTauDiscriminatorLogicalAndProducer.cc:32
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PFTauDiscriminatorLogicalAndProducer::discriminate
double discriminate(const PFTauRef &pfTau) const override
Definition: PFTauDiscriminatorLogicalAndProducer.cc:38
edm::InputTag
Definition: InputTag.h:15
TauDiscriminationProducerBase::prediscriminantFailValue_
double prediscriminantFailValue_
Definition: TauDiscriminationProducerBase.h:102