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

#include <PndSttTrack.h>

Inheritance diagram for PndSttTrack:

Public Member Functions

 PndSttTrack ()
 
virtual ~PndSttTrack ()
 
void Print ()
 
Int_t GetTrackCandIndex ()
 
Int_t GetNofHelixHits () const
 
Int_t GetHelixHitIndex (Int_t iHit) const
 
Int_t GetPidHypo () const
 
Int_t GetFlag () const
 
Double_t GetChi2Long () const
 
Double_t GetChi2Rad () const
 
Int_t GetNDF () const
 
Double_t GetDist ()
 
Double_t GetPhi ()
 
Double_t GetRad ()
 
Double_t GetTanL ()
 
Double_t GetZ ()
 
Int_t GetCharge ()
 
Double_t CalculateScosl (Double_t x, Double_t y)
 
TVector3 * MomentumAtPoint (TVector3 *point)
 
TVector3 * PCAToPoint (TVector3 *point)
 
void SetTrackCandIndex (Int_t trackCandID)
 
void SetPidHypo (Int_t pid)
 
void SetParameters (Double_t d, Double_t phi, Double_t r, Double_t tanl, Double_t z)
 
void SetDist (Double_t dist)
 
void SetPhi (Double_t phi)
 
void SetRad (Double_t r)
 
void SetTanL (Double_t tanl)
 
void SetZ (Double_t z)
 
void SetCharge (Int_t charge)
 
void SetFlag (Int_t flag)
 
void SetChi2Long (Double_t chi2)
 
void SetChi2Rad (Double_t chi2)
 
void SetNDF (Int_t ndf)
 
void AddHelixHit (Int_t size, Int_t index, Int_t helixhitindex)
 

Private Member Functions

 ClassDef (PndSttTrack, 1)
 

Private Attributes

TArrayI fHelixHits
 
Int_t fPidHypo
 
Double_t fDist
 // CHECK not for now, maybe in future if needed More...
 
Double_t fPhi
 
Double_t fRad
 
Double_t fTanL
 
Double_t fZ
 
Int_t fH
 
Int_t fFlag
 
Double_t fChi2Long
 
Int_t fNDF
 // CHECK not for now, maybe in future if needed More...
 
Double_t fChi2Rad
 // CHECK not for now, maybe in future if needed More...
 
Int_t fTrackCandIndex
 // CHECK not for now, maybe in future if needed More...
 

Detailed Description

Definition at line 28 of file PndSttTrack.h.

Constructor & Destructor Documentation

PndSttTrack::PndSttTrack ( )

Default constructor

Definition at line 17 of file PndSttTrack.cxx.

17  :
18  fHelixHits(TArrayI()),fPidHypo(0), fDist(0.), fPhi(0.), fRad(0.), fTanL(0.), fZ(0.), fH(0), fFlag(0), fChi2Long(0.), fNDF(0), fChi2Rad(0.), fTrackCandIndex(0)
19 {
20 }
Int_t fTrackCandIndex
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:122
Double_t fPhi
Definition: PndSttTrack.h:110
Int_t fNDF
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:118
Int_t fPidHypo
Definition: PndSttTrack.h:107
Double_t fChi2Rad
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:119
Double_t fTanL
Definition: PndSttTrack.h:110
Double_t fChi2Long
Definition: PndSttTrack.h:117
Double_t fDist
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:110
TArrayI fHelixHits
Definition: PndSttTrack.h:104
Double_t fRad
Definition: PndSttTrack.h:110
Double_t fZ
Definition: PndSttTrack.h:110
PndSttTrack::~PndSttTrack ( )
virtual

Destructor

Definition at line 26 of file PndSttTrack.cxx.

27 {}

Member Function Documentation

void PndSttTrack::AddHelixHit ( Int_t  size,
Int_t  index,
Int_t  helixhitindex 
)

Definition at line 42 of file PndSttTrack.cxx.

References fHelixHits.

Referenced by PndSttHelixHitProducer::Exec().

43 {
44  // fHelixHits.Reset();
45  fHelixHits.Set(size);
46  fHelixHits[index] = helixhitindex;
47  AddLink(FairLink("STTHelixHit", helixhitindex));
48 }
TArrayI fHelixHits
Definition: PndSttTrack.h:104
Double_t PndSttTrack::CalculateScosl ( Double_t  x,
Double_t  y 
)

Definition at line 129 of file PndSttTrack.cxx.

