ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
TrigFTF_ExtendedTrackState Struct Reference

#include <TrigInDetTrackFollowingTool.h>

Collaboration diagram for TrigFTF_ExtendedTrackState:

Public Member Functions

 TrigFTF_ExtendedTrackState ()=delete
 
 ~TrigFTF_ExtendedTrackState ()
 
TrigFTF_ExtendedTrackStateoperator= (const TrigFTF_ExtendedTrackState &)=delete
 
 TrigFTF_ExtendedTrackState (double const *, const Trk::PlaneSurface *)
 
void AddHole ()
 
void AddHit (const Trk::PrepRawData *, double, int)
 
void SwapTheEnds ()
 
void correctAngles ()
 
void report () const
 

Public Attributes

double m_Xk [10]
 
double m_Gk [10][10]
 
double m_chi2
 
double m_ndof
 
const Trk::PlaneSurfacem_pS
 
const Trk::PlaneSurfacem_pO
 
std::list< TrigFTF_HitAssignmentm_track
 
int m_nClusters
 
int m_nHoles
 
bool m_isSwapped
 

Detailed Description

Definition at line 52 of file TrigInDetTrackFollowingTool.h.

Constructor & Destructor Documentation

◆ TrigFTF_ExtendedTrackState() [1/2]

TrigFTF_ExtendedTrackState::TrigFTF_ExtendedTrackState ( )
delete

◆ ~TrigFTF_ExtendedTrackState()

TrigFTF_ExtendedTrackState::~TrigFTF_ExtendedTrackState ( )
inline

Definition at line 55 of file TrigInDetTrackFollowingTool.h.

55 {};

◆ TrigFTF_ExtendedTrackState() [2/2]

TrigFTF_ExtendedTrackState::TrigFTF_ExtendedTrackState ( double const P,
const Trk::PlaneSurface pS 
)

Definition at line 40 of file TrigInDetTrackFollowingTool.cxx.

40  : m_chi2(0), m_ndof(-5), m_pS(pS), m_pO(pS), m_nClusters(0), m_nHoles(0), m_isSwapped(false) {
41 
42  for(int i=0;i<5;i++) m_Xk[i] = m_Xk[i+5] = P[i];//duplicate the lower half of the state vector
43 
44  memset(&m_Gk[0][0],0,sizeof(m_Gk));
45 
46  //covariance block C
47 
48  m_Gk[0][0] = 1.0;
49  m_Gk[1][1] = 1.0;
50  m_Gk[2][2] = 0.0001;
51  m_Gk[3][3] = 0.0001;
52  m_Gk[4][4] = P[5];
53 
54  //triplicate the lower block
55  for(int i=0;i<5;i++) {
56  m_Gk[i+5][i+5] = m_Gk[i][i+5] = m_Gk[i+5][i] = m_Gk[i][i];
57  }
58 
59  m_track.clear();
60 }

Member Function Documentation

◆ AddHit()

void TrigFTF_ExtendedTrackState::AddHit ( const Trk::PrepRawData pPRD,
double  dchi2,
int  ndof 
)

Definition at line 84 of file TrigInDetTrackFollowingTool.cxx.

84  {
85 
86  correctAngles();
87 
88  double cov[15];
89  int idx=0;
90  for(int i=0;i<5;i++)
91  for(int j=0;j<=i;j++)
92  cov[idx++] = m_Gk[i][j];
93 
94  if(m_isSwapped) {
95  m_track.emplace_front(pPRD, m_Xk, &cov[0], dchi2, ndof);
96  }
97  else {
98  m_track.emplace_back(pPRD, m_Xk, &cov[0], dchi2, ndof);
99  }
100 
101  m_chi2 += dchi2;
102  m_ndof += ndof;
103  m_nClusters++;
104  m_nHoles = 0;//reset the counter
105 }

◆ AddHole()

void TrigFTF_ExtendedTrackState::AddHole ( )

