]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSURecoDet.h
modifications for PropagateBack
[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   Int_t              FindLastLayerID(Double_t r, int dir)  const;
30   Int_t              FindFirstLayerID(Double_t r, int dir) const;
31   AliITSURecoLayer*  GetLayer(Int_t i)             const;
32   AliITSURecoLayer*  GetLayerActive(Int_t i)       const;
33   AliITSUGeomTGeo*   GetGeom()                     const {return fGeom;}
34   //
35   void               SetRMin(Double_t r)                 {fRMin = r;}
36   void               SetRMax(Double_t r)                 {fRMax = r;}
37   //
38   void               AddLayer(const AliITSURecoLayer* lr);
39   //
40   void               ProcessClusters(Int_t mode=0);
41   //
42   virtual void       Print(Option_t* option = "")  const;
43   //
44  protected:
45   Bool_t             Build();
46   void               IndexLayers();
47   //
48  protected:
49   Int_t              fNLayers;        // total number of layers
50   Int_t              fNLayersActive;  // N of active layers
51   Double_t           fRMax;           // max  R
52   Double_t           fRMin;           // min  R
53   TObjArray          fLayers;         // layers
54   TObjArray          fLayersActive;   // active layers
55   AliITSUGeomTGeo*   fGeom;           // ITS geometry
56   //
57  protected:
58   static const Char_t*     fgkBeamPipeVolName;    // name of the beam pipe volume
59
60  private:
61   AliITSURecoDet(const AliITSURecoDet &source); 
62   AliITSURecoDet& operator=(const AliITSURecoDet &source); 
63   //
64   ClassDef(AliITSURecoDet,1); // helper for ITS data in reco
65 };
66
67
68
69 //_____________________________________________________________
70 inline Int_t AliITSURecoDet::GetLrIDActive(Int_t lrActID) const 
71 {
72   // get global layer id from active id
73   return (lrActID<fNLayersActive) ? ((AliITSURecoLayer*)fLayersActive.UncheckedAt(lrActID))->GetID() : fNLayers;
74 }
75
76 //_____________________________________________________________
77 inline AliITSURecoLayer* AliITSURecoDet::GetLayer(Int_t i) const 
78 {
79   // get layer with global id=i
80   return i>=0&&i<fNLayers ? (AliITSURecoLayer*)fLayers.UncheckedAt(i):0;
81 }
82
83 //_____________________________________________________________
84 inline AliITSURecoLayer* AliITSURecoDet::GetLayerActive(Int_t i) const
85 {
86   // get layer with activeID=i
87   return i>=0&&i<fNLayersActive ? (AliITSURecoLayer*)fLayersActive.UncheckedAt(i):0;
88 }
89
90 //______________________________________________________
91 inline void AliITSURecoDet::ProcessClusters(Int_t mode)
92 {
93   // prepare clsuters for reconstrunction
94   for (int ilr=fNLayersActive;ilr--;) GetLayerActive(ilr)->ProcessClusters(mode);
95 }
96
97 #endif