Public Member Functions | Private Member Functions | Private Attributes | List of all members
gar::rec::TrackPar Class Reference

#include <TrackPar.h>

Public Member Functions

 TrackPar (gar::rec::Track const &t, bool reversed=false)
 
 TrackPar (const float lengthforwards, const float lengthbackwards, const size_t nTPCClusters, const float xbeg, const float *trackparbeg, const float *covmatbeg, const float chisqforward, const float xend, const float *trackparend, const float *covmatend, const float chisqbackward, const double time)
 
 TrackPar ()
 
const float * getTrackParametersBegin () const
 
const float * getTrackParametersEnd () const
 
const float * getCovMatBeg () const
 
const float * getCovMatEnd () const
 
float getYCentBeg () const
 
float getZCentBeg () const
 
float getYCentEnd () const
 
float getZCentEnd () const
 
bool getBegCentValid () const
 
bool getEndCentValid () const
 
size_t getNTPCClusters () const
 
float getLengthForwards () const
 
float getLengthBackwards () const
 
float getChisqForwards () const
 
float getChisqBackwards () const
 
float getXBeg () const
 
float getXEnd () const
 
double getTime () const
 
TVector3 getXYZBeg () const
 
TVector3 getXYZEnd () const
 
void setNTPCClusters (const size_t nTPCClusters)
 
void setTrackParametersBegin (const float *tparbeg)
 
void setTrackParametersEnd (const float *tparend)
 
void setCovMatBeg (const float *covmatbeg)
 
void setCovMatEnd (const float *covmatend)
 
void setLengthForwards (const float lengthforwards)
 
void setLengthBackwards (const float lengthbackwards)
 
void setChisqForwards (const float chisqforwards)
 
void setChisqBackwards (const float chisqbackwards)
 
void setXBeg (const float xbeg)
 
void setXEnd (const float xend)
 
void setTime (const double time)
 
gar::rec::Track CreateTrack ()
 
void FitAnotherTrack (TrackPar &othertrack, float &chisquared, float *xyz, float *covmat)
 

Private Member Functions

void CalcCenter ()
 

Private Attributes

size_t fNTPCClusters
 
float fXBeg
 
float fTrackParametersBegin [5]
 
float fXEnd
 
float fTrackParametersEnd [5]
 
float fChisquaredForwards
 
float fChisquaredBackwards
 
float fLengthForwards
 
float fLengthBackwards
 
float fCovMatBeg [25]
 
float fCovMatEnd [25]
 
float fYCentBeg
 
float fZCentBeg
 
float fYCentEnd
 
float fZCentEnd
 
bool fBegCentValid
 
bool fEndCentValid
 
double fTime
 

Detailed Description

Definition at line 23 of file TrackPar.h.

Constructor & Destructor Documentation

gar::rec::TrackPar::TrackPar ( gar::rec::Track const &  t,
bool  reversed = false 
)

Definition at line 15 of file TrackPar.cxx.

16  {
17  fNTPCClusters = t.NHits();
18  if (!reversed)
19  {
20  fXBeg = t.Vertex()[0];
21  fXEnd = t.End()[0];
22  for (size_t i=0; i<5; ++i)
23  {
24  fTrackParametersBegin[i] = t.TrackParBeg()[i];
25  fTrackParametersEnd[i] = t.TrackParEnd()[i];
26  }
27  fChisquaredForwards = t.ChisqForward();
28  fChisquaredBackwards = t.ChisqBackward();
29  fLengthForwards = t.LengthForward();
30  fLengthBackwards = t.LengthBackward();
31  t.CovMatBegSymmetric(fCovMatBeg);
32  t.CovMatEndSymmetric(fCovMatEnd);
33  }
34  else
35  {
36  fXEnd = t.Vertex()[0];
37  fXBeg = t.End()[0];
38  for (size_t i=0; i<5; ++i)
39  {
40  fTrackParametersEnd[i] = t.TrackParBeg()[i];
41  fTrackParametersBegin[i] = t.TrackParEnd()[i];
42  }
43  fChisquaredBackwards = t.ChisqForward();
44  fChisquaredForwards = t.ChisqBackward();
45  fLengthBackwards = t.LengthForward();
46  fLengthForwards = t.LengthBackward();
47  t.CovMatEndSymmetric(fCovMatBeg);
48  t.CovMatEndSymmetric(fCovMatEnd);
49  }
50  CalcCenter();
51  }
float fChisquaredBackwards
Definition: TrackPar.h:91
float fTrackParametersBegin[5]
Definition: TrackPar.h:87
float fCovMatBeg[25]
Definition: TrackPar.h:94
float fLengthForwards
Definition: TrackPar.h:92
float fLengthBackwards
Definition: TrackPar.h:93
float fTrackParametersEnd[5]
Definition: TrackPar.h:89
float fChisquaredForwards
Definition: TrackPar.h:90
float fCovMatEnd[25]
Definition: TrackPar.h:95
size_t fNTPCClusters
Definition: TrackPar.h:85
gar::rec::TrackPar::TrackPar ( const float  lengthforwards,
const float  lengthbackwards,
const size_t  nTPCClusters,
const float  xbeg,
const float *  trackparbeg,
const float *  covmatbeg,
const float  chisqforward,
const float  xend,
const float *  trackparend,
const float *  covmatend,
const float  chisqbackward,
const double  time 
)

