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