CMS 3D CMS Logo

PFRecoTauDiscriminationByIPCut.cc
Go to the documentation of this file.
4 /*
5  * class PFRecoTauDiscriminationByIPCut
6  */
7 
8 using namespace reco;
9 
11 public:
14  tausTIPToken_(consumes(iConfig.getParameter<edm::InputTag>("tausTIP"))),
15  tauTIPSelector_(iConfig.getParameter<std::string>("cut")) {}
17  void beginEvent(const edm::Event&, const edm::EventSetup&) override;
18  double discriminate(const PFTauRef& pfTau) const override;
19  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
20 
21 private:
26 
28 };
29 
30 double PFRecoTauDiscriminationByIPCut::discriminate(const PFTauRef& thePFTauRef) const {
31  return tauTIPSelector_(*(*tausTIP_)[thePFTauRef]) ? 1. : 0.;
32 }
33 
35  event.getByToken(tausTIPToken_, tausTIP_);
36 }
37 
40  desc.add<edm::InputTag>("tausTIP", edm::InputTag("hltTauIPCollection"));
41  desc.add<std::string>("cut", "abs(dxy) > -999.");
42  fillProducerDescriptions(desc); // inherited from the base
43  descriptions.addWithDefaultLabel(desc);
44 }
45 
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< PFTauTIPAssociationByRef > tausTIPToken_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
double discriminate(const PFTauRef &pfTau) const override
PFRecoTauDiscriminationByIPCut(const edm::ParameterSet &iConfig)
edm::Handle< PFTauTIPAssociationByRef > tausTIP_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const StringCutObjectSelector< reco::PFTauTransverseImpactParameter > tauTIPSelector_
fixed size matrix
HLT enums.
void beginEvent(const edm::Event &, const edm::EventSetup &) override
edm::AssociationVector< reco::PFTauRefProd, std::vector< reco::PFTauTransverseImpactParameterRef > > PFTauTIPAssociationByRef
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: event.py:1