1 #ifndef ALIITSRESIDUALSANALYSIS_H
2 #define ALIITSRESIDUALSANALYSIS_H
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 //*************************************************************************
9 // AliITSResidualAnalysis: class which deals with the analysis of the *
10 // tracks residuals in the ITS *
11 // More comments will come with the development of the interfaces and *
12 // functionalities of the class. *
13 //*************************************************************************
15 #include "AliAlignmentTracks.h"
23 class AliTrackPointArray;
24 class AliTrackResiduals;
27 class AliITSResidualsAnalysis : public AliAlignmentTracks {
32 AliITSResidualsAnalysis();
33 AliITSResidualsAnalysis(const TString aliTrackPoints,const TString geom);
34 AliITSResidualsAnalysis(const TArrayI *volIDs);
35 ~AliITSResidualsAnalysis();
39 void ListVolUsed(TTree *pointsTree,TArrayI ***arrayIndex,Int_t **lastIndex);
40 void ListVolUsed(){if(!fIsIndexBuilt)return;ListVolUsed(fPointsTree,fArrayIndex,fLastIndex);};
42 void InitHistograms(const TArrayI *volIDs);
43 void FillResidualsH(AliTrackPointArray *trackClust,AliTrackPointArray *trackFitPoints) const;
44 void DrawHists() const;
45 Bool_t SaveHists(Int_t minNpoints=10,TString outname="ResidualsAnalysisTree.root") const;
47 void FillVolumeCorrelationHists(Int_t ivol,Int_t volIDalignable,Int_t volIDpoint,Bool_t used) const;
48 Bool_t SetBinning(const TArrayI *volids,Float_t *phiBin,Float_t *zBin);
49 Float_t** CheckSingleLayer(const TArrayI *volids);
50 TArrayI* GetITSLayersVolids(Int_t layers[6]) const;
51 TArrayI* GetSPDSectorsVolids(Int_t sectors[10]) const;
52 Int_t WhichSector(Int_t module) const;
53 Int_t GetBinPhiZ(const Int_t volID,Int_t *binz) const;
54 void GetTrackDirClusterCov(AliTrackPoint *point,Double_t &phi,Double_t &lambda,Double_t &lambda2,Double_t &alpha,Double_t &xovery,Double_t &zovery) const;
55 void CalculateResiduals(const TArrayI *volids,const TArrayI *volidsfit,AliGeomManager::ELayerID layerRangeMin,AliGeomManager::ELayerID layerRangeMax,TString outname="ResidualsAnalysisTree.root");
56 void ProcessVolumes(Int_t fit=0,TArrayI *volIDs=0,TArrayI *volIDsFit=0,TString misalignmentFile="",TString outname="ResidualsAnalysisTree.root",Int_t minPoints=2);
57 TString GetFileNameTrackPoints() const { return fAliTrackPoints; };
58 TString GetFileNameGeometry() const { return fGeom; };
59 void SetFileNameTrackPoints(TString name) { fAliTrackPoints=name; };
60 void SetFileNameGeometry(TString name) { fGeom=name; };
61 void SetUseGausFit(Bool_t opt=kTRUE) {fUseGausFit=opt;}
80 Int_t fnHist; // number of histogram = number of alignable volumes considered
81 Int_t fnPhi; // coordinate of the volume (Phi)
82 Int_t fnZ; // coordinate of the volume (Z)
83 Int_t **fvolidsToBin; // array with volID and bin
84 Int_t *fLastVolVolid; // Last Vol Volid
85 Double_t ***fCoordToBinTable; // array with coordinate and bin
86 TH1F **fVolResHistRPHI; // Histogram of Residuals along Global rphi
87 TH1F **fResHistZ; // Histogram of Residuals along Global Z
88 TH1F **fResHistX; // Histogram of Residuals along Global X
89 TH1F **fResHistXLocsddL; // Histogram of Residuals along Local X
90 // SDD left side of module
91 TH1F **fResHistXLocsddR; // Histogram of Residuals along Local X
92 // SDD right side of module
93 TH1F **fHistCoordGlobY; // Histogram of the Y coordinate in Global Reference
94 TH1F **fPullHistRPHI; // Misc Histogram ...
95 TH1F **fPullHistZ; // Misc Histogram ...
96 TH1F **fTrackDirPhi; // Misc Histogram ...
97 TH1F **fTrackDirLambda; // Misc Histogram ...
98 TH1F **fTrackDirLambda2; // Misc Histogram ...
99 TH1F **fTrackDirAlpha; // Misc Histogram ...
100 TH1F *fTrackDirPhiAll; // Misc Histogram ...
101 TH1F *fTrackDirLambdaAll; // Misc Histogram ...
102 TH1F *fTrackDirLambda2All; // Misc Histogram ...
103 TH1F *fTrackDirAlphaAll; // Misc Histogram ...
104 TH2F **fTrackDir; // Misc Histogram ...
105 TH2F *fTrackDirAll; // Misc Histogram ...
106 TH2F *fTrackDir2All; // Misc Histogram ...
107 TH2F *fTrackDirXZAll; // Misc Histogram ...
108 TH1F **fResHistGlob; // Histogram of Residuals
109 TH2F **fhistCorrVol; // Misc Histogram ...
110 TH2F *fVolNTracks; // Histogram to see how many tracks pass through a given module
111 TH2F *fhEmpty; // Histogram to get/set the binning
112 TH2F *fhistVolNptsUsed; // Histogram with the numer of points used per volume
113 TH2F *fhistVolUsed; // Histogram with the numer of volumes udes
114 TH2F *fSigmaVolZ; // Histogram with the sigma vs volume Z
115 Bool_t fsingleLayer; // Tag for single layer
116 Bool_t fWriteHist; // Tag for histograms
117 TArrayI *fpTrackVolIDs; // array that gives the volID for the i^(th) entry
118 TArrayI **fVolVolids; // array with the volumes to analyze
119 TArrayI **fVolUsed; // array with the volumes to use
120 Bool_t fRealignObjFileIsOpen; // indicator- if the file fRealignObjFilename is opened
121 TClonesArray *fClonesArray; // pointer to the TClonesArray with the final AliAlignObjParams
122 TString fAliTrackPoints; // Filename with the AliTrackPoints
123 TString fGeom; // Filename with the Geometry
124 Bool_t fUseGausFit; // Fit residual histos with gaussians
127 AliITSResidualsAnalysis(const AliITSResidualsAnalysis&); // Not implemented
128 AliITSResidualsAnalysis& operator=(const AliITSResidualsAnalysis&); // Not implemented
131 ClassDef(AliITSResidualsAnalysis,3) // Residuals analysis for the ITS