Macro for calculating the mean pt in the bin (AndreaR)
[u/mrichter/AliRoot.git] / TRD / AliTRDPreprocessorOffline.h
CommitLineData
b3fcfd96 1#ifndef ALITRDPREPROCESSOROFFLINE_H
2#define ALITRDPREPROCESSOROFFLINE_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"
14class TObjArray;
01239968 15class AliTRDCalDet;
b3fcfd96 16class TH2I;
17class TProfile2D;
18class AliTRDCalibraVdriftLinearFit;
19class TH1I;
20class TH2F;
01239968 21class TString;
b3fcfd96 22
23
24class AliTRDPreprocessorOffline:public TNamed {
25public:
26 enum{
27 kGain = 0,
28 kVdriftPHDet = 1,
29 kVdriftPHPad = 2,
30 kT0PHDet = 3,
31 kT0PHPad = 4,
32 kVdriftLinear = 5,
33 kLorentzLinear = 6,
34 kPRF = 7
35 };
36
37 AliTRDPreprocessorOffline();
38 virtual ~AliTRDPreprocessorOffline();
39
40 void SetLinearFitForVdrift(Bool_t methodsecond) { fMethodSecond = methodsecond;};
41 Bool_t GetLinearFitForVdrift() const { return fMethodSecond;};
01239968 42 void SetNameList(TString nameList) { fNameList = nameList;};
43 TString GetNameList() const { return fNameList;};
44 void SetCalDetGain(AliTRDCalDet *calDetGainUsed) {fCalDetGainUsed = calDetGainUsed;};
4c865c34 45 void SetCalDetVdrift(AliTRDCalDet *calDetVdriftUsed) {fCalDetVdriftUsed = calDetVdriftUsed;};
008817a3 46 void SetSwitchOnValidation(Bool_t switchOnValidation) {fSwitchOnValidation = switchOnValidation;};
01239968 47 AliTRDCalDet *GetCalDetGain() const { return fCalDetGainUsed;};
4c865c34 48 AliTRDCalDet *GetCalDetVdrift() const { return fCalDetVdriftUsed;};
b3fcfd96 49
4c865c34 50 Bool_t Init(const Char_t* fileName);
51
b3fcfd96 52 void CalibVdriftT0(const Char_t* file, Int_t startRunNumber, Int_t endRunNumber, TString ocdbStorage="");
53 void CalibGain(const Char_t* file, Int_t startRunNumber, Int_t endRunNumber, TString ocdbStorage="");
54 void CalibPRF(const Char_t* file, Int_t startRunNumber, Int_t endRunNumber, TString ocdbStorage="");
55
56 Bool_t ReadGainGlobal(const Char_t* fileName="CalibObjects.root");
57 Bool_t ReadVdriftT0Global(const Char_t* fileName="CalibObjects.root");
58 Bool_t ReadVdriftLinearFitGlobal(const Char_t* fileName="CalibObjects.root");
59 Bool_t ReadPRFGlobal(const Char_t* fileName="CalibObjects.root");
60
61 Bool_t AnalyzeGain();
62 Bool_t AnalyzeVdriftT0();
63 Bool_t AnalyzeVdriftLinearFit();
64 Bool_t AnalyzePRF();
65
01239968 66 void CorrectFromDetGainUsed();
4c865c34 67 void CorrectFromDetVdriftUsed();
01239968 68
b3fcfd96 69 void UpdateOCDBT0(Int_t startRunNumber, Int_t endRunNumber, const char* storagePath);
70 void UpdateOCDBVdrift(Int_t startRunNumber, Int_t endRunNumber, const char* storagePath);
71 void UpdateOCDBGain(Int_t startRunNumber, Int_t endRunNumber, const char* storagePath);
72 void UpdateOCDBPRF(Int_t startRunNumber, Int_t endRunNumber, const char* storagePath);
73
00d203b6 74 Bool_t ValidateGain() const;
75 Bool_t ValidateVdrift();
76 Bool_t ValidateT0();
77 Bool_t ValidatePRF() const;
78
4c865c34 79 Int_t GetVersionGainUsed() const { return fVersionGainUsed; }
80 Int_t GetSubVersionGainUsed() const { return fSubVersionGainUsed; }
81 Int_t GetVersionVdriftUsed() const { return fVersionVdriftUsed; }
82 Int_t GetSubVersionVdriftUsed() const { return fSubVersionVdriftUsed; }
a2a4ec8e 83
84 void SetMinStatsVdriftT0PH(Int_t minStatsVdriftT0PH) { fMinStatsVdriftT0PH = minStatsVdriftT0PH; }
85 void SetMinStatsVdriftLinear(Int_t minStatsVdriftLinear) { fMinStatsVdriftLinear = minStatsVdriftLinear; }
86 void SetMinStatsGain(Int_t minStatsGain) { fMinStatsGain = minStatsGain; }
87 void SetMinStatsPRF(Int_t minStatsPRF) { fMinStatsPRF = minStatsPRF; }
4c865c34 88
89 private:
b3fcfd96 90 Bool_t fMethodSecond; // Second Method for drift velocity
01239968 91 TString fNameList; // Name of the list
92 AliTRDCalDet *fCalDetGainUsed; // CalDet used and to be corrected for
4c865c34 93 AliTRDCalDet *fCalDetVdriftUsed; // CalDet used and to be corrected for
b3fcfd96 94 TH2I *fCH2d; // Gain
95 TProfile2D *fPH2d; // Drift velocity first method
96 TProfile2D *fPRF2d; // PRF
97 AliTRDCalibraVdriftLinearFit *fAliTRDCalibraVdriftLinearFit; // Drift velocity second method
98 TH1I *fNEvents; // Number of events
99 TH2F *fAbsoluteGain; // Absolute Gain calibration
100 TObjArray * fPlots; // array with some plots to check
101 TObjArray * fCalibObjects; // array with calibration objects
4c865c34 102 Int_t fVersionGainUsed; // VersionGainUsed
103 Int_t fSubVersionGainUsed; // SubVersionGainUsed
104 Int_t fVersionVdriftUsed; // VersionVdriftUsed
105 Int_t fSubVersionVdriftUsed; // SubVersionVdriftUsed
00d203b6 106 Bool_t fSwitchOnValidation; // Validation
107 Bool_t fVdriftValidated; // Vdrift validation
108 Bool_t fT0Validated; // T0 validation
a2a4ec8e 109 Int_t fMinStatsVdriftT0PH; // MinStats VdriftT0
110 Int_t fMinStatsVdriftLinear; // MinStats Vdrift Linear
111 Int_t fMinStatsGain; // MinStats Gain
112 Int_t fMinStatsPRF; // MinStats PRF
113
b3fcfd96 114
4c865c34 115 Int_t GetSubVersion(TString name) const;
116 Int_t GetVersion(TString name) const;
b3fcfd96 117
118
119
120private:
121 AliTRDPreprocessorOffline& operator=(const AliTRDPreprocessorOffline&); // not implemented
122 AliTRDPreprocessorOffline(const AliTRDPreprocessorOffline&); // not implemented
123 ClassDef(AliTRDPreprocessorOffline,1)
124};
125
126#endif
01239968 127