CMS 3D CMS Logo

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

#include <GBRTree.h>

Public Member Functions

std::vector< unsigned char > & CutIndices ()
 
const std::vector< unsigned char > & CutIndices () const
 
std::vector< float > & CutVals ()
 
const std::vector< float > & CutVals () const
 
 GBRTree ()
 
 GBRTree (int nIntermediate, int nTerminal)
 
double GetResponse (const float *vector) const
 
std::vector< int > & LeftIndices ()
 
const std::vector< int > & LeftIndices () const
 
std::vector< float > & Responses ()
 
const std::vector< float > & Responses () const
 
std::vector< int > & RightIndices ()
 
const std::vector< int > & RightIndices () const
 

Protected Attributes

std::vector< unsigned char > fCutIndices
 
std::vector< float > fCutVals
 
std::vector< int > fLeftIndices
 
std::vector< float > fResponses
 
std::vector< int > fRightIndices
 

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 30 of file GBRTree.h.

Constructor & Destructor Documentation

GBRTree::GBRTree ( )
GBRTree::GBRTree ( int  nIntermediate,
int  nTerminal 
)
explicit

Member Function Documentation

std::vector<unsigned char>& GBRTree::CutIndices ( )
inline

Definition at line 42 of file GBRTree.h.

References fCutIndices.

42 { return fCutIndices; }
std::vector< unsigned char > fCutIndices
Definition: GBRTree.h:56
const std::vector<unsigned char>& GBRTree::CutIndices ( ) const
inline

Definition at line 43 of file GBRTree.h.

References fCutIndices.

43 { return fCutIndices; }
std::vector< unsigned char > fCutIndices
Definition: GBRTree.h:56
std::vector<float>& GBRTree::CutVals ( )
inline

Definition at line 45 of file GBRTree.h.

References fCutVals.

45 { return fCutVals; }
std::vector< float > fCutVals
Definition: GBRTree.h:57
const std::vector<float>& GBRTree::CutVals ( ) const
inline

Definition at line 46 of file GBRTree.h.

References fCutVals.

46 { return fCutVals; }
std::vector< float > fCutVals
Definition: GBRTree.h:57
double GBRTree::GetResponse ( const float *  vector) const
inline

Definition at line 67 of file GBRTree.h.

References fCutIndices, fCutVals, fLeftIndices, fResponses, fRightIndices, checklumidiff::l, and alignCSCRings::r.

68 {
69  int index = 0;
70  do {
71  auto r = fRightIndices[index];
72  auto l = fLeftIndices[index];
73  index = vector[fCutIndices[index]] > fCutVals[index] ? r : l;
74  } while (index>0);
75  return fResponses[-index];
76 }
std::vector< int > fRightIndices
Definition: GBRTree.h:59
std::vector< float > fResponses
Definition: GBRTree.h:60
std::vector< float > fCutVals
Definition: GBRTree.h:57
std::vector< int > fLeftIndices
Definition: GBRTree.h:58
std::vector< unsigned char > fCutIndices
Definition: GBRTree.h:56
std::vector<int>& GBRTree::LeftIndices ( )
inline

Definition at line 48 of file GBRTree.h.

References fLeftIndices.

48 { return fLeftIndices; }
std::vector< int > fLeftIndices
Definition: GBRTree.h:58
const std::vector<int>& GBRTree::LeftIndices ( ) const
inline

Definition at line 49 of file GBRTree.h.

References fLeftIndices.

49 { return fLeftIndices; }
std::vector< int > fLeftIndices
Definition: GBRTree.h:58
std::vector<float>& GBRTree::Responses ( )
inline

Definition at line 39 of file GBRTree.h.

References fResponses.

39 { return fResponses; }
std::vector< float > fResponses
Definition: GBRTree.h:60
const std::vector<float>& GBRTree::Responses ( ) const
inline

Definition at line 40 of file GBRTree.h.

References fResponses.

40 { return fResponses; }
std::vector< float > fResponses
Definition: GBRTree.h:60
std::vector<int>& GBRTree::RightIndices ( )
inline

Definition at line 51 of file GBRTree.h.

References fRightIndices.

51 { return fRightIndices; }
std::vector< int > fRightIndices
Definition: GBRTree.h:59
const std::vector<int>& GBRTree::RightIndices ( ) const
inline

Definition at line 52 of file GBRTree.h.

References fRightIndices.

52 { return fRightIndices; }
std::vector< int > fRightIndices
Definition: GBRTree.h:59
template<class Archive >
void GBRTree::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 63 of file GBRTree.h.

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

Definition at line 63 of file GBRTree.h.

Member Data Documentation

std::vector<unsigned char> GBRTree::fCutIndices
protected

Definition at line 56 of file GBRTree.h.

Referenced by CutIndices(), and GetResponse().

std::vector<float> GBRTree::fCutVals
protected

Definition at line 57 of file GBRTree.h.

Referenced by CutVals(), and GetResponse().

std::vector<int> GBRTree::fLeftIndices
protected

Definition at line 58 of file GBRTree.h.

Referenced by GetResponse(), and LeftIndices().

std::vector<float> GBRTree::fResponses
protected

Definition at line 60 of file GBRTree.h.

Referenced by GetResponse(), and Responses().

std::vector<int> GBRTree::fRightIndices
protected

Definition at line 59 of file GBRTree.h.

Referenced by GetResponse(), and RightIndices().