References CAMath::ATan2(), CAMath::Cos(), Double_t, fDist, fH, fPhi, fRad, CAMath::Sin(), x0, and y0.

Referenced by PndSttHelixHitProducer::Exec(), PCAToPoint(), PndSttHelixTrackFitter::ZFinder(), PndSttHelixTrackFitter::ZFinderThroughOrigin(), PndSttHelixTrackFitter::ZFit(), and PndSttHelixTrackFitter::ZFitThroughOrigin().

130 {
131 
132  Double_t x_0 = (fDist + fRad) * TMath::Cos(fPhi);
133  Double_t y_0 = (fDist + fRad) * TMath::Sin(fPhi);
134 
137 
138  Double_t Phi0 = TMath::ATan2((y0 - y_0),(x0 - x_0));
139 
140  // cout << "calculate Phi0: " << Phi0 << " v0: " << x0 << " " << y0 << endl;
141  // cout << "phi: " << fPhi << " Phi0: " << Phi0 << endl;
142 
143  Double_t scos = -fH * fRad * TMath::ATan2((y - y0) * TMath::Cos(Phi0) - (x - x0) * TMath::Sin(Phi0) , fRad + (x - x0) * TMath::Cos(Phi0) + (y - y0) * TMath::Sin(Phi0));
144 
145  return scos;
146 
147 }
Double_t x0
Definition: checkhelixhit.C:70
Double_t fPhi
Definition: PndSttTrack.h:110
static T Sin(const T &x)
Definition: PndCAMath.h:42
static T Cos(const T &x)
Definition: PndCAMath.h:43
Double_t fDist
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:110
Double_t
Double_t y0
Definition: checkhelixhit.C:71
static T ATan2(const T &y, const T &x)
Double_t x
Double_t fRad
Definition: PndSttTrack.h:110
Double_t y
PndSttTrack::ClassDef ( PndSttTrack  ,
 
)
private
Int_t PndSttTrack::GetCharge ( )
inline

Definition at line 63 of file PndSttTrack.h.

References fH.

Referenced by PndSttHelixTrackFitter::DoFitPlain(), PndSttTrackFitterQATask::Exec(), and GetEntriesFast().

63 {return fH; };
Double_t PndSttTrack::GetChi2Long ( ) const
inline

Definition at line 52 of file PndSttTrack.h.

References fChi2Long.

52 { return fChi2Long; };
Double_t fChi2Long
Definition: PndSttTrack.h:117
Double_t PndSttTrack::GetChi2Rad ( ) const
inline

Definition at line 53 of file PndSttTrack.h.

References fChi2Rad.

53 { return fChi2Rad; };
Double_t fChi2Rad
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:119
Double_t PndSttTrack::GetDist ( )
inline
Int_t PndSttTrack::GetFlag ( ) const
inline
Int_t PndSttTrack::GetHelixHitIndex ( Int_t  iHit) const
inline

Definition at line 49 of file PndSttTrack.h.

References fHelixHits.

Referenced by PndSttTrackFitterQATask::Exec(), and GetEntriesFast().

49 { return fHelixHits.At(iHit); };
TArrayI fHelixHits
Definition: PndSttTrack.h:104
Int_t PndSttTrack::GetNDF ( ) const
inline

Definition at line 54 of file PndSttTrack.h.

References fNDF.

54 { return fNDF; };
Int_t fNDF
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:118
Int_t PndSttTrack::GetNofHelixHits ( ) const
inline

Reconstructed "Helix" Hits

Definition at line 48 of file PndSttTrack.h.

References fHelixHits.

Referenced by PndSttTrackFitterQATask::Exec(), and GetEntriesFast().

48 { return fHelixHits.GetSize(); };
TArrayI fHelixHits
Definition: PndSttTrack.h:104
Double_t PndSttTrack::GetPhi ( )
inline
Int_t PndSttTrack::GetPidHypo ( ) const
inline

Definition at line 50 of file PndSttTrack.h.

References fPidHypo.

50 { return fPidHypo; };
Int_t fPidHypo
Definition: PndSttTrack.h:107
Double_t PndSttTrack::GetRad ( )
inline
Double_t PndSttTrack::GetTanL ( )
inline
Int_t PndSttTrack::GetTrackCandIndex ( )
inline

Native Hits attached via PndTrackCand

Definition at line 45 of file PndSttTrack.h.

References fTrackCandIndex.

Referenced by PndSttHelixHitProducer::Exec(), and PndSttTrackFitterQATask::Exec().

