CMS 3D CMS Logo

EgammaRegressionContainer.cc
Go to the documentation of this file.
2 
9 
11  : outputTransformerLowEt_(iConfig.getParameter<double>("rangeMinLowEt"),
12  iConfig.getParameter<double>("rangeMaxLowEt")),
13  outputTransformerHighEt_(iConfig.getParameter<double>("rangeMinHighEt"),
14  iConfig.getParameter<double>("rangeMaxHighEt")),
15  forceHighEnergyTrainingIfSaturated_(iConfig.getParameter<bool>("forceHighEnergyTrainingIfSaturated")),
16  lowEtHighEtBoundary_(iConfig.getParameter<double>("lowEtHighEtBoundary")),
17  ebLowEtForestName_(iConfig.getParameter<std::string>("ebLowEtForestName")),
18  ebHighEtForestName_(iConfig.getParameter<std::string>("ebHighEtForestName")),
19  eeLowEtForestName_(iConfig.getParameter<std::string>("eeLowEtForestName")),
20  eeHighEtForestName_(iConfig.getParameter<std::string>("eeHighEtForestName")),
21  ebLowEtForest_(nullptr),
22  ebHighEtForest_(nullptr),
23  eeLowEtForest_(nullptr),
24  eeHighEtForest_(nullptr) {}
25 
28  desc.add<double>("rangeMinLowEt", -1.);
29  desc.add<double>("rangeMaxLowEt", 3.0);
30  desc.add<double>("rangeMinHighEt", -1.);
31  desc.add<double>("rangeMaxHighEt", 3.0);
32  desc.add<double>("lowEtHighEtBoundary", 50.);
33  desc.add<bool>("forceHighEnergyTrainingIfSaturated", false);
34  desc.add<std::string>("ebLowEtForestName", "electron_eb_ECALTRK_lowpt");
35  desc.add<std::string>("ebHighEtForestName", "electron_eb_ECALTRK");
36  desc.add<std::string>("eeLowEtForestName", "electron_ee_ECALTRK_lowpt");
37  desc.add<std::string>("eeHighEtForestName", "electron_ee_ECALTRK");
38  return desc;
39 }
40 
41 namespace {
42  const GBRForestD* getForest(const edm::EventSetup& iSetup, const std::string& name) {
44  iSetup.get<GBRDWrapperRcd>().get(name, handle);
45  return handle.product();
46  }
47 } // namespace
48 
50  ebLowEtForest_ = getForest(iSetup, ebLowEtForestName_);
51  ebHighEtForest_ = getForest(iSetup, ebHighEtForestName_);
52  eeLowEtForest_ = getForest(iSetup, eeLowEtForestName_);
53  eeHighEtForest_ = getForest(iSetup, eeHighEtForestName_);
54 }
55 
57  const bool isEB,
58  const bool isSaturated,
59  const float* data) const {
60  if (useLowEtBin(et, isSaturated)) {
61  if (isEB)
63  else
65  } else {
66  if (isEB)
68  else
70  }
71 }
72 
73 bool EgammaRegressionContainer::useLowEtBin(const float et, const bool isSaturated) const {
75  return false;
76  else
77  return et < lowEtHighEtBoundary_;
78 }
EgammaRegressionContainer::forceHighEnergyTrainingIfSaturated_
bool forceHighEnergyTrainingIfSaturated_
Definition: EgammaRegressionContainer.h:41
EgammaRegressionContainer::outputTransformerLowEt_
const EgammaBDTOutputTransformer outputTransformerLowEt_
Definition: EgammaRegressionContainer.h:38
electrons_cff.bool
bool
Definition: electrons_cff.py:372
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
GBRForestD::GetResponse
double GetResponse(const float *vector) const
Definition: GBRForestD.h:52
ESHandle.h
patZpeak.handle
handle
Definition: patZpeak.py:23
EgammaRegressionContainer::lowEtHighEtBoundary_
const float lowEtHighEtBoundary_
Definition: EgammaRegressionContainer.h:42
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EgammaRegressionContainer::setEventContent
void setEventContent(const edm::EventSetup &iSetup)
Definition: EgammaRegressionContainer.cc:49
GBRDWrapperRcd
Definition: GBRDWrapperRcd.h:24
EgammaRegressionContainer::ebLowEtForest_
const GBRForestD * ebLowEtForest_
Definition: EgammaRegressionContainer.h:48
EgammaRegressionContainer::makePSetDescription
static edm::ParameterSetDescription makePSetDescription()
Definition: EgammaRegressionContainer.cc:26
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
CastorSimpleRecAlgoImpl::isSaturated
bool isSaturated(const Digi &digi, const int &maxADCvalue, int ifirst, int n)
Definition: CastorSimpleRecAlgo.cc:97
edm::ESHandle
Definition: DTSurvey.h:22
EgammaRegressionContainer::ebHighEtForestName_
const std::string ebHighEtForestName_
Definition: EgammaRegressionContainer.h:44
GBRDWrapperRcd.h
GBRForestD
Definition: GBRForestD.h:27
ParameterSetDescription.h
GBRForestD.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EgammaRegressionContainer.h
EgammaRegressionContainer::operator()
float operator()(const float et, const bool isEB, const bool isSaturated, const float *data) const
Definition: EgammaRegressionContainer.cc:56
edm::ParameterSet
Definition: ParameterSet.h:36
EgammaRegressionContainer::eeHighEtForestName_
const std::string eeHighEtForestName_
Definition: EgammaRegressionContainer.h:46
EgammaRegressionContainer::eeHighEtForest_
const GBRForestD * eeHighEtForest_
Definition: EgammaRegressionContainer.h:51
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
EgammaRegressionContainer::eeLowEtForest_
const GBRForestD * eeLowEtForest_
Definition: EgammaRegressionContainer.h:50
EgammaRegressionContainer::EgammaRegressionContainer
EgammaRegressionContainer(const edm::ParameterSet &iConfig)
Definition: EgammaRegressionContainer.cc:10
std
Definition: JetResolutionObject.h:76
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EgammaRegressionContainer::eeLowEtForestName_
const std::string eeLowEtForestName_
Definition: EgammaRegressionContainer.h:45
EgammaRegressionContainer::outputTransformerHighEt_
const EgammaBDTOutputTransformer outputTransformerHighEt_
Definition: EgammaRegressionContainer.h:39
ParameterSet.h
EgammaRegressionContainer::ebLowEtForestName_
const std::string ebLowEtForestName_
Definition: EgammaRegressionContainer.h:43
EgammaRegressionContainer::useLowEtBin
bool useLowEtBin(const float et, const bool isSaturated) const
Definition: EgammaRegressionContainer.cc:73
EgammaRegressionContainer::ebHighEtForest_
const GBRForestD * ebHighEtForest_
Definition: EgammaRegressionContainer.h:49