PandaRoot
DecayTreeFitter::Projection Class Reference

#include <Projection.h>

Public Member Functions

 Projection (int dimP, int dimC)
 
virtual ~Projection ()
 
const TMatrixDH () const
 
double & H (int row, int col)
 
const TVectorD & r () const
 
TVectorD & r ()
 
double & r (int row)
 
const TMatrixDSym & V () const
 
double & V (int row, int col)
 
double & Vfast (int row, int col)
 
void reset ()
 
double chiSquare () const
 
void incrementOffset (unsigned int i)
 
unsigned int offset () const
 
void setParticle (const ParticleBase &p)
 
const ParticleBaseparticle () const
 

Detailed Description

Definition at line 19 of file Projection.h.

Constructor & Destructor Documentation

◆ Projection()

DecayTreeFitter::Projection::Projection ( int  dimP,
int  dimC 
)
inline

Definition at line 22 of file Projection.h.

22 : m_matrixH(dimC, dimP), m_r(dimC), m_matrixV(dimC), m_offset(0), m_particle(nullptr), m_nHidden(0) {}

◆ ~Projection()

virtual DecayTreeFitter::Projection::~Projection ( )
inlinevirtual

Definition at line 23 of file Projection.h.

23 {};

Member Function Documentation

◆ chiSquare()

double DecayTreeFitter::Projection::chiSquare ( ) const
inline

Definition at line 78 of file Projection.h.

79  {
80  TMatrixDSym W = m_matrixV;
81  double det = 0;
82  W.InvertFast(&det);
83  return W.Similarity(m_r);
84  }

◆ H() [1/2]

const TMatrixD& DecayTreeFitter::Projection::H ( ) const
inline

Definition at line 26 of file Projection.h.

26 { return m_matrixH; }

◆ H() [2/2]

double& DecayTreeFitter::Projection::H ( int  row,
int  col 
)
inline

Definition at line 28 of file Projection.h.

29  {
30 #ifdef VTK_BOUNDSCHECKING
31  assert(m_offset + row > 0 && col > 0 && m_offset + row <= m_matrixH.GetNrows() && col <= m_matrixH.GetNcols());
32 #endif
33  return m_matrixH(m_offset + row, col);
34  }

◆ incrementOffset()

void DecayTreeFitter::Projection::incrementOffset ( unsigned int  i)
inline

Definition at line 86 of file Projection.h.

References i.

86 { m_offset += i; }
unsigned int i
Definition: P4_F32vec4.h:21

◆ offset()

unsigned int DecayTreeFitter::Projection::offset ( ) const
inline

Definition at line 87 of file Projection.h.

87 { return m_offset; }

◆ particle()

const ParticleBase* DecayTreeFitter::Projection::particle ( ) const
inline

Definition at line 90 of file Projection.h.

90 { return m_particle; }

◆ r() [1/3]

const TVectorD& DecayTreeFitter::Projection::r ( ) const
inline

Definition at line 37 of file Projection.h.

37 { return m_r; }

◆ r() [2/3]

TVectorD& DecayTreeFitter::Projection::r ( )
inline

Definition at line 38 of file Projection.h.

38 { return m_r; }

◆ r() [3/3]

double& DecayTreeFitter::Projection::r ( int  row)
inline

Definition at line 40 of file Projection.h.

41  {
42 #ifdef VTK_BOUNDSCHECKING
43  assert(m_offset + row > 0 && m_offset + row <= m_r.GetNrows());
44 #endif
45  return m_r(m_offset + row);
46  }

◆ reset()

void DecayTreeFitter::Projection::reset ( )
inline

Definition at line 62 of file Projection.h.

63  {
64  // fill everything with '0'. this implementation is kind of
65  // tricky, but it is fast.
66  // int dimC = m_matrixH.GetNrows() ;
67  // int dimP = m_matrixH.GetNcols() ;
68  // memset(&(m_matrixH(1,1)),0,dimP*dimC*sizeof(double));
69  // memset(&(m_r(1)) ,0,dimC*sizeof(double));
70  // memset(&(m_matrixV(1,1)),0,dimC*(dimC+1)/2*sizeof(double));
71  m_matrixH.Zero();
72  m_r.Zero();
73  m_matrixV.Zero();
74  m_offset = 0;
75  }

◆ setParticle()

void DecayTreeFitter::Projection::setParticle ( const ParticleBase p)
inline

Definition at line 89 of file Projection.h.

89 { m_particle = &p; }

◆ V() [1/2]

const TMatrixDSym& DecayTreeFitter::Projection::V ( ) const
inline

Definition at line 49 of file Projection.h.

49 { return m_matrixV; }

◆ V() [2/2]

double& DecayTreeFitter::Projection::V ( int  row,
int  col 
)
inline

Definition at line 51 of file Projection.h.

51 { return m_matrixV(m_offset + row, m_offset + col); }

◆ Vfast()

double& DecayTreeFitter::Projection::Vfast ( int  row,
int  col 
)
inline

Definition at line 52 of file Projection.h.

53  {
54 #ifdef VTK_BOUNDSCHECKING
55  assert(m_offset + row > 0 && m_offset + col > 0 && m_offset + row <= m_matrixV.GetNrows() && m_offset + col <= m_matrixV.GetNcols() && row >= col);
56 #endif
57  return m_matrixV(m_offset + row, m_offset + col);
58  }

The documentation for this class was generated from the following file: