]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSURecoDet.h
bbbcb4a91d2a3e0b2bf2bef9774db795adfefeb3
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSURecoDet.h
1 #ifndef ALIITSURECODET
2 #define ALIITSURECODET
3
4 #include <TNamed.h>
5 #include <TObjArray.h>
6 #include "AliITSURecoLayer.h"
7 class AliITSUGeomTGeo;
8
9 ///////////////////////////////////////////////////////////////////////
10 //                                                                   //
11 //  Class AliITSURecoDet                                             //
12 //  Interface between the framework and reconstruction for ITS       //
13 //                                                                   //
14 ///////////////////////////////////////////////////////////////////////
15
16
17 class AliITSURecoDet : public TNamed
18 {
19  public:
20   //
21   AliITSURecoDet(AliITSUGeomTGeo* geom, const char* name="");
22   virtual ~AliITSURecoDet();
23   //
24   Double_t           GetRMin()                     const {return fRMin;}
25   Double_t           GetRMax()                     const {return fRMax;}
26   Int_t              GetNLayers()                  const {return fNLayers;}
27   Int_t              GetNLayersActive()            const {return fNLayersActive;}
28   Int_t              GetLrIDActive(Int_t lrActID)  const;
29   AliITSURecoLayer*  GetLayer(Int_t i)             const;
30   AliITSURecoLayer*  GetLayerActive(Int_t i)       const;
31   AliITSUGeomTGeo*   GetGeom()                     const {return fGeom;}
32   //
33   void               SetRMin(Double_t r)                 {fRMin = r;}
34   void               SetRMax(Double_t r)                 {fRMax = r;}
35   //
36   void               AddLayer(const AliITSURecoLayer* lr);
37   //
38   void               ProcessClusters(Int_t mode=0);
39   //
40   virtual void       Print(Option_t* option = "")  const;
41   //
42  protected:
43   Bool_t             Build();
44   void               IndexLayers();
45   //
46  protected:
47   Int_t              fNLayers;        // total number of layers
48   Int_t              fNLayersActive;  // N of active layers
49   Double_t           fRMax;           // max  R
50   Double_t           fRMin;           // min  R
51   TObjArray          fLayers;         // layers
52   TObjArray          fLayersActive;   // active layers
53   AliITSUGeomTGeo*   fGeom;           // ITS geometry
54   //
55  protected:
56   static const Char_t*     fgkBeamPipeVolName;    // name of the beam pipe volume
57
58  private:
59   AliITSURecoDet(const AliITSURecoDet &source); 
60   AliITSURecoDet& operator=(const AliITSURecoDet &source); 
61   //
62   ClassDef(AliITSURecoDet,1); // helper for ITS data in reco
63 };
64
65
66
67 //_____________________________________________________________
68 inline Int_t AliITSURecoDet::GetLrIDActive(Int_t lrActID) const 
69 {
70   // get global layer id from active id
71   return (lrActID<fNLayersActive) ? ((AliITSURecoLayer*)fLayersActive.UncheckedAt(lrActID))->GetID() : fNLayers;
72 }
73
74 //_____________________________________________________________
75 inline AliITSURecoLayer* AliITSURecoDet::GetLayer(Int_t i) const 
76 {
77   // get layer with global id=i
78   return i<fNLayers ? (AliITSURecoLayer*)fLayers.UncheckedAt(i):0;
79 }
80
81 //_____________________________________________________________
82 inline AliITSURecoLayer* AliITSURecoDet::GetLayerActive(Int_t i) const
83 {
84   // get layer with activeID=i
85   return i<fNLayersActive ? (AliITSURecoLayer*)fLayersActive.UncheckedAt(i):0;
86 }
87
88 //______________________________________________________
89 inline void AliITSURecoDet::ProcessClusters(Int_t mode)
90 {
91   // prepare clsuters for reconstrunction
92   for (int ilr=fNLayersActive;ilr--;) GetLayerActive(ilr)->ProcessClusters(mode);
93 }
94
95 #endif