45 {return fTrackCandIndex; }
Int_t fTrackCandIndex
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:122
Double_t PndSttTrack::GetZ ( )
inline

Definition at line 61 of file PndSttTrack.h.

References fZ.

Referenced by PndSttHelixHitProducer::Exec(), PndSttHelixTrackFitter::FinishEventDisplay(), and GetEntriesFast().

61 {return fZ; };
Double_t fZ
Definition: PndSttTrack.h:110
TVector3 * PndSttTrack::MomentumAtPoint ( TVector3 *  point)

Definition at line 90 of file PndSttTrack.cxx.

References alpha, CAMath::Cos(), Double_t, fDist, fH, fPhi, fRad, fTanL, m, pt(), R, CAMath::Sin(), and tanl.

90  {
91 
92  // transverse momentum ..................................
93  Double_t pt = 0., px = 0., py = 0.;
94 
95  // tangent in point on track
96  Double_t R = fRad;
97  Double_t xc = (fDist + fRad) * TMath::Cos(fPhi);
98  Double_t yc = (fDist + fRad) * TMath::Sin(fPhi);
99  Double_t m = (yc - point->Y()) / (xc - point->X());
100  Double_t mt = -1./m;
101  Double_t alpha = TMath::ATan(mt);
102 
103  pt = 0.006 * R;
104  px = pt * TMath::Cos(alpha);
105  py = pt * TMath::Sin(alpha);
106 
107 
108  // negative NO if point higher than center
109  // positive NO if point lower than center
110  if((fH < 0 && (yc - point->Y()) < 0) || (fH > 0 && (yc - point->Y()) > 0))
111  {
112  px = -px;
113  py = -py;
114  }
115  else if(fH == 0) cout << "NO CHARGE" << endl;
116 
117  // longitudinal momentum ..................................
118  Double_t pl = 0.;
119 
120  Double_t tanl = fTanL;
121  pl = pt * tanl;
122 
123  TVector3 *ptotcl = new TVector3(px, py, pl);
124 
125  return ptotcl;
126 }
Double_t tanl
Definition: checkhelixhit.C:63
Double_t fPhi
Definition: PndSttTrack.h:110
__m128 m
Definition: P4_F32vec4.h:28
static T Sin(const T &x)
Definition: PndCAMath.h:42
Double_t fTanL
Definition: PndSttTrack.h:110
static T Cos(const T &x)
Definition: PndCAMath.h:43
Double_t fDist
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:110
TString pt(TString pts, TString exts="px py pz")
Definition: invexp.C:133
Double_t
Double_t fRad
Definition: PndSttTrack.h:110
double alpha
Definition: f_Init.h:9
Double_t R
Definition: checkhelixhit.C:61
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72
TVector3 * PndSttTrack::PCAToPoint ( TVector3 *  point)

Definition at line 52 of file PndSttTrack.cxx.

References CalculateScosl(), CAMath::Cos(), Double_t, fDist, fPhi, fRad, fTanL, fZ, m, R, CAMath::Sin(), sqrt(), z, and z0.