Definition at line 62 of file TrigInDetTrackFollowingTool.cxx.

62  {
63  if(m_isSwapped) {
64  m_track.emplace_front(nullptr, nullptr, nullptr, 0, -1);
65  }
66  else {
67  m_track.emplace_back(nullptr, nullptr, nullptr, 0, -1);
68  }
69  m_nHoles++;
70 }

◆ correctAngles()

void TrigFTF_ExtendedTrackState::correctAngles ( )

Definition at line 72 of file TrigInDetTrackFollowingTool.cxx.

72  {
73  if (m_Xk[2] > M_PI) m_Xk[2] -= 2 * M_PI;
74  if (m_Xk[2] < -M_PI) m_Xk[2] += 2 * M_PI;
75  if (m_Xk[3] < 0.0) m_Xk[3] += M_PI;
76  if (m_Xk[3] > M_PI) m_Xk[3] -= M_PI;
77  if (m_Xk[7] > M_PI) m_Xk[7] -= 2 * M_PI;
78  if (m_Xk[7] < -M_PI) m_Xk[7] += 2 * M_PI;
79  if (m_Xk[8] < 0.0) m_Xk[8] += M_PI;
80  if (m_Xk[8] > M_PI) m_Xk[8] -= M_PI;
81 
82 }

◆ operator=()

TrigFTF_ExtendedTrackState& TrigFTF_ExtendedTrackState::operator= ( const TrigFTF_ExtendedTrackState )
delete

◆ report()

void TrigFTF_ExtendedTrackState::report ( ) const

Definition at line 136 of file TrigInDetTrackFollowingTool.cxx.

136  {
137  std::cout<<"L: ";
138  for(int i=0;i<4;i++) std::cout<<m_Xk[i]<<" ";
139  std::cout<<1/m_Xk[4]<<" "<<std::sin(m_Xk[3])/m_Xk[4]<<std::endl;
140 
141 
142  std::cout<<"Covariance at last point:"<<std::endl;
143 
144  for(int i=0;i<5;i++) {
145  for(int j=0;j<5;j++) std::cout<<m_Gk[i][j]<<" ";
146  std::cout<<std::endl;
147  }
148 
149  std::cout<<"F: ";
150  for(int i=0;i<4;i++) std::cout<<m_Xk[i+5]<<" ";
151  std::cout<<1/m_Xk[4+5]<<" "<<std::sin(m_Xk[3+5])/m_Xk[4+5]<<std::endl;
152  std::cout<<std::endl;
153 
154  std::cout<<"Covariance at the first point:"<<std::endl;
155 
156  for(int i=0;i<5;i++) {
157  for(int j=0;j<5;j++) std::cout<<m_Gk[i+5][j+5]<<" ";
158  std::cout<<std::endl;
159  }
160 
161  std::cout<<"chi2="<<m_chi2<<" ndof="<<m_ndof<<" nClusters="<<m_nClusters<<" nHoles="<<m_nHoles<<std::endl;
162 
163 }

◆ SwapTheEnds()

void TrigFTF_ExtendedTrackState::SwapTheEnds ( )

Definition at line 107 of file TrigInDetTrackFollowingTool.cxx.

107  {
108 
110 
111  std::swap(m_pS, m_pO);
112 
113  double tmpX[10];
114  memcpy(&tmpX[0], &m_Xk[0], sizeof(tmpX));
115 
116  for(int i=0;i<5;i++) {
117  m_Xk[i] = tmpX[i+5];
118  m_Xk[i+5] = tmpX[i];
119  }
120 
121  double tmpG[10][10];
122  memcpy(&tmpG[0][0], &m_Gk[0][0], sizeof(tmpG));
123 
124  //covariance blocks are moved around to reflect the state vectors swap done above
125 
126  for(int i=0;i<5;i++) {
127  for(int j=0;j<5;j++) {
128  m_Gk[i+5][j+5] = tmpG[i][j]; //C -> E
129  m_Gk[i][j] = tmpG[i+5][j+5];//E -> C
130  m_Gk[i][j+5] = tmpG[i+5][j]; //D -> B
131  m_Gk[i+5][j] = tmpG[i][j+5]; //B -> D
132  }
133  }
134 }

