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