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 AliTRDstackLayer;
32 class AliTRDrecoParam;
35 class AliTRDseedV1 : public AliTRDseed
44 AliTRDseedV1(Int_t layer = -1, AliTRDrecoParam *p=0x0);
46 AliTRDseedV1(const AliTRDseedV1 &ref);
47 AliTRDseedV1& operator=(const AliTRDseedV1 &ref);
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);
53 static Float_t FitRiemanTilt(AliTRDseedV1 * cseed, Bool_t terror);
56 void Init(AliTRDtrack *track);
57 inline void Init(const AliRieman *fit);
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 Float_t GetdQdl(Int_t ic) const;
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 GetSnp() const {return fSnp;}
70 Double_t GetTgl() const {return fTgl;}
71 Double_t GetYat(Double_t x) const {return fYfitR[0] + fYfitR[1] * (x - fX0);}
72 Double_t GetZat(Double_t x) const {return fZfitR[0] + fZfitR[1] * (x - fX0);}
74 Bool_t IsOwner() const {return fOwner;}
75 void Print(Option_t * /*o*/) const { }
78 void SetMomentum(Double_t mom) {fMom = mom;}
79 void SetOwner(Bool_t own = kTRUE);
80 void SetPlane(Int_t p) { fPlane = p; }
81 void SetRecoParam(AliTRDrecoParam *p) { fRecoParam = p; }
82 void SetSnp(Double_t snp) {fSnp = snp;}
83 void SetTgl(Double_t tgl) {fTgl = tgl;}
87 void Copy(TObject &ref) const;
91 Int_t fPlane; // TRD plane
92 Bool_t fOwner; // Toggle ownership of clusters
93 Float_t fMom; // Momentum estimate for tracklet [GeV/c]
94 Float_t fSnp; // sin of track with respect to x direction in XY plane
95 Float_t fTgl; // tg of track with respect to x direction in XZ plane
96 Float_t fdX; // length of time bin
97 Float_t fdEdx[knSlices]; // dE/dx measurements for tracklet
98 Double_t fProb[AliPID::kSPECIES]; // PID probabilities
99 AliTRDrecoParam *fRecoParam; //! Local copy of the reco params
101 ClassDef(AliTRDseedV1, 1) // New TRD seed
105 //____________________________________________________________
106 inline Float_t AliTRDseedV1::GetChi2Z(const Float_t z) const
108 Float_t z1 = (z == 0.) ? fMeanz : z;
109 Float_t chi = fZref[0] - z1;
113 //____________________________________________________________
114 inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const
116 Float_t y1 = (y == 0.) ? fYfitR[0] : y;
117 Float_t chi = fYref[0] - y1;
121 //____________________________________________________________
122 inline void AliTRDseedV1::Init(const AliRieman *rieman)
124 fZref[0] = rieman->GetZat(fX0);
125 fZref[1] = rieman->GetDZat(fX0);
126 fYref[0] = rieman->GetYat(fX0);
127 fYref[1] = rieman->GetDYat(fX0);