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