Definition at line 55 of file TrackPar.cxx.

67  {
68  fNTPCClusters = nTPCClusters;
69  fLengthForwards = lengthforwards;
70  fLengthBackwards = lengthbackwards;
71  fXBeg = xbeg;
72  fXEnd = xend;
73  for (size_t i=0; i<5; ++i)
74  {
75  fTrackParametersBegin[i] = trackparbeg[i];
76  fTrackParametersEnd[i] = trackparend[i];
77  }
78  for (size_t i=0; i<25; ++i)
79  {
80  fCovMatBeg[i] = covmatbeg[i];
81  fCovMatEnd[i] = covmatend[i];
82  }
83  fChisquaredForwards = chisqforward;
84  fChisquaredBackwards = chisqbackward;
85  fTime = time;
86  CalcCenter();
87  }
float fChisquaredBackwards
Definition: TrackPar.h:91
float fTrackParametersBegin[5]
Definition: TrackPar.h:87
float fCovMatBeg[25]
Definition: TrackPar.h:94
float fLengthForwards
Definition: TrackPar.h:92
float fLengthBackwards
Definition: TrackPar.h:93
float fTrackParametersEnd[5]
Definition: TrackPar.h:89
float fChisquaredForwards
Definition: TrackPar.h:90
float fCovMatEnd[25]
Definition: TrackPar.h:95
size_t fNTPCClusters
Definition: TrackPar.h:85
gar::rec::TrackPar::TrackPar ( )
inline

Definition at line 42 of file TrackPar.h.

42 {}; // empty constructor

Member Function Documentation

void gar::rec::TrackPar::CalcCenter ( )
private

Definition at line 91 of file TrackPar.cxx.

92  {
93  if (fTrackParametersBegin[2] != 0)
94  {
95  float phi = fTrackParametersBegin[3];
96  float r = 1.0/fTrackParametersBegin[2];
97  fZCentBeg = fTrackParametersBegin[1] - r*TMath::Sin(phi);
98  fYCentBeg = fTrackParametersBegin[0] + r*TMath::Cos(phi);
99  fBegCentValid = true;
100  }
101  else
102  {
103  fBegCentValid = false;
104  }
105  if (fTrackParametersEnd[2] != 0)
106  {
107  float phi = fTrackParametersEnd[3];
108  float r = 1.0/fTrackParametersEnd[2];
109  fZCentEnd = fTrackParametersEnd[1] - r*TMath::Sin(phi);
110  fYCentEnd = fTrackParametersEnd[0] + r*TMath::Cos(phi);
111  fEndCentValid = true;
112  }
113  else
114  {
115  fEndCentValid = false;
116  }
117  }
float fTrackParametersBegin[5]
Definition: TrackPar.h:87
float fTrackParametersEnd[5]
Definition: TrackPar.h:89
gar::rec::Track gar::rec::TrackPar::CreateTrack ( )

Definition at line 292 of file TrackPar.cxx.

293  {
294 
298  fXBeg,
300  fCovMatBeg,
302  fXEnd,
304  fCovMatEnd,
306  fTime
307  );
308  }
float fChisquaredBackwards
Definition: TrackPar.h:91
float fTrackParametersBegin[5]
Definition: TrackPar.h:87
float fCovMatBeg[25]
Definition: TrackPar.h:94
float fLengthForwards
Definition: TrackPar.h:92
float fLengthBackwards
Definition: TrackPar.h:93
float fTrackParametersEnd[5]
Definition: TrackPar.h:89
float fChisquaredForwards
Definition: TrackPar.h:90
float fCovMatEnd[25]
Definition: TrackPar.h:95
size_t fNTPCClusters
Definition: TrackPar.h:85
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
Definition: Track.h:1036
void gar::rec::TrackPar::FitAnotherTrack ( TrackPar othertrack,
float &  chisquared,
float *  xyz,
float *  covmat 
)
bool gar::rec::TrackPar::getBegCentValid ( ) const

Definition at line 162 of file TrackPar.cxx.

163  {
164  return fBegCentValid;
165  }
float gar::rec::TrackPar::getChisqBackwards ( ) const

