1 #ifndef ALITPCCALIBTIME_H
2 #define ALITPCCALIBTIME_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 Comments to be written here:
9 Time dependence of gain and drift velocity in order to account for changes in: temperature, pressure, gas composition.
13 #include "AliTPCcalibBase.h"
14 //#include "THnSparse.h" // Temporary
15 //#include "TH1D.h" // Temporary make code compiling for HLT in the
26 class AliTPCcalibLaser;
29 class AliESDfriendTrack;
31 class AliTPCcalibTime:public AliTPCcalibBase {
34 AliTPCcalibTime(const Text_t *name, const Text_t *title, UInt_t StartTime, UInt_t EndTime, Int_t deltaIntegrationTimeVdrift, Int_t memoryMode=2);
35 virtual ~AliTPCcalibTime();
37 virtual void Process(AliESDEvent *event);
38 virtual Long64_t Merge(TCollection *const li);
39 virtual void Analyze();
40 //static Bool_t IsLaser (const AliESDEvent *const event) const;
41 //static Bool_t IsCosmics (const AliESDEvent *const event) const;
42 //static Bool_t IsBeam (const AliESDEvent *const event) const;
43 void ProcessLaser (AliESDEvent *event);
44 void ProcessCosmic(const AliESDEvent *const event);
45 void ProcessBeam (const AliESDEvent *const event);
46 Bool_t IsPair(const AliExternalTrackParam *tr0, const AliExternalTrackParam *tr1);
47 Bool_t IsCross(const AliESDtrack *const tr0, const AliESDtrack *const tr1);
48 Bool_t IsSame (const AliESDtrack *const tr0, const AliESDtrack *const tr1);
49 void ProcessSame(const AliESDtrack *const track, AliESDfriendTrack *const friendTrack, const AliESDEvent *const event);
50 void ProcessAlignITS(AliESDtrack *const track, const AliESDfriendTrack *const friendTrack, const AliESDEvent *const event, AliESDfriend *const ESDfriend);
51 void ProcessAlignTRD(AliESDtrack* const track, const AliESDfriendTrack *const friendTrack);
52 void ProcessAlignTOF(AliESDtrack* const track, const AliESDfriendTrack *const friendTrack);
54 THnSparse* GetHistVdriftLaserA(Int_t index=1) const {return fHistVdriftLaserA[index];};
55 THnSparse* GetHistVdriftLaserC(Int_t index=1) const {return fHistVdriftLaserC[index];};
56 THnSparse* GetHistoDrift(const char* name) const;
57 TObjArray* GetHistoDrift() const;
58 TGraphErrors* GetGraphDrift(const char* name);
59 TObjArray* GetGraphDrift();
60 AliSplineFit* GetFitDrift(const char* name);
61 // TObjArray* GetFitDrift();
62 TH1F* GetCosmiMatchingHisto(Int_t index=0) const {return fCosmiMatchingHisto[index];};
63 void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
64 void Process(AliTPCseed *track){return AliTPCcalibBase::Process(track);}
65 TObjArray* GetAlignITSTPC() const {return fAlignITSTPC;} // alignemnt array ITS TPC match
66 TObjArray* GetAlignTRDTPC() const {return fAlignTRDTPC;} // alignemnt array TRD TPC match
67 TObjArray* GetAlignTOFTPC() const {return fAlignTOFTPC;} // alignemnt array TOF TPC match
69 THnSparse * GetTPCVertexHisto(Int_t index) const { return fTPCVertex[index%12];}
70 THnSparse * GetTPCVertexHistoCorrelation(Int_t index) const { return fTPCVertexCorrelation[index%5];}
72 THnSparse* GetResHistoTPCCE(Int_t index) const { return (index<5) ? fResHistoTPCCE[index]:0;} //TPC-CE matching map
73 THnSparse* GetResHistoTPCITS(Int_t index) const { return (index<5) ? fResHistoTPCITS[index]:0;} //TPC-ITS matching map
74 THnSparse* GetResHistoTPCvertex(Int_t index) const { return (index<5) ? fResHistoTPCvertex[index] :0;} //TPC vertex matching map
75 THnSparse* GetResHistoTPCTRD(Int_t index) const { return (index<5) ? fResHistoTPCTRD[index]:0;} //TPC-TRD matching map
76 THnSparse* GetResHistoTPCTOF(Int_t index) const { return (index<5) ? fResHistoTPCTOF[index]:0;} //TPC-TOF matching map
78 void BookDistortionMaps(); // book histograms
79 void FillResHistoTPCCE(const AliExternalTrackParam * pTPCIn, const AliExternalTrackParam * pTPCOut ); // fill residual histo
80 void FillResHistoTPCITS(const AliExternalTrackParam * pTPCIn, const AliExternalTrackParam * pITSOut ); // fill residual histo
81 void FillResHistoTPC(const AliESDtrack * pTrack);
82 void FillResHistoTPCTRD(const AliExternalTrackParam * pTPCOut, const AliExternalTrackParam * pTRDIn );
83 void FillResHistoTPCTOF(const AliExternalTrackParam * pTPCOut, const AliExternalTrackParam * pTOFIn );
85 TObjArray * GetLaserArrayA() const { return fArrayLaserA;}
86 TObjArray * GetLaserArrayC() const { return fArrayLaserC;}
89 void SetCutTracks(Int_t maxTracks) { fCutTracks = maxTracks; } // set maximal number of tracks
90 Int_t GetCutTracks() const { return fCutTracks; } // retun maximal number of tracks
95 void ResetCurrent(); // reset current values
96 Int_t fMemoryMode; // 0 -do not fill THnSparse with residuals 1- fill only important QA THn 2 - Fill all THnsparse for calibration
97 AliTPCcalibLaser * fLaser; //! laser calibration
99 // current information
101 Float_t fDz; //! current delta z
105 Float_t fCutMaxD; // maximal distance in rfi ditection
106 Float_t fCutMaxDz; // maximal distance in z ditection
107 Float_t fCutTheta; // maximal distance in theta ditection
108 Float_t fCutMinDir; // direction vector products
109 Int_t fCutTracks; // maximal number of tracks
112 TH1F* fCosmiMatchingHisto[10]; // cosmic matching histogram
116 THnSparse* fResHistoTPCCE[5]; //TPC-TPCE matching map
117 THnSparse* fResHistoTPCITS[5]; //TPC-ITS matching map
118 THnSparse* fResHistoTPCvertex[5]; //TPC-ITS vertex matching map
119 THnSparse* fResHistoTPCTRD[5]; //TPC-TRD matching map
120 THnSparse* fResHistoTPCTOF[5]; //TPC-TRD matching map
122 THnSparse * fHistVdriftLaserA[3]; //Histograms for V drift from laser
123 THnSparse * fHistVdriftLaserC[3]; //Histograms for V drift from laser
124 TObjArray *fArrayLaserA; //Object array of driftvelocity laserA
125 TObjArray *fArrayLaserC; //Object array of driftvelocity laserC
127 // TPC vertex A side C side histo
129 THnSparse * fTPCVertex[12]; // TPC vertex histograms A side c side - A+C -ESD
130 THnSparse * fTPCVertexCorrelation[5]; // TPC vertex correlation A side C side with TPC vertex and ITS vertex
132 TObjArray* fArrayDz; // array of DZ histograms for different triggers
133 TObjArray* fAlignITSTPC; // alignemnt array ITS TPC match
134 TObjArray* fAlignTRDTPC; // alignemnt array TRD TPC match
135 TObjArray* fAlignTOFTPC; // alignemnt array TOF TPC match
136 Int_t fTimeKalmanBin; // width of Kalman bin - time in seconds
137 Int_t fTimeBins; //Bins time
138 Double_t fTimeStart; //Start time
139 Double_t fTimeEnd; //End time
140 Int_t fPtBins; //Bins pt
141 Double_t fPtStart; //Start pt
142 Double_t fPtEnd; //End pt
143 Int_t fVdriftBins; //Bins vdrift
144 Double_t fVdriftStart; //Start vdrift
145 Double_t fVdriftEnd; //End vdrift
146 Int_t fRunBins; //Bins run
147 Double_t fRunStart; //Start run
148 Double_t fRunEnd; //End run
149 Int_t fBinsVdrift[4]; //Bins for vdrift
150 Double_t fXminVdrift[4]; //Xmax for vdrift
151 Double_t fXmaxVdrift[4]; //Xmin for vdrift
154 AliTPCcalibTime(const AliTPCcalibTime&);
155 AliTPCcalibTime& operator=(const AliTPCcalibTime&);
157 ClassDef(AliTPCcalibTime, 10);