]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDseedV1.h
ALIfied Pythia version for PYQUEN.
[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;
fbb2ea06 29
e4f2f73d 30class AliTRDseedV1 : public AliTRDseed
31{
fbb2ea06 32
33 public:
34
e4f2f73d 35 AliTRDseedV1(Int_t layer = -1, AliTRDrecoParam *p=0x0);
36 ~AliTRDseedV1();
fbb2ea06 37 AliTRDseedV1(const AliTRDseedV1 &ref, Bool_t owner=kFALSE);
d76231c8 38 AliTRDseedV1& operator=(const AliTRDseedV1 &ref);
e4f2f73d 39
40 Bool_t AttachClustersIter(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE, AliTRDcluster *c=0x0);
fbb2ea06 41 Bool_t AttachClustersProj(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE, AliTRDcluster *c=0x0);
e4f2f73d 42 static Float_t FitRiemanTilt(AliTRDseedV1 * cseed, Bool_t terror);
fbb2ea06 43 Bool_t FitTracklet();
e4f2f73d 44
fbb2ea06 45// Bool_t AttachClusters(Double_t *dx, Float_t quality, Bool_t kZcorr=kFALSE, AliTRDcluster *c=0x0);
e4f2f73d 46 inline Float_t GetChi2Z(const Float_t z = 0.) const;
47 inline Float_t GetChi2Y(const Float_t y = 0.) const;
fbb2ea06 48 Float_t GetQuality(Bool_t kZcorr) const;
49 Int_t GetLayer() const { return fLayer; }
50
51 inline void Update(const AliRieman *rieman);
52 void Print(Option_t * /*o*/) const { }
53 void Print();
54
55 void SetLayer(Int_t l) { fLayer = l; }
56 void SetNTimeBins(Int_t nTB) { fTimeBins = nTB; }
57 void SetRecoParam(AliTRDrecoParam *p) { fRecoParam = p; }
e4f2f73d 58
59 protected:
60
61 void Copy(TObject &ref) const;
62
63 private:
64
fbb2ea06 65 Int_t fLayer; // layer for this seed
66 Int_t fTimeBins; // local copy of the DB info
e4f2f73d 67 Bool_t fOwner; // owner of the clusters
68 AliTRDrecoParam *fRecoParam; //! local copy of the reco params
69
70 ClassDef(AliTRDseedV1, 1) // New TRD seed
71
72};
73
74//____________________________________________________________
75inline Float_t AliTRDseedV1::GetChi2Z(const Float_t z) const
76{
77 Float_t z1 = (z == 0.) ? fMeanz : z;
78 Float_t chi = fZref[0] - z1;
79 return chi*chi;
80}
81
82//____________________________________________________________
83inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const
84{
85 Float_t y1 = (y == 0.) ? fYfitR[0] : y;
86 Float_t chi = fYref[0] - y1;
87 return chi*chi;
88}
89
90//____________________________________________________________
fbb2ea06 91inline void AliTRDseedV1::Update(const AliRieman *rieman)
e4f2f73d 92{
93 fZref[0] = rieman->GetZat(fX0);
94 fZref[1] = rieman->GetDZat(fX0);
95 fYref[0] = rieman->GetYat(fX0);
96 fYref[1] = rieman->GetDYat(fX0);
97}
98
99#endif
100