AliRoot Core  edcc906 (edcc906)
AliESDTrdTrack.h
Go to the documentation of this file.
1 #ifndef ALIESDTRDTRACK_H
2 #define ALIESDTRDTRACK_H
3 
4 //
5 // ESD format for the TRD tracks calculated in the
6 // Global Tracking Unit, used for the TRD L1 trigger
7 // Author: Jochen Klein <jochen.klein@cern.ch>
8 
9 #include "TRef.h"
10 
11 #include "AliVTrdTrack.h"
12 #include "AliESDTrdTracklet.h"
13 #include "AliESDtrack.h"
14 
15 class AliESDTrdTrack : public AliVTrdTrack {
16 
17  public:
18 
20  virtual ~AliESDTrdTrack() {};
23  virtual void Copy(TObject &obj) const;
24 
25  ULong64_t GetTrackWord(Int_t rev) const;
26  ULong64_t GetExtendedTrackWord(Int_t rev) const;
27 
28  Int_t GetA() const { return fA; }
29  Int_t GetB() const { return fB; }
30  Int_t GetC() const { return fC; }
31  Int_t GetY() const { return fY; }
32  Int_t GetLayerMask() const { return fLayerMask; }
33  Int_t GetPID() const { return fPID; }
34  Int_t GetPt() const;
35  Int_t GetStack() const { return fStack; }
36  Int_t GetSector() const { return fSector; }
37  UChar_t GetFlags() const { return fFlags; }
38  UChar_t GetFlagsTiming() const { return fFlagsTiming; }
39  Bool_t GetTrackInTime() const { return (fFlagsTiming & 0x1); }
40  Int_t GetLabel() const { return fLabel; }
41  Int_t GetTrackletIndex(const Int_t iLayer) const { return fTrackletIndex[iLayer]; }
42 
43  Double_t Pt() const { return GetPt() / 128.; }
44  Double_t Phi() const { return 0.; };
45  Double_t Eta() const { return 0.; };
46 
47  Int_t GetNTracklets() const {
48  Int_t count = 0;
49  for (Int_t iLayer = 0; iLayer < 6; ++iLayer)
50  count += (fLayerMask >> iLayer) & 1;
51  return count;
52  }
53  AliESDTrdTracklet* GetTracklet(Int_t idx) const
54  { return (GetLayerMask() & (1<<idx)) ? (AliESDTrdTracklet*) ((fTrackletRefs[idx]).GetObject()) : 0x0; }
55  AliVTrack* GetTrackMatch() const { return (AliVTrack*) fTrackMatch.GetObject(); }
56 
57  void SetA(Int_t a) { fA = a; }
58  void SetB(Int_t b) { fB = b; }
59  void SetC(Int_t c) { fC = c; }
60  void SetY(Int_t y) { fY = y; }
61  void SetLayerMask(Int_t mask) { fLayerMask = mask; }
62  void SetPID(Int_t pid) { fPID = pid; }
63  void SetLabel(Int_t label) { fLabel = label; }
64  void SetSector(Int_t sector) { fSector = sector; }
65  void SetStack(Int_t stack) { fStack = stack; }
66  void SetFlags(Int_t flags) { fFlags = flags; }
67  void SetFlagsTiming(Int_t flags) { fFlagsTiming = flags; }
68  void SetReserved(Int_t res) { fReserved = res; }
69  void SetTrackletIndex(const Char_t idx, const Int_t layer) { fTrackletIndex[layer] = idx; }
70 
71  void AddTrackletReference(AliESDTrdTracklet* trkl, Int_t layer) { fTrackletRefs[layer] = trkl; }
73 
74  Bool_t IsSortable() const { return kTRUE; }
75  Int_t Compare(const TObject* obj) const;
76 
77  protected:
78 
79  void AppendBits(ULong64_t &word, Int_t nBits, Int_t val) const { word = (word << nBits) | (val & ~(~0 << nBits)); }
80 
81  Int_t fSector; // sector in which the track was found
82  Char_t fStack; // stack in which the track was found
83  // (unique because of stack-wise tracking)
84  Int_t fA; // transverse offset from nominal primary vertex
85  Int_t fB; // slope in transverse plane
86  Short_t fC; // slope in r-z plane
87  Short_t fY; // y position of the track
88  UChar_t fPID; // electron PID for this track
89  Char_t fLayerMask; // mask of contributing tracklets
90  Char_t fTrackletIndex[fgkNlayers]; //[fgkNlayers] index to tracklets
91  UShort_t fFlags; // flags (high-pt, electron, positron)
92  UChar_t fFlagsTiming; // timing flags (track in-time, ...)
93  UChar_t fReserved; // reserved for future use
94 
95  TRef fTrackletRefs[fgkNlayers]; // references to contributing tracklets
96 
97  TRef fTrackMatch; // reference to matched global track
98  // to reject TRD tracks from late conversions
99 
100  Int_t fLabel; // Track label
101 
102  ClassDef(AliESDTrdTrack,7)
103 };
104 
105 #endif
TBrowser b
Definition: RunAnaESD.C:12
Double_t Phi() const
AliTPCcalibPID * pid
Definition: CalibPID.C:69
void SetLabel(Int_t label)
Int_t GetLayerMask() const
TRef fTrackletRefs[fgkNlayers]
Int_t GetTrackletIndex(const Int_t iLayer) const
AliESDTrdTracklet * GetTracklet(Int_t idx) const
Int_t GetNTracklets() const
static const Int_t fgkNlayers
Definition: AliVTrdTrack.h:54
void SetB(Int_t b)
Char_t fTrackletIndex[fgkNlayers]
void SetStack(Int_t stack)
ULong64_t GetTrackWord(Int_t rev) const
UChar_t GetFlagsTiming() const
void SetSector(Int_t sector)
void SetA(Int_t a)
void SetPID(Int_t pid)
AliTPCfastTrack * track
virtual void Copy(TObject &obj) const
Int_t GetStack() const
Int_t GetPt() const
void SetC(Int_t c)
Int_t GetB() const
void SetTrackletIndex(const Char_t idx, const Int_t layer)
Double_t Eta() const
ULong64_t GetExtendedTrackWord(Int_t rev) const
Double_t Pt() const
Int_t GetY() const
AliESDTrdTrack & operator=(const AliESDTrdTrack &track)
Bool_t GetTrackInTime() const
Int_t GetPID() const
void SetTrackMatchReference(AliVTrack *trk)
void AppendBits(ULong64_t &word, Int_t nBits, Int_t val) const
void SetY(Int_t y)
Int_t GetSector() const
Int_t GetLabel() const
virtual ~AliESDTrdTrack()
void SetFlagsTiming(Int_t flags)
void AddTrackletReference(AliESDTrdTracklet *trkl, Int_t layer)
AliVTrack * GetTrackMatch() const
Int_t GetA() const
UChar_t fFlagsTiming
void SetLayerMask(Int_t mask)
void SetReserved(Int_t res)
void res(Char_t i)
Definition: Resolution.C:2
UChar_t GetFlags() const
void SetFlags(Int_t flags)
Bool_t IsSortable() const
Int_t GetC() const
Int_t Compare(const TObject *obj) const