Definition at line 192 of file TrackPar.cxx.

193  {
194  return fChisquaredBackwards;
195  }
float fChisquaredBackwards
Definition: TrackPar.h:91
float gar::rec::TrackPar::getChisqForwards ( ) const

Definition at line 187 of file TrackPar.cxx.

188  {
189  return fChisquaredForwards;
190  }
float fChisquaredForwards
Definition: TrackPar.h:90
const float * gar::rec::TrackPar::getCovMatBeg ( ) const

Definition at line 131 of file TrackPar.cxx.

132  {
133  return fCovMatBeg;
134  }
float fCovMatBeg[25]
Definition: TrackPar.h:94
const float * gar::rec::TrackPar::getCovMatEnd ( ) const

Definition at line 136 of file TrackPar.cxx.

137  {
138  return fCovMatEnd;
139  }
float fCovMatEnd[25]
Definition: TrackPar.h:95
bool gar::rec::TrackPar::getEndCentValid ( ) const

Definition at line 167 of file TrackPar.cxx.

168  {
169  return fEndCentValid;
170  }
float gar::rec::TrackPar::getLengthBackwards ( ) const

Definition at line 182 of file TrackPar.cxx.

183  {
184  return fLengthBackwards;
185  }
float fLengthBackwards
Definition: TrackPar.h:93
float gar::rec::TrackPar::getLengthForwards ( ) const

Definition at line 177 of file TrackPar.cxx.

178  {
179  return fLengthForwards;
180  }
float fLengthForwards
Definition: TrackPar.h:92
size_t gar::rec::TrackPar::getNTPCClusters ( ) const

Definition at line 172 of file TrackPar.cxx.

173  {
174  return fNTPCClusters;
175  }
size_t fNTPCClusters
Definition: TrackPar.h:85
double gar::rec::TrackPar::getTime ( ) const

Definition at line 207 of file TrackPar.cxx.

208  {
209  return fTime;
210  }
const float * gar::rec::TrackPar::getTrackParametersBegin ( ) const

Definition at line 121 of file TrackPar.cxx.

122  {
123  return fTrackParametersBegin;
124  }
float fTrackParametersBegin[5]
Definition: TrackPar.h:87
const float * gar::rec::TrackPar::getTrackParametersEnd ( ) const

Definition at line 126 of file TrackPar.cxx.

127  {
128  return fTrackParametersEnd;
129  }
float fTrackParametersEnd[5]
Definition: TrackPar.h:89
float gar::rec::TrackPar::getXBeg ( ) const

Definition at line 197 of file TrackPar.cxx.

198  {
199  return fXBeg;
200  }
float gar::rec::TrackPar::getXEnd ( ) const

Definition at line 202 of file TrackPar.cxx.

203  {
204  return fXEnd;
205  }
TVector3 gar::rec::TrackPar::getXYZBeg ( ) const

Definition at line 310 of file TrackPar.cxx.

311  {
313  return result;
314  }
static QCString result
float getXBeg() const
Definition: TrackPar.cxx:197
const float * getTrackParametersBegin() const
Definition: TrackPar.cxx:121
TVector3 gar::rec::TrackPar::getXYZEnd ( ) const

Definition at line 316 of file TrackPar.cxx.

317  {
319  return result;
320  }
static QCString result
const float * getTrackParametersEnd() const
Definition: TrackPar.cxx:126
float getXEnd() const
Definition: TrackPar.cxx:202
float gar::rec::TrackPar::getYCentBeg ( ) const

Definition at line 142 of file TrackPar.cxx.

143  {
144  return fYCentBeg;
145  }
float gar::rec::TrackPar::getYCentEnd ( ) const

Definition at line 152 of file TrackPar.cxx.

153  {
154  return fYCentEnd;
155  }
float gar::rec::TrackPar::getZCentBeg ( ) const

Definition at line 147 of file TrackPar.cxx.

148  {
149  return fZCentBeg;
150  }
float gar::rec::TrackPar::getZCentEnd ( ) const

Definition at line 157 of file TrackPar.cxx.

158  {
159  return fZCentEnd;
160  }
void gar::rec::TrackPar::setChisqBackwards ( const float  chisqbackwards)

Definition at line 266 of file TrackPar.cxx.

267  {
268  fChisquaredBackwards = chisqbackwards;
269  }
float fChisquaredBackwards
Definition: TrackPar.h:91
void gar::rec::TrackPar::setChisqForwards ( const float  chisqforwards)

Definition at line 261 of file TrackPar.cxx.

262  {
263  fChisquaredForwards = chisqforwards;
264  }
float fChisquaredForwards
Definition: TrackPar.h:90
void gar::rec::TrackPar::setCovMatBeg ( const float *  covmatbeg)

