1 #ifndef __SCREGRESSIONCALCULATOR_H__ 2 #define __SCREGRESSIONCALCULATOR_H__ 20 template <
class VarCalc>
38 template <
class VarCalc>
49 template <
class VarCalc>
53 if (!gbr_record || gbrfrom_es.
cacheIdentifier() != gbr_record->cacheIdentifier()) {
54 gbr_record = &gbrfrom_es;
55 gbr_record->
get(eb_corr_name.c_str(), eb_corr);
56 gbr_record->get(ee_corr_name.c_str(), ee_corr);
57 if (!eb_err_name.empty()) {
58 gbr_record->get(eb_err_name.c_str(), eb_err);
60 if (!ee_err_name.empty()) {
61 gbr_record->get(ee_err_name.c_str(), ee_err);
66 template <
class VarCalc>
70 switch (sc.
seed()->seed().subdetId()) {
72 return eb_corr->GetResponse(
inputs.data());
75 return ee_corr->GetResponse(
inputs.data());
81 template <
class VarCalc>
85 switch (sc.
seed()->seed().subdetId()) {
87 return std::make_pair(eb_corr->GetResponse(
inputs.data()), eb_err->GetResponse(
inputs.data()));
90 return std::make_pair(ee_corr->GetResponse(
inputs.data()), ee_err->GetResponse(
inputs.data()));
93 return std::make_pair(-1.0
f, -1.0
f);
T getParameter(std::string const &) const
edm::ESHandle< GBRForest > eb_corr
SCRegressionCalculator(const edm::ParameterSet &)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
const GBRWrapperRcd * gbr_record
unsigned long long cacheIdentifier() const
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
std::unique_ptr< VarCalc > & varCalc()
edm::ESHandle< GBRForest > ee_corr
float getCorrection(const reco::SuperCluster &) const
edm::ESHandle< GBRForest > ee_err
const CaloClusterPtr & seed() const
seed BasicCluster
void update(const edm::EventSetup &)
std::pair< float, float > getCorrectionWithErrors(const reco::SuperCluster &) const
std::unique_ptr< VarCalc > var_calc
edm::ESHandle< GBRForest > eb_err