Coverity
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackGTU.h
CommitLineData
52c19022 1#ifndef ALITRDTRACKGTU_H
2#define ALITRDTRACKGTU_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDtrackGTU.h 27496 2008-07-22 08:35:45Z cblume $ */
7
8//---------------------------------------------------------------
9//
10// TRD track as calculated in the GTU (for L1 contribution)
11//
12//---------------------------------------------------------------
13
14#include "TClonesArray.h"
15
16#include "AliTRDtrackletGTU.h"
4d6aee34 17class AliESDTrdTrack;
52c19022 18
19class AliTRDtrackGTU : public TObject {
20 public:
21 AliTRDtrackGTU();
dd09a2e2 22 AliTRDtrackGTU(const AliTRDtrackGTU &rhs);
23 AliTRDtrackGTU& operator=(const AliTRDtrackGTU &rhs);
52c19022 24 ~AliTRDtrackGTU();
25
26// ----- Track properties
d2c8b010 27 Int_t GetPtInt() const { return AliTRDgtuParam::GetPt(fTrackletMask, (Int_t) this->GetA(), 0, 0, 0, 0); }
28 Float_t GetPt() const { return (Float_t) this->GetPtInt() / 128.; }
52c19022 29 Int_t GetPID() const { return fPID; }
30 Int_t GetSector() const { return fSector; }
31 Int_t GetStack() const { return fStack; }
80f93426 32 Int_t GetLabel() const { return fLabel; }
52c19022 33
34 AliESDTrdTrack* CreateTrdTrack() const;
35
36// ----- compositing tracklets
37 Int_t GetNTracklets() const;
38 Int_t GetTrackletMask() const { return fTrackletMask; }
39 Bool_t IsTrackletInLayer(Int_t layer) const;
5f006bd7 40 Int_t GetTrackletIndex(Int_t layer) { return IsTrackletInLayer(layer) ? ((AliTRDtrackletGTU*) (*fTracklets)[layer])->GetIndex() : -1; }
44eafcf2 41 AliTRDtrackletGTU* GetTracklet(Int_t layer) const;
52c19022 42
43// ----- Quantities used internally for the calculation
44 Float_t GetA() const { return fA; }
45 Float_t GetB() const { return fB; }
46 Float_t GetC() const { return fC; }
47 Int_t GetZChannel() const { return fZChannel; }
48 Int_t GetZSubChannel();
d2c8b010 49 Int_t GetRefLayer() const { return AliTRDgtuParam::GetRefLayer(fRefLayerIdx); }
52c19022 50 Int_t GetRefLayerIdx() const { return fRefLayerIdx; }
51 Int_t GetYapprox();
52
53
4d6aee34 54 void AddTracklet(const AliTRDtrackletGTU * const tracklet, Int_t layer);
52c19022 55
56 void SetStack(Int_t stack) { fStack = stack; }
57 void SetSector(Int_t sector) { fSector = sector; }
52c19022 58 void SetPID(Int_t pid) { fPID = pid; }
59
60 void SetZChannel(Int_t zch) { fZChannel = zch; }
61 void SetRefLayerIdx(Int_t reflayer) { fRefLayerIdx = reflayer; }
62// void SetInnerIntPoint(Float_t *x);
63// void SetOuterIntPoint(Float_t *x);
64 void SetFitParams(Float_t a, Float_t b, Float_t c);
65
4cc89512 66 Bool_t CookLabel();
67
52c19022 68 protected:
69
4cc89512 70 Int_t fStack; // TRD stack to which this track belongs
71 Int_t fSector; // sector in which the track was found
52c19022 72
4cc89512 73 Int_t fPID; // PID calculated from tracklet PID
74
75 TClonesArray *fTracklets; // array holding the tracklets composing this track
76 Int_t fTrackletMask; // mask in which layers tracklets have been assigned
77 Int_t fNTracklets; // number of tracklets in this track
52c19022 78
4cc89512 79 Int_t fRefLayerIdx; // index of the reference layer in which this track was found
80 Int_t fZChannel; // z-channel unit in which this track was found
81 Int_t fZSubChannel; // z-subchannel of the assigned tracklets
52c19022 82
4cc89512 83 Float_t fA; // fit parameter of y' = a + b*x + c*z
84 Float_t fB; // fit parameter of y' = a + b*x + c*z
85 Float_t fC; // fit parameter of y' = a + b*x + c*z
52c19022 86
4cc89512 87 Int_t fLabel; // MC label
52c19022 88
52c19022 89 ClassDef(AliTRDtrackGTU, 1);
90};
91
92#endif