]>
Commit | Line | Data |
---|---|---|
da268e11 | 1 | #ifndef ALITPCPREPROCESSOROFFLINE_H |
2 | #define ALITPCPREPROCESSOROFFLINE_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
f12abd89 | 7 | // |
da268e11 | 8 | // |
9 | // Class to create OCDB entries - processing the results of the OFFLINE calibration | |
f12abd89 | 10 | // |
11 | ||
da268e11 | 12 | |
13 | #include "TNamed.h" | |
14 | class TObjArray; | |
15 | class AliTPCcalibTime; | |
16 | class AliTPCcalibTimeGain; | |
17 | class AliTPCROC; | |
f12abd89 | 18 | class AliTPCParam; |
19 | class TPad; | |
20 | class AliCDBRunRange; | |
da268e11 | 21 | |
f12abd89 | 22 | class AliTPCPreprocessorOffline:public TNamed { |
da268e11 | 23 | public: |
24 | AliTPCPreprocessorOffline(); | |
25 | virtual ~AliTPCPreprocessorOffline(); | |
da268e11 | 26 | void UpdateOCDBDrift(Int_t ustartRun, Int_t uendRun, const char* storagePath); |
27 | void UpdateOCDBGain(Int_t startRunNumber, Int_t endRunNumber, const char* storagePath); | |
40120adc | 28 | void UpdateDriftParam(AliTPCParam *param, TObjArray *const arr, Int_t startRun); |
da268e11 | 29 | |
30 | // | |
31 | // v drift part | |
32 | // | |
40120adc | 33 | void GetRunRange(AliTPCcalibTime* const timeDrift); |
34 | void CalibTimeVdrift(const Char_t* file, Int_t ustartRun, Int_t uendRun,TString ocdbStorage=""); | |
35 | void AddHistoGraphs( TObjArray * vdriftArray, AliTPCcalibTime * const timeDrift, Int_t minEntries); | |
36 | void AddAlignmentGraphs( TObjArray * vdriftArray, AliTPCcalibTime * const timeDrift); | |
da268e11 | 37 | void AddLaserGraphs( TObjArray * vdriftArray, AliTPCcalibTime *timeDrift); |
38 | void SetDefaultGraphDrift(TGraph *graph, Int_t color, Int_t style); | |
40120adc | 39 | void MakeDefaultPlots(TObjArray * const arr, TObjArray *picArray); |
68d461b2 | 40 | Bool_t ValidateTimeDrift(Double_t maxVDriftCorr=0.03); |
da268e11 | 41 | // |
42 | // Gain part | |
43 | // | |
40120adc | 44 | void CalibTimeGain(const Char_t* fileName, Int_t startRunNumber, Int_t endRunNumber, TString ocdbStorage); |
45 | void ReadGainGlobal(const Char_t* fileName="CalibObjectsTrain1.root"); | |
da268e11 | 46 | void MakeQAPlot(Float_t FPtoMIPratio); |
47 | Bool_t AnalyzeGain(Int_t startRunNumber, Int_t endRunNumber, Int_t minEntriesGaussFit = 500, Float_t FPtoMIPratio = 1.43); | |
391ffdb2 | 48 | Bool_t AnalyzeAttachment(Int_t startRunNumber, Int_t endRunNumber, Int_t minEntriesFit = 2000); |
68d461b2 | 49 | Bool_t ValidateTimeGain(Double_t minGain=2.0, Double_t maxGain = 3.0); |
da268e11 | 50 | // |
51 | // QA drawing part | |
52 | // | |
53 | static void SetPadStyle(TPad *pad, Float_t mx0, Float_t mx1, Float_t my0, Float_t my1); | |
54 | static void PrintArray(TObjArray *array); | |
55 | // | |
56 | // graph filtering part | |
57 | // | |
58 | static TGraphErrors* FilterGraphMedianAbs(TGraphErrors * graph, Float_t cut,Double_t &medianY); | |
59 | static TGraphErrors* FilterGraphDrift(TGraphErrors * graph, Float_t errSigmaCut, Float_t medianCutAbs); | |
60 | static TGraphErrors * MakeGraphFilter0(THnSparse *hisN, Int_t itime, Int_t ival, Int_t minEntries, Double_t offset=0); | |
61 | ||
68d461b2 | 62 | // |
63 | void SwitchOnValidation(Bool_t val = kTRUE) {fSwitchOnValidation = val;} | |
64 | Bool_t IsSwitchOnValidation() { return fSwitchOnValidation; } | |
65 | ||
66 | ||
40120adc | 67 | private: |
68 | Int_t fMinEntries; // minimal number of entries for fit | |
da268e11 | 69 | Int_t startRun; // start Run - used to make fast selection in THnSparse |
70 | Int_t endRun; // end Run - used to make fast selection in THnSparse | |
71 | Int_t startTime; // startTime - used to make fast selection in THnSparse | |
72 | Int_t endTime; // endTime - used to make fast selection in THnSparse | |
73 | TString ocdbStorage; // path to the OCDB storage | |
40120adc | 74 | TObjArray * fVdriftArray; // array with output calibration graphs |
75 | AliTPCcalibTime * fTimeDrift; // input data to construct calibration graphs | |
da268e11 | 76 | TGraphErrors * fGraphMIP; // graph time dependence of MIP |
77 | TGraphErrors * fGraphCosmic; // graph time dependence at Plateu | |
391ffdb2 | 78 | TGraphErrors * fGraphAttachmentMIP; // graph time dependence of attachment (signal vs. mean driftlength) |
da268e11 | 79 | AliSplineFit * fFitMIP; // fit of dependence - MIP |
80 | AliSplineFit * fFitCosmic; // fit of dependence - Plateu | |
81 | TObjArray * fGainArray; // array to be stored in the OCDB | |
82 | AliTPCcalibTimeGain * fGainMIP; // calibration component for MIP | |
83 | AliTPCcalibTimeGain * fGainCosmic; // calibration component for cosmic | |
68d461b2 | 84 | |
85 | Bool_t fSwitchOnValidation; // flag to switch on validation of OCDB parameters | |
da268e11 | 86 | |
87 | private: | |
f12abd89 | 88 | AliTPCPreprocessorOffline& operator=(const AliTPCPreprocessorOffline&); // not implemented |
89 | AliTPCPreprocessorOffline(const AliTPCPreprocessorOffline&); // not implemented | |
da268e11 | 90 | ClassDef(AliTPCPreprocessorOffline,1) |
91 | }; | |
92 | ||
93 | #endif |