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