Member Data Documentation

◆ m_chi2

double TrigFTF_ExtendedTrackState::m_chi2

Definition at line 68 of file TrigInDetTrackFollowingTool.h.

◆ m_Gk

double TrigFTF_ExtendedTrackState::m_Gk[10][10]

Definition at line 67 of file TrigInDetTrackFollowingTool.h.

◆ m_isSwapped

bool TrigFTF_ExtendedTrackState::m_isSwapped

Definition at line 79 of file TrigInDetTrackFollowingTool.h.

◆ m_nClusters

int TrigFTF_ExtendedTrackState::m_nClusters

Definition at line 76 of file TrigInDetTrackFollowingTool.h.

◆ m_ndof

double TrigFTF_ExtendedTrackState::m_ndof

Definition at line 69 of file TrigInDetTrackFollowingTool.h.

◆ m_nHoles

int TrigFTF_ExtendedTrackState::m_nHoles

Definition at line 77 of file TrigInDetTrackFollowingTool.h.

◆ m_pO

const Trk::PlaneSurface* TrigFTF_ExtendedTrackState::m_pO

Definition at line 72 of file TrigInDetTrackFollowingTool.h.

◆ m_pS

const Trk::PlaneSurface* TrigFTF_ExtendedTrackState::m_pS

Definition at line 71 of file TrigInDetTrackFollowingTool.h.

◆ m_track

std::list<TrigFTF_HitAssignment> TrigFTF_ExtendedTrackState::m_track

Definition at line 74 of file TrigInDetTrackFollowingTool.h.

◆ m_Xk

double TrigFTF_ExtendedTrackState::m_Xk[10]

Definition at line 66 of file TrigInDetTrackFollowingTool.h.


The documentation for this struct was generated from the following files:
IDTPM::ndof
float ndof(const U &p)
Definition: TrackParametersHelper.h:132
TrigFTF_ExtendedTrackState::m_pS
const Trk::PlaneSurface * m_pS
Definition: TrigInDetTrackFollowingTool.h:71
TrigFTF_ExtendedTrackState::m_nClusters
int m_nClusters
Definition: TrigInDetTrackFollowingTool.h:76
DMTest::P
P_v1 P
Definition: P.h:23
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
M_PI
#define M_PI
Definition: ActiveFraction.h:11
TrigFTF_ExtendedTrackState::m_isSwapped
bool m_isSwapped
Definition: TrigInDetTrackFollowingTool.h:79
TrigFTF_ExtendedTrackState::m_Xk
double m_Xk[10]
Definition: TrigInDetTrackFollowingTool.h:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigFTF_ExtendedTrackState::m_ndof
double m_ndof
Definition: TrigInDetTrackFollowingTool.h:69
TrigFTF_ExtendedTrackState::m_pO
const Trk::PlaneSurface * m_pO
Definition: TrigInDetTrackFollowingTool.h:72
TrigFTF_ExtendedTrackState::m_Gk
double m_Gk[10][10]
Definition: TrigInDetTrackFollowingTool.h:67
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
TrigFTF_ExtendedTrackState::correctAngles
void correctAngles()
Definition: TrigInDetTrackFollowingTool.cxx:72
TrigFTF_ExtendedTrackState::m_chi2
double m_chi2
Definition: TrigInDetTrackFollowingTool.h:68
TrigFTF_ExtendedTrackState::m_track
std::list< TrigFTF_HitAssignment > m_track
Definition: TrigInDetTrackFollowingTool.h:74
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
TrigFTF_ExtendedTrackState::m_nHoles
int m_nHoles
Definition: TrigInDetTrackFollowingTool.h:77
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36