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

◆ TreeT

Definition at line 29 of file GBRForestD.h.

Constructor & Destructor Documentation

◆ GBRForestD() [1/2]

GBRForestD::GBRForestD ( )

Definition at line 4 of file GBRForestD.cc.

4 : fInitialResponse(0.) {}

◆ GBRForestD() [2/2]

template<typename InputForestT >
GBRForestD::GBRForestD ( const InputForestT &  forest)

Definition at line 63 of file GBRForestD.h.

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 }

References fTrees.

◆ ~GBRForestD()

GBRForestD::~GBRForestD ( )
virtual

Definition at line 7 of file GBRForestD.cc.

7 {}

Member Function Documentation

◆ GetResponse()

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

Definition at line 52 of file GBRForestD.h.

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 }

References fInitialResponse, fTrees, and trackerHitRTTI::vector.

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

◆ InitialResponse()

double GBRForestD::InitialResponse ( ) const
inline

Definition at line 38 of file GBRForestD.h.

38 { return fInitialResponse; }

References fInitialResponse.

◆ serialize()

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

◆ SetInitialResponse()

void GBRForestD::SetInitialResponse ( double  response)
inline

Definition at line 39 of file GBRForestD.h.

39 { fInitialResponse = response; }

References fInitialResponse.

◆ Trees() [1/2]

std::vector<GBRTreeD>& GBRForestD::Trees ( )
inline

Definition at line 41 of file GBRForestD.h.

41 { return fTrees; }

References fTrees.

◆ Trees() [2/2]

const std::vector<GBRTreeD>& GBRForestD::Trees ( ) const
inline

Definition at line 42 of file GBRForestD.h.

42 { return fTrees; }

References fTrees.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 48 of file GBRForestD.h.

◆ cond::serialization::access

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

Definition at line 48 of file GBRForestD.h.

Member Data Documentation

◆ fInitialResponse

double GBRForestD::fInitialResponse
protected

Definition at line 45 of file GBRForestD.h.

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

◆ fTrees

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

Definition at line 46 of file GBRForestD.h.

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

GBRForestD::fTrees
std::vector< GBRTreeD > fTrees
Definition: GBRForestD.h:46
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
GBRForestD::fInitialResponse
double fInitialResponse
Definition: GBRForestD.h:45
GBRTreeD
Definition: GBRTreeD.h:33