FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PndLinTrack Class Reference

#include <PndLinTrack.h>

Inheritance diagram for PndLinTrack:

Public Member Functions

 PndLinTrack ()
 
 PndLinTrack (TString detName, Double_t p0, Double_t p1, Double_t p2, Double_t p3, Double_t p4, Double_t p5, Double_t chi, Int_t first, Int_t last, Int_t cand)
 
virtual ~PndLinTrack ()
 
void SetDetName (TString name)
 
void SetCovarianceMatrix (TMatrixDSym covmatrix)
 
TString GetDetName () const
 
void GetPar (Double_t *par) const
 
TVector3 GetStartVec () const
 
TVector3 GetDirectionVec () const
 
TVector3 GetStartErrVec ()
 
TVector3 GetDirectionErrVec ()
 
Double_t GetChiSquare () const
 
Int_t GetFirstHit () const
 
Int_t GetLastHit () const
 
Int_t GetTCandID () const
 
void GetParErr (Double_t *errpar)
 
TMatrixDSym GetCovarianceMatrix ()
 

Private Member Functions

 ClassDef (PndLinTrack, 10)
 

Private Attributes

TString fDetName
 
Double_t fP0
 
Double_t fP1
 
Double_t fP2
 
Double_t fP3
 
Double_t fP4
 
Double_t fP5
 
TMatrixDSym fCovMatrix
 
Double_t fChiSq
 
Int_t fFirst
 
Int_t fLast
 
Int_t fCandId
 

Detailed Description

PndLinTrack.h

Author
M.Michel miche.nosp@m.l@kp.nosp@m.h.uni.nosp@m.-mai.nosp@m.nz.de

A container for straight line tracks

Definition at line 24 of file PndLinTrack.h.

Constructor & Destructor Documentation

PndLinTrack::PndLinTrack ( )

Default constructor (not for use)

Definition at line 17 of file PndLinTrack.cxx.

17  {
18  // std::cout<<"/lmd/LmdTrack/PndLinTrack()"<<std::endl;
19  // fCovMatrix = new TMatrixDSym(6);
20 }
PndLinTrack::PndLinTrack ( TString  detName,
Double_t  p0,
Double_t  p1,
Double_t  p2,
Double_t  p3,
Double_t  p4,
Double_t  p5,
Double_t  chi,
Int_t  first,
Int_t  last,
Int_t  cand 
)

Standard constructor with all paramneters

Parameters
detNameDetector Name
pXParameter of Fit [cm]
chiChiSquare of Fit
firstId of first Hit
lastId of last Hit
candId of TrackCandidate

Definition at line 24 of file PndLinTrack.cxx.

References fCandId, fChiSq, fCovMatrix, fDetName, fFirst, fLast, fP0, fP1, fP2, fP3, fP4, fP5, p1, and p2.

26  {
27  fDetName = detName;
28  fP0 = p0;
29  fP1 = p1;
30  fP2 = p2;
31  fP3 = p3;
32  fP4 = p4;
33  fP5 = p5;
34  fChiSq = chi;
35  fFirst = first;
36  fLast = last;
37  fCandId = cand;
38  // fP0err = p0err; fP1err = p1err; fP2err = p2err; fP3err = p3err;
39  // fz0 = z0;
40  // fCovMatrix = NULL;
41  fCovMatrix.ResizeTo(6, 6);
42  // fCovMatrix = TMatrixDSym(6);
43 }
Int_t fFirst
Definition: PndLinTrack.h:96
Double_t fP1
Definition: PndLinTrack.h:91
TString fDetName
Definition: PndLinTrack.h:89
Int_t fCandId
Definition: PndLinTrack.h:97
Double_t fP2
Definition: PndLinTrack.h:91
Double_t fP0
Definition: PndLinTrack.h:91
Int_t fLast
Definition: PndLinTrack.h:96
Double_t fP3
Definition: PndLinTrack.h:91
TMatrixDSym fCovMatrix
Definition: PndLinTrack.h:93
Double_t fP5
Definition: PndLinTrack.h:91
Double_t fChiSq
Definition: PndLinTrack.h:95
TPad * p2
Definition: hist-t7.C:117
TPad * p1
Definition: hist-t7.C:116
Double_t fP4
Definition: PndLinTrack.h:91
PndLinTrack::~PndLinTrack ( )
virtual

