ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::TrkClusterNode Class Reference

#include <TrkFilteringNodes.h>

Inheritance diagram for Trk::TrkClusterNode:
Collaboration diagram for Trk::TrkClusterNode:

Public Member Functions

 TrkClusterNode (TrkPlanarSurface *, double, const PrepRawData *)
 TrkClusterNode (TrkPlanarSurface *, double, double, double)
virtual ~TrkClusterNode ()
virtual void validateMeasurement (TrkTrackState *)
virtual void updateTrackState (TrkTrackState *)
virtual double getChi2Distance (TrkTrackState *)
virtual void serialize (char fileName[])
virtual void report ()
virtual void updateWithRIO (const RIO_OnTrack *)
virtual int getKalmanGain (double[5][2])
virtual int getResiduals (double[2])
virtual int getInverseResidualVariance (double[2][2])
virtual int getMeasurementMatrix (double[2][5])
virtual void runKalmanFilter (TrkTrackState *)
virtual double calculateChi2 ()
virtual bool isValidated ()
virtual void setNodeState (int)
virtual int getNodeState ()
virtual void setNodeType (char)
virtual char getNodeType ()
virtual void updateInternal ()
TrkTrackStategetTrackState ()
virtual TrkPlanarSurfacegetSurface ()
virtual const PrepRawDatagetPrepRawData ()
double getChi2 () const
int getNdof () const

Protected Attributes

double m_B [5]
double m_D
double m_H [5]
double m_K [5]
double m_resid
double m_m
double m_V
int m_nodeState
double m_chi2Cut
char m_nodeType
TrkPlanarSurfacem_pSurface
const PrepRawDatam_pPRD
double m_dChi2
int m_ndof
TrkTrackStatem_pTrackState

Detailed Description

Constructor & Destructor Documentation

◆ TrkClusterNode() [1/2]

◆ TrkClusterNode() [2/2]

TrkClusterNode::TrkClusterNode ( TrkPlanarSurface * pS,
double chi2Cut,
double pos,
double cov )

Definition at line 137 of file TrkFilteringNodes.cxx.

137 {
138 m_pSurface = pS;
139 m_chi2Cut = chi2Cut;
140 m_m = pos;
141 m_V = cov;
142 m_pPRD = nullptr;
143 m_nodeType = 2;
144 m_ndof = 1;
145 }

◆ ~TrkClusterNode()

virtual Trk::TrkClusterNode::~TrkClusterNode ( )
inlinevirtual

Member Function Documentation

◆ calculateChi2()

◆ getChi2()

double TrkBaseNode::getChi2 ( ) const
inherited

◆ getChi2Distance()

double TrkClusterNode::getChi2Distance ( TrkTrackState * pTS)
virtual

Implements Trk::TrkBaseNode.

Definition at line 161 of file TrkFilteringNodes.cxx.

◆ getInverseResidualVariance()

int TrkFilteringNode1D::getInverseResidualVariance ( double V[2][2])
virtualinherited

Implements Trk::TrkBaseNode.

Definition at line 63 of file TrkFilteringNodes.cxx.

63 {
64 V[0][0] = m_D;
65 return 1;
66 }

◆ getKalmanGain()

int TrkFilteringNode1D::getKalmanGain ( double K[5][2])
virtualinherited

Implements Trk::TrkBaseNode.

Definition at line 51 of file TrkFilteringNodes.cxx.

51 {
52 int i;
53
54 for (i = 0; i < 5; i++) K[i][0] = m_K[i];
55 return 1;
56 }

◆ getMeasurementMatrix()

int TrkFilteringNode1D::getMeasurementMatrix ( double H[2][5])
virtualinherited

Implements Trk::TrkBaseNode.

Definition at line 68 of file TrkFilteringNodes.cxx.

68 {
69 int i;
70
71 for (i = 0; i < 5; i++) H[0][i] = m_H[i];
72 return 1;
73 }
#define H(x, y, z)
Definition MD5.cxx:114

◆ getNdof()

int TrkBaseNode::getNdof ( ) const
inherited

Definition at line 65 of file TrkBaseNode.cxx.

65 {
66 return m_ndof;
67 }

◆ getNodeState()

int TrkBaseNode::getNodeState ( )
virtualinherited

◆ getNodeType()

char TrkBaseNode::getNodeType ( )
virtualinherited

Definition at line 61 of file TrkBaseNode.cxx.

61 {
62 return m_nodeType;
63 }

◆ getPrepRawData()

const PrepRawData * TrkBaseNode::getPrepRawData ( )
virtualinherited

Definition at line 39 of file TrkBaseNode.cxx.

39 {
40 return m_pPRD;
41 }

◆ getResiduals()

int TrkFilteringNode1D::getResiduals ( double r[2])
virtualinherited

Implements Trk::TrkBaseNode.

Definition at line 58 of file TrkFilteringNodes.cxx.

58 {
59 r[0] = m_resid;
60 return 1;
61 }
int r
Definition globals.cxx:22

◆ getSurface()

TrkPlanarSurface * TrkBaseNode::getSurface ( )
virtualinherited

Definition at line 35 of file TrkBaseNode.cxx.

35 {
36 return m_pSurface;
37 }

◆ getTrackState()

TrkTrackState * TrkBaseNode::getTrackState ( )
inherited

