Adding some further mother volumes to speed-up the overlap checking and particle...
[u/mrichter/AliRoot.git] / ITS / AliITSRealignTracks.h
CommitLineData
40053737 1#ifndef ALIITSREALIGNTRACKS_H
2#define ALIITSREALIGNTRACKS_H
3
a70ed6ad 4
5//Class to perform the realignment if the Inner Tracking System
6//with an iterative approach based on track to cluster residuals
7// minimization. More details in .cxx file
8//
9//Class by: A. Rossi, andrea,rossi@ts.infn.it
10
11
40053737 12#include "AliGeomManager.h"
13#include "AliAlignmentTracks.h"
a70ed6ad 14
15class TArray;
16class TGraph;
17class TCanvas;
18class TArray;
19class TFile;
20class AliAlignObjParams;
21
40053737 22
e2859055 23/* $Id$ */
24
a70ed6ad 25
40053737 26class AliITSRealignTracks: public AliAlignmentTracks {
27 public:
28
29 AliITSRealignTracks():
30 AliAlignmentTracks(),
31 fSurveyObjs(0),
32 fgeomfilename(),
33 fmintracks(0),
e2859055 34 fUpdateCov(kFALSE),
35 fVarySigmaY(kFALSE),
36 fCorrModules(0),
37 fLimitCorr(0.),
38 fsigmaY(),
39 fDraw(kFALSE),
40 fAlignDrawObjs(0),
41 fCanvPar(0),
42 fCanvGr(0),
43 fgrIterMeanX(0),
44 fgrIterRMSX(0),
45 fgrIterMeanY(0),
46 fgrIterRMSY(0),
47 fgrIterMeanZ(0),
48 fgrIterRMSZ(0),
49 fgrIterMeanPsi(0),
50 fgrIterRMSPsi(0),
51 fgrIterMeanTheta(0),
52 fgrIterRMSTheta(0),
53 fgrIterMeanPhi(0),
54 fgrIterRMSPhi(0)
a70ed6ad 55 {SetCovIsUsed(kFALSE);}
40053737 56
57 AliITSRealignTracks(TString minimizer,Int_t fit=0,Bool_t covUsed=kFALSE,TString fileintro="AliTrackPoints.root",TString geometryfile="geometry.root",TString misalignmentFile="",TString startingfile="");
58 AliITSRealignTracks(const AliITSRealignTracks &realignTracks);
59 AliITSRealignTracks& operator=(const AliITSRealignTracks& obj);
60 ~AliITSRealignTracks();
61
62 void InitAlignObjs();
e2859055 63 Bool_t InitSurveyObjs(Bool_t infinite=kFALSE,Double_t factor=1.,TString filename="",TString arrayName="");
64 void ResetAlignObjs(Bool_t all,TArrayI *volids=0x0);
65 void ResetCorrModules();
40053737 66 void DeleteSurveyObjs();
e2859055 67 void SetLimitCorr(Double_t limit=0.1){fLimitCorr=limit;}
a70ed6ad 68 Int_t CheckWithSurvey(Double_t factor=2.,const TArrayI *volids=0x0);
40053737 69 Bool_t SelectFitter(Int_t fit,Int_t minTrackPoint=2);
70 Bool_t SelectMinimizer(TString minimizer,Int_t minpoints=1,const Bool_t *coord=0x0);
71 void SetMinNtracks(Int_t minNtracks){fmintracks=minNtracks;}
72 void SetCovUpdate(Bool_t covupdate){fUpdateCov=covupdate;}
e2859055 73 void SetVarySigmaY(Bool_t varysigmay,Double_t sigmaYfixed=1.);
40053737 74 void SetGeomFilename(TString geomfilename){fgeomfilename=geomfilename;}
75 // Int_t LoadPoints(const TArrayI *volids, AliTrackPointArray** &points);
76 Bool_t ReadAlignObjs(const char *alignObjFileName = "AlignObjs.root", const char* arrayName = "Alignment");
77 void RealignITSVolIndependent(Int_t iter1,Int_t iterations,Int_t minNtracks,Int_t layer=0,Int_t minTrackPoint=6);
78 void RealignITStracks(TString minimizer,Int_t fit,Int_t iter1,Int_t iterations,Int_t minNtracks,Int_t layer,Int_t minTrackPoint,Bool_t covUsed,TString misalignmentFile,TString startingfile,Int_t doGlobal);
79 Bool_t AlignVolumesITS(const TArrayI *volids, const TArrayI *volidsfit,AliGeomManager::ELayerID layerRangeMin,AliGeomManager::ELayerID layerRangeMax,Int_t iterations);
e2859055 80 Bool_t FirstAlignmentSPD(Int_t minNtracks,Int_t iterations,Bool_t fitall=kTRUE,TArrayI *volidsSet=0x0);
a70ed6ad 81 Bool_t FirstAlignmentLayers(const Bool_t *layers,Int_t minNtracks,Int_t iterations,Bool_t fitall=kTRUE,TArrayI *volidsSet=0x0);
40053737 82 Bool_t SPDmodulesAlignToSSD(Int_t minNtracks,Int_t iterations);
83 Bool_t AlignSPDBarrel(Int_t iterations);
84 Bool_t AlignSPDHalfBarrel(Int_t method,Int_t iterations);
85 Bool_t AlignLayer(Int_t layer,Int_t iterations);
a70ed6ad 86 Bool_t AlignLayersToLayers(const Int_t *layer,Int_t iterations);
40053737 87 Bool_t AlignLayerToSPDHalfBarrel(Int_t layer,Int_t updown,Int_t iterations);
88 Bool_t AlignLayerToSector(Int_t layer,Int_t sector,Int_t iterations);
89 Bool_t AlignSPDSectorToOuterLayers(Int_t sector,Int_t iterations);
90 Bool_t AlignSPDSectorWithSectors(Int_t sector,Int_t iterations);
91 Bool_t AlignSPDSectorsWithSectors(Int_t *sectorIN,Int_t *sectorFit,Int_t iterations);
e2859055 92 Bool_t AlignSPDStaves(Int_t *staves,Int_t *sectorsIN,Int_t *sectorsFit,Int_t iterations);
40053737 93 Bool_t AlignSPDHalfBarrelToHalfBarrel(Int_t updown,Int_t iterations);
94 Bool_t AlignSPDHalfBarrelToSectorRef(Int_t sector,Int_t iterations);
95 Bool_t AlignSPD1SectorRef(Int_t sector,Int_t iterations);
96 //masera void AlignGlobalToSectRef(Int_t sector,Int_t minNtracks=100);
a70ed6ad 97 TArrayI* GetLayersVolUID(const Int_t *layer);
40053737 98 AliAlignObjParams* MediateAlignObj(TArrayI *volIDs,Int_t lastVolid);
a70ed6ad 99 TArrayI* GetSPDSectorsVolids(const Int_t *sectors);
100 TArrayI* GetSPDStavesVolids(const Int_t *sectors,const Int_t* staves);
40053737 101 TArrayI* SelectLayerInVolids(const TArrayI *volidsIN,AliGeomManager::ELayerID layer);
102 TArrayI* JoinVolArrays(const TArrayI *vol1,const TArrayI *vol2);
103 TArrayI* IntersectVolArray(const TArrayI *vol1,const TArrayI *vol2);
104 TArrayI* ExcludeVolidsFromVolidsArray(const TArrayI *volidsToExclude,const TArrayI *volStart);
a70ed6ad 105 TArrayI* GetLayerVolumes(const Int_t *layer);
e2859055 106 TArrayI* GetAlignedVolumes(char *filename);
107 /* void AlignGlobalToSectRef(Int_t sector,Int_t minNtracks=100);
108 AliAlignObjParams* MediateAlignObjs(AliAlignObj **alObjs,Int_t nObjs,const Bool_t *coords=0x0,TArrayI *volidArray=0x0,Bool_t local=kFALSE,const char* geometryfile=0x0);
109 Bool_t MediateSectorsVolumes(char *filename,Bool_t local=kFALSE,char *geometryfile=0x0,Bool_t *coord=0x0);
110 */
111 void InitDrawHists();
112 void SetDraw(Bool_t draw,Bool_t refresh);
113 void UpdateDraw(TArrayI *volids,Int_t iter,Int_t color);
114 void DeleteDrawHists();
115 void WriteHists(const char *outfile);
40053737 116
117 private:
118
119 AliAlignObj ***fSurveyObjs; // Array with survey measurments
120 TString fgeomfilename; // Geometry file name
e2859055 121 Int_t fmintracks; // minimum number of tracks to realign a set of volumes
40053737 122 Bool_t fUpdateCov; // Update of Covariance for AlignObjs
e2859055 123 Bool_t fVarySigmaY; // If kTRUE the "sigmaY" parameter is changed accordingly to alignObj error
124 Double_t **fCorrModules; // Used to reduce correlations between modules
125 Double_t fLimitCorr; // Maximum number of tracks shared between modules
126 Double_t fsigmaY; // sigmaY parameter
127 Bool_t fDraw; // flag to activate draw objects
128 AliAlignObj ***fAlignDrawObjs; //Array with reference objects for histograms
129 TCanvas *fCanvPar; //Canvas with iterations distributions
130 TCanvas *fCanvGr; //Canvas with iterations results
131 TGraph *fgrIterMeanX; //
132 TGraph *fgrIterRMSX; //
133 TGraph *fgrIterMeanY; //
134 TGraph *fgrIterRMSY; //
135 TGraph *fgrIterMeanZ; //
136 TGraph *fgrIterRMSZ; // TGraphs for displaying results during iterations
137 TGraph *fgrIterMeanPsi; //
138 TGraph *fgrIterRMSPsi; //
139 TGraph *fgrIterMeanTheta; //
140 TGraph *fgrIterRMSTheta; //
141 TGraph *fgrIterMeanPhi; //
142 TGraph *fgrIterRMSPhi; //
40053737 143
e2859055 144 ClassDef(AliITSRealignTracks,3)
40053737 145
146 };
147
148#endif