]>
Commit | Line | Data |
---|---|---|
e4f2f73d | 1 | #ifndef ALITRDSEEDV1_H |
2 | #define ALITRDSEEDV1_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //////////////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // The TRD track seed // | |
11 | // // | |
12 | //////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #ifndef ALITRDSEED_H | |
15 | #include "AliTRDseed.h" | |
16 | #endif | |
17 | ||
0906e73e | 18 | #ifndef ALIPID_H |
19 | #include "AliPID.h" | |
20 | #endif | |
21 | ||
e4f2f73d | 22 | #ifndef ALIRIEMAN_H |
23 | #include "AliRieman.h" | |
24 | #endif | |
25 | ||
26 | class TTreeSRedirector; | |
27 | ||
28 | class AliRieman; | |
29 | ||
30 | class AliTRDstackLayer; | |
31 | class AliTRDcluster; | |
32 | class AliTRDrecoParam; | |
0906e73e | 33 | class AliTRDtrack; |
fbb2ea06 | 34 | |
e4f2f73d | 35 | class AliTRDseedV1 : public AliTRDseed |
36 | { | |
fbb2ea06 | 37 | |
0906e73e | 38 | public: |
39 | ||
40 | enum { | |
41 | knSlices = 10 | |
42 | }; | |
fbb2ea06 | 43 | |
e4f2f73d | 44 | AliTRDseedV1(Int_t layer = -1, AliTRDrecoParam *p=0x0); |
45 | ~AliTRDseedV1(); | |
0906e73e | 46 | AliTRDseedV1(const AliTRDseedV1 &ref); |
d76231c8 | 47 | AliTRDseedV1& operator=(const AliTRDseedV1 &ref); |
e4f2f73d | 48 | |
0906e73e | 49 | Bool_t AttachClustersIter(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE |
50 | , AliTRDcluster *c=0x0); | |
51 | Bool_t AttachClusters(AliTRDstackLayer *layer, Bool_t kZcorr = kFALSE); | |
52 | void CookdEdx(Int_t nslices); | |
e4f2f73d | 53 | static Float_t FitRiemanTilt(AliTRDseedV1 * cseed, Bool_t terror); |
0906e73e | 54 | Bool_t Fit(); |
fbb2ea06 | 55 | |
0906e73e | 56 | void Init(AliTRDtrack *track); |
57 | inline void Init(const AliRieman *fit); | |
58 | ||
59 | inline Float_t GetChi2Z(const Float_t z = 0.) const; | |
60 | inline Float_t GetChi2Y(const Float_t y = 0.) const; | |
61 | void GetCovAt(Double_t x, Double_t *cov) const; | |
62 | Float_t* GetdEdx() {return &fdEdx[0];} | |
63 | Double_t* GetdQdl() {return &fdQdl[0];} | |
64 | Double_t GetMomentum() const {return fMom;} | |
65 | Int_t GetN() const {return fN2;} | |
66 | Float_t GetQuality(Bool_t kZcorr) const; | |
67 | Int_t GetPlane() const { return fPlane; } | |
68 | Double_t* GetProbability(); | |
69 | Double_t GetYat(Double_t x) const {return fYfitR[0] + fYfitR[1] * (x - fX0);} | |
70 | Double_t GetZat(Double_t x) const {return fZfitR[0] + fZfitR[1] * (x - fX0);} | |
71 | ||
72 | Bool_t IsOwner() const {return fOwner;} | |
73 | void Print(Option_t * /*o*/) const { } | |
74 | void Print(); | |
75 | ||
76 | void SetdQdl(Double_t length); | |
77 | void SetMomentum(Double_t mom) {fMom = mom;} | |
78 | void SetOwner(Bool_t own = kTRUE); | |
79 | void SetPlane(Int_t p) { fPlane = p; } | |
80 | void SetRecoParam(AliTRDrecoParam *p) { fRecoParam = p; } | |
e4f2f73d | 81 | |
82 | protected: | |
83 | ||
84 | void Copy(TObject &ref) const; | |
85 | ||
86 | private: | |
87 | ||
0906e73e | 88 | Int_t fPlane; // TRD plane |
89 | Bool_t fOwner; // Toggle ownership of clusters | |
90 | Float_t fMom; // Momentum estimate for tracklet [GeV/c] | |
91 | Float_t fdEdx[knSlices]; // dE/dx measurements for tracklet | |
92 | Double_t fdQdl[knTimebins]; // dQ/dl for all clusters attached to tracklet | |
93 | Double_t fdQ[knTimebins]; //! dQ for all clusters attached to tracklet TODO migrate to AliTRDcluster | |
94 | Double_t fProb[AliPID::kSPECIES]; // PID probabilities | |
95 | AliTRDrecoParam *fRecoParam; //! Local copy of the reco params | |
e4f2f73d | 96 | |
0906e73e | 97 | ClassDef(AliTRDseedV1, 1) // New TRD seed |
e4f2f73d | 98 | |
99 | }; | |
100 | ||
101 | //____________________________________________________________ | |
102 | inline Float_t AliTRDseedV1::GetChi2Z(const Float_t z) const | |
103 | { | |
104 | Float_t z1 = (z == 0.) ? fMeanz : z; | |
105 | Float_t chi = fZref[0] - z1; | |
106 | return chi*chi; | |
107 | } | |
108 | ||
109 | //____________________________________________________________ | |
110 | inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const | |
111 | { | |
112 | Float_t y1 = (y == 0.) ? fYfitR[0] : y; | |
113 | Float_t chi = fYref[0] - y1; | |
114 | return chi*chi; | |
115 | } | |
116 | ||
117 | //____________________________________________________________ | |
0906e73e | 118 | inline void AliTRDseedV1::Init(const AliRieman *rieman) |
e4f2f73d | 119 | { |
120 | fZref[0] = rieman->GetZat(fX0); | |
121 | fZref[1] = rieman->GetDZat(fX0); | |
122 | fYref[0] = rieman->GetYat(fX0); | |
123 | fYref[1] = rieman->GetDYat(fX0); | |
124 | } | |
125 | ||
126 | #endif | |
127 |