◆ isValidated()

bool TrkBaseNode::isValidated ( )
virtualinherited

Definition at line 31 of file TrkBaseNode.cxx.

31 {
32 return (m_nodeState != 0);
33 }

◆ report()

virtual void Trk::TrkClusterNode::report ( )
inlinevirtual

◆ runKalmanFilter()

void TrkFilteringNode1D::runKalmanFilter ( TrkTrackState * pTS)
virtualinherited

Definition at line 37 of file TrkFilteringNodes.cxx.

37 {
38 int i, j, idx = 0;
39 double updState[5], updCov[15];
40
41 for (i = 0; i < 5; i++) m_K[i] = m_D * m_B[i];
42 for (i = 0; i < 5; i++) updState[i] = m_K[i] * m_resid;
43 pTS->updateTrackState(updState);
44 for (i = 0; i < 5; i++) for (j = i; j < 5; j++) {
45 updCov[idx] = -m_K[i] * m_B[j];
46 idx++;
47 }
48 pTS->updateTrackCovariance(updCov);
49 }
void updateTrackState(double *)
void updateTrackCovariance(double *)

◆ serialize()

void TrkClusterNode::serialize ( char fileName[])
virtual

Implements Trk::TrkBaseNode.

Definition at line 147 of file TrkFilteringNodes.cxx.

147 {
148 FILE* pFile = fopen(fileName, "a");
149 if (!pFile) {
150 std::cerr << "Cannot open file " << fileName << " for write.\n";
151 std::abort();
152 }
153 fclose(pFile);
154 }

◆ setNodeState()

void TrkBaseNode::setNodeState ( int s)
virtualinherited

Definition at line 49 of file TrkBaseNode.cxx.

49 {
50 m_nodeState = s;
51 }

◆ setNodeType()

void TrkBaseNode::setNodeType ( char s)
virtualinherited

Definition at line 57 of file TrkBaseNode.cxx.

57 {
58 m_nodeType = s;
59 }

◆ updateInternal()

void TrkBaseNode::updateInternal ( )
virtualinherited

Reimplemented in Trk::TrkTrtNode.

Definition at line 73 of file TrkBaseNode.cxx.

73 {
74 }

◆ updateTrackState()

void TrkClusterNode::updateTrackState ( TrkTrackState * pTS)
virtual

Implements Trk::TrkBaseNode.

Definition at line 173 of file TrkFilteringNodes.cxx.

173 {
174 if (isValidated()) runKalmanFilter(pTS);
175 m_pTrackState = pTS;
176 }
virtual bool isValidated()
virtual void runKalmanFilter(TrkTrackState *)

◆ updateWithRIO()

void TrkClusterNode::updateWithRIO ( const RIO_OnTrack * pRIO)
virtual

Implements Trk::TrkBaseNode.

Definition at line 178 of file TrkFilteringNodes.cxx.

178 {
179 /*
180 printf("RIO update, SCT cluster: old m=%f new m=%f old V=%f new V=%f\n",
181 m_m,pRIO->localParameters()[Trk::locX],sqrt(m_V),
182 sqrt(pRIO->localErrorMatrix().localCovariance()[0][0]));
183 */
184 m_m = pRIO->localParameters()[Trk::locX];
185 m_V = pRIO->localCovariance()(0, 0);
186 }
@ locX
Definition ParamDefs.h:37

◆ validateMeasurement()

void TrkClusterNode::validateMeasurement ( TrkTrackState * pTS)
virtual

Implements Trk::TrkBaseNode.

Definition at line 156 of file TrkFilteringNodes.cxx.

156 {
158 m_nodeState = (m_dChi2 < m_chi2Cut) ? 1 : 0;
159 }
virtual double getChi2Distance(TrkTrackState *)

Member Data Documentation

◆ m_B

double Trk::TrkFilteringNode1D::m_B[5]
protectedinherited

◆ m_chi2Cut

double Trk::TrkBaseNode::m_chi2Cut
protectedinherited

◆ m_D

double Trk::TrkFilteringNode1D::m_D
protectedinherited

◆ m_dChi2

double Trk::TrkBaseNode::m_dChi2
protectedinherited

◆ m_H

double Trk::TrkFilteringNode1D::m_H[5]
protectedinherited

◆ m_K

double Trk::TrkFilteringNode1D::m_K[5]
protectedinherited

◆ m_m

double Trk::TrkFilteringNode1D::m_m
protectedinherited

◆ m_ndof

int Trk::TrkBaseNode::m_ndof
protectedinherited

◆ m_nodeState

int Trk::TrkBaseNode::m_nodeState
protectedinherited

◆ m_nodeType

char Trk::TrkBaseNode::m_nodeType
protectedinherited

◆ m_pPRD

const PrepRawData* Trk::TrkBaseNode::m_pPRD
protectedinherited

◆ m_pSurface

TrkPlanarSurface* Trk::TrkBaseNode::m_pSurface
protectedinherited

◆ m_pTrackState

TrkTrackState* Trk::TrkBaseNode::m_pTrackState
protectedinherited

◆ m_resid

double Trk::TrkFilteringNode1D::m_resid
protectedinherited

◆ m_V

double Trk::TrkFilteringNode1D::m_V
protectedinherited

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