CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  :
6 {
7 
8 }
double fInitialResponse
Definition: GBRForestD.h:44
template<typename InputForestT >
GBRForestD::GBRForestD ( const InputForestT &  forest)

Definition at line 61 of file GBRForestD.h.

References fTrees.

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

Definition at line 11 of file GBRForestD.cc.

12 {
13 }

Member Function Documentation

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

Definition at line 51 of file GBRForestD.h.

References fInitialResponse, and fTrees.

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

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

Definition at line 37 of file GBRForestD.h.

References fInitialResponse.

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

Definition at line 38 of file GBRForestD.h.

References fInitialResponse.

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

Definition at line 40 of file GBRForestD.h.

References fTrees.

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

Definition at line 41 of file GBRForestD.h.

References fTrees.

41 { return fTrees; }
std::vector< GBRTreeD > fTrees
Definition: GBRForestD.h:45

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 47 of file GBRForestD.h.

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

Definition at line 47 of file GBRForestD.h.

Member Data Documentation

double GBRForestD::fInitialResponse
protected

Definition at line 44 of file GBRForestD.h.

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

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

Definition at line 45 of file GBRForestD.h.

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