Destructor

Definition at line 134 of file PndLinTrack.cxx.

134 {}

Member Function Documentation

PndLinTrack::ClassDef ( PndLinTrack  ,
10   
)
private
Double_t PndLinTrack::GetChiSquare ( ) const
inline

Definition at line 80 of file PndLinTrack.h.

References fChiSq.

Referenced by main().

80 { return fChiSq; }
Double_t fChiSq
Definition: PndLinTrack.h:95
TMatrixDSym PndLinTrack::GetCovarianceMatrix ( )
inline

Definition at line 86 of file PndLinTrack.h.

References fCovMatrix.

86 { return fCovMatrix; }
TMatrixDSym fCovMatrix
Definition: PndLinTrack.h:93
TString PndLinTrack::GetDetName ( ) const
inline

Definition at line 60 of file PndLinTrack.h.

References fDetName.

60 { return fDetName; }
TString fDetName
Definition: PndLinTrack.h:89
TVector3 PndLinTrack::GetDirectionErrVec ( )

Definition at line 69 of file PndLinTrack.cxx.

References fCovMatrix, and CAMath::Sqrt().

Referenced by main().

69  {
70  // double err_dx = sqrt((fCovMatrix)(1,1));
71  // double err_dy = sqrt((fCovMatrix)(3,3));
72  // double l = sqrt(1-fP1*fP1-fP3*fP3);
73  // double err_dz = sqrt(pow(fP1/l,2)*((fCovMatrix)(1,1))+
74  // pow(fP3/l,2)*((fCovMatrix)(3,3))
75  // +2*fP1*fP3/(l*l)*((fCovMatrix)(1,3)));
76  // return TVector3(err_dx,err_dy,err_dz);
77  // double l = 1./sqrt(1+fP1*fP1+fP3*fP3);
78  // // std::cout<<"l = "<<l<<" pow(l,3) = "<<pow(l,3)<<" p1="<<fP1<<"
79  // p3="<<fP3<<std::endl;
80  // double ddx_dp1=(1+fP3*fP3);
81  // double ddx_dp3=fP1*fP3;
82  // double err_dx =
83  // pow(l,3)*sqrt(ddx_dp1*ddx_dp1*((fCovMatrix)(1,1))+ddx_dp3*ddx_dp3*((fCovMatrix)(3,3))
84  // +(2*ddx_dp1*ddx_dp3*((fCovMatrix)(1,3))));
85  // std::cout<<"err_dx = "<<ddx_dp1*ddx_dp1*((fCovMatrix)(1,1))<<" +
86  // "<<ddx_dp3*ddx_dp3*((fCovMatrix)(3,3))
87  // <<" + "<<2*ddx_dp1*ddx_dp3*((fCovMatrix)(1,3))<<" =
88  // "<<err_dx<<std::endl;
89 
90  // double ddy_dp1=fP1*fP3;
91  // double ddy_dp3=(1+fP1*fP1);
92  // double err_dy =
93  // pow(l,3)*sqrt(ddy_dp1*ddy_dp1*((fCovMatrix)(1,1))+ddy_dp3*ddy_dp3*((fCovMatrix)(3,3))
94  // +(2*ddy_dp1*ddy_dp3*fabs((fCovMatrix)(1,3))));
95 
96  // double ddz_dp1=fP1;
97  // double ddz_dp3=fP3;
98  // double err_dz
99  // =pow(l,3)*sqrt(ddz_dp1*ddz_dp1*((fCovMatrix)(1,1))+ddz_dp3*ddz_dp3*((fCovMatrix)(3,3))
100  // +(2*ddz_dp1*ddz_dp3*fabs((fCovMatrix)(1,3))));
101  // return TVector3(err_dx,err_dy,err_dz);
102 
103  // double l = pow(fP1*fP1+fP3*fP3+fP5*fP5,-0.5);
104  // double l3 = pow(l,3);
105  // double p12 = pow(fP1,2);
106  // double p32 = pow(fP3,2);
107  // double p52 = pow(fP5,2);
108  // double p1p3 = fP1*fP3;
109  // double p1p5 = fP1*fP5;
110  // double p3p5 = fP3*fP5;
111 
112  // double err_dx =
113  // sqrt(pow((l-p12*l3),2)*((fCovMatrix)(1,1))+pow((p1p3*l3),2)*((fCovMatrix)(3,3))+pow((p1p5*l3),2)*((fCovMatrix)(5,5))+2*((l-p12*l3)*(-fP1*fP3*l3)*((fCovMatrix)(1,3))+(l-p12*l3)*(-fP1*fP5*l3)*((fCovMatrix)(1,5))+p12*fP3*fP5*l3*l3*((fCovMatrix)(3,5))));
114  // double err_dy =
115  // sqrt(pow((l-p32*l3),2)*((fCovMatrix)(3,3))+pow((p1p3*l3),2)*((fCovMatrix)(1,1))+pow((p3p5*l3),2)*((fCovMatrix)(5,5))+2*((l-p32*l3)*(-fP1*fP3*l3)*((fCovMatrix)(1,3))+(l-p32*l3)*(-fP3*fP5*l3)*((fCovMatrix)(3,5))+p32*fP1*fP5*l3*l3*((fCovMatrix)(1,5))));
116  // double err_dz =
117  // sqrt(pow((l-p52*l3),2)*((fCovMatrix)(5,5))+pow((p3p5*l3),2)*((fCovMatrix)(3,3))+pow((p1p5*l3),2)*((fCovMatrix)(1,1))+2*((l-p52*l3)*(-fP1*fP5*l3)*((fCovMatrix)(1,5))+(l-p52*l3)*(-fP3*fP5*l3)*((fCovMatrix)(3,5))+p52*fP1*fP3*l3*l3*((fCovMatrix)(1,3))));
118  // return TVector3(err_dx,err_dy,err_dz);
119  return TVector3(TMath::Sqrt((fCovMatrix)(1, 1)),
120  TMath::Sqrt((fCovMatrix)(3, 3)),
121  TMath::Sqrt((fCovMatrix)(5, 5)));
122 }
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
TMatrixDSym fCovMatrix
Definition: PndLinTrack.h:93
TVector3 PndLinTrack::GetDirectionVec ( ) const
inline

