]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtrackletGTU.h
Add Jochens GTU simulation code
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackletGTU.h
CommitLineData
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// --------------------------------------------------------
9//
10// GTU tracklet
11//
12//
13// --------------------------------------------------------
14
15#include "AliTRDtrackletBase.h"
16#include "AliLog.h"
17
18class AliTRDmcmTracklet;
19class AliTRDgtuParam;
20
21class AliTRDtrackletGTU : public AliTRDtrackletBase {
22 public:
23 AliTRDtrackletGTU();
24// AliTRDtrackletGTU(UInt_t tracklet_word = 0);
25 AliTRDtrackletGTU(AliTRDtrackletBase *tracklet);
26 AliTRDtrackletGTU(const AliTRDtrackletGTU& trk);
27
28 ~AliTRDtrackletGTU();
29
30 AliTRDtrackletGTU& operator=(const AliTRDtrackletGTU &rhs);
31
32 Bool_t IsSortable() const { return kTRUE; }
33 Int_t Compare(const TObject *o) const;
34
35 // ----- Getters for information from the tracklet word -----
36 Int_t GetYbin() const { return fTracklet->GetYbin(); }
37 Int_t GetdY() const { return fTracklet->GetdY(); }
38 Int_t GetZbin() const { return fTracklet->GetZbin(); }
39 Double_t GetPID() const { return fTracklet->GetPID(); }
40 Double_t GetPID(Int_t is) const { return fTracklet->GetPID(is); }
41
42 // ----- Getters for calculated properties -----
43 Int_t GetYProj() const { return fYProj; }
44 Int_t GetAlpha() const { return fAlpha; }
45 Int_t GetYPrime() const { return fYPrime; }
46 Int_t GetSubChannel(Int_t zch);
47
48 // ----- Getters for offline corresponding values -----
49 Bool_t CookPID() { return kFALSE; }
50 Int_t GetDetector() const { return fTracklet->GetDetector(); }
51 Int_t GetIndex() const { return fIndex; }
52
53 Float_t GetdYdX() const { return (GetdY() * 140e-4 / 3.); }
54 Float_t GetX() const { return 0; }
55 Float_t GetY() const { return (GetYbin() * 160e-4); }
56 Float_t GetZ() const { return 0; }
57
58// AliTRDtrackletBase* GetTracklet() const { return fTracklet; }
59 UInt_t GetTrackletWord() const { return fTracklet->GetTrackletWord(); }
60
61 Int_t GetSide() const { return GetYbin() < 0 ? 0 : 1; }
62
63 // ----- Setters -----
64 void SetAlpha(Int_t alpha) { fAlpha = alpha; }
65 void SetYProj(Int_t yproj) { fYProj = yproj; }
66 void SetYPrime(Int_t yprime) { fYPrime = yprime; }
67
68 void SetSubChannel(Int_t zch, Int_t subch);
69 void SetDetector(Int_t /* id */ ) { AliError("Cannot change base tracklet"); }
70 void SetIndex(Int_t idx) { fIndex = idx; }
71
72 void RemoveTracklet() { fTracklet = fgkDummyTracklet; }
73
74 protected:
75 AliTRDgtuParam *fGtuParam; //!
76 const AliTRDtrackletBase *fTracklet; // always points to a valid tracklet
77
78 Int_t *fSubChannel; //! [AliTRDgtuParam::GetNZChannels()]
79 Bool_t fAssignedZ; // tracklet assigned to a Z-channel
80
81 Int_t fAlpha; // calculated value for alpha
82 Int_t fYProj; // calculated value for y_proj
83 Int_t fYPrime; // calculated value for y'
84 Int_t fIndex;
85
86 static AliTRDtrackletBase* fgkDummyTracklet;
87
88 private:
89
90 ClassDef(AliTRDtrackletGTU, 1);
91};
92
93#endif