Revised DDL map
[u/mrichter/AliRoot.git] / STEER / AliAlignmentTracks.h
CommitLineData
98937d93 1#ifndef ALIALIGNMENTTRACKS_H
2#define ALIALIGNMENTTRACKS_H
3
4//*************************************************************************
5// AliAlignmentTracks: main steering class which deals with the alignment *
6// procedures based on reconstructed tracks. *
7// More comments will come with the development of the interfaces and *
8// functionalities of the class. *
9//*************************************************************************
10
11#include <TObject.h>
12
13#include "AliAlignObj.h"
14
15class TChain;
16class AliTrackPointArray;
17class AliAlignObj;
18class AliTrackFitter;
19class AliTrackResiduals;
20
21class AliAlignmentTracks : public TObject {
22
23 public:
24
25 AliAlignmentTracks();
26 AliAlignmentTracks(TChain *esdchain);
27 AliAlignmentTracks(const char *esdfilename, const char *esdtreename = "esdTree");
98937d93 28 virtual ~AliAlignmentTracks();
29
30 void AddESD(TChain *esdchain);
31 void AddESD(const char *esdfilename, const char *esdtreename = "esdTree");
32
33 void SetPointsFilename(const char *pointsfilename = "AliTrackPoints.root") { fPointsFilename = pointsfilename; }
34
35 void ProcessESD(TSelector *selector);
babbb915 36 void ProcessESD(Bool_t onlyITS=kFALSE,Int_t minITSpts=0,
37 Bool_t cuts=kTRUE,
38 Float_t minMom=0.5,Float_t maxMom=1.e9,
39 Float_t minAbsSinPhi=0.,Float_t maxAbsSinPhi=1.,
40 Float_t minSinTheta=0.,Float_t maxSinTheta=1.);
41 void ProcessESDCosmics(Bool_t onlyITS=kFALSE,Int_t minITSpts=0,
42 Bool_t cuts=kTRUE,
43 Float_t minMom=0.5,Float_t maxMom=1.e9,
44 Float_t minAbsSinPhi=0.,Float_t maxAbsSinPhi=1.,
45 Float_t minSinTheta=0.,Float_t maxSinTheta=1.);
98937d93 46
47 void BuildIndex();
98937d93 48
46ae650f 49 Bool_t ReadAlignObjs(const char *alignObjFileName = "AlignObjs.root", const char* arrayName = "Alignment");
98937d93 50
51 void SetTrackFitter(AliTrackFitter *fitter) { fTrackFitter = fitter; }
52 void SetMinimizer(AliTrackResiduals *minimizer) { fMinimizer = minimizer; }
53
25be1e5c 54 void AlignDetector(AliGeomManager::ELayerID firstLayer,
55 AliGeomManager::ELayerID lastLayer,
56 AliGeomManager::ELayerID layerRangeMin = AliGeomManager::kFirstLayer,
57 AliGeomManager::ELayerID layerRangeMax = AliGeomManager::kLastLayer,Int_t iterations = 1);
58 void AlignLayer(AliGeomManager::ELayerID layer,
59 AliGeomManager::ELayerID layerRangeMin = AliGeomManager::kFirstLayer,
60 AliGeomManager::ELayerID layerRangeMax = AliGeomManager::kLastLayer,
98937d93 61 Int_t iterations = 1);
cc345ce3 62 void AlignVolume(UShort_t volId, UShort_t volIdFit,
63 Int_t iterations);
64 void AlignVolumes(const TArrayI *volids, const TArrayI *volidsfit = 0x0,
25be1e5c 65 AliGeomManager::ELayerID layerRangeMin = AliGeomManager::kFirstLayer,
66 AliGeomManager::ELayerID layerRangeMax = AliGeomManager::kLastLayer,
46ae650f 67 Int_t iterations = 1);
98937d93 68
cc345ce3 69 AliAlignObj* GetAlignObj(UShort_t volid) const {
70 Int_t iModule;
25be1e5c 71 AliGeomManager::ELayerID iLayer = AliGeomManager::VolUIDToLayer(volid,iModule);
72 return fAlignObjs[iLayer-AliGeomManager::kFirstLayer][iModule];
cc345ce3 73 }
91264393 74 void SetUpdate(Bool_t update){fDoUpdate = update;}
75 Bool_t GetUpdate() const { return fDoUpdate;}
98937d93 76 protected:
77
78 void InitIndex();
79 void ResetIndex();
80 void DeleteIndex();
81
82 void InitAlignObjs();
83 void ResetAlignObjs();
84 void DeleteAlignObjs();
85
cc345ce3 86 Int_t LoadPoints(const TArrayI *volids, AliTrackPointArray** &points);
98937d93 87 void UnloadPoints(Int_t n, AliTrackPointArray **points);
88
89 AliTrackFitter *CreateFitter();
90 AliTrackResiduals *CreateMinimizer();
91
46ae650f 92 Bool_t Misalign(const char *misalignObjFileName, const char* arrayName);
93
98937d93 94 TChain *fESDChain; //! Chain with ESDs
95 TString fPointsFilename; // Name of the file containing the track point arrays
96 TFile *fPointsFile; // File containing the track point arrays
97 TTree *fPointsTree; // Tree with the track point arrays
98 Int_t **fLastIndex; //! Last filled index in volume arrays
99 TArrayI ***fArrayIndex; //! Volume arrays which contains the tree index
100 Bool_t fIsIndexBuilt; // Is points tree index built
101 AliAlignObj ***fAlignObjs; // Array with alignment objects
46ae650f 102 AliAlignObj ***fMisalignObjs; // Array with alignment objects used to introduce misalignment of the space-points
98937d93 103 AliTrackFitter *fTrackFitter; // Pointer to the track fitter
104 AliTrackResiduals*fMinimizer; // Pointer to track residuals minimizer
91264393 105 Bool_t fDoUpdate; // Indicator - update Alignment object after minimization
75e3794b 106
107 private:
108 AliAlignmentTracks(const AliAlignmentTracks & alignment);
109 AliAlignmentTracks& operator= (const AliAlignmentTracks& alignment);
110
91264393 111 ClassDef(AliAlignmentTracks,2)
98937d93 112
113};
114
115#endif