52  {
53 
54  // transverse
55  Double_t R = fRad;
56  Double_t xc = (fDist + fRad) * TMath::Cos(fPhi);
57  Double_t yc = (fDist + fRad) * TMath::Sin(fPhi);
58 
59  // transverse -> circle
60  // 1. find the line joining the point and the centre
61  Double_t m = (yc - point->Y()) / (xc - point->X());
62  Double_t q = yc - m * xc;
63 
64  // 2. find the point on track closest to point
65  // +
66  Double_t x1 = (-(m*(q - yc) - xc) + sqrt((m*(q - yc) - xc)*(m*(q - yc) - xc) - (m*m + 1)*((q - yc)*(q - yc) + xc*xc - R*R))) / (m*m + 1);
67  Double_t y1 = m*x1 + q;
68  // -
69  Double_t x2 = (-(m*(q - yc) - xc) - sqrt((m*(q - yc) - xc)*(m*(q - yc) - xc) - (m*m + 1)*((q - yc)*(q - yc) + xc*xc - R*R))) / (m*m + 1);
70  Double_t y2 = m*x2 + q;
71 
72  Double_t dist1 = sqrt((point->Y() - y1)*(point->Y() - y1) + (point->X() - x1)*(point->X() - x1));
73  Double_t dist2 = sqrt((point->Y() - y2)*(point->Y() - y2) + (point->X() - x2)*(point->X() - x2));
74 
75  TVector3 *clsontrk; // close on track
76  if(dist1 < dist2) clsontrk = new TVector3(x1, y1, 0.);
77  else clsontrk = new TVector3(x2, y2, 0.);
78 
79  // longitudinal: find the z correspondent to the PCA in x, y (CHECK not in 3D!!!)
80  Double_t clstrkln = CalculateScosl(clsontrk->X(), clsontrk->Y());
81  Double_t z0 = fZ;
82  Double_t zslope = fTanL;
83  Double_t z = z0 + zslope * clstrkln;
84  clsontrk->SetZ(z);
85 
86  return clsontrk;
87 }
Double_t z0
Definition: checkhelixhit.C:62
Double_t fPhi
Definition: PndSttTrack.h:110
__m128 m
Definition: P4_F32vec4.h:28
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
static T Sin(const T &x)
Definition: PndCAMath.h:42
Double_t fTanL
Definition: PndSttTrack.h:110
static T Cos(const T &x)
Definition: PndCAMath.h:43
Double_t fDist
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:110
Double_t
Double_t z
Double_t CalculateScosl(Double_t x, Double_t y)
Double_t fRad
Definition: PndSttTrack.h:110
Double_t R
Definition: checkhelixhit.C:61
Double_t fZ
Definition: PndSttTrack.h:110
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72
void PndSttTrack::Print ( )

Public method Print Output to screen

Definition at line 31 of file PndSttTrack.cxx.

References fDist, fFlag, fPhi, fRad, fTanL, fTrackCandIndex, and fZ.

32 {
33  cout << " Reco track corresponding to track cand: "
34  << fTrackCandIndex << endl;
35  cout << " Parameters of the helix: " << endl;
36  cout << fDist << " " << fPhi << " " << fRad << " " << fTanL << " " << fZ << endl;
37  // cout << "Chi2Long: " << fChi2Long << ", Chi2Rad: " << fChi2Rad << endl;
38  cout << "Quality flag " << fFlag << endl; // CHECK add number of helix hits
39 }
Int_t fTrackCandIndex
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:122
Double_t fPhi
Definition: PndSttTrack.h:110
Double_t fTanL
Definition: PndSttTrack.h:110
Double_t fDist
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:110
Double_t fRad
Definition: PndSttTrack.h:110
Double_t fZ
Definition: PndSttTrack.h:110
void PndSttTrack::SetCharge ( Int_t  charge)
inline
void PndSttTrack::SetChi2Long ( Double_t  chi2)
inline

Definition at line 96 of file PndSttTrack.h.

References fChi2Long.

96 { fChi2Long = chi2; };
Double_t fChi2Long
Definition: PndSttTrack.h:117
void PndSttTrack::SetChi2Rad ( Double_t  chi2)
inline

Definition at line 97 of file PndSttTrack.h.

References fChi2Rad.

97 { fChi2Rad = chi2; };
Double_t fChi2Rad
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:119
void PndSttTrack::SetDist ( Double_t  dist)
inline

Definition at line 87 of file PndSttTrack.h.

References fDist.

Referenced by PndSttHelixTrackFitter::MinuitFit(), PndSttHelixTrackFitter::XYFit(), and PndSttHelixTrackFitter::XYFitThroughOrigin().

87 {fDist = dist;}
Double_t fDist
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:110
void PndSttTrack::SetFlag ( Int_t  flag)
inline

Definition at line 95 of file PndSttTrack.h.

References fFlag.

Referenced by PndSttHelixTrackFitter::DoFitPlain().

95 { fFlag = flag; };
void PndSttTrack::SetNDF ( Int_t  ndf)
inline

Definition at line 98 of file PndSttTrack.h.

References fNDF.

98 { fNDF = ndf; };
Int_t fNDF
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:118
void PndSttTrack::SetParameters ( Double_t  d,
Double_t  phi,
Double_t  r,
Double_t  tanl,
Double_t  z 
)
inline

Definition at line 80 of file PndSttTrack.h.

References d, fDist, fPhi, fRad, fTanL, fZ, phi, r, tanl, and z.

