CMS 3D CMS Logo

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

#include <GBRForestD.h>

Public Types

typedef GBRTreeD TreeT
 

Public Member Functions

 GBRForestD ()
 
template<typename InputForestT >
 GBRForestD (const InputForestT &forest)
 
double GetResponse (const float *vector) const
 
double InitialResponse () const
 
void SetInitialResponse (double response)
 
std::vector< GBRTreeD > & Trees ()
 
const std::vector< GBRTreeD > & Trees () const
 
virtual ~GBRForestD ()
 

Protected Attributes

double fInitialResponse
 
std::vector< GBRTreeDfTrees
 

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 27 of file GBRForestD.h.

Member Typedef Documentation

Definition at line 29 of file GBRForestD.h.

Constructor & Destructor Documentation

GBRForestD::GBRForestD ( )

Definition at line 4 of file GBRForestD.cc.

4 : fInitialResponse(0.) {}
double fInitialResponse
Definition: GBRForestD.h:45
template<typename InputForestT >
GBRForestD::GBRForestD ( const InputForestT &  forest)

Definition at line 63 of file GBRForestD.h.

References fTrees.

63  : fInitialResponse(forest.InitialResponse()) {
64  //templated constructor to allow construction from Forest classes in GBRLikelihood
65  //without creating an explicit dependency
66 
67  for (typename std::vector<typename InputForestT::TreeT>::const_iterator treeit = forest.Trees().begin();
68  treeit != forest.Trees().end();
69  ++treeit) {
70  fTrees.push_back(GBRTreeD(*treeit));
71  }
72 }
std::vector< GBRTreeD > fTrees
Definition: GBRForestD.h:46
double fInitialResponse
Definition: GBRForestD.h:45
GBRForestD::~GBRForestD ( )
virtual

Definition at line 7 of file GBRForestD.cc.

7 {}

Member Function Documentation

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

Definition at line 52 of file GBRForestD.h.

References fInitialResponse, and fTrees.

Referenced by PFClusterEMEnergyCorrector::correctEnergies(), SCEnergyCorrectorSemiParm::getCorrections(), and EgammaRegressionContainer::operator()().

52  {
53  double response = fInitialResponse;
54  for (std::vector<GBRTreeD>::const_iterator it = fTrees.begin(); it != fTrees.end(); ++it) {
55  int termidx = it->TerminalIndex(vector);
56  response += it->GetResponse(termidx);
57  }
58  return response;
59 }
std::vector< GBRTreeD > fTrees
Definition: GBRForestD.h:46
double fInitialResponse
Definition: GBRForestD.h:45
double GBRForestD::InitialResponse ( ) const
inline

Definition at line 38 of file GBRForestD.h.

References fInitialResponse.

38 { return fInitialResponse; }
double fInitialResponse
Definition: GBRForestD.h:45
template<class Archive >
void GBRForestD::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void GBRForestD::SetInitialResponse ( double  response)
inline

Definition at line 39 of file GBRForestD.h.

References fInitialResponse.

39 { fInitialResponse = response; }
double fInitialResponse
Definition: GBRForestD.h:45
std::vector<GBRTreeD>& GBRForestD::Trees ( )
inline

Definition at line 41 of file GBRForestD.h.

References fTrees.

41 { return fTrees; }
std::vector< GBRTreeD > fTrees
Definition: GBRForestD.h:46
const std::vector<GBRTreeD>& GBRForestD::Trees ( ) const
inline

Definition at line 42 of file GBRForestD.h.

References fTrees.

42 { return fTrees; }
std::vector< GBRTreeD > fTrees
Definition: GBRForestD.h:46

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 48 of file GBRForestD.h.

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

Definition at line 48 of file GBRForestD.h.

Member Data Documentation

double GBRForestD::fInitialResponse
protected

Definition at line 45 of file GBRForestD.h.

Referenced by GetResponse(), InitialResponse(), and SetInitialResponse().

std::vector<GBRTreeD> GBRForestD::fTrees
protected

Definition at line 46 of file GBRForestD.h.

Referenced by GBRForestD(), GetResponse(), and Trees().