]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDseedV1.h
fix for changed TString::Tokenize behavior in new ROOT
[u/mrichter/AliRoot.git] / TRD / AliTRDseedV1.h
CommitLineData
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
18#ifndef ALIRIEMAN_H
19#include "AliRieman.h"
20#endif
21
22class TTreeSRedirector;
23
24class AliRieman;
25
26class AliTRDstackLayer;
27class AliTRDcluster;
28class AliTRDrecoParam;
d9950a5a 29class AliTRDtrack;
e4f2f73d 30class AliTRDseedV1 : public AliTRDseed
31{
d9950a5a 32public:
e4f2f73d 33 AliTRDseedV1(Int_t layer = -1, AliTRDrecoParam *p=0x0);
34 ~AliTRDseedV1();
d9950a5a 35 AliTRDseedV1(const AliTRDseedV1 &ref);
d76231c8 36 AliTRDseedV1& operator=(const AliTRDseedV1 &ref);
e4f2f73d 37
38 Bool_t AttachClustersIter(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE, AliTRDcluster *c=0x0);
d9950a5a 39 Bool_t AttachClusters(AliTRDstackLayer *layer, Bool_t kZcorr = kFALSE);
40 void CookdEdx(Float_t */*dedx*/){};
e4f2f73d 41 static Float_t FitRiemanTilt(AliTRDseedV1 * cseed, Bool_t terror);
d9950a5a 42 Bool_t Fit();
43
44 void Init(AliTRDtrack *track);
45 inline void Init(const AliRieman *fit);
e4f2f73d 46
e4f2f73d 47 inline Float_t GetChi2Z(const Float_t z = 0.) const;
48 inline Float_t GetChi2Y(const Float_t y = 0.) const;
d9950a5a 49 Float_t GetQuality(Bool_t kZcorr) const;
50 Int_t GetPlane() const { return fPlane; }
51 Int_t GetN() const {return fN2;}
52 Double_t GetYat(Double_t x) const {return fYfitR[0] + fYfitR[1] * (x - fX0);}
53 Double_t GetZat(Double_t x) const {return fZfitR[0] + fZfitR[1] * (x - fX0);}
54 void GetCovAt(Double_t x, Double_t *cov) const;
55
56 void Print(Option_t * /*o*/) const { }
57 void Print();
58 void SetOwner(Bool_t own = kTRUE);
59 void SetPlane(Int_t p) { fPlane = p; }
60 void SetRecoParam(AliTRDrecoParam *p) { fRecoParam = p; }
e4f2f73d 61
62 protected:
63
64 void Copy(TObject &ref) const;
65
66 private:
67
d9950a5a 68 Int_t fPlane; // layer for this seed
e4f2f73d 69 Bool_t fOwner; // owner of the clusters
70 AliTRDrecoParam *fRecoParam; //! local copy of the reco params
71
72 ClassDef(AliTRDseedV1, 1) // New TRD seed
73
74};
75
76//____________________________________________________________
77inline Float_t AliTRDseedV1::GetChi2Z(const Float_t z) const
78{
79 Float_t z1 = (z == 0.) ? fMeanz : z;
80 Float_t chi = fZref[0] - z1;
81 return chi*chi;
82}
83
84//____________________________________________________________
85inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const
86{
87 Float_t y1 = (y == 0.) ? fYfitR[0] : y;
88 Float_t chi = fYref[0] - y1;
89 return chi*chi;
90}
91
92//____________________________________________________________
d9950a5a 93inline void AliTRDseedV1::Init(const AliRieman *rieman)
e4f2f73d 94{
95 fZref[0] = rieman->GetZat(fX0);
96 fZref[1] = rieman->GetDZat(fX0);
97 fYref[0] = rieman->GetYat(fX0);
98 fYref[1] = rieman->GetDYat(fX0);
99}
100
101#endif
102