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