]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCTracklet.h
The LHC clock phase stored also in the Raw2SDigits method. Temporary solution
[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);
967eae0d 72 static inline void SetEdgeCut(Float_t edgeX, Float_t edgeY);
69209e2c 73private:
967eae0d 74 static Bool_t RejectCluster(AliTPCclusterMI* cl,AliExternalTrackParam * param=0);
9318a5b4 75 static const Double_t kB2C; //! ugly to have the track parametrised in a way, that constand is allways needed
76 static double GetBz(Double_t *xyz);
967eae0d 77 static Float_t fgEdgeCutY; //cut on the edge effect in local Y
78 static Float_t fgEdgeCutX; //cut on the edge effect in local X
9318a5b4 79 void FitLinear(const AliTPCseed *track,Int_t sector,TrackType type);
80 void FitKalman(const AliTPCseed *track,Int_t sector);
81 void FitRiemann(const AliTPCseed *track,Int_t sector);
82 void Quadratic2Helix(Double_t *a,Double_t *ca,
83 Double_t *b,Double_t *cb,
84 Double_t x0,
85 Double_t *p,Double_t *c);
86 Bool_t Riemann2Helix(Double_t *a,Double_t *ca,
87 Double_t *b,Double_t *cb,
88 Double_t x0,
89 Double_t *p,Double_t *c);
69209e2c 90 Int_t fNClusters; // The number of clusters assined to the tracklet.
9318a5b4 91 Int_t fNStoredClusters; // The number of stored clusters.
92 AliTPCclusterMI *fClusters; //[fNStoredClusters] The clusters of the track, if stored (otherwise 0)
69209e2c 93 Int_t fSector; // The sector this tracklet lives in.
94 AliExternalTrackParam *fOuter; // The tracklet parametrisation at its outer most cluster.
95 AliExternalTrackParam *fInner; // The tracklet parametrisation at its inner most cluster.
96 AliExternalTrackParam *fPrimary; // The tracklet parametrisation at X=0, i.e. the "primary vertex".
97
98 ClassDef(AliTPCTracklet,1)
99};
100
967eae0d 101
102void AliTPCTracklet::SetEdgeCut(Float_t edgeX, Float_t edgeY){
103 //
104 //
105 fgEdgeCutY=edgeY;
106 fgEdgeCutX=edgeX;
107}
108
69209e2c 109#endif