]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/AliITSURecoLayer.h
A skeleton of a comparison macro for pileup studies
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSURecoLayer.h
CommitLineData
a11ef2e4 1#ifndef ALIITSURECOLAYER
2#define ALIITSURECOLAYER
3
4#include <TNamed.h>
5#include <TObjArray.h>
c61e50c3 6#include <TClonesArray.h>
32d38de2 7#include "AliITSURecoSens.h"
8b16dbae 8
a11ef2e4 9class AliITSUGeomTGeo;
10class AliITSsegmentation;
c61e50c3 11class AliCluster;
32d38de2 12
a11ef2e4 13
14///////////////////////////////////////////////////////////////////////
15// //
16// Class AliITSURecoLayer //
17// Interface between the framework and reconstruction for ITS layer //
18// //
19///////////////////////////////////////////////////////////////////////
20
21
22class AliITSURecoLayer : public TNamed
23{
24 public:
68b7631d 25 //
26 enum {kMaxSensMatching=9}; // max number of sensors returned by FindSensors
a11ef2e4 27 //
ee52e7b5 28 enum {kPassive=BIT(14) // layer is passive
29 ,kOwnsClusterArray=BIT(15) // owner of cluster array, delete in destructor
30 };
a11ef2e4 31 AliITSURecoLayer(const char* name);
32d38de2 32 AliITSURecoLayer(const char* name, Int_t activeID,AliITSUGeomTGeo* gm);
a11ef2e4 33 virtual ~AliITSURecoLayer();
34 //
32d38de2 35 void ProcessClusters(Int_t mode=0);
a11ef2e4 36 //
37 Int_t GetID() const {return (int)GetUniqueID();}
38 Int_t GetActiveID() const {return fActiveID;}
39 Int_t GetNSensors() const {return fNSensors;}
68b7631d 40 Int_t GetNSensorRows() const {return fNSensorRows;}
41 Int_t GetNSensorsPerRow() const {return fNSensorsPerRow;}
a11ef2e4 42 Double_t GetRMin() const {return fRMin;}
43 Double_t GetRMax() const {return fRMax;}
32d38de2 44 Double_t GetDR() const {return fRMax-fRMin;}
a11ef2e4 45 Double_t GetR() const {return fR;}
c51c3124 46 Double_t GetR(Int_t dir) const {return dir==0 ? fR : (dir<0 ? fRMin : fRMax);}
173b3073 47 Double_t GetZMin() const {return fZMin;}
48 Double_t GetZMax() const {return fZMax;}
32d38de2 49 Double_t GetMaxStep() const {return fMaxStep;}
a11ef2e4 50 Bool_t IsActive() const {return !TestBit(kPassive);}
51 Bool_t IsPassive() const {return TestBit(kPassive);}
ee52e7b5 52 Bool_t GetOwnsClusterArray() const {return TestBit(kOwnsClusterArray);}
a11ef2e4 53 //
54 void SetID(Int_t i) {SetUniqueID(i);}
55 void SetActiveID(Int_t i) {fActiveID = i;}
56 void SetRMin(Double_t r) {fRMin = r;}
57 void SetRMax(Double_t r) {fRMax = r;}
58 void SetR(Double_t r) {fR = r;}
173b3073 59 void SetZMin(Double_t z) {fZMin = z;}
60 void SetZMax(Double_t z) {fZMax = z;}
a11ef2e4 61 void SetPassive(Bool_t v=kTRUE) {SetBit(kPassive,v);}
ee52e7b5 62 void SetOwnsClusterArray(Bool_t v=kTRUE) {SetBit(kOwnsClusterArray,v);}
32d38de2 63 void SetMaxStep(Double_t st) {fMaxStep = st>0 ? st : 0.1;}
a11ef2e4 64 //
68b7631d 65 AliITSURecoSens* GetSensor(Int_t i) const {return (AliITSURecoSens*)fSensors->UncheckedAt(i);}
66 AliITSURecoSens* GetSensor(Int_t row,Int_t sinrow) const {return GetSensor(sinrow+row*fNSensorsPerRow);}
67 //
8b16dbae 68 AliITSURecoSens* GetSensorFromID(Int_t i) const;
32d38de2 69 TClonesArray* GetClusters() const {return (TClonesArray*)fClusters;}
ee52e7b5 70 TClonesArray** GetClustersAddress() {return (TClonesArray**)&fClusters;}
0091e9f0 71 Int_t GetNClusters() const {return fClusters ? fClusters->GetEntriesFast() : 0;}
c61e50c3 72 AliCluster* GetCluster(Int_t icl) const {return (AliCluster*)fClusters->UncheckedAt(icl);}
32d38de2 73 void SetClusters(TClonesArray* cl) {fClusters = cl;}
a11ef2e4 74 //
5785a9d8 75 // Int_t FindSensors(const double* impPar, AliITSURecoSens *sensors[AliITSURecoSens::kNNeighbors], int mcLab=-1);
68b7631d 76 Int_t FindSensors(const double* impPar, AliITSURecoSens *sensors[kMaxSensMatching]);
a11ef2e4 77 //
78 virtual void Print(Option_t* option = "") const;
dde91d5d 79 virtual Bool_t IsSortable() const {return kTRUE;}
80 virtual Bool_t IsEqual(const TObject* obj) const;
81 virtual Int_t Compare(const TObject* obj) const;
32d38de2 82 //
83 protected:
84 void Build();
68b7631d 85 Int_t SensVIDtoMatrixID(Int_t i) const {return fSensVIDtoMatrixID[i];}
32d38de2 86 //
a11ef2e4 87 protected:
88 Int_t fActiveID; // ID within active layers
852af72e 89 Int_t fNSensors; // N of chips
68b7631d 90 Int_t fNSensorRows; // N of sensor rows (sensors aligned at same phi and spanning the Z range of the layer)
91 Int_t fNSensorsPerRow; // number of sensors in a row
92 Int_t* fSensVIDtoMatrixID; //[fNSensors]
a11ef2e4 93 Double_t fR; // mean R
94 Double_t fRMax; // max R
95 Double_t fRMin; // min R
96 Double_t fZMax; // max Z
97 Double_t fZMin; // min Z
852af72e 98 Double_t fPhiOffs; // offset in phi for 1st stave
a11ef2e4 99 Double_t fSensDZInv; // inverse mean sensor Z span
68b7631d 100 Double_t fSensDPhiInv;// inverse mean sensor dphi
32d38de2 101 Double_t fMaxStep; // max step in tracking X allowed within layer
68b7631d 102 TObjArray* fSensors; // sensors
a11ef2e4 103 AliITSUGeomTGeo* fITSGeom; // geometry interface
32d38de2 104 TClonesArray* fClusters; // clusters of the layer
a11ef2e4 105 //
106 private:
107 AliITSURecoLayer(const AliITSURecoLayer &source);
108 AliITSURecoLayer& operator=(const AliITSURecoLayer &source);
109 //
110
111 ClassDef(AliITSURecoLayer,1); // helper for layer data used in reco
112};
113
114#endif