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

Constructor & Destructor Documentation

◆ GBRTree() [1/2]

GBRTree::GBRTree ( )

◆ GBRTree() [2/2]

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

Member Function Documentation

◆ CutIndices() [1/2]

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

Definition at line 39 of file GBRTree.h.

39 { return fCutIndices; }

References fCutIndices.

◆ CutIndices() [2/2]

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

Definition at line 40 of file GBRTree.h.

40 { return fCutIndices; }

References fCutIndices.

◆ CutVals() [1/2]

std::vector<float>& GBRTree::CutVals ( )
inline

Definition at line 42 of file GBRTree.h.

42 { return fCutVals; }

References fCutVals.

◆ CutVals() [2/2]

const std::vector<float>& GBRTree::CutVals ( ) const
inline

Definition at line 43 of file GBRTree.h.

43 { return fCutVals; }

References fCutVals.

◆ GetResponse()

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

Definition at line 62 of file GBRTree.h.

62  {
63  int index = 0;
64  do {
65  auto r = fRightIndices[index];
66  auto l = fLeftIndices[index];
67  index = vector[fCutIndices[index]] > fCutVals[index] ? r : l;
68  } while (index > 0);
69  return fResponses[-index];
70 }

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

◆ LeftIndices() [1/2]

std::vector<int>& GBRTree::LeftIndices ( )
inline

Definition at line 45 of file GBRTree.h.

45 { return fLeftIndices; }

References fLeftIndices.

◆ LeftIndices() [2/2]

const std::vector<int>& GBRTree::LeftIndices ( ) const
inline

Definition at line 46 of file GBRTree.h.

46 { return fLeftIndices; }

References fLeftIndices.

◆ Responses() [1/2]

std::vector<float>& GBRTree::Responses ( )
inline

Definition at line 36 of file GBRTree.h.

36 { return fResponses; }

References fResponses.

◆ Responses() [2/2]

const std::vector<float>& GBRTree::Responses ( ) const
inline

Definition at line 37 of file GBRTree.h.

37 { return fResponses; }

References fResponses.

◆ RightIndices() [1/2]

std::vector<int>& GBRTree::RightIndices ( )
inline

Definition at line 48 of file GBRTree.h.

48 { return fRightIndices; }

References fRightIndices.

◆ RightIndices() [2/2]

const std::vector<int>& GBRTree::RightIndices ( ) const
inline

Definition at line 49 of file GBRTree.h.

49 { return fRightIndices; }

References fRightIndices.

◆ serialize()

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 58 of file GBRTree.h.

◆ cond::serialization::access

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

Definition at line 58 of file GBRTree.h.

Member Data Documentation

◆ fCutIndices

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

Definition at line 52 of file GBRTree.h.

Referenced by CutIndices(), and GetResponse().

◆ fCutVals

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

Definition at line 53 of file GBRTree.h.

Referenced by CutVals(), and GetResponse().

◆ fLeftIndices

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

Definition at line 54 of file GBRTree.h.

Referenced by GetResponse(), and LeftIndices().

◆ fResponses

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

Definition at line 56 of file GBRTree.h.

Referenced by GetResponse(), and Responses().

◆ fRightIndices

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

Definition at line 55 of file GBRTree.h.

Referenced by GetResponse(), and RightIndices().

GBRTree::fCutIndices
std::vector< unsigned char > fCutIndices
Definition: GBRTree.h:52
GBRTree::fLeftIndices
std::vector< int > fLeftIndices
Definition: GBRTree.h:54
GBRTree::fRightIndices
std::vector< int > fRightIndices
Definition: GBRTree.h:55
GBRTree::fCutVals
std::vector< float > fCutVals
Definition: GBRTree.h:53
GBRTree::fResponses
std::vector< float > fResponses
Definition: GBRTree.h:56
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
alignCSCRings.r
r
Definition: alignCSCRings.py:93
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46