CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SCRegressionCalculator< VarCalc > Class Template Reference

#include <SCRegressionCalculator.h>

Public Member Functions

float getCorrection (const reco::SuperCluster &) const
 
std::pair< float, float > getCorrectionWithErrors (const reco::SuperCluster &) const
 
 SCRegressionCalculator (const edm::ParameterSet &)
 
void update (const edm::EventSetup &)
 
std::unique_ptr< VarCalc > & varCalc ()
 

Private Attributes

edm::ESHandle< GBRForesteb_corr
 
std::string eb_corr_name
 
edm::ESHandle< GBRForesteb_err
 
std::string eb_err_name
 
edm::ESHandle< GBRForestee_corr
 
std::string ee_corr_name
 
edm::ESHandle< GBRForestee_err
 
std::string ee_err_name
 
const GBRWrapperRcdgbr_record
 
std::unique_ptr< VarCalc > var_calc
 

Detailed Description

template<class VarCalc>
class SCRegressionCalculator< VarCalc >

Definition at line 21 of file SCRegressionCalculator.h.

Constructor & Destructor Documentation

◆ SCRegressionCalculator()

template<class VarCalc >
SCRegressionCalculator< VarCalc >::SCRegressionCalculator ( const edm::ParameterSet conf)

Member Function Documentation

◆ getCorrection()

template<class VarCalc >
float SCRegressionCalculator< VarCalc >::getCorrection ( const reco::SuperCluster sc) const

Definition at line 67 of file SCRegressionCalculator.h.

67  {
68  std::vector<float> inputs;
69  var_calc->set(sc, inputs);
70  switch (sc.seed()->seed().subdetId()) {
72  return eb_corr->GetResponse(inputs.data());
73  break;
75  return ee_corr->GetResponse(inputs.data());
76  break;
77  }
78  return -1.0f;
79 }

References EcalBarrel, EcalEndcap, PixelMapPlotter::inputs, and reco::SuperCluster::seed().

◆ getCorrectionWithErrors()

template<class VarCalc >
std::pair< float, float > SCRegressionCalculator< VarCalc >::getCorrectionWithErrors ( const reco::SuperCluster sc) const

Definition at line 82 of file SCRegressionCalculator.h.

82  {
83  std::vector<float> inputs;
84  var_calc->set(sc, inputs);
85  switch (sc.seed()->seed().subdetId()) {
87  return std::make_pair(eb_corr->GetResponse(inputs.data()), eb_err->GetResponse(inputs.data()));
88  break;
90  return std::make_pair(ee_corr->GetResponse(inputs.data()), ee_err->GetResponse(inputs.data()));
91  break;
92  }
93  return std::make_pair(-1.0f, -1.0f);
94 }

References EcalBarrel, EcalEndcap, f, PixelMapPlotter::inputs, and reco::SuperCluster::seed().

◆ update()

template<class VarCalc >
void SCRegressionCalculator< VarCalc >::update ( const edm::EventSetup es)

◆ varCalc()

template<class VarCalc >
std::unique_ptr<VarCalc>& SCRegressionCalculator< VarCalc >::varCalc ( )
inline

Definition at line 26 of file SCRegressionCalculator.h.

26 { return var_calc; }

References SCRegressionCalculator< VarCalc >::var_calc.

Member Data Documentation

◆ eb_corr

template<class VarCalc >
edm::ESHandle<GBRForest> SCRegressionCalculator< VarCalc >::eb_corr
private

Definition at line 34 of file SCRegressionCalculator.h.

◆ eb_corr_name

template<class VarCalc >
std::string SCRegressionCalculator< VarCalc >::eb_corr_name
private

◆ eb_err

template<class VarCalc >
edm::ESHandle<GBRForest> SCRegressionCalculator< VarCalc >::eb_err
private

Definition at line 34 of file SCRegressionCalculator.h.

◆ eb_err_name

template<class VarCalc >
std::string SCRegressionCalculator< VarCalc >::eb_err_name
private

◆ ee_corr

template<class VarCalc >
edm::ESHandle<GBRForest> SCRegressionCalculator< VarCalc >::ee_corr
private

Definition at line 34 of file SCRegressionCalculator.h.

◆ ee_corr_name

template<class VarCalc >
std::string SCRegressionCalculator< VarCalc >::ee_corr_name
private

◆ ee_err

template<class VarCalc >
edm::ESHandle<GBRForest> SCRegressionCalculator< VarCalc >::ee_err
private

Definition at line 34 of file SCRegressionCalculator.h.

◆ ee_err_name

template<class VarCalc >
std::string SCRegressionCalculator< VarCalc >::ee_err_name
private

◆ gbr_record

template<class VarCalc >
const GBRWrapperRcd* SCRegressionCalculator< VarCalc >::gbr_record
private

Definition at line 33 of file SCRegressionCalculator.h.

◆ var_calc

template<class VarCalc >
std::unique_ptr<VarCalc> SCRegressionCalculator< VarCalc >::var_calc
private
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
SCRegressionCalculator::ee_corr
edm::ESHandle< GBRForest > ee_corr
Definition: SCRegressionCalculator.h:34
SCRegressionCalculator::eb_err_name
std::string eb_err_name
Definition: SCRegressionCalculator.h:32
SCRegressionCalculator::eb_err
edm::ESHandle< GBRForest > eb_err
Definition: SCRegressionCalculator.h:34
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:160
EcalBarrel
Definition: EcalSubdetector.h:10
SCRegressionCalculator::gbr_record
const GBRWrapperRcd * gbr_record
Definition: SCRegressionCalculator.h:33
GBRForest::GetResponse
double GetResponse(const float *vector) const
Definition: GBRForest.h:49
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
SCRegressionCalculator::ee_err_name
std::string ee_err_name
Definition: SCRegressionCalculator.h:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
reco::SuperCluster::seed
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
SCRegressionCalculator::ee_corr_name
std::string ee_corr_name
Definition: SCRegressionCalculator.h:32
SCRegressionCalculator::ee_err
edm::ESHandle< GBRForest > ee_err
Definition: SCRegressionCalculator.h:34
SCRegressionCalculator::eb_corr_name
std::string eb_corr_name
Definition: SCRegressionCalculator.h:32
PixelMapPlotter.inputs
inputs
Definition: PixelMapPlotter.py:490
SCRegressionCalculator::eb_corr
edm::ESHandle< GBRForest > eb_corr
Definition: SCRegressionCalculator.h:34
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
GBRWrapperRcd
Definition: GBRWrapperRcd.h:24
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
edm::eventsetup::EventSetupRecord::cacheIdentifier
unsigned long long cacheIdentifier() const
Definition: EventSetupRecord.h:185
SCRegressionCalculator::var_calc
std::unique_ptr< VarCalc > var_calc
Definition: SCRegressionCalculator.h:35