1 #ifndef ALIALIGNMENTTRACKS_H
2 #define ALIALIGNMENTTRACKS_H
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 //*************************************************************************
13 #include "AliAlignObj.h"
16 class AliTrackPointArray;
19 class AliTrackResiduals;
21 class AliAlignmentTracks : public TObject {
26 AliAlignmentTracks(TChain *esdchain);
27 AliAlignmentTracks(const char *esdfilename, const char *esdtreename = "esdTree");
28 AliAlignmentTracks(const AliAlignmentTracks & alignment);
29 AliAlignmentTracks& operator= (const AliAlignmentTracks& alignment);
30 virtual ~AliAlignmentTracks();
32 void AddESD(TChain *esdchain);
33 void AddESD(const char *esdfilename, const char *esdtreename = "esdTree");
35 void SetPointsFilename(const char *pointsfilename = "AliTrackPoints.root") { fPointsFilename = pointsfilename; }
37 void ProcessESD(TSelector *selector);
41 /* void BuildIndexLayer(AliAlignObj::ELayerID layer); */
42 /* void BuildIndexVolume(UShort_t volid); */
44 Bool_t ReadAlignObjs(const char *alignObjFileName = "AlignObjs.root", const char* arrayName = "Alignment");
46 void SetTrackFitter(AliTrackFitter *fitter) { fTrackFitter = fitter; }
47 void SetMinimizer(AliTrackResiduals *minimizer) { fMinimizer = minimizer; }
49 void Align(Int_t iterations = 100);
50 void AlignLayer(AliAlignObj::ELayerID layer,
51 AliAlignObj::ELayerID layerRangeMin = AliAlignObj::kFirstLayer,
52 AliAlignObj::ELayerID layerRangeMax = AliAlignObj::kLastLayer,
53 Int_t iterations = 1);
54 void AlignVolume(UShort_t volid, UShort_t volidfit = 0,
55 AliAlignObj::ELayerID layerRangeMin = AliAlignObj::kFirstLayer,
56 AliAlignObj::ELayerID layerRangeMax = AliAlignObj::kLastLayer,
57 Int_t iterations = 1);
66 void ResetAlignObjs();
67 void DeleteAlignObjs();
69 Int_t LoadPoints(UShort_t volid, AliTrackPointArray** &points);
70 void UnloadPoints(Int_t n, AliTrackPointArray **points);
72 AliTrackFitter *CreateFitter();
73 AliTrackResiduals *CreateMinimizer();
75 Bool_t Misalign(const char *misalignObjFileName, const char* arrayName);
77 TChain *fESDChain; //! Chain with ESDs
78 TString fPointsFilename; // Name of the file containing the track point arrays
79 TFile *fPointsFile; // File containing the track point arrays
80 TTree *fPointsTree; // Tree with the track point arrays
81 Int_t **fLastIndex; //! Last filled index in volume arrays
82 TArrayI ***fArrayIndex; //! Volume arrays which contains the tree index
83 Bool_t fIsIndexBuilt; // Is points tree index built
84 AliAlignObj ***fAlignObjs; // Array with alignment objects
85 AliAlignObj ***fMisalignObjs; // Array with alignment objects used to introduce misalignment of the space-points
86 AliTrackFitter *fTrackFitter; // Pointer to the track fitter
87 AliTrackResiduals*fMinimizer; // Pointer to track residuals minimizer
89 ClassDef(AliAlignmentTracks,1)