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