Definition at line 72 of file PndLinTrack.h.

References fP1, fP3, and fP5.

Referenced by main().

72 { return TVector3(fP1, fP3, fP5); }
Double_t fP1
Definition: PndLinTrack.h:91
Double_t fP3
Definition: PndLinTrack.h:91
Double_t fP5
Definition: PndLinTrack.h:91
Int_t PndLinTrack::GetFirstHit ( ) const
inline

Definition at line 81 of file PndLinTrack.h.

References fFirst.

81 { return fFirst; }
Int_t fFirst
Definition: PndLinTrack.h:96
Int_t PndLinTrack::GetLastHit ( ) const
inline

Definition at line 82 of file PndLinTrack.h.

References fLast.

82 { return fLast; }
Int_t fLast
Definition: PndLinTrack.h:96
void PndLinTrack::GetPar ( Double_t par) const
inline

Definition at line 61 of file PndLinTrack.h.

References fP0, fP1, fP2, fP3, fP4, and fP5.

Referenced by main().

61  {
62  par[0] = fP0;
63  par[1] = fP1;
64  par[2] = fP2;
65  par[3] = fP3;
66  par[4] = fP4;
67  par[5] = fP5;
68  }
Double_t fP1
Definition: PndLinTrack.h:91
Double_t par[3]
Double_t fP2
Definition: PndLinTrack.h:91
Double_t fP0
Definition: PndLinTrack.h:91
Double_t fP3
Definition: PndLinTrack.h:91
Double_t fP5
Definition: PndLinTrack.h:91
Double_t fP4
Definition: PndLinTrack.h:91
void PndLinTrack::GetParErr ( Double_t errpar)

Definition at line 124 of file PndLinTrack.cxx.

References fCovMatrix, and CAMath::Sqrt().

Referenced by main().

