]>
Commit | Line | Data |
---|---|---|
a11ef2e4 | 1 | #ifndef ALIITSURECODET |
2 | #define ALIITSURECODET | |
3 | ||
4 | #include <TNamed.h> | |
5 | #include <TObjArray.h> | |
6 | #include "AliITSURecoLayer.h" | |
7 | class AliITSUGeomTGeo; | |
ee52e7b5 | 8 | class TTree; |
a11ef2e4 | 9 | |
10 | /////////////////////////////////////////////////////////////////////// | |
11 | // // | |
12 | // Class AliITSURecoDet // | |
13 | // Interface between the framework and reconstruction for ITS // | |
14 | // // | |
15 | /////////////////////////////////////////////////////////////////////// | |
16 | ||
17 | ||
18 | class AliITSURecoDet : public TNamed | |
19 | { | |
20 | public: | |
21 | // | |
32d38de2 | 22 | AliITSURecoDet(AliITSUGeomTGeo* geom, const char* name=""); |
a11ef2e4 | 23 | virtual ~AliITSURecoDet(); |
24 | // | |
25 | Double_t GetRMin() const {return fRMin;} | |
26 | Double_t GetRMax() const {return fRMax;} | |
27 | Int_t GetNLayers() const {return fNLayers;} | |
28 | Int_t GetNLayersActive() const {return fNLayersActive;} | |
29 | Int_t GetLrIDActive(Int_t lrActID) const; | |
8b16dbae | 30 | Int_t FindLastLayerID(Double_t r, int dir) const; |
31 | Int_t FindFirstLayerID(Double_t r, int dir) const; | |
a11ef2e4 | 32 | AliITSURecoLayer* GetLayer(Int_t i) const; |
33 | AliITSURecoLayer* GetLayerActive(Int_t i) const; | |
32d38de2 | 34 | AliITSUGeomTGeo* GetGeom() const {return fGeom;} |
a11ef2e4 | 35 | // |
36 | void SetRMin(Double_t r) {fRMin = r;} | |
37 | void SetRMax(Double_t r) {fRMax = r;} | |
38 | // | |
39 | void AddLayer(const AliITSURecoLayer* lr); | |
32d38de2 | 40 | // |
41 | void ProcessClusters(Int_t mode=0); | |
ee52e7b5 | 42 | void CreateClusterArrays(); |
43 | Int_t LoadClusters(TTree* treeRP); | |
a11ef2e4 | 44 | // |
45 | virtual void Print(Option_t* option = "") const; | |
46 | // | |
32d38de2 | 47 | protected: |
48 | Bool_t Build(); | |
dde91d5d | 49 | void IndexLayers(); |
32d38de2 | 50 | // |
a11ef2e4 | 51 | protected: |
52 | Int_t fNLayers; // total number of layers | |
53 | Int_t fNLayersActive; // N of active layers | |
54 | Double_t fRMax; // max R | |
55 | Double_t fRMin; // min R | |
56 | TObjArray fLayers; // layers | |
57 | TObjArray fLayersActive; // active layers | |
32d38de2 | 58 | AliITSUGeomTGeo* fGeom; // ITS geometry |
a11ef2e4 | 59 | // |
173b3073 | 60 | protected: |
61 | static const Char_t* fgkBeamPipeVolName; // name of the beam pipe volume | |
62 | ||
a11ef2e4 | 63 | private: |
64 | AliITSURecoDet(const AliITSURecoDet &source); | |
65 | AliITSURecoDet& operator=(const AliITSURecoDet &source); | |
66 | // | |
67 | ClassDef(AliITSURecoDet,1); // helper for ITS data in reco | |
68 | }; | |
69 | ||
70 | ||
71 | ||
72 | //_____________________________________________________________ | |
73 | inline Int_t AliITSURecoDet::GetLrIDActive(Int_t lrActID) const | |
74 | { | |
75 | // get global layer id from active id | |
76 | return (lrActID<fNLayersActive) ? ((AliITSURecoLayer*)fLayersActive.UncheckedAt(lrActID))->GetID() : fNLayers; | |
77 | } | |
78 | ||
79 | //_____________________________________________________________ | |
80 | inline AliITSURecoLayer* AliITSURecoDet::GetLayer(Int_t i) const | |
81 | { | |
82 | // get layer with global id=i | |
8b16dbae | 83 | return i>=0&&i<fNLayers ? (AliITSURecoLayer*)fLayers.UncheckedAt(i):0; |
a11ef2e4 | 84 | } |
85 | ||
86 | //_____________________________________________________________ | |
87 | inline AliITSURecoLayer* AliITSURecoDet::GetLayerActive(Int_t i) const | |
88 | { | |
89 | // get layer with activeID=i | |
8b16dbae | 90 | return i>=0&&i<fNLayersActive ? (AliITSURecoLayer*)fLayersActive.UncheckedAt(i):0; |
a11ef2e4 | 91 | } |
92 | ||
32d38de2 | 93 | //______________________________________________________ |
94 | inline void AliITSURecoDet::ProcessClusters(Int_t mode) | |
95 | { | |
96 | // prepare clsuters for reconstrunction | |
97 | for (int ilr=fNLayersActive;ilr--;) GetLayerActive(ilr)->ProcessClusters(mode); | |
98 | } | |
a11ef2e4 | 99 | |
100 | #endif |