]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDtrackGTU.h
Bug fix: AliHLTComponent::ConfigureFromArgumentString
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackGTU.h
1 #ifndef ALITRDTRACKGTU_H
2 #define ALITRDTRACKGTU_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliTRDtrackGTU.h 27496 2008-07-22 08:35:45Z cblume $ */
7
8 //---------------------------------------------------------------
9 //
10 // TRD track as calculated in the GTU (for L1 contribution)
11 //
12 //---------------------------------------------------------------
13
14 #include "TClonesArray.h"
15
16 #include "AliTRDtrackletGTU.h"
17 class AliESDTrdTrack;
18
19 class AliTRDtrackGTU : public TObject {
20  public:
21   AliTRDtrackGTU();
22   AliTRDtrackGTU(const AliTRDtrackGTU &rhs);
23   AliTRDtrackGTU& operator=(const AliTRDtrackGTU &rhs);
24   AliTRDtrackGTU& operator=(const AliESDTrdTrack &rhs);
25   ~AliTRDtrackGTU();
26
27 // ----- Track properties
28   Int_t    GetPtInt() const { return AliTRDgtuParam::GetPt(fTrackletMask, (Int_t) this->GetA(), 0, 0, 0, 0); }
29   Float_t  GetPt() const { return (Float_t) this->GetPtInt() / 128.; }
30   Int_t    GetPID() const { return fPID; }
31   Int_t    GetSector() const { return fSector; }
32   Int_t    GetStack() const { return fStack; }
33   Int_t GetLabel() const { return fLabel; }
34
35   AliESDTrdTrack* CreateTrdTrack() const;
36
37 // ----- compositing tracklets
38   Int_t    GetNTracklets() const;
39   Int_t    GetTrackletMask() const { return fTrackletMask; }
40   Bool_t   IsTrackletInLayer(Int_t layer) const;
41   Int_t    GetTrackletIndex(Int_t layer) { return IsTrackletInLayer(layer) ? ((AliTRDtrackletGTU*) (*fTracklets)[layer])->GetIndex() : -1; }
42   AliTRDtrackletGTU* GetTracklet(Int_t layer) const;
43
44 // ----- Quantities used internally for the calculation
45   Float_t GetA() const { return fA; }
46   Float_t GetB() const { return fB; }
47   Float_t GetC() const { return fC; }
48   Int_t GetZChannel() const { return fZChannel; }
49   Int_t GetZSubChannel();
50   Int_t GetRefLayer() const { return AliTRDgtuParam::GetRefLayer(fRefLayerIdx); }
51   Int_t GetRefLayerIdx() const { return fRefLayerIdx; }
52   Int_t GetYapprox();
53
54
55   void AddTracklet(const AliTRDtrackletGTU * const tracklet, Int_t layer);
56
57   void SetStack(Int_t stack) { fStack = stack; }
58   void SetSector(Int_t sector) { fSector = sector; }
59   void SetPID(Int_t pid) { fPID = pid; }
60   void SetLabel(Int_t label) { fLabel = label; }
61
62   void SetZChannel(Int_t zch) { fZChannel = zch; }
63   void SetRefLayerIdx(Int_t reflayer) { fRefLayerIdx = reflayer; }
64 //  void SetInnerIntPoint(Float_t *x);
65 //  void SetOuterIntPoint(Float_t *x);
66   void SetFitParams(Float_t a, Float_t b, Float_t c);
67
68   Bool_t CookLabel();
69
70  protected:
71
72   Int_t fStack; // TRD stack to which this track belongs
73   Int_t fSector; // sector in which the track was found
74
75   Int_t fPID; // PID calculated from tracklet PID
76
77   TClonesArray *fTracklets; // array holding the tracklets composing this track
78   Int_t fTrackletMask; // mask in which layers tracklets have been assigned
79   Int_t fNTracklets; // number of tracklets in this track
80
81   Int_t fRefLayerIdx; // index of the reference layer in which this track was found
82   Int_t fZChannel; // z-channel unit in which this track was found
83   Int_t fZSubChannel; // z-subchannel of the assigned tracklets
84
85   Float_t fA; // fit parameter of y' = a + b*x + c*z
86   Float_t fB; // fit parameter of y' = a + b*x + c*z
87   Float_t fC; // fit parameter of y' = a + b*x + c*z
88
89   Int_t fLabel; // MC label
90
91   ClassDef(AliTRDtrackGTU, 1);
92 };
93
94 #endif