124  {
125  errpar[0] = TMath::Sqrt((fCovMatrix)(0, 0));
126  errpar[1] = TMath::Sqrt((fCovMatrix)(1, 1));
127  errpar[2] = TMath::Sqrt((fCovMatrix)(2, 2));
128  errpar[3] = TMath::Sqrt((fCovMatrix)(3, 3));
129  errpar[4] = TMath::Sqrt((fCovMatrix)(4, 4));
130  errpar[5] = TMath::Sqrt((fCovMatrix)(5, 5));
131 }
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
TMatrixDSym fCovMatrix
Definition: PndLinTrack.h:93
TVector3 PndLinTrack::GetStartErrVec ( )

Definition at line 63 of file PndLinTrack.cxx.

References fCovMatrix, and CAMath::Sqrt().

Referenced by main().

63  {
64  return TVector3(TMath::Sqrt((fCovMatrix)(0, 0)),
65  TMath::Sqrt((fCovMatrix)(2, 2)),
66  TMath::Sqrt((fCovMatrix)(4, 4)));
67 }
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
TMatrixDSym fCovMatrix
Definition: PndLinTrack.h:93
TVector3 PndLinTrack::GetStartVec ( ) const
inline

Definition at line 70 of file PndLinTrack.h.

References fP0, fP2, and fP4.

Referenced by main().

70 { return TVector3(fP0, fP2, fP4); }
Double_t fP2
Definition: PndLinTrack.h:91
Double_t fP0
Definition: PndLinTrack.h:91
Double_t fP4
Definition: PndLinTrack.h:91
Int_t PndLinTrack::GetTCandID ( ) const
inline

Definition at line 83 of file PndLinTrack.h.

References fCandId.

Referenced by main().

83 { return fCandId; }
Int_t fCandId
Definition: PndLinTrack.h:97
void PndLinTrack::SetCovarianceMatrix ( TMatrixDSym  covmatrix)
inline

Definition at line 52 of file PndLinTrack.h.

References fCovMatrix, and i.

52  {
53  for (size_t i = 0; i < 6; i++) {
54  for (size_t j = 0; j < 6; j++) {
55  fCovMatrix[i][j] = covmatrix[i][j];
56  }
57  }
58  }
Int_t i
Definition: run_full.C:25
TMatrixDSym fCovMatrix
Definition: PndLinTrack.h:93
void PndLinTrack::SetDetName ( TString  name)
inline

Accessors

Definition at line 51 of file PndLinTrack.h.

References fDetName, and name.

51 { fDetName = name; }
TString fDetName
Definition: PndLinTrack.h:89
TString name

Member Data Documentation

Int_t PndLinTrack::fCandId
private

Definition at line 97 of file PndLinTrack.h.

Referenced by GetTCandID(), and PndLinTrack().

Double_t PndLinTrack::fChiSq
private

Definition at line 95 of file PndLinTrack.h.

Referenced by GetChiSquare(), and PndLinTrack().

TMatrixDSym PndLinTrack::fCovMatrix
private
TString PndLinTrack::fDetName
private

Definition at line 89 of file PndLinTrack.h.

Referenced by GetDetName(), PndLinTrack(), and SetDetName().

Int_t PndLinTrack::fFirst
private

Definition at line 96 of file PndLinTrack.h.

Referenced by GetFirstHit(), and PndLinTrack().

Int_t PndLinTrack::fLast
private

Definition at line 96 of file PndLinTrack.h.

Referenced by GetLastHit(), and PndLinTrack().

Double_t PndLinTrack::fP0
private

Definition at line 91 of file PndLinTrack.h.

Referenced by GetPar(), GetStartVec(), and PndLinTrack().

Double_t PndLinTrack::fP1
private

Definition at line 91 of file PndLinTrack.h.

Referenced by GetDirectionVec(), GetPar(), and PndLinTrack().

Double_t PndLinTrack::fP2
private

Definition at line 91 of file PndLinTrack.h.

Referenced by GetPar(), GetStartVec(), and PndLinTrack().

Double_t PndLinTrack::fP3
private

Definition at line 91 of file PndLinTrack.h.

Referenced by GetDirectionVec(), GetPar(), and PndLinTrack().

Double_t PndLinTrack::fP4
private

Definition at line 91 of file PndLinTrack.h.

Referenced by GetPar(), GetStartVec(), and PndLinTrack().

Double_t PndLinTrack::fP5
private

Definition at line 91 of file PndLinTrack.h.

Referenced by GetDirectionVec(), GetPar(), and PndLinTrack().


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