CMS 3D CMS Logo

GsfEleTrkPtIsoRhoCut.cc
Go to the documentation of this file.
6 
8 
10 public:
12 
13  result_type operator()(const reco::GsfElectronPtr&) const override final;
14 
15  void setConsumes(edm::ConsumesCollector&) override final;
16  void getEventContent(const edm::EventBase&) override final;
17 
18  double value(const reco::CandidatePtr& cand) const override final;
19 
20  CandidateType candidateType() const override final {
21  return ELECTRON;
22  }
23 
24 private:
25 
31 
32 
34 
35 };
36 
39  "GsfEleTrkPtIsoRhoCut");
40 
43  slopeTerm_(params,"slopeTerm"),
44  slopeStart_(params,"slopeStart"),
45  constTerm_(params,"constTerm"),
46  rhoEtStart_(params,"rhoEtStart"),
47  rhoEA_(params,"rhoEA")
48 {
50  contentTags_.emplace("rho",rhoTag);
51 }
52 
54  auto rho = cc.consumes<double>(contentTags_["rho"]);
55  contentTokens_.emplace("rho",rho);
56 }
57 
60 }
61 
62 CutApplicatorBase::result_type
65  const double rho = (*rhoHandle_);
66  const float isolTrkPt = cand->dr03TkSumPt();
67 
68  const float et = cand->et();
69  const float cutValue = et > slopeStart_(cand) ? slopeTerm_(cand)*(et-slopeStart_(cand)) + constTerm_(cand) : constTerm_(cand);
70 
71  const float rhoCutValue = et >= rhoEtStart_(cand) ? rhoEA_(cand)*rho : 0.;
72 
73  return isolTrkPt < cutValue+rhoCutValue;
74 }
75 
77 value(const reco::CandidatePtr& cand) const {
78  reco::GsfElectronPtr ele(cand);
79  return ele->dr03TkSumPt();
80 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
bool ev
std::unordered_map< std::string, edm::InputTag > contentTags_
double value(const reco::CandidatePtr &cand) const override final
virtual double et() const final
transverse energy
CandidateType candidateType() const override final
result_type operator()(const reco::GsfElectronPtr &) const override final
edm::Handle< double > rhoHandle_
float dr03TkSumPt() const
Definition: GsfElectron.h:543
GsfEleTrkPtIsoRhoCut(const edm::ParameterSet &c)
et
define resolution functions of each parameter
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:94
void setConsumes(edm::ConsumesCollector &) override final
#define DEFINE_EDM_PLUGIN(factory, type, name)
void getEventContent(const edm::EventBase &) override final