1 #ifndef __SCREGRESSIONCALCULATOR_H__
2 #define __SCREGRESSIONCALCULATOR_H__
20 template<
class VarCalc>
29 std::pair<float,float>
39 template<
class VarCalc>
53 template<
class VarCalc>
60 gbr_record = &gbrfrom_es;
61 gbr_record->
get(eb_corr_name.c_str(),eb_corr);
62 gbr_record->get(ee_corr_name.c_str(),ee_corr);
63 if( eb_err_name.size() ) {
64 gbr_record->get(eb_err_name.c_str(),eb_err);
66 if( ee_err_name.size() ) {
67 gbr_record->get(ee_err_name.c_str(),ee_err);
72 template<
class VarCalc>
76 var_calc->set(sc,inputs);
77 switch( sc.
seed()->seed().subdetId() ) {
79 return eb_corr->GetResponse(inputs.data());
82 return ee_corr->GetResponse(inputs.data());
88 template<
class VarCalc>
92 var_calc->set(sc,inputs);
93 switch( sc.
seed()->seed().subdetId() ) {
95 return std::make_pair( eb_corr->GetResponse(inputs.data()),
96 eb_err->GetResponse(inputs.data()) );
99 return std::make_pair( ee_corr->GetResponse(inputs.data()),
100 ee_err->GetResponse(inputs.data()) );
103 return std::make_pair(-1.0
f,-1.0
f);
T getParameter(std::string const &) const
unsigned long long cacheIdentifier() const
edm::ESHandle< GBRForest > eb_corr
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
float getCorrection(const reco::SuperCluster &) const
SCRegressionCalculator(const edm::ParameterSet &)
const GBRWrapperRcd * gbr_record
std::pair< float, float > getCorrectionWithErrors(const reco::SuperCluster &) const
void get(HolderT &iHolder) const
std::unique_ptr< VarCalc > & varCalc()
edm::ESHandle< GBRForest > ee_corr
edm::ESHandle< GBRForest > ee_err
void update(const edm::EventSetup &)
const CaloClusterPtr & seed() const
seed BasicCluster
std::unique_ptr< VarCalc > var_calc
edm::ESHandle< GBRForest > eb_err