CMS 3D CMS Logo

GsfEleEmHadD1IsoRhoCut.cc
Go to the documentation of this file.
5 
7 public:
9 
10  result_type operator()(const reco::GsfElectronPtr&) const final;
11 
13  void getEventContent(const edm::EventBase&) final;
14 
15  double value(const reco::CandidatePtr& cand) const final;
16 
18 
19 private:
20  float rhoConstant_;
25 
27 };
28 
30 
33  rhoConstant_(params.getParameter<double>("rhoConstant")),
34  slopeTerm_(params, "slopeTerm"),
35  slopeStart_(params, "slopeStart"),
36  constTerm_(params, "constTerm"),
37  energyRetriever_(params.getParameter<std::string>("energyType")) {
38  edm::InputTag rhoTag = params.getParameter<edm::InputTag>("rho");
39  contentTags_.emplace("rho", rhoTag);
40 }
41 
43  auto rho = cc.consumes<double>(contentTags_["rho"]);
44  contentTokens_.emplace("rho", rho);
45 }
46 
48  ev.getByLabel(contentTags_["rho"], rhoHandle_);
49 }
50 
52  const double rho = (*rhoHandle_);
53 
54  const float isolEmHadDepth1 = cand->dr03EcalRecHitSumEt() + cand->dr03HcalDepth1TowerSumEt();
55 
56  const float sinTheta = cand->p() != 0. ? cand->pt() / cand->p() : 0.;
57  const float et = energyRetriever_(*cand) * sinTheta;
58 
59  const float cutValue =
61  return isolEmHadDepth1 < cutValue + rhoConstant_ * rho;
62 }
63 
66  return ele->dr03EcalRecHitSumEt() + ele->dr03HcalDepth1TowerSumEt();
67 }
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
GsfEleEmHadD1IsoRhoCut::getEventContent
void getEventContent(const edm::EventBase &) final
Definition: GsfEleEmHadD1IsoRhoCut.cc:47
EBEECutValues.h
GsfEleEmHadD1IsoRhoCut::rhoConstant_
float rhoConstant_
Definition: GsfEleEmHadD1IsoRhoCut.cc:20
EleEnergyRetriever
Definition: EleEnergyRetriever.h:7
GsfEleEmHadD1IsoRhoCut
Definition: GsfEleEmHadD1IsoRhoCut.cc:6
watchdog.const
const
Definition: watchdog.py:83
edm::Handle< double >
GsfEleEmHadD1IsoRhoCut::candidateType
CandidateType candidateType() const final
Definition: GsfEleEmHadD1IsoRhoCut.cc:17
GsfEleEmHadD1IsoRhoCut::value
double value(const reco::CandidatePtr &cand) const final
Definition: GsfEleEmHadD1IsoRhoCut.cc:64
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition: CutApplicatorWithEventContentBase.h:35
HLT_FULL_cff.rhoTag
rhoTag
Definition: HLT_FULL_cff.py:15052
candidate_functions::CandidateCut::result_type
bool result_type
Definition: CandidateCut.h:11
GsfEleEmHadD1IsoRhoCut::GsfEleEmHadD1IsoRhoCut
GsfEleEmHadD1IsoRhoCut(const edm::ParameterSet &c)
Definition: GsfEleEmHadD1IsoRhoCut.cc:31
CutApplicatorWithEventContentBase.h
EleEnergyRetriever.h
GsfEleEmHadD1IsoRhoCut::slopeStart_
EBEECutValues slopeStart_
Definition: GsfEleEmHadD1IsoRhoCut.cc:22
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
DDAxes::rho
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GsfEleEmHadD1IsoRhoCut::slopeTerm_
EBEECutValues slopeTerm_
Definition: GsfEleEmHadD1IsoRhoCut.cc:21
edm::ParameterSet
Definition: ParameterSet.h:47
CutApplicatorBase::CandidateType
CandidateType
Definition: CutApplicatorBase.h:47
GsfEleEmHadD1IsoRhoCut::setConsumes
void setConsumes(edm::ConsumesCollector &) final
Definition: GsfEleEmHadD1IsoRhoCut.cc:42
edmplugin::PluginFactory
Definition: PluginFactory.h:34
reco::GsfElectron::dr03HcalDepth1TowerSumEt
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:532
GsfEleEmHadD1IsoRhoCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition: GsfEleEmHadD1IsoRhoCut.cc:51
cand
Definition: decayParser.h:32
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
cc
edm::Ptr< reco::GsfElectron >
GsfEleEmHadD1IsoRhoCut::constTerm_
EBEECutValues constTerm_
Definition: GsfEleEmHadD1IsoRhoCut.cc:23
GsfEleEmHadD1IsoRhoCut::energyRetriever_
EleEnergyRetriever energyRetriever_
Definition: GsfEleEmHadD1IsoRhoCut.cc:24
std
Definition: JetResolutionObject.h:76
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition: CutApplicatorWithEventContentBase.h:40
edm::EventBase
Definition: EventBase.h:46
GsfEleEmHadD1IsoRhoCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition: GsfEleEmHadD1IsoRhoCut.cc:26
EBEECutValuesT< double >
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
reco::GsfElectron::dr03EcalRecHitSumEt
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:531
CutApplicatorWithEventContentBase
Definition: CutApplicatorWithEventContentBase.h:19