]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSURecoLayer.h
reco update
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSURecoLayer.h
1 #ifndef ALIITSURECOLAYER
2 #define ALIITSURECOLAYER
3
4 #include <TNamed.h>
5 #include <TObjArray.h>
6 #include <TClonesArray.h>
7 #include "AliITSURecoSens.h"
8 class AliITSUGeomTGeo;
9 class AliITSsegmentation;
10 class AliCluster;
11
12
13 ///////////////////////////////////////////////////////////////////////
14 //                                                                   //
15 //  Class AliITSURecoLayer                                           //
16 //  Interface between the framework and reconstruction for ITS layer //
17 //                                                                   //
18 ///////////////////////////////////////////////////////////////////////
19
20
21 class AliITSURecoLayer : public TNamed
22 {
23  public:
24   //
25   enum {kPassive=BIT(14)};
26   AliITSURecoLayer(const char* name);
27   AliITSURecoLayer(const char* name, Int_t activeID,AliITSUGeomTGeo* gm);
28   virtual ~AliITSURecoLayer();
29   //
30   void               ProcessClusters(Int_t mode=0);
31   //
32   Int_t              GetID()                       const {return (int)GetUniqueID();}
33   Int_t              GetActiveID()                 const {return fActiveID;}
34   Int_t              GetNSensors()                 const {return fNSensors;}
35   Int_t              GetNLadders()                 const {return fNLadders;}
36   Int_t              GetNSensInLadder()            const {return fNSensInLadder;}
37   Double_t           GetRMin()                     const {return fRMin;}
38   Double_t           GetRMax()                     const {return fRMax;}
39   Double_t           GetDR()                       const {return fRMax-fRMin;}
40   Double_t           GetR()                        const {return fR;}
41   Double_t           GetZMin()                     const {return fZMin;}
42   Double_t           GetZMax()                     const {return fZMax;}
43   Double_t           GetMaxStep()                  const {return fMaxStep;}
44   Bool_t             IsActive()                    const {return !TestBit(kPassive);}
45   Bool_t             IsPassive()                   const {return TestBit(kPassive);}
46   //
47   void               SetID(Int_t i)                      {SetUniqueID(i);} 
48   void               SetActiveID(Int_t i)                {fActiveID = i;} 
49   void               SetRMin(Double_t r)                 {fRMin = r;}
50   void               SetRMax(Double_t r)                 {fRMax = r;}
51   void               SetR(Double_t r)                    {fR = r;}
52   void               SetZMin(Double_t z)                 {fZMin = z;}
53   void               SetZMax(Double_t z)                 {fZMax = z;}
54   void               SetPassive(Bool_t v=kTRUE)          {SetBit(kPassive,v);}
55   void               SetMaxStep(Double_t st)             {fMaxStep = st>0 ? st : 0.1;}
56   //
57   AliITSURecoSens*   GetSensor(Int_t i)            const {return i<0 ? 0:(AliITSURecoSens*)fSensors[i];}
58   AliITSURecoSens*   GetSensor(Int_t ld,Int_t is)  const {return GetSensor(ld*fNSensInLadder+is);}
59   TClonesArray*      GetClusters()                 const {return (TClonesArray*)fClusters;}
60   Int_t              GetNClusters()                const {return fClusters ? fClusters->GetEntriesFast() : 0;}
61   AliCluster*        GetCluster(Int_t icl)         const {return (AliCluster*)fClusters->UncheckedAt(icl);}
62   void               SetClusters(TClonesArray* cl)       {fClusters = cl;}
63   //
64   Int_t              FindSensors(const double* impPar, AliITSURecoSens *sensors[AliITSURecoSens::kNNeighbors]);
65   //
66   virtual void       Print(Option_t* option = "")  const;
67   virtual Bool_t     IsSortable()                  const {return kTRUE;}
68   virtual Bool_t     IsEqual(const TObject* obj)   const;
69   virtual Int_t      Compare(const TObject* obj)   const;
70   //
71  protected:
72   void               Build();
73   //
74  protected:
75   Int_t              fActiveID;  // ID within active layers
76   Int_t              fNSensors;  // N of modules
77   Int_t              fNSensInLadder; // N sensors in the ladder
78   Int_t              fNLadders;  // N ladder
79   Double_t           fR;         // mean R
80   Double_t           fRMax;      // max  R
81   Double_t           fRMin;      // min  R
82   Double_t           fZMax;      // max  Z
83   Double_t           fZMin;      // min  Z
84   Double_t*          fPhiLadMax; // max lab phi of the ladder
85   Double_t*          fPhiLadMin; // min lab phi of the ladder
86   Double_t           fPhiOffs;   // offset in phi for 1st ladder
87   Double_t           fSensDZInv; // inverse mean sensor Z span
88   Double_t           fDPhiLadInv;// inverse mean ladder dphi
89   Double_t           fMaxStep;   // max step in tracking X allowed within layer
90   AliITSURecoSens**  fSensors;   // sensors
91   AliITSUGeomTGeo*   fITSGeom;   // geometry interface
92   TClonesArray*      fClusters;  // clusters of the layer
93   //
94  private:
95   AliITSURecoLayer(const AliITSURecoLayer &source); 
96   AliITSURecoLayer& operator=(const AliITSURecoLayer &source); 
97   //
98
99   ClassDef(AliITSURecoLayer,1); // helper for layer data used in reco
100 };
101
102 #endif