CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Friends
GBRForest Class Reference

#include <GBRForest.h>

Public Member Functions

 GBRForest ()
 
double GetAdaBoostClassifier (const float *vector) const
 
double GetClassifier (const float *vector) const
 
double GetGradBoostClassifier (const float *vector) const
 
double GetResponse (const float *vector) const
 
void SetInitialResponse (double response)
 
std::vector< GBRTree > & Trees ()
 
const std::vector< GBRTree > & Trees () const
 

Protected Attributes

double fInitialResponse = 0.0
 
std::vector< GBRTreefTrees
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 24 of file GBRForest.h.

Constructor & Destructor Documentation

◆ GBRForest()

GBRForest::GBRForest ( )
inline

Definition at line 26 of file GBRForest.h.

26 {}

Member Function Documentation

◆ GetAdaBoostClassifier()

double GBRForest::GetAdaBoostClassifier ( const float *  vector) const
inline

Definition at line 30 of file GBRForest.h.

References GetResponse(), and trackerHitRTTI::vector.

30 { return GetResponse(vector); }
double GetResponse(const float *vector) const
Definition: GBRForest.h:48

◆ GetClassifier()

double GBRForest::GetClassifier ( const float *  vector) const
inline

◆ GetGradBoostClassifier()

double GBRForest::GetGradBoostClassifier ( const float *  vector) const
inline

Definition at line 57 of file GBRForest.h.

References JetChargeProducer_cfi::exp, GetResponse(), G2GainsValidator::response, and trackerHitRTTI::vector.

Referenced by PhotonMVABasedHaloTagger::calculateMVA(), and GetClassifier().

57  {
58  double response = GetResponse(vector);
59  return 2.0 / (1.0 + std::exp(-2.0 * response)) - 1; //MVA output between -1 and 1
60 }
double GetResponse(const float *vector) const
Definition: GBRForest.h:48

◆ GetResponse()

double GBRForest::GetResponse ( const float *  vector) const
inline

Definition at line 48 of file GBRForest.h.

References fInitialResponse, fTrees, G2GainsValidator::response, and trackerHitRTTI::vector.

Referenced by RegressionHelper::applyCombinationRegression(), EGEnergyCorrector::CorrectedEnergyWithError(), EGEnergyCorrector::CorrectedEnergyWithErrorV3(), GetAdaBoostClassifier(), RegressionHelper::getEcalRegression(), GetGradBoostClassifier(), PFMETAlgorithmMVA::GetResponse(), EGRegressionModifierV1::modifyObject(), ElectronEnergyRegressionEvaluate::regressionUncertaintyNoTrkVar(), ElectronEnergyRegressionEvaluate::regressionUncertaintyNoTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithSubClusters(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVar(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVarV2(), ElectronEnergyRegressionEvaluate::regressionValueNoTrkVar(), ElectronEnergyRegressionEvaluate::regressionValueNoTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionValueWithSubClusters(), ElectronEnergyRegressionEvaluate::regressionValueWithTrkVar(), ElectronEnergyRegressionEvaluate::regressionValueWithTrkVarV1(), and ElectronEnergyRegressionEvaluate::regressionValueWithTrkVarV2().

48  {
49  double response = fInitialResponse;
50  for (auto const& tree : fTrees) {
51  response += tree.GetResponse(vector);
52  }
53  return response;
54 }
double fInitialResponse
Definition: GBRForest.h:41
std::vector< GBRTree > fTrees
Definition: GBRForest.h:42
Definition: tree.py:1

◆ serialize()

template<class Archive >
void GBRForest::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ SetInitialResponse()

void GBRForest::SetInitialResponse ( double  response)
inline

Definition at line 35 of file GBRForest.h.

References fInitialResponse, and G2GainsValidator::response.

◆ Trees() [1/2]

std::vector<GBRTree>& GBRForest::Trees ( )
inline

Definition at line 37 of file GBRForest.h.

References fTrees.

37 { return fTrees; }
std::vector< GBRTree > fTrees
Definition: GBRForest.h:42

◆ Trees() [2/2]

const std::vector<GBRTree>& GBRForest::Trees ( ) const
inline

Definition at line 38 of file GBRForest.h.

References fTrees.

38 { return fTrees; }
std::vector< GBRTree > fTrees
Definition: GBRForest.h:42

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 44 of file GBRForest.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 44 of file GBRForest.h.

Member Data Documentation

◆ fInitialResponse

double GBRForest::fInitialResponse = 0.0
protected

Definition at line 41 of file GBRForest.h.

Referenced by GetResponse(), and SetInitialResponse().

◆ fTrees

std::vector<GBRTree> GBRForest::fTrees
protected

Definition at line 42 of file GBRForest.h.

Referenced by GetResponse(), and Trees().