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