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 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);}
72 Bool_t IsOwner() const {return fOwner;}
73 void Print(Option_t * /*o*/) const { }
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; }
84 void Copy(TObject &ref) const;
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
97 ClassDef(AliTRDseedV1, 1) // New TRD seed
101 //____________________________________________________________
102 inline Float_t AliTRDseedV1::GetChi2Z(const Float_t z) const
104 Float_t z1 = (z == 0.) ? fMeanz : z;
105 Float_t chi = fZref[0] - z1;
109 //____________________________________________________________
110 inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const
112 Float_t y1 = (y == 0.) ? fYfitR[0] : y;
113 Float_t chi = fYref[0] - y1;
117 //____________________________________________________________
118 inline void AliTRDseedV1::Init(const AliRieman *rieman)
120 fZref[0] = rieman->GetZat(fX0);
121 fZref[1] = rieman->GetDZat(fX0);
122 fYref[0] = rieman->GetYat(fX0);
123 fYref[1] = rieman->GetDYat(fX0);