1 #ifndef ALITPCCALIBLASER_H
2 #define ALITPCCALIBLASER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
12 #include "TObjArray.h"
13 #include "TLinearFitter.h"
14 #include "AliTPCcalibBase.h"
17 #include "THnSparse.h"
20 class AliExternalTrackParam;
27 class AliTPCLaserTrack;
30 class AliTPCcalibLaser:public AliTPCcalibBase {
33 AliTPCcalibLaser(const Text_t *name, const Text_t *title, Bool_t full=kTRUE);
34 AliTPCcalibLaser(const AliTPCcalibLaser& laser);
35 AliTPCcalibLaser & operator=(const AliTPCcalibLaser& calibLaser);
36 virtual ~AliTPCcalibLaser();
37 virtual void Process(AliESDEvent *event);
38 Int_t GetNtracks(){return fNtracks;}
39 virtual void Analyze();
40 virtual Long64_t Merge(TCollection *li);
41 virtual void DumpMeanInfo(Int_t run=-1);
42 static void DumpScanInfo(TTree * tree, const char * cutUser="entries>300&&(gz2<0.15&&gphi2<0.1&&gp42<0.02&&abs(gp41)<0.03)");
43 static void DumpFitInfo(TTree * chainFit, Int_t id);
44 static TH1* GetLaserProjection(TH2F* his, Int_t laser){return his->ProjectionY("aaa",laser+1,laser+1);}
47 virtual void DumpLaser(Int_t id);
48 virtual void RefitLaserJW(Int_t id);
50 Bool_t FitDriftV(Float_t minFraction);
52 void MakeDistHisto(Int_t id);
53 void AddCut(Double_t xcut, Double_t ycut, Double_t ncl){fEdgeXcuts[fNcuts]=xcut; fEdgeYcuts[fNcuts]=ycut; fNClCuts[fNcuts]=ncl; fNcuts++;}
55 Int_t FindMirror(AliESDtrack *track, AliTPCseed *seed);
56 Bool_t AcceptLaser(Int_t id);
57 Float_t GetDistance(AliExternalTrackParam *track, AliTPCLaserTrack *ltrp);
59 void MergeFitHistos(AliTPCcalibLaser * add);
60 void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
61 void Process(AliTPCseed *track){return AliTPCcalibBase::Process(track);}
63 void SetBeamParameters(TVectorD& meanOffset, TVectorD& meanSlope,
64 TVectorD& sectorArray, Int_t option);
65 void SetFixedDriftVConstant(Double_t aside0, Double_t aside1,
66 Double_t cside0, Double_t cside1)
67 {fUseFixedDriftV = 1; fFixedFitAside0=aside0; fFixedFitAside1=aside1;
68 fFixedFitCside0=cside0; fFixedFitCside1=cside1;}
70 AliESDEvent * fESD; //! ESD event - not OWNER
71 AliESDfriend * fESDfriend; //! ESD event - not OWNER
72 Int_t fNtracks; //! counter of associated laser tracks
74 TObjArray fTracksMirror; //! tracks with mirror information
75 TObjArray fTracksEsd; //! tracks with reconstructed information -
77 TObjArray fTracksEsdParam; //! tracks with reconstructed information -
78 // is owner ESD at mirror
79 TObjArray fTracksTPC; //! tracks with reconstructed information - TPC
80 Int_t fCounter[336]; //! counter of usage
81 Float_t fClusterCounter[336]; //!couter of clusters in "sensitive are"
82 Float_t fClusterSatur[336]; //!couter of saturated clusters in "sensitive are"
83 Bool_t fFullCalib; // do full calibrration
84 Float_t fFitZ[336]; //fitted z position
86 TObjArray fDeltaZ; //-> array of histograms of delta z for each track
87 TObjArray fDeltaP3; //-> array of histograms of P3 for each track
88 TObjArray fDeltaP4; //-> array of histograms of P4 for each track
89 TObjArray fDeltaPhi; //-> array of histograms of delta Phi for each track
90 TObjArray fDeltaPhiP; //-> array of histograms of delta Phi direction for each track
91 TObjArray fSignals; //->Array of dedx signals
94 // Refit residuals histogram
96 THnSparseS *fHisLaser; // N dim histogram of laser
97 TH2F *fHisNclIn; //->Number of clusters inner
98 TH2F *fHisNclOut; //->Number of clusters outer
99 TH2F *fHisNclIO; //->Number of cluster inner outer
100 TH2F *fHisLclIn; //->Level arm inner
101 TH2F *fHisLclOut; //->Level arm outer
102 TH2F *fHisLclIO; //->Level aram inner outer
104 TH2F *fHisdEdx; //->dEdx histo
105 TH2F *fHisdZfit; //->distance to the mirror after linear fit
108 TH2F *fHisChi2YIn1; //->chi2 y inner - line
109 TH2F *fHisChi2YOut1; //->chi2 y inner - line
110 TH2F *fHisChi2YIn2; //->chi2 y inner - parabola
111 TH2F *fHisChi2YOut2; //->chi2 y inner - parabola
112 TH2F *fHisChi2YIO1; //->chi2 y IO - common
113 TH2F *fHisChi2ZIn1; //->chi2 z inner - line
114 TH2F *fHisChi2ZOut1; //->chi2 z inner - line
115 TH2F *fHisChi2ZIn2; //->chi2 z inner - parabola
116 TH2F *fHisChi2ZOut2; //->chi2 z inner - parabola
117 TH2F *fHisChi2ZIO1; //->chi2 z IO - common
120 TH2F *fHisPy1vP0; //-> delta y P0outer-P0inner - line
121 TH2F *fHisPy2vP0; //-> delta y P0outer-P0inner - parabola
122 TH2F *fHisPy3vP0; //-> delta y P0outer-P0inner - common parabola
123 TH2F *fHisPy1vP1; //-> delta ky P1outer-P1inner - line
124 TH2F *fHisPy2vP1; //-> delta ky P1outer-P1inner - parabola
125 TH2F *fHisPy3vP1; //-> delta ky P1outer-P1inner - common parabola
126 TH2F *fHisPy2vP2In; //-> Curv P2inner - parabola
127 TH2F *fHisPy2vP2Out; //-> Curv P2outer - parabola
128 TH2F *fHisPy3vP2IO; //-> Curv P2outerinner - common parabola
131 TH2F *fHisPz1vP0; //-> delta z P0outer-P0inner - line
132 TH2F *fHisPz2vP0; //-> delta z P0outer-P0inner - parabola
133 TH2F *fHisPz3vP0; //-> delta z P0outer-P0inner - common parabola
134 TH2F *fHisPz1vP1; //-> delta kz P1outer-P1inner - line
135 TH2F *fHisPz2vP1; //-> delta kz P1outer-P1inner - parabola
136 TH2F *fHisPz3vP1; //-> delta kz P1outer-P1inner - common parabola
137 TH2F *fHisPz2vP2In; //-> Curv P2inner - parabola
138 TH2F *fHisPz2vP2Out; //-> Curv P2outer - parabola
139 TH2F *fHisPz3vP2IO; //-> Curv P2outerinner - common parabola
141 // Residual histograms
143 TObjArray fDeltaYres; //-> array of histograms of delta y residuals for each track
144 TObjArray fDeltaZres; //-> array of histograms of delta z residuals for each track
145 TObjArray fDeltaYres2; //-> array of histograms of delta y residuals for each track
146 TObjArray fDeltaZres2; //-> array of histograms of delta z residuals for each track
147 TObjArray fDeltaYresAbs; //-> array of histograms of absolute delta y residuals for each track
148 TH1F *fHisYAbsErrors; //-> Number of errors (wrongly assigned tracks) per beam
149 TObjArray fDeltaZresAbs; //-> array of histograms of absolute delta z residuals for each track
150 TH1F *fHisZAbsErrors; //-> Number of errors (wrongly assigned tracks or missing drift velocity) per beam
151 // TObjArray fDeltaYres3; //-> array of histograms of delta y residuals for each track
152 //TObjArray fDeltaZres3; //-> array of histograms of delta z residuals for each track
155 TVectorD* fFitAside; //! drift fit - A side
156 TVectorD* fFitCside; //! drift fit - C- side
157 TVectorD* fFitACside; //! drift fit - A+C- side
159 TVectorD fEdgeXcuts; //! cuts in local x direction; used in the refit of the laser tracks
160 TVectorD fEdgeYcuts; //! cuts in local y direction; used in the refit of the laser tracks
161 TVectorD fNClCuts; //! cuts on the number of clusters per tracklet; used in the refit of the laser tracks
162 Int_t fNcuts; //! number of cuts
163 TVectorD fBeamSectorOuter; //! sector map for beams in outer sector
164 TVectorD fBeamSectorInner; //! sector map for beams in inner sector
165 TVectorD fBeamOffsetYOuter; //! absolute y beam offset in outer sector
166 TVectorD fBeamSlopeYOuter; //! absolute y beam slope in outer sector
167 TVectorD fBeamOffsetYInner; //! absolute y beam offset in inner sector
168 TVectorD fBeamSlopeYInner; //! absolute y beam slope in inner sector
169 TVectorD fBeamOffsetZOuter; //! absolute z beam offset in outer sectror
170 TVectorD fBeamSlopeZOuter; //! absolute z beam slope in outer sector
171 TVectorD fBeamOffsetZInner; //! absolute z beam offset in inner sectror
172 TVectorD fBeamSlopeZInner; //! absolute z beam slope in inner sector
173 Bool_t fInverseSlopeZ; //! invert slope in z - mismatch between database and lasers
174 Int_t fUseFixedDriftV; // flag for fixed drift velocity for abs res
175 Double_t fFixedFitAside0; // Fixed drift v constant 0 - A side
176 Double_t fFixedFitAside1; // Fixed drift v constant 1 - A side
177 Double_t fFixedFitCside0; // Fixed drift v constant 0 - C side
178 Double_t fFixedFitCside1; // Fixed drift v constant 1 - C side
181 ClassDef(AliTPCcalibLaser,5)