Label for the ITS tracklets (Jan Fiete)
[u/mrichter/AliRoot.git] / STEER / AliAODTracklets.h
CommitLineData
21b22f32 1/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4/* $Id$ */
5
6//-------------------------------------------------------------------------
7// AOD class to store tracklets
8// Author: Jan Fiete Grosse-Oetringhaus, CERN
9// Class created from AliMultiplicity
10//-------------------------------------------------------------------------
11
12#ifndef ALIAODTRACKLETS_H
13#define ALIAODTRACKLETS_H
14
15#include <TNamed.h>
16
17class AliAODTracklets : public TNamed
18{
19 public:
20 AliAODTracklets();
21 AliAODTracklets(const char* name, const char* title);
5c1dc41f 22 AliAODTracklets(const AliAODTracklets& evt);
23 AliAODTracklets& operator=(const AliAODTracklets& evt);
21b22f32 24
25 virtual ~AliAODTracklets();
26
27 void CreateContainer(Int_t nTracks);
28 void DeleteContainer();
29
0939e22a 30 Bool_t SetTracklet(Int_t pos, Double32_t theta, Double32_t phi, Double32_t deltaPhi, Int_t labelL1, Int_t labelL2);
21b22f32 31
32 Int_t GetNumberOfTracklets() const { return fNTracks; }
d59deed5 33 inline Double32_t GetTheta(Int_t i) const;
34 inline Double32_t GetPhi(Int_t i) const;
35 inline Double32_t GetDeltaPhi(Int_t i) const;
0939e22a 36 inline Int_t GetLabel(Int_t i, Int_t layer) const;
21b22f32 37
38 protected:
f51b5257 39 Int_t fNTracks; // Number of tracklets
d59deed5 40 Double32_t *fTheta; //[fNTracks] array with theta values
41 Double32_t *fPhi; //[fNTracks] array with phi values
42 Double32_t *fDeltaPhi; //[fNTracks] array with delta phi values
0939e22a 43 Int_t *fLabels; //[fNTracks] array with labels of cluster in L1 used for the tracklet
44 Int_t *fLabelsL2; //[fNTracks] array with labels of cluster in L2 used for the tracklet
21b22f32 45
21b22f32 46
0939e22a 47 ClassDef(AliAODTracklets, 3);
21b22f32 48};
49
d59deed5 50Double32_t AliAODTracklets::GetTheta(Int_t i) const
21b22f32 51{
52 if (i>=0 && i<fNTracks)
53 {
54 return fTheta[i];
55 }
56 else
57 Error("GetTheta","Invalid track number %d",i); return -9999.;
58}
59
d59deed5 60Double32_t AliAODTracklets::GetPhi(Int_t i) const
21b22f32 61{
62 if (i>=0 && i<fNTracks)
63 {
64 return fPhi[i];
65 }
66 else
67 Error("GetPhi","Invalid track number %d",i); return -9999.;
68}
69
d59deed5 70Double32_t AliAODTracklets::GetDeltaPhi(Int_t i) const
21b22f32 71{
72 if (i>=0 && i<fNTracks)
73 {
74 return fDeltaPhi[i];
75 }
76 else
77 Error("GetDeltaPhi","Invalid track number %d",i); return -9999.;
78}
79
0939e22a 80Int_t AliAODTracklets::GetLabel(Int_t i, Int_t layer) const
21b22f32 81{
82 if (i>=0 && i<fNTracks)
83 {
0939e22a 84 return (layer == 0) ? fLabels[i] : fLabelsL2[i];
21b22f32 85 }
86 else
87 Error("GetLabel","Invalid track number %d",i); return -9999;
88}
89
90#endif