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