]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSURecoLayer.h
343d2b339a02d11fd120af402a1655c2764120b1
[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           GetR(Int_t dir)               const {return dir==0 ? fR : (dir<0 ? fRMin : fRMax);}
42   Double_t           GetZMin()                     const {return fZMin;}
43   Double_t           GetZMax()                     const {return fZMax;}
44   Double_t           GetMaxStep()                  const {return fMaxStep;}
45   Bool_t             IsActive()                    const {return !TestBit(kPassive);}
46   Bool_t             IsPassive()                   const {return TestBit(kPassive);}
47   //
48   void               SetID(Int_t i)                      {SetUniqueID(i);} 
49   void               SetActiveID(Int_t i)                {fActiveID = i;} 
50   void               SetRMin(Double_t r)                 {fRMin = r;}
51   void               SetRMax(Double_t r)                 {fRMax = r;}
52   void               SetR(Double_t r)                    {fR = r;}
53   void               SetZMin(Double_t z)                 {fZMin = z;}
54   void               SetZMax(Double_t z)                 {fZMax = z;}
55   void               SetPassive(Bool_t v=kTRUE)          {SetBit(kPassive,v);}
56   void               SetMaxStep(Double_t st)             {fMaxStep = st>0 ? st : 0.1;}
57   //
58   AliITSURecoSens*   GetSensor(Int_t i)            const {return i<0 ? 0:(AliITSURecoSens*)fSensors[i];}
59   AliITSURecoSens*   GetSensor(Int_t ld,Int_t is)  const {return GetSensor(ld*fNSensInLadder+is);}
60   TClonesArray*      GetClusters()                 const {return (TClonesArray*)fClusters;}
61   Int_t              GetNClusters()                const {return fClusters ? fClusters->GetEntriesFast() : 0;}
62   AliCluster*        GetCluster(Int_t icl)         const {return (AliCluster*)fClusters->UncheckedAt(icl);}
63   void               SetClusters(TClonesArray* cl)       {fClusters = cl;}
64   //
65   Int_t              FindSensors(const double* impPar, AliITSURecoSens *sensors[AliITSURecoSens::kNNeighbors]);
66   //
67   virtual void       Print(Option_t* option = "")  const;
68   virtual Bool_t     IsSortable()                  const {return kTRUE;}
69   virtual Bool_t     IsEqual(const TObject* obj)   const;
70   virtual Int_t      Compare(const TObject* obj)   const;
71   //
72  protected:
73   void               Build();
74   //
75  protected:
76   Int_t              fActiveID;  // ID within active layers
77   Int_t              fNSensors;  // N of modules
78   Int_t              fNSensInLadder; // N sensors in the ladder
79   Int_t              fNLadders;  // N ladder
80   Double_t           fR;         // mean R
81   Double_t           fRMax;      // max  R
82   Double_t           fRMin;      // min  R
83   Double_t           fZMax;      // max  Z
84   Double_t           fZMin;      // min  Z
85   Double_t*          fPhiLadMax; // max lab phi of the ladder
86   Double_t*          fPhiLadMin; // min lab phi of the ladder
87   Double_t           fPhiOffs;   // offset in phi for 1st ladder
88   Double_t           fSensDZInv; // inverse mean sensor Z span
89   Double_t           fDPhiLadInv;// inverse mean ladder dphi
90   Double_t           fMaxStep;   // max step in tracking X allowed within layer
91   AliITSURecoSens**  fSensors;   // sensors
92   AliITSUGeomTGeo*   fITSGeom;   // geometry interface
93   TClonesArray*      fClusters;  // clusters of the layer
94   //
95  private:
96   AliITSURecoLayer(const AliITSURecoLayer &source); 
97   AliITSURecoLayer& operator=(const AliITSURecoLayer &source); 
98   //
99
100   ClassDef(AliITSURecoLayer,1); // helper for layer data used in reco
101 };
102
103 #endif