PandaRoot
PndTrkTrack.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 
18 #ifndef PNDTRKTRACK_H
19 #define PNDTRKTRACK_H 1
20 
21 #include "TVector3.h"
22 #include "TVector2.h"
23 #include "PndTrkCluster.h"
24 #include "PndTrackCand.h"
25 #include "PndTrack.h"
26 #include "PndTrkHit.h"
27 #include "PndTrkTools.h"
28 
29 class PndTrkTrack : public TObject {
30 
31  public:
32  PndTrkTrack();
33  PndTrkTrack(PndTrkCluster *cluster);
34  PndTrkTrack(PndTrkCluster *cluster, double x, double y, double radius);
35  PndTrkTrack(PndTrkHit *hit, PndTrkCluster *cluster, double x, double y, double radius);
36  PndTrkTrack(double x, double y, double radius);
37  PndTrkTrack(PndTrack *trk);
38  PndTrkTrack(const PndTrkTrack &track);
39 
40  ~PndTrkTrack();
41 
42  PndTrkTrack &operator=(const PndTrkTrack &track);
43 
44  Bool_t operator==(PndTrkTrack track); // CHECK this needs to be changed
45 
46  void SetRadius(double radius) { fRadius = radius; }
47  void SetCenter(double x, double y)
48  {
49  fCenterX = x;
50  fCenterY = y;
51  }
52  void SetCenter(TVector3 center)
53  {
54  fCenterX = center.X();
55  fCenterY = center.Y();
56  }
57  void SetTanL(double tanl) { fTanL = tanl; }
58  void SetZ0(double z0) { fZ0 = z0; }
59  void SetCluster(PndTrkCluster *cluster) { fCluster = *cluster; }
60  void SetRefHit(PndTrkHit *hit) { fRefHit = hit; }
61  Double_t GetRadius() { return fRadius; }
62  TVector2 GetCenter() { return TVector2(fCenterX, fCenterY); }
63  Double_t GetTanL() { return fTanL; }
64  Double_t GetZ0() { return fZ0; }
65 
67 
68  Double_t ComputePhi(TVector3 hit);
69  Double_t ComputePhiFrom(TVector3 hit, TVector3 from);
70 
71  TVector3 ComputeMomentumAtPosition(TVector3 position, TVector3 &newposition);
72  void ComputeCharge();
75  Int_t GetCharge() { return fCharge; }
76 
77  void Draw(Color_t color = kBlack);
78  void LightUp();
79 
80  void Clear(Option_t *opt = "");
81 
82  protected:
86  int fCharge;
87  double fPhiMin;
88  double fPhiMax;
89  // parameters:
90  // pT = p cos(lam)
91  // pL = p sin(lam)
92  // ==> pL = pT * tan(lam)
93  // z = z0 + s sin(lam) = z0 + tan(lam) [s cos(lam)]
94  // with s cos(lam) = proj track length = -q phi_rad* R
95  // ==> z = z0 - q tanl phi_rad R
96  // If I have z = z0 + k phi_deg ==> k 180/pi = -q tanl R ==> tanl = -q k (180/pi) /R
97 
99 };
100 
101 #endif
double fPhiMax
Definition: PndTrkTrack.h:88
Double_t GetRadius()
Definition: PndTrkTrack.h:61
void Clear(Option_t *opt="")
PndTrack ConvertToPndTrack()
Bool_t operator==(PndTrkTrack track)
PndTrackCand ConvertToPndTrackCand()
double fRadius
Definition: PndTrkTrack.h:85
void SetRefHit(PndTrkHit *hit)
Definition: PndTrkTrack.h:60
PndTrkCluster GetCluster()
Definition: PndTrkTrack.h:66
void SetTanL(double tanl)
Definition: PndTrkTrack.h:57
Double_t GetZ0()
Definition: PndTrkTrack.h:64
void SetCluster(PndTrkCluster *cluster)
Definition: PndTrkTrack.h:59
TVector2 GetCenter()
Definition: PndTrkTrack.h:62
double fPhiMin
Definition: PndTrkTrack.h:87
double fZ0
Definition: PndTrkTrack.h:85
Double_t ComputePhi(TVector3 hit)
void ComputeCharge()
Int_t GetCharge()
Definition: PndTrkTrack.h:75
TVector3 ComputeMomentumAtPosition(TVector3 position, TVector3 &newposition)
void SetCenter(double x, double y)
Definition: PndTrkTrack.h:47
PndTrkTrack & operator=(const PndTrkTrack &track)
double fCenterY
Definition: PndTrkTrack.h:85
void SetRadius(double radius)
Definition: PndTrkTrack.h:46
void SetCenter(TVector3 center)
Definition: PndTrkTrack.h:52
void Draw(Color_t color=kBlack)
PndTrkHit * fRefHit
Definition: PndTrkTrack.h:84
void LightUp()
void SetZ0(double z0)
Definition: PndTrkTrack.h:58
ClassDef(PndTrkTrack, 1)
double fTanL
Definition: PndTrkTrack.h:85
double fCenterX
Definition: PndTrkTrack.h:85
Double_t GetTanL()
Definition: PndTrkTrack.h:63
PndTrkCluster fCluster
Definition: PndTrkTrack.h:83
Double_t ComputePhiFrom(TVector3 hit, TVector3 from)