]>
Commit | Line | Data |
---|---|---|
52c19022 | 1 | #ifndef ALITRDTRACKLETGTU_H |
2 | #define ALITRDTRACKLETGTU_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliTRDtrackletGTU.h 27496 2008-07-22 08:35:45Z cblume $ */ | |
7 | ||
8 | // -------------------------------------------------------- | |
5f006bd7 | 9 | // |
52c19022 | 10 | // GTU tracklet |
5f006bd7 | 11 | // |
52c19022 | 12 | // |
13 | // -------------------------------------------------------- | |
14 | ||
15 | #include "AliTRDtrackletBase.h" | |
44eafcf2 | 16 | #include "AliESDTrdTracklet.h" |
17 | #include "AliTRDgtuParam.h" | |
52c19022 | 18 | #include "AliLog.h" |
19 | ||
52c19022 | 20 | class AliTRDtrackletGTU : public AliTRDtrackletBase { |
21 | public: | |
22 | AliTRDtrackletGTU(); | |
5f006bd7 | 23 | AliTRDtrackletGTU(AliTRDtrackletBase *tracklet); |
44eafcf2 | 24 | AliTRDtrackletGTU(AliESDTrdTracklet *tracklet); |
52c19022 | 25 | AliTRDtrackletGTU(const AliTRDtrackletGTU& trk); |
26 | ||
27 | ~AliTRDtrackletGTU(); | |
28 | ||
5f006bd7 | 29 | AliTRDtrackletGTU& operator=(const AliTRDtrackletGTU &rhs); |
52c19022 | 30 | |
52c19022 | 31 | // ----- Getters for information from the tracklet word ----- |
44eafcf2 | 32 | Int_t GetYbin() const { return fTrackletESD ? fTrackletESD->GetBinY() : fTracklet->GetYbin(); } |
33 | Int_t GetdY() const { return fTrackletESD ? fTrackletESD->GetBinDy() : fTracklet->GetdY(); } | |
34 | Int_t GetZbin() const { return fTrackletESD ? fTrackletESD->GetBinZ() : fTracklet->GetZbin(); } | |
35 | Int_t GetPID() const { return fTrackletESD ? fTrackletESD->GetPID() : ((Int_t) (256 * fTracklet->GetPID())); } | |
36 | Double_t GetPID(Int_t is) const { return fTracklet ? fTracklet->GetPID(is) : 0.; } | |
52c19022 | 37 | |
38 | // ----- Getters for calculated properties ----- | |
39 | Int_t GetYProj() const { return fYProj; } | |
40 | Int_t GetAlpha() const { return fAlpha; } | |
41 | Int_t GetYPrime() const { return fYPrime; } | |
36dc3337 | 42 | Int_t GetSubChannel(Int_t zch) const; |
52c19022 | 43 | |
44 | // ----- Getters for offline corresponding values ----- | |
45 | Bool_t CookPID() { return kFALSE; } | |
44eafcf2 | 46 | Int_t GetDetector() const { return fTrackletESD ? fTrackletESD->GetDetector() : fTracklet->GetDetector(); } |
52c19022 | 47 | Int_t GetIndex() const { return fIndex; } |
48 | ||
49 | Float_t GetdYdX() const { return (GetdY() * 140e-4 / 3.); } | |
50 | Float_t GetX() const { return 0; } | |
51 | Float_t GetY() const { return (GetYbin() * 160e-4); } | |
52 | Float_t GetZ() const { return 0; } | |
53 | ||
44eafcf2 | 54 | AliTRDtrackletBase* GetTracklet() const { return fTracklet; } |
55 | AliESDTrdTracklet* GetTrackletESD() const { return fTrackletESD; } | |
56 | UInt_t GetTrackletWord() const { return fTrackletESD ? fTrackletESD->GetTrackletWord() : fTracklet->GetTrackletWord(); } | |
059f00c5 | 57 | Int_t GetMCMtrackletIndex() const { return fMCMtrackletIndex; } |
58 | void SetMCMtrackletIndex(Int_t val) { fMCMtrackletIndex=val; } | |
52c19022 | 59 | |
5f006bd7 | 60 | Int_t GetSide() const { return GetYbin() < 0 ? 0 : 1; } |
52c19022 | 61 | |
4cc89512 | 62 | Int_t GetLabel() const; // { return fLabel; } |
63 | ||
52c19022 | 64 | // ----- Setters ----- |
65 | void SetAlpha(Int_t alpha) { fAlpha = alpha; } | |
66 | void SetYProj(Int_t yproj) { fYProj = yproj; } | |
67 | void SetYPrime(Int_t yprime) { fYPrime = yprime; } | |
68 | ||
69 | void SetSubChannel(Int_t zch, Int_t subch); | |
70 | void SetDetector(Int_t /* id */ ) { AliError("Cannot change base tracklet"); } | |
71 | void SetIndex(Int_t idx) { fIndex = idx; } | |
72 | ||
73 | void RemoveTracklet() { fTracklet = fgkDummyTracklet; } | |
74 | ||
75 | protected: | |
76 | AliTRDgtuParam *fGtuParam; //! | |
44eafcf2 | 77 | AliTRDtrackletBase *fTracklet; //! pointer to the underlying tracklet |
78 | AliESDTrdTracklet *fTrackletESD; //! pointer to the underlying ESD tracklet | |
52c19022 | 79 | |
059f00c5 | 80 | Int_t fMCMtrackletIndex; // Index number of the original tracklet in the TrackletTree |
81 | ||
44eafcf2 | 82 | Int_t fSubChannel[AliTRDgtuParam::fgkNZChannels]; // z-channel assignments |
52c19022 | 83 | Bool_t fAssignedZ; // tracklet assigned to a Z-channel |
84 | ||
85 | Int_t fAlpha; // calculated value for alpha | |
86 | Int_t fYProj; // calculated value for y_proj | |
87 | Int_t fYPrime; // calculated value for y' | |
4cc89512 | 88 | Int_t fIndex; // index of tracklet in the sequence after the input units |
52c19022 | 89 | |
4cc89512 | 90 | static AliTRDtrackletBase* fgkDummyTracklet; // dummy tracklet, used in case no tracklet is given |
52c19022 | 91 | |
92 | private: | |
93 | ||
059f00c5 | 94 | ClassDef(AliTRDtrackletGTU, 1); |
52c19022 | 95 | }; |
96 | ||
97 | #endif |