3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ////////////////////////////////////////////////////////////////////////////
10 // The TRD track seed //
12 ////////////////////////////////////////////////////////////////////////////
15 #include "AliTRDseed.h"
23 #include "AliRieman.h"
26 class TTreeSRedirector;
30 class AliTRDtrackingChamber;
33 class AliTRDReconstructor;
34 class AliTRDseedV1 : public AliTRDseed
42 // bits from 0-13 are reserved by ROOT (see TObject.h)
43 enum AliTRDtrackletStatus {
48 AliTRDseedV1(Int_t plane = -1);
50 AliTRDseedV1(const AliTRDseedV1 &ref);
51 AliTRDseedV1& operator=(const AliTRDseedV1 &ref);
53 Bool_t AttachClustersIter(AliTRDtrackingChamber *chamber, Float_t quality, Bool_t kZcorr = kFALSE
54 , AliTRDcluster *c=0x0);
55 Bool_t AttachClusters(AliTRDtrackingChamber *chamber, Bool_t kZcorr = kFALSE);
56 void CookdEdx(Int_t nslices);
57 void Draw(Option_t* o = "");
58 Bool_t Fit(Bool_t tilt=kTRUE);
60 Bool_t Init(AliTRDtrackV1 *track);
61 inline void Init(const AliRieman *fit);
62 Bool_t IsOwner() const { return TestBit(kOwner);}
63 Bool_t IsRowCross() const { return TestBit(kRowCross);}
65 inline Float_t GetChi2Z(const Float_t z = 999.) const;
66 inline Float_t GetChi2Y(const Float_t y = 999.) const;
67 void GetCovAt(Double_t x, Double_t *cov) const;
68 Double_t* GetCrossXYZ() { return &fCross[0];}
69 Double_t GetCrossSz2() const { return fCross[3];}
70 Float_t* GetdEdx() {return &fdEdx[0];}
71 Float_t GetdQdl(Int_t ic) const;
72 Double_t GetMomentum() const {return fMom;}
73 Int_t GetN() const {return fN2;}
74 Float_t GetQuality(Bool_t kZcorr) const;
75 Int_t GetPlane() const { return fPlane; }
76 Double_t* GetProbability();
77 Double_t GetSnp() const { return fSnp;}
78 Double_t GetTgl() const { return fTgl;}
79 Double_t GetYat(Double_t x) const { return fYfit[0] + fYfit[1] * (x-fX0);}
80 Double_t GetZat(Double_t x) const { return fZfit[0] + fZfit[1] * (x-fX0);}
82 void Print(Option_t *o = "") const;
84 void SetMomentum(Double_t mom) {fMom = mom;}
86 void SetPlane(Int_t p) { fPlane = p; }
87 void SetSnp(Double_t snp) {fSnp = snp;}
88 void SetTgl(Double_t tgl) {fTgl = tgl;}
89 void SetReconstructor(const AliTRDReconstructor *rec) {fReconstructor = rec;}
92 void Copy(TObject &ref) const;
95 const AliTRDReconstructor *fReconstructor;//! local reconstructor
96 Int_t fPlane; // TRD plane
97 Float_t fMom; // Momentum estimate for tracklet [GeV/c]
98 Float_t fSnp; // sin of track with respect to x direction in XY plane
99 Float_t fTgl; // tg of track with respect to x direction in XZ plane
100 Float_t fdX; // length of time bin
101 Float_t fdEdx[knSlices]; // dE/dx measurements for tracklet
102 Double_t fCross[4]; // spatial parameters of the pad row crossing
103 Double_t fProb[AliPID::kSPECIES]; // PID probabilities
105 ClassDef(AliTRDseedV1, 1) // New TRD seed
109 //____________________________________________________________
110 inline Float_t AliTRDseedV1::GetChi2Z(const Float_t z) const
112 Float_t z1 = (z == 999.) ? fMeanz : z;
113 Float_t chi = fZref[0] - z1;
117 //____________________________________________________________
118 inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const
120 Float_t y1 = (y == 999.) ? fYfitR[0] : y;
121 Float_t chi = fYref[0] - y1;
125 //____________________________________________________________
126 inline void AliTRDseedV1::Init(const AliRieman *rieman)
128 fZref[0] = rieman->GetZat(fX0);
129 fZref[1] = rieman->GetDZat(fX0);
130 fYref[0] = rieman->GetYat(fX0);
131 fYref[1] = rieman->GetDYat(fX0);
133 fChi2 = rieman->GetChi2();