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