CMS 3D CMS Logo

RecoTauDiscriminationByGenMatch.cc
Go to the documentation of this file.
1 /*
2  * Build a PFTauDiscriminator that returns 1.0 if the a given tau has a matching
3  * in the input matching collection.
4  *
5  * Author: Evan K. Friis (UC Davis)
6  *
7  */
8 
12 
14  public:
17  matchingSrc_ = pset.getParameter<edm::InputTag>("match");
18  }
20  double discriminate(const reco::PFTauRef& pfTau) const override;
21  void beginEvent(
22  const edm::Event& evt, const edm::EventSetup& es) override;
23  private:
26 };
27 
29  const edm::Event& evt, const edm::EventSetup& es) {
31 }
32 
33 double
35  reco::GenJetRef genJet = (*matching_)[tau];
36  return genJet.isNonnull() ? 1.0 : 0;
37 }
38 
T getParameter(std::string const &) const
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void beginEvent(const edm::Event &evt, const edm::EventSetup &es) override
double discriminate(const reco::PFTauRef &pfTau) const override
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:464
edm::Handle< edm::Association< reco::GenJetCollection > > matching_
RecoTauDiscriminationByGenMatch(const edm::ParameterSet &pset)