]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliAODTracklets.h
Changed return type of GetNCells (Gustavo)
[u/mrichter/AliRoot.git] / STEER / AliAODTracklets.h
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
17 class AliAODTracklets : public TNamed 
18 {
19  public:
20   AliAODTracklets();
21   AliAODTracklets(const char* name, const char* title);
22
23   virtual ~AliAODTracklets();
24
25   void CreateContainer(Int_t nTracks);
26   void DeleteContainer();
27
28   Bool_t SetTracklet(Int_t pos, Double32_t theta, Double32_t phi, Double32_t deltaPhi, Int_t label);
29
30   Int_t GetNumberOfTracklets() const { return fNTracks; }
31   inline Double32_t GetTheta(Int_t i) const;
32   inline Double32_t GetPhi(Int_t i) const;
33   inline Double32_t GetDeltaPhi(Int_t i) const;
34   inline Int_t   GetLabel(Int_t i) const;
35
36  protected:
37   Int_t      fNTracks;       // Number of tracklets
38   Double32_t *fTheta;        //[fNTracks] array with theta values
39   Double32_t *fPhi;          //[fNTracks] array with phi values
40   Double32_t *fDeltaPhi;     //[fNTracks] array with delta phi values
41   Int_t      *fLabels;       //[fNTracks] array with labels of tracklets
42
43  private:
44   AliAODTracklets(const AliAODTracklets& evt); 
45   AliAODTracklets& operator=(const AliAODTracklets& evt);
46
47   ClassDef(AliAODTracklets, 1);
48 };
49
50 Double32_t AliAODTracklets::GetTheta(Int_t i) const 
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
60 Double32_t AliAODTracklets::GetPhi(Int_t i) const 
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
70 Double32_t AliAODTracklets::GetDeltaPhi(Int_t i) const 
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
80 Int_t AliAODTracklets::GetLabel(Int_t i) const 
81 {
82   if (i>=0 && i<fNTracks) 
83   {
84     return fLabels[i];
85   }
86   else 
87     Error("GetLabel","Invalid track number %d",i); return -9999;
88 }
89
90 #endif