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