Adding TRD online tracks and trackets to ESD:
[u/mrichter/AliRoot.git] / STEER / AliESDTrdTrack.h
CommitLineData
0ee00e25 1#ifndef ALIESDTRDTRACK_H
2#define ALIESDTRDTRACK_H
3
52cd0cc0 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
0ee00e25 9
10#include "TObject.h"
52cd0cc0 11#include "TRef.h"
12
13#include "AliESDTrdTracklet.h"
0ee00e25 14
15class AliESDTrdTrack : public TObject {
16
17 public:
18
19 AliESDTrdTrack();
52cd0cc0 20 virtual ~AliESDTrdTrack() {};
0ee00e25 21 AliESDTrdTrack(const AliESDTrdTrack& track);
22 AliESDTrdTrack& operator=(const AliESDTrdTrack& track);
732a24fe 23 virtual void Copy(TObject &obj) const;
0ee00e25 24
52cd0cc0 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 Int_t GetLabel() const { return fLabel; }
38 Int_t GetTrackletIndex(const Int_t iLayer) const { return fTrackletIndex[iLayer]; }
39
40 Double_t Pt() const { return GetPt() / 128.; }
41 Double_t Phi() const { return 0.; };
42 Double_t Eta() const { return 0.; };
43
44 AliESDTrdTracklet* GetTracklet(Int_t idx) const
45 { return (GetLayerMask() & (1<<idx)) ? (AliESDTrdTracklet*) ((fTrackletRefs[idx]).GetObject()) : 0x0; }
46
47 void SetA(Int_t a) { fA = a; }
48 void SetB(Int_t b) { fB = b; }
49 void SetC(Int_t c) { fC = c; }
50 void SetY(Int_t y) { fY = y; }
51 void SetLayerMask(Int_t mask) { fLayerMask = mask; }
52 void SetPID(Int_t pid) { fPID = pid; }
53 void SetLabel(Int_t label) { fLabel = label; }
54 void SetSector(Int_t sector) { fSector = sector; }
55 void SetStack(Int_t stack) { fStack = stack; }
56 void SetFlags(Int_t flags) { fFlags = flags; }
57 void SetReserved(Int_t res) { fReserved = res; }
58 void SetTrackletIndex(const Char_t idx, const Int_t layer) { fTrackletIndex[layer] = idx; }
59
60 void AddTrackletReference(AliESDTrdTracklet* trkl, Int_t layer) { fTrackletRefs[layer] = trkl; }
0ee00e25 61
62 protected:
63
52cd0cc0 64 void AppendBits(ULong64_t &word, Int_t nBits, Int_t val) const { word = (word << nBits) | (val & ~(~0 << nBits)); }
65
66 static const Int_t fgkNlayers = 6; // number of TRD layers
0ee00e25 67
52cd0cc0 68 Int_t fSector; // sector in which the track was found
69 Char_t fStack; // stack in which the track was found
70 // (unique because of stack-wise tracking)
71 Int_t fA; // transverse offset from nominal primary vertex
72 Int_t fB; // slope in transverse plane
73 Short_t fC; // slope in r-z plane
74 Short_t fY; // y position of the track
75 UChar_t fPID; // electron PID for this track
76 Char_t fLayerMask; // mask of contributing tracklets
77 Char_t fTrackletIndex[fgkNlayers]; //[fgkNlayers] index to tracklets
78 UShort_t fFlags; // flags (high-pt, electron, positron)
79 UChar_t fReserved; // reserved for future use
cd888a89 80
52cd0cc0 81 TRef fTrackletRefs[fgkNlayers]; // references to contributing tracklets
cd888a89 82
52cd0cc0 83 Int_t fLabel; // Track label
0ee00e25 84
52cd0cc0 85 ClassDef(AliESDTrdTrack,4)
0ee00e25 86};
87
88#endif