Move pio calibration staff to directiry Calib;
[u/mrichter/AliRoot.git] / TPC / AliTPCTracklet.h
CommitLineData
69209e2c 1#ifndef ALITPCTRACKLET_H
2#define ALITPCTRACKLET_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////
8// A class that contains a tracklet (a track that lives only in a single TPC
9// sector).
10////
11
12
13#include "TObject.h"
14
15class TObjArray;
16class AliTPCseed;
17class AliExternalTrackParam;
9318a5b4 18class AliTPCclusterMI;
19
20#include "TEllipse.h"
69209e2c 21
22class AliTPCTracklet:public TObject {
9318a5b4 23public:
24 enum TrackType {kKalman,kRiemann,kLinear,kQuadratic};
25
69209e2c 26 AliTPCTracklet();
9318a5b4 27 AliTPCTracklet(const AliTPCseed *s,Int_t sector,TrackType type=kKalman,
28 Bool_t storeClusters=kFALSE);
29 AliTPCTracklet(const TObjArray &clusters,Int_t sector,TrackType type=kKalman,
30 Bool_t storeClusters=kFALSE);
69209e2c 31 AliTPCTracklet(const AliTPCTracklet &t);
32 AliTPCTracklet& operator=(const AliTPCTracklet &t);
33 virtual ~AliTPCTracklet();
34
9318a5b4 35 static TObjArray CreateTracklets(const TObjArray &clusters,
36 TrackType type=kKalman,
37 Bool_t storeClusters=kFALSE,
38 Int_t minClusters=0,
39 Int_t maxTracklets=72);
40
69209e2c 41 static TObjArray CreateTracklets(const AliTPCseed *s,
9318a5b4 42 TrackType type=kKalman,
43 Bool_t storeClusters=kFALSE,
69209e2c 44 Int_t minClusters=0,
45 Int_t maxTracklets=72);
46
9318a5b4 47 static Bool_t PropagateToMeanX(const AliTPCTracklet &t1,
48 const AliTPCTracklet &t2,
49 AliExternalTrackParam *&t1m,
50 AliExternalTrackParam *&t2m);
51
69209e2c 52 // Returns the tracklet parametrisation at its outer most cluster.
53 AliExternalTrackParam* GetOuter() const {return fOuter;};
54 // Returns the tracklet parametrisation at its inner most cluster.
55 AliExternalTrackParam* GetInner() const {return fInner;};
56 // Returns the tracklet parametrisation at X=0, i.e. the "primary vertex".
57 AliExternalTrackParam* GetPrimary() const {return fPrimary;};
58 // Returns the sector in which the tracklet lives.
59 Int_t GetSector() const {return fSector;}
60 // Returns the number of clusters assined to the tracklet.
61 Int_t GetNClusters() const {return fNClusters;}
9318a5b4 62 // Returns the clusters of this tracklet. In case they weren't stored it
63 // returns 0.
64 AliTPCclusterMI* GetClusters() const {return fClusters;};
65 // Test the functionality of the class. Generates some random tracks and
66 // refits them into tracklets.
67 static void Test(const char *filename);
68 static void RandomND(Int_t ndim,const Double_t *p,const Double_t *c,
69 Double_t *x);
70 static TEllipse ErrorEllipse(Double_t x,Double_t y,
71 Double_t sx,Double_t sy,Double_t sxy);
69209e2c 72private:
9318a5b4 73 static const Double_t kB2C; //! ugly to have the track parametrised in a way, that constand is allways needed
74 static double GetBz(Double_t *xyz);
75 void FitLinear(const AliTPCseed *track,Int_t sector,TrackType type);
76 void FitKalman(const AliTPCseed *track,Int_t sector);
77 void FitRiemann(const AliTPCseed *track,Int_t sector);
78 void Quadratic2Helix(Double_t *a,Double_t *ca,
79 Double_t *b,Double_t *cb,
80 Double_t x0,
81 Double_t *p,Double_t *c);
82 Bool_t Riemann2Helix(Double_t *a,Double_t *ca,
83 Double_t *b,Double_t *cb,
84 Double_t x0,
85 Double_t *p,Double_t *c);
69209e2c 86 Int_t fNClusters; // The number of clusters assined to the tracklet.
9318a5b4 87 Int_t fNStoredClusters; // The number of stored clusters.
88 AliTPCclusterMI *fClusters; //[fNStoredClusters] The clusters of the track, if stored (otherwise 0)
69209e2c 89 Int_t fSector; // The sector this tracklet lives in.
90 AliExternalTrackParam *fOuter; // The tracklet parametrisation at its outer most cluster.
91 AliExternalTrackParam *fInner; // The tracklet parametrisation at its inner most cluster.
92 AliExternalTrackParam *fPrimary; // The tracklet parametrisation at X=0, i.e. the "primary vertex".
93
94 ClassDef(AliTPCTracklet,1)
95};
96
97#endif