]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - TRD/AliTRDseedV1.h
Fixes in MUON documentation files
[u/mrichter/AliRoot.git] / TRD / AliTRDseedV1.h
... / ...
CommitLineData
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
26class TTreeSRedirector;
27
28class AliRieman;
29
30class AliTRDstackLayer;
31class AliTRDcluster;
32class AliTRDrecoParam;
33class AliTRDtrack;
34
35class AliTRDseedV1 : public AliTRDseed
36{
37
38 public:
39
40 enum {
41 knSlices = 10
42 };
43
44 AliTRDseedV1(Int_t layer = -1, AliTRDrecoParam *p=0x0);
45 ~AliTRDseedV1();
46 AliTRDseedV1(const AliTRDseedV1 &ref);
47 AliTRDseedV1& operator=(const AliTRDseedV1 &ref);
48
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);
54 Bool_t Fit();
55
56 void Init(AliTRDtrack *track);
57 inline void Init(const AliRieman *fit);
58
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);}
71
72 Bool_t IsOwner() const {return fOwner;}
73 void Print(Option_t * /*o*/) const { }
74 void Print();
75
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; }
81
82 protected:
83
84 void Copy(TObject &ref) const;
85
86 private:
87
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
96
97 ClassDef(AliTRDseedV1, 1) // New TRD seed
98
99};
100
101//____________________________________________________________
102inline Float_t AliTRDseedV1::GetChi2Z(const Float_t z) const
103{
104 Float_t z1 = (z == 0.) ? fMeanz : z;
105 Float_t chi = fZref[0] - z1;
106 return chi*chi;
107}
108
109//____________________________________________________________
110inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const
111{
112 Float_t y1 = (y == 0.) ? fYfitR[0] : y;
113 Float_t chi = fYref[0] - y1;
114 return chi*chi;
115}
116
117//____________________________________________________________
118inline void AliTRDseedV1::Init(const AliRieman *rieman)
119{
120 fZref[0] = rieman->GetZat(fX0);
121 fZref[1] = rieman->GetDZat(fX0);
122 fYref[0] = rieman->GetYat(fX0);
123 fYref[1] = rieman->GetDYat(fX0);
124}
125
126#endif
127