]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCPreprocessorOffline.h
- changes due to deletion of files
[u/mrichter/AliRoot.git] / TPC / AliTPCPreprocessorOffline.h
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
7 //
8 //
9 //    Class to create OCDB entries - processing the results of the OFFLINE calibration
10 //
11
12
13 #include "TNamed.h"
14 class TObjArray;
15 class AliTPCcalibTime;
16 class AliTPCcalibTimeGain;
17 class AliTPCROC;
18 class AliTPCParam;
19 class TPad;
20 class AliCDBRunRange;
21
22 class AliTPCPreprocessorOffline:public TNamed { 
23 public:
24   AliTPCPreprocessorOffline();
25   virtual ~AliTPCPreprocessorOffline();
26   void MakeAll(){;}
27   void UpdateOCDBDrift(Int_t ustartRun, Int_t uendRun, const char* storagePath);
28   void UpdateOCDBGain(Int_t  startRunNumber, Int_t endRunNumber, const char* storagePath);
29   void UpdateDriftParam(AliTPCParam *param, TObjArray *arr, Int_t startRun);
30
31   //
32   // v drift part
33   //
34   void GetRunRange(AliTPCcalibTime* timeDrift);
35   void CalibTimeVdrift(Char_t* file, Int_t ustartRun, Int_t uendRun,TString ocdbStorage="");
36   void AddHistoGraphs(  TObjArray * vdriftArray, AliTPCcalibTime *timeDrift, Int_t minEntries);
37   void AddAlignmentGraphs(  TObjArray * vdriftArray, AliTPCcalibTime *timeDrift);
38   void AddLaserGraphs(  TObjArray * vdriftArray, AliTPCcalibTime *timeDrift);
39   void SetDefaultGraphDrift(TGraph *graph, Int_t color, Int_t style);
40   void MakeDefaultPlots(TObjArray * arr, TObjArray *picArray);
41   //
42   // Gain part
43   //
44   void CalibTimeGain(Char_t* fileName, Int_t startRunNumber, Int_t endRunNumber,  TString  ocdbStorage);
45   void ReadGainGlobal(Char_t* fileName="CalibObjectsTrain1.root");
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); 
48   //
49   // QA drawing part
50   //
51   static void SetPadStyle(TPad *pad, Float_t mx0, Float_t mx1, Float_t my0, Float_t my1);
52   static void PrintArray(TObjArray *array);
53   //
54   // graph filtering part
55   //
56   static TGraphErrors* FilterGraphMedianAbs(TGraphErrors * graph, Float_t cut,Double_t &medianY);
57   static TGraphErrors* FilterGraphDrift(TGraphErrors * graph, Float_t errSigmaCut, Float_t medianCutAbs);
58   static TGraphErrors * MakeGraphFilter0(THnSparse *hisN, Int_t itime, Int_t ival, Int_t minEntries, Double_t offset=0);
59
60 public:
61   Int_t kMinEntries;                      // minimal number of entries for fit
62   Int_t startRun;                         // start Run - used to make fast selection in THnSparse
63   Int_t endRun;                           // end   Run - used to make fast selection in THnSparse
64   Int_t startTime;                        // startTime - used to make fast selection in THnSparse
65   Int_t endTime;                          // endTime   - used to make fast selection in THnSparse
66   TString  ocdbStorage;                   // path to the OCDB storage
67   TObjArray * fVdriftArray;
68   AliTPCcalibTime * fTimeDrift;
69   TGraphErrors * fGraphMIP;                // graph time dependence of MIP
70   TGraphErrors * fGraphCosmic;             // graph time dependence at Plateu
71   AliSplineFit * fFitMIP;                  // fit of dependence - MIP
72   AliSplineFit * fFitCosmic;               // fit of dependence - Plateu
73   TObjArray    * fGainArray;               // array to be stored in the OCDB
74   AliTPCcalibTimeGain * fGainMIP;          // calibration component for MIP
75   AliTPCcalibTimeGain * fGainCosmic;       // calibration component for cosmic
76
77 private:
78   AliTPCPreprocessorOffline& operator=(const AliTPCPreprocessorOffline&); // not implemented
79   AliTPCPreprocessorOffline(const AliTPCPreprocessorOffline&); // not implemented
80   ClassDef(AliTPCPreprocessorOffline,1)
81 };
82
83 #endif