PandaRoot
PndLinTrack.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndLinTrack header file -----
15 // ----- Created by M. Michel -----
16 // ----- Modifided by A.Karavdina -----
17 // -------------------------------------------------------------------------
18 
25 #ifndef PNDLINTRACK_H
26 #define PNDLINTRACK_H
27 
28 #include "TMatrixDSym.h"
29 #include "TMatrixTSym.h"
30 #include "TString.h"
31 #include "TVector3.h"
32 
33 #include <stdio.h>
34 #include <iostream>
35 
36 class PndLinTrack : public TObject {
37  public:
39  PndLinTrack();
40 
50  /* PndLinTrack(TString detName, Double_t z0, Double_t p0, Double_t p1,
51  * Double_t p2, Double_t p3, */
52  /* Double_t p0err, Double_t p1err, Double_t p2err, Double_t p3err, */
53  /* Double_t chi, Int_t first, Int_t last, Int_t cand); */
54  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);
55 
57  virtual ~PndLinTrack();
58 
61  void SetDetName(TString name) { fDetName = name; }
62  void SetCovarianceMatrix(TMatrixDSym covmatrix)
63  {
64  for (size_t i = 0; i < 6; i++) {
65  for (size_t j = 0; j < 6; j++) {
66  fCovMatrix[i][j] = covmatrix[i][j];
67  }
68  }
69  }
70 
71  TString GetDetName() const { return fDetName; }
72  void GetPar(Double_t *par) const
73  {
74  par[0] = fP0;
75  par[1] = fP1;
76  par[2] = fP2;
77  par[3] = fP3;
78  par[4] = fP4;
79  par[5] = fP5;
80  }
81  /* TVector3 GetStartVec() const { return TVector3(fP0,fP2,0.);} */
82  TVector3 GetStartVec() const { return TVector3(fP0, fP2, fP4); }
83  // TVector3 GetStartVec();
84  TVector3 GetDirectionVec() const { return TVector3(fP1, fP3, fP5); }
85  // TVector3 GetDirectionVec();
86  TVector3 GetStartErrVec();
87  TVector3 GetDirectionErrVec();
88  /* TVector3 GetParErr(Double_t* errpar) */
89  /* const {
90  * errpar[0]=fP0err;errpar[1]=fP1err;errpar[2]=fP2err;errpar[3]=fP3err;errpar[4]=fP4err;}
91  */
92  Double_t GetChiSquare() const { return fChiSq; }
93  Int_t GetFirstHit() const { return fFirst; }
94  Int_t GetLastHit() const { return fLast; }
95  Int_t GetTCandID() const { return fCandId; }
96 
97  void GetParErr(Double_t *errpar);
98  TMatrixDSym GetCovarianceMatrix() { return fCovMatrix; }
99 
100  private:
101  TString fDetName; // Detector name
102  // Double_t fz0;// z-position of first LMD plane
103  Double_t fP0, fP1, fP2, fP3, fP4, fP5; // fit-parameter
104  // start (P0, P2, P4), direction (P1, P3, P5) straight line
105  TMatrixDSym fCovMatrix;
106  // Double_t fP0err, fP1err, fP2err, fP3err, fP4err; // errors of parameters
107  Double_t fChiSq; // Chi-Square of Fit
108  Int_t fFirst, fLast;
109  Int_t fCandId; // TrackCand id
110 
111  ClassDef(PndLinTrack, 10);
112 };
113 
114 #endif
TVector3 GetStartVec() const
Definition: PndLinTrack.h:82
void SetCovarianceMatrix(TMatrixDSym covmatrix)
Definition: PndLinTrack.h:62
virtual ~PndLinTrack()
void GetParErr(Double_t *errpar)
void GetPar(Double_t *par) const
Definition: PndLinTrack.h:72
unsigned int i
Definition: P4_F32vec4.h:33
TString GetDetName() const
Definition: PndLinTrack.h:71
void SetDetName(TString name)
Definition: PndLinTrack.h:61
TVector3 GetDirectionVec() const
Definition: PndLinTrack.h:84
Int_t GetLastHit() const
Definition: PndLinTrack.h:94
Double_t GetChiSquare() const
Definition: PndLinTrack.h:92
TMatrixDSym GetCovarianceMatrix()
Definition: PndLinTrack.h:98
Int_t GetFirstHit() const
Definition: PndLinTrack.h:93
Int_t GetTCandID() const
Definition: PndLinTrack.h:95
TVector3 GetStartErrVec()
TVector3 GetDirectionErrVec()