Definition at line 235 of file TrackPar.cxx.

236  {
237  for (size_t i=0; i<25; ++i)
238  {
239  fCovMatBeg[i] = covmatbeg[i];
240  }
241  }
float fCovMatBeg[25]
Definition: TrackPar.h:94
void gar::rec::TrackPar::setCovMatEnd ( const float *  covmatend)

Definition at line 243 of file TrackPar.cxx.

244  {
245  for (size_t i=0; i<25; ++i)
246  {
247  fCovMatEnd[i] = covmatend[i];
248  }
249  }
float fCovMatEnd[25]
Definition: TrackPar.h:95
void gar::rec::TrackPar::setLengthBackwards ( const float  lengthbackwards)

Definition at line 256 of file TrackPar.cxx.

257  {
258  fLengthBackwards = lengthbackwards;
259  }
float fLengthBackwards
Definition: TrackPar.h:93
void gar::rec::TrackPar::setLengthForwards ( const float  lengthforwards)

Definition at line 251 of file TrackPar.cxx.

252  {
253  fLengthForwards = lengthforwards;
254  }
float fLengthForwards
Definition: TrackPar.h:92
void gar::rec::TrackPar::setNTPCClusters ( const size_t  nTPCClusters)

Definition at line 214 of file TrackPar.cxx.

215  {
216  fNTPCClusters = nTPCClusters;
217  }
size_t fNTPCClusters
Definition: TrackPar.h:85
void gar::rec::TrackPar::setTime ( const double  time)

Definition at line 281 of file TrackPar.cxx.

282  {
283  fTime = time;
284  }
void gar::rec::TrackPar::setTrackParametersBegin ( const float *  tparbeg)

Definition at line 219 of file TrackPar.cxx.

220  {
221  for (size_t i=0; i<5; ++i)
222  {
223  fTrackParametersBegin[i] = tparbeg[i];
224  }
225  }
float fTrackParametersBegin[5]
Definition: TrackPar.h:87
void gar::rec::TrackPar::setTrackParametersEnd ( const float *  tparend)

Definition at line 227 of file TrackPar.cxx.

228  {
229  for (size_t i=0; i<5; ++i)
230  {
231  fTrackParametersEnd[i] = tparend[i];
232  }
233  }
float fTrackParametersEnd[5]
Definition: TrackPar.h:89
void gar::rec::TrackPar::setXBeg ( const float  xbeg)

Definition at line 271 of file TrackPar.cxx.

272  {
273  fXBeg = xbeg;
274  }
void gar::rec::TrackPar::setXEnd ( const float  xend)

Definition at line 276 of file TrackPar.cxx.

277  {
278  fXEnd = xend;
279  }

Member Data Documentation

bool gar::rec::TrackPar::fBegCentValid
private

Definition at line 100 of file TrackPar.h.

float gar::rec::TrackPar::fChisquaredBackwards
private

Definition at line 91 of file TrackPar.h.

float gar::rec::TrackPar::fChisquaredForwards
private

Definition at line 90 of file TrackPar.h.

float gar::rec::TrackPar::fCovMatBeg[25]
private

Definition at line 94 of file TrackPar.h.

float gar::rec::TrackPar::fCovMatEnd[25]
private

Definition at line 95 of file TrackPar.h.

bool gar::rec::TrackPar::fEndCentValid
private

Definition at line 101 of file TrackPar.h.

float gar::rec::TrackPar::fLengthBackwards
private

Definition at line 93 of file TrackPar.h.

float gar::rec::TrackPar::fLengthForwards
private

Definition at line 92 of file TrackPar.h.

size_t gar::rec::TrackPar::fNTPCClusters
private

Definition at line 85 of file TrackPar.h.

double gar::rec::TrackPar::fTime
private

Definition at line 102 of file TrackPar.h.

float gar::rec::TrackPar::fTrackParametersBegin[5]
private

Definition at line 87 of file TrackPar.h.

float gar::rec::TrackPar::fTrackParametersEnd[5]
private

Definition at line 89 of file TrackPar.h.

float gar::rec::TrackPar::fXBeg
private

Definition at line 86 of file TrackPar.h.

float gar::rec::TrackPar::fXEnd
private

Definition at line 88 of file TrackPar.h.

float gar::rec::TrackPar::fYCentBeg
private

Definition at line 96 of file TrackPar.h.

float gar::rec::TrackPar::fYCentEnd
private

Definition at line 98 of file TrackPar.h.

float gar::rec::TrackPar::fZCentBeg
private

Definition at line 97 of file TrackPar.h.

float gar::rec::TrackPar::fZCentEnd
private

Definition at line 99 of file TrackPar.h.


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