80  {
81  fDist = d;
82  fPhi = phi;
83  fRad = r;
84  fTanL = tanl;
85  fZ = z; };
Double_t tanl
Definition: checkhelixhit.C:63
double r
Definition: RiemannTest.C:14
TObjArray * d
Double_t fPhi
Definition: PndSttTrack.h:110
Double_t fTanL
Definition: PndSttTrack.h:110
Double_t fDist
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:110
Double_t z
Double_t fRad
Definition: PndSttTrack.h:110
Double_t fZ
Definition: PndSttTrack.h:110
void PndSttTrack::SetPhi ( Double_t  phi)
inline
void PndSttTrack::SetPidHypo ( Int_t  pid)
inline

Definition at line 79 of file PndSttTrack.h.

References fPidHypo, and pid().

79 { fPidHypo = pid; };
Int_t fPidHypo
Definition: PndSttTrack.h:107
int pid()
void PndSttTrack::SetRad ( Double_t  r)
inline
void PndSttTrack::SetTanL ( Double_t  tanl)
inline

Definition at line 90 of file PndSttTrack.h.

References fTanL, and tanl.

Referenced by PndSttHelixTrackFitter::ZFit(), and PndSttHelixTrackFitter::ZFitThroughOrigin().

90 {fTanL = tanl;}
Double_t tanl
Definition: checkhelixhit.C:63
Double_t fTanL
Definition: PndSttTrack.h:110
void PndSttTrack::SetTrackCandIndex ( Int_t  trackCandID)
inline

Modifiers

Definition at line 78 of file PndSttTrack.h.

References fTrackCandIndex.

Referenced by PndSttFitTracks::Exec().

78 { fTrackCandIndex = trackCandID; };
Int_t fTrackCandIndex
// CHECK not for now, maybe in future if needed
Definition: PndSttTrack.h:122
void PndSttTrack::SetZ ( Double_t  z)
inline

Definition at line 91 of file PndSttTrack.h.

References fZ, and z.

Referenced by PndSttHelixTrackFitter::ZFit(), and PndSttHelixTrackFitter::ZFitThroughOrigin().

91 {fZ = z;}
Double_t z
Double_t fZ
Definition: PndSttTrack.h:110

Member Data Documentation

Double_t PndSttTrack::fChi2Long
private

RMS deviation of hit coordinates to track

Definition at line 117 of file PndSttTrack.h.

Referenced by GetChi2Long(), and SetChi2Long().

Double_t PndSttTrack::fChi2Rad
private

// CHECK not for now, maybe in future if needed

Definition at line 119 of file PndSttTrack.h.

Referenced by GetChi2Rad(), and SetChi2Rad().

Double_t PndSttTrack::fDist
private

// CHECK not for now, maybe in future if needed

Track parameters of the helix

Definition at line 110 of file PndSttTrack.h.

Referenced by CalculateScosl(), GetDist(), MomentumAtPoint(), PCAToPoint(), Print(), SetDist(), and SetParameters().

Int_t PndSttTrack::fFlag
private

Quality flag

Definition at line 114 of file PndSttTrack.h.

Referenced by GetFlag(), Print(), and SetFlag().

Int_t PndSttTrack::fH
private

Definition at line 111 of file PndSttTrack.h.

Referenced by CalculateScosl(), GetCharge(), MomentumAtPoint(), and SetCharge().

TArrayI PndSttTrack::fHelixHits
private

Arrays containg the indices of the helixhits attached to the track

Definition at line 104 of file PndSttTrack.h.

Referenced by AddHelixHit(), GetHelixHitIndex(), and GetNofHelixHits().

Int_t PndSttTrack::fNDF
private

// CHECK not for now, maybe in future if needed

Definition at line 118 of file PndSttTrack.h.

Referenced by GetNDF(), and SetNDF().

Double_t PndSttTrack::fPhi
private
Int_t PndSttTrack::fPidHypo
private

PID hypothesis used by the track fitter

Definition at line 107 of file PndSttTrack.h.

Referenced by GetPidHypo(), and SetPidHypo().

Double_t PndSttTrack::fRad
private
Double_t PndSttTrack::fTanL
private

Definition at line 110 of file PndSttTrack.h.

Referenced by GetTanL(), MomentumAtPoint(), PCAToPoint(), Print(), SetParameters(), and SetTanL().

Int_t PndSttTrack::fTrackCandIndex
private

// CHECK not for now, maybe in future if needed

track cand

Definition at line 122 of file PndSttTrack.h.

Referenced by GetTrackCandIndex(), Print(), and SetTrackCandIndex().

Double_t PndSttTrack::fZ
private

Definition at line 110 of file PndSttTrack.h.

Referenced by GetZ(), PCAToPoint(), Print(), SetParameters(), and SetZ().


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