CMS 3D CMS Logo

GsfEleTrkPtIsoRhoCut.cc
Go to the documentation of this file.
7 
9 public:
11 
12  result_type operator()(const reco::GsfElectronPtr&) const final;
13 
15  void getEventContent(const edm::EventBase&) final;
16 
17  double value(const reco::CandidatePtr& cand) const final;
18 
20 
21 private:
27 
29 };
30 
32 
35  slopeTerm_(params, "slopeTerm"),
36  slopeStart_(params, "slopeStart"),
37  constTerm_(params, "constTerm"),
38  rhoEtStart_(params, "rhoEtStart"),
39  rhoEA_(params, "rhoEA") {
40  edm::InputTag rhoTag = params.getParameter<edm::InputTag>("rho");
41  contentTags_.emplace("rho", rhoTag);
42 }
43 
45  auto rho = cc.consumes<double>(contentTags_["rho"]);
46  contentTokens_.emplace("rho", rho);
47 }
48 
50 
52  const double rho = (*rhoHandle_);
53  const float isolTrkPt = cand->dr03TkSumPt();
54 
55  const float et = cand->et();
56  const float cutValue =
58 
59  const float rhoCutValue = et >= rhoEtStart_(cand) ? rhoEA_(cand) * rho : 0.;
60 
61  return isolTrkPt < cutValue + rhoCutValue;
62 }
63 
66  return ele->dr03TkSumPt();
67 }
std::unordered_map< std::string, edm::InputTag > contentTags_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
CandidateType candidateType() const final
float dr03TkSumPt() const
Definition: GsfElectron.h:557
void getEventContent(const edm::EventBase &) final
edm::Handle< double > rhoHandle_
void setConsumes(edm::ConsumesCollector &) final
GsfEleTrkPtIsoRhoCut(const edm::ParameterSet &c)
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
result_type operator()(const reco::GsfElectronPtr &) const final
#define DEFINE_EDM_PLUGIN(factory, type, name)
double value(const reco::CandidatePtr &cand) const final