]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/AliITSURecoDet.h
Little coverity fix
[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 //
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;}
70cb7fe4 27 Double_t GetRITSTPCRef() const {return fRITSTPCRef;}
a11ef2e4 28 Int_t GetNLayers() const {return fNLayers;}
29 Int_t GetNLayersActive() const {return fNLayersActive;}
30 Int_t GetLrIDActive(Int_t lrActID) const;
8b16dbae 31 Int_t FindLastLayerID(Double_t r, int dir) const;
32 Int_t FindFirstLayerID(Double_t r, int dir) const;
a11ef2e4 33 AliITSURecoLayer* GetLayer(Int_t i) const;
34 AliITSURecoLayer* GetLayerActive(Int_t i) const;
32d38de2 35 AliITSUGeomTGeo* GetGeom() const {return fGeom;}
a11ef2e4 36 //
37 void SetRMin(Double_t r) {fRMin = r;}
38 void SetRMax(Double_t r) {fRMax = r;}
70cb7fe4 39 void SetRITSTPCRef(Double_t r) {fRITSTPCRef = r;}
a11ef2e4 40 //
41 void AddLayer(const AliITSURecoLayer* lr);
32d38de2 42 //
43 void ProcessClusters(Int_t mode=0);
ee52e7b5 44 void CreateClusterArrays();
45 Int_t LoadClusters(TTree* treeRP);
a11ef2e4 46 //
47 virtual void Print(Option_t* option = "") const;
48 //
32d38de2 49 protected:
50 Bool_t Build();
dde91d5d 51 void IndexLayers();
32d38de2 52 //
a11ef2e4 53 protected:
54 Int_t fNLayers; // total number of layers
55 Int_t fNLayersActive; // N of active layers
56 Double_t fRMax; // max R
57 Double_t fRMin; // min R
70cb7fe4 58 Double_t fRITSTPCRef; // reference radius for ITS/TPC matching check
a11ef2e4 59 TObjArray fLayers; // layers
60 TObjArray fLayersActive; // active layers
32d38de2 61 AliITSUGeomTGeo* fGeom; // ITS geometry
a11ef2e4 62 //
173b3073 63 protected:
64 static const Char_t* fgkBeamPipeVolName; // name of the beam pipe volume
65
a11ef2e4 66 private:
67 AliITSURecoDet(const AliITSURecoDet &source);
68 AliITSURecoDet& operator=(const AliITSURecoDet &source);
69 //
70 ClassDef(AliITSURecoDet,1); // helper for ITS data in reco
71};
72
73
74
75//_____________________________________________________________
76inline Int_t AliITSURecoDet::GetLrIDActive(Int_t lrActID) const
77{
78 // get global layer id from active id
70cb7fe4 79 return (lrActID<fNLayersActive) ? ((AliITSURecoLayer*)fLayersActive.UncheckedAt(lrActID))->GetID()
80 : GetLayerActive(fNLayersActive-1)->GetID()+1;
a11ef2e4 81}
82
83//_____________________________________________________________
84inline AliITSURecoLayer* AliITSURecoDet::GetLayer(Int_t i) const
85{
86 // get layer with global id=i
8b16dbae 87 return i>=0&&i<fNLayers ? (AliITSURecoLayer*)fLayers.UncheckedAt(i):0;
a11ef2e4 88}
89
90//_____________________________________________________________
91inline AliITSURecoLayer* AliITSURecoDet::GetLayerActive(Int_t i) const
92{
93 // get layer with activeID=i
8b16dbae 94 return i>=0&&i<fNLayersActive ? (AliITSURecoLayer*)fLayersActive.UncheckedAt(i):0;
a11ef2e4 95}
96
32d38de2 97//______________________________________________________
98inline void AliITSURecoDet::ProcessClusters(Int_t mode)
99{
100 // prepare clsuters for reconstrunction
101 for (int ilr=fNLayersActive;ilr--;) GetLayerActive(ilr)->ProcessClusters(mode);
102}
a11ef2e4 103
104#endif