*** V interface for TPCCalibTasks ***
[u/mrichter/AliRoot.git] / TPC / Calib / AliTPCcalibTime.h
CommitLineData
c74c5f6c 1#ifndef ALITPCCALIBTIME_H
2#define ALITPCCALIBTIME_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
e0ef0ad7 6/*
7Comments to be written here:
8What do we calibrate.
9 Time dependence of gain and drift velocity in order to account for changes in: temperature, pressure, gas composition.
10*/
11
c74c5f6c 12
13#include "AliTPCcalibBase.h"
c6c14e33 14#include "THnSparse.h"
e0ef0ad7 15//#include "TH1D.h" // Temporary make code compiling for HLT in the
16
2811495d 17class TObjArray;
c74c5f6c 18class TH1F;
19class TH3F;
20class TH2F;
3e0d9569 21class TH1D;
c74c5f6c 22class TList;
e3d1b1e2 23//class AliESDEvent;
24class AliVEvent;
25//class AliESDtrack;
26class AliVTrack;
27class AliExternalTrackParam;
da6c0bc9 28class AliTPCcalibLaser;
74235403 29class TGraphErrors;
dde68d36 30class AliSplineFit;
e3d1b1e2 31//class AliESDfriendTrack;
32class AliVfriendTrack;
33class AliVfriendEvent;
c74c5f6c 34
c74c5f6c 35class AliTPCcalibTime:public AliTPCcalibBase {
36public:
37 AliTPCcalibTime();
660f0543 38 AliTPCcalibTime(const Text_t *name, const Text_t *title, UInt_t StartTime, UInt_t EndTime, Int_t deltaIntegrationTimeVdrift, Int_t memoryMode=2);
c74c5f6c 39 virtual ~AliTPCcalibTime();
40
e3d1b1e2 41 virtual void Process(AliVEvent *event);
2811495d 42 virtual Long64_t Merge(TCollection *const li);
c74c5f6c 43 virtual void Analyze();
9170f0f0 44 //static Bool_t IsLaser (const AliESDEvent *const event) const;
45 //static Bool_t IsCosmics (const AliESDEvent *const event) const;
46 //static Bool_t IsBeam (const AliESDEvent *const event) const;
e3d1b1e2 47 //void ProcessLaser (AliESDEvent *event);
48 //void ProcessCosmic(const AliESDEvent *const event);
49 //void ProcessBeam (const AliESDEvent *const event);
50 void ProcessLaser (AliVEvent *event);
51 void ProcessCosmic(const AliVEvent *const event);
52 void ProcessBeam (const AliVEvent *const event);
53
e0ef0ad7 54 Bool_t IsPair(const AliExternalTrackParam *tr0, const AliExternalTrackParam *tr1);
e3d1b1e2 55 Bool_t IsCross(const AliVTrack *const tr0, const AliVTrack *const tr1);
56 Bool_t IsSame (const AliVTrack *const tr0, const AliVTrack *const tr1);
57 void ProcessSame(const AliVTrack *const track, const AliVfriendTrack *const friendTrack, const AliVEvent *const event);
58 void ProcessAlignITS(AliVTrack *const track, const AliVfriendTrack *const friendTrack, const AliVEvent *const event, AliVfriendEvent *const friendEvent);
59 void ProcessAlignTRD(AliVTrack* const track, const AliVfriendTrack *const friendTrack);
60 void ProcessAlignTOF(AliVTrack* const track, const AliVfriendTrack *const friendTrack);
d3ce44cb 61
6ba68367 62 THnSparse* GetHistVdriftLaserA(Int_t index=1) const {return fHistVdriftLaserA[index];};
63 THnSparse* GetHistVdriftLaserC(Int_t index=1) const {return fHistVdriftLaserC[index];};
2811495d 64 THnSparse* GetHistoDrift(const char* name) const;
65 TObjArray* GetHistoDrift() const;
dde68d36 66 TGraphErrors* GetGraphDrift(const char* name);
67 TObjArray* GetGraphDrift();
68 AliSplineFit* GetFitDrift(const char* name);
69// TObjArray* GetFitDrift();
6ba68367 70 TH1F* GetCosmiMatchingHisto(Int_t index=0) const {return fCosmiMatchingHisto[index];};
e3d1b1e2 71 //void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);}
72 void Process(AliVTrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);}
1aa15e8d 73 void Process(AliTPCseed *track){return AliTPCcalibBase::Process(track);}
2811495d 74 TObjArray* GetAlignITSTPC() const {return fAlignITSTPC;} // alignemnt array ITS TPC match
75 TObjArray* GetAlignTRDTPC() const {return fAlignTRDTPC;} // alignemnt array TRD TPC match
76 TObjArray* GetAlignTOFTPC() const {return fAlignTOFTPC;} // alignemnt array TOF TPC match
3e55050f 77
9170f0f0 78 THnSparse * GetTPCVertexHisto(Int_t index) const { return fTPCVertex[index%12];}
79 THnSparse * GetTPCVertexHistoCorrelation(Int_t index) const { return fTPCVertexCorrelation[index%5];}
70036ef3 80
b9908d0b 81 THnSparse* GetResHistoTPCCE(Int_t index) const { return (index<5) ? fResHistoTPCCE[index]:0;} //TPC-CE matching map
9112627b 82 THnSparse* GetResHistoTPCITS(Int_t index) const { return (index<5) ? fResHistoTPCITS[index]:0;} //TPC-ITS matching map
391ffdb2 83 THnSparse* GetResHistoTPCvertex(Int_t index) const { return (index<5) ? fResHistoTPCvertex[index] :0;} //TPC vertex matching map
84 THnSparse* GetResHistoTPCTRD(Int_t index) const { return (index<5) ? fResHistoTPCTRD[index]:0;} //TPC-TRD matching map
0b736a46 85 THnSparse* GetResHistoTPCTOF(Int_t index) const { return (index<5) ? fResHistoTPCTOF[index]:0;} //TPC-TOF matching map
391ffdb2 86
87 void BookDistortionMaps(); // book histograms
b9908d0b 88 void FillResHistoTPCCE(const AliExternalTrackParam * pTPCIn, const AliExternalTrackParam * pTPCOut ); // fill residual histo
391ffdb2 89 void FillResHistoTPCITS(const AliExternalTrackParam * pTPCIn, const AliExternalTrackParam * pITSOut ); // fill residual histo
e3d1b1e2 90 void FillResHistoTPC(const AliVTrack * pTrack);
391ffdb2 91 void FillResHistoTPCTRD(const AliExternalTrackParam * pTPCOut, const AliExternalTrackParam * pTRDIn );
0b736a46 92 void FillResHistoTPCTOF(const AliExternalTrackParam * pTPCOut, const AliExternalTrackParam * pTOFIn );
3e55050f 93
00ec4542 94 TObjArray * GetLaserArrayA() const { return fArrayLaserA;}
95 TObjArray * GetLaserArrayC() const { return fArrayLaserC;}
96
c6c14e33 97 Int_t GetEntries() const {if (fResHistoTPCTOF[0]) return fResHistoTPCITS[0]->GetEntries(); else return 0;}
b9ab8e40 98
99 void SetCutTracks(Int_t maxTracks) { fCutTracks = maxTracks; } // set maximal number of tracks
100 Int_t GetCutTracks() const { return fCutTracks; } // retun maximal number of tracks
101
c6c14e33 102 static Double_t fgResHistoMergeCut;
103 static void SetResHistoMergeCut(Double_t d) {fgResHistoMergeCut=d;}
b9ab8e40 104
00ec4542 105protected:
da6c0bc9 106 void ResetCurrent(); // reset current values
660f0543 107 Int_t fMemoryMode; // 0 -do not fill THnSparse with residuals 1- fill only important QA THn 2 - Fill all THnsparse for calibration
da6c0bc9 108 AliTPCcalibLaser * fLaser; //! laser calibration
109 //
110 // current information
111 //
112 Float_t fDz; //! current delta z
da6c0bc9 113
c74c5f6c 114 // cuts
115 //
116 Float_t fCutMaxD; // maximal distance in rfi ditection
74235403 117 Float_t fCutMaxDz; // maximal distance in z ditection
c74c5f6c 118 Float_t fCutTheta; // maximal distance in theta ditection
119 Float_t fCutMinDir; // direction vector products
74235403 120 Int_t fCutTracks; // maximal number of tracks
c74c5f6c 121
c74c5f6c 122
e0ef0ad7 123 TH1F* fCosmiMatchingHisto[10]; // cosmic matching histogram
391ffdb2 124 //
125 // distortion maps
126 //
b9908d0b 127 THnSparse* fResHistoTPCCE[5]; //TPC-TPCE matching map
391ffdb2 128 THnSparse* fResHistoTPCITS[5]; //TPC-ITS matching map
129 THnSparse* fResHistoTPCvertex[5]; //TPC-ITS vertex matching map
130 THnSparse* fResHistoTPCTRD[5]; //TPC-TRD matching map
0b736a46 131 THnSparse* fResHistoTPCTOF[5]; //TPC-TRD matching map
2be25cc9 132 // laser histo
74235403 133 THnSparse * fHistVdriftLaserA[3]; //Histograms for V drift from laser
134 THnSparse * fHistVdriftLaserC[3]; //Histograms for V drift from laser
97d3fea0 135 TObjArray *fArrayLaserA; //Object array of driftvelocity laserA
136 TObjArray *fArrayLaserC; //Object array of driftvelocity laserC
70036ef3 137 //
138 // TPC vertex A side C side histo
139 //
b1fea14f 140 THnSparse * fTPCVertex[12]; // TPC vertex histograms A side c side - A+C -ESD
141 THnSparse * fTPCVertexCorrelation[5]; // TPC vertex correlation A side C side with TPC vertex and ITS vertex
2be25cc9 142 // DELTA Z histo
dde68d36 143 TObjArray* fArrayDz; // array of DZ histograms for different triggers
817766d5 144 TObjArray* fAlignITSTPC; // alignemnt array ITS TPC match
145 TObjArray* fAlignTRDTPC; // alignemnt array TRD TPC match
146 TObjArray* fAlignTOFTPC; // alignemnt array TOF TPC match
97d3fea0 147 Int_t fTimeKalmanBin; // width of Kalman bin - time in seconds
74235403 148 Int_t fTimeBins; //Bins time
149 Double_t fTimeStart; //Start time
150 Double_t fTimeEnd; //End time
151 Int_t fPtBins; //Bins pt
152 Double_t fPtStart; //Start pt
153 Double_t fPtEnd; //End pt
154 Int_t fVdriftBins; //Bins vdrift
155 Double_t fVdriftStart; //Start vdrift
156 Double_t fVdriftEnd; //End vdrift
157 Int_t fRunBins; //Bins run
158 Double_t fRunStart; //Start run
159 Double_t fRunEnd; //End run
160 Int_t fBinsVdrift[4]; //Bins for vdrift
161 Double_t fXminVdrift[4]; //Xmax for vdrift
162 Double_t fXmaxVdrift[4]; //Xmin for vdrift
00ec4542 163
164private:
165 AliTPCcalibTime(const AliTPCcalibTime&);
166 AliTPCcalibTime& operator=(const AliTPCcalibTime&);
167
b1fea14f 168 ClassDef(AliTPCcalibTime, 10);
c74c5f6c 169};
170
171#endif
172
173