]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDseedV1.h
Update of reco param by Alex
[u/mrichter/AliRoot.git] / TRD / AliTRDseedV1.h
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 ALIPID_H
19 #include "AliPID.h"
20 #endif
21
22 #ifndef ALIRIEMAN_H
23 #include "AliRieman.h"
24 #endif
25
26 class TTreeSRedirector;
27
28 class AliRieman;
29
30 class AliTRDtrackingChamber;
31 class AliTRDcluster;
32 class AliTRDtrackV1;
33 class AliTRDReconstructor;
34 class AliTRDseedV1 : public AliTRDseed
35 {
36
37   public:
38
39         enum {
40           knSlices = 10
41         };
42
43         AliTRDseedV1(Int_t plane = -1);
44         ~AliTRDseedV1();
45         AliTRDseedV1(const AliTRDseedV1 &ref);
46         AliTRDseedV1& operator=(const AliTRDseedV1 &ref);
47
48         Bool_t  AttachClustersIter(AliTRDtrackingChamber *chamber, Float_t quality, Bool_t kZcorr = kFALSE
49                                  , AliTRDcluster *c=0x0);
50         Bool_t  AttachClusters(AliTRDtrackingChamber *chamber, Bool_t kZcorr = kFALSE);
51         void    CookdEdx(Int_t nslices);
52         void    Draw(Option_t* o = "");
53         Bool_t  Fit();
54
55         Bool_t  Init(AliTRDtrackV1 *track);
56         inline void      Init(const AliRieman *fit);
57         Bool_t    IsOwner() const          { return TestBit(1);}
58         Bool_t    IsRowCross() const       { return TestBit(2);}
59
60         inline Float_t   GetChi2Z(const Float_t z = 999.) const;
61         inline Float_t   GetChi2Y(const Float_t y = 999.) const;
62         void      GetCovAt(Double_t x, Double_t *cov) const;
63         Double_t* GetCrossXYZ() { return &fCross[0];}
64         Double_t  GetCrossSz2() const { return fCross[3];}
65         Float_t*  GetdEdx() {return &fdEdx[0];}
66         Float_t   GetdQdl(Int_t ic) const;
67         Double_t  GetMomentum() const {return fMom;}
68         Int_t     GetN() const {return fN2;}
69         Float_t   GetQuality(Bool_t kZcorr) const;
70         Int_t     GetPlane() const         { return fPlane;    }
71         Double_t* GetProbability();
72         Double_t  GetSnp() const           { return fSnp;}
73         Double_t  GetTgl() const           { return fTgl;}
74         Double_t  GetYat(Double_t x) const { return fYfitR[0] + fYfitR[1] * (x - fX0);}
75         Double_t  GetZat(Double_t x) const { return fZfitR[0] + fZfitR[1] * (x - fX0);}
76         
77         void      Print(Option_t *o = "") const;
78         
79         void      SetMomentum(Double_t mom) {fMom = mom;}
80         void      SetOwner(Bool_t own = kTRUE);
81         void      SetPlane(Int_t p)                      { fPlane     = p;   }
82         void      SetSnp(Double_t snp) {fSnp = snp;}
83         void      SetTgl(Double_t tgl) {fTgl = tgl;}
84   void      SetReconstructor(const AliTRDReconstructor *rec) {fReconstructor = rec;}
85  protected:
86
87         void Copy(TObject &ref) const;
88
89  private:
90   const AliTRDReconstructor *fReconstructor;
91         Int_t            fPlane;                  //  TRD plane
92         Float_t          fMom;                    //  Momentum estimate for tracklet [GeV/c]
93         Float_t          fSnp;                    // sin of track with respect to x direction in XY plane       
94         Float_t          fTgl;                    // tg of track with respect to x direction in XZ plane        
95         Float_t          fdX;                     // length of time bin
96         Float_t          fdEdx[knSlices];         //  dE/dx measurements for tracklet
97         Double_t         fCross[4];            // spatial parameters of the pad row crossing
98         Double_t         fProb[AliPID::kSPECIES]; //  PID probabilities
99
100         ClassDef(AliTRDseedV1, 1)                 //  New TRD seed 
101
102 };
103
104 //____________________________________________________________
105 inline Float_t AliTRDseedV1::GetChi2Z(const Float_t z) const
106 {
107         Float_t z1  = (z == 999.) ? fMeanz : z;
108         Float_t chi = fZref[0] - z1;
109         return chi*chi;
110 }
111
112 //____________________________________________________________
113 inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const
114 {
115         Float_t y1  = (y == 999.) ? fYfitR[0] : y;
116         Float_t chi = fYref[0] - y1;
117         return chi*chi;
118 }
119
120 //____________________________________________________________
121 inline void AliTRDseedV1::Init(const AliRieman *rieman)
122 {
123         fZref[0] = rieman->GetZat(fX0);
124         fZref[1] = rieman->GetDZat(fX0);
125         fYref[0] = rieman->GetYat(fX0);
126         fYref[1] = rieman->GetDYat(fX0);
127 }
128
129 #endif
130
131