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