]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDPreprocessorOffline.h
Small update for the status code (Raphaelle)
[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"
81a5aeca 14#include "AliTRDCalChamberStatus.h"
b3fcfd96 15class TObjArray;
01239968 16class AliTRDCalDet;
b3fcfd96 17class TH2I;
18class TProfile2D;
19class AliTRDCalibraVdriftLinearFit;
20class TH1I;
21class TH2F;
01239968 22class TString;
b3fcfd96 23
24
25class AliTRDPreprocessorOffline:public TNamed {
26public:
27 enum{
28 kGain = 0,
29 kVdriftPHDet = 1,
30 kVdriftPHPad = 2,
31 kT0PHDet = 3,
32 kT0PHPad = 4,
33 kVdriftLinear = 5,
34 kLorentzLinear = 6,
a5dcf618 35 kChamberStatus = 7,
36 kPRF = 8
b3fcfd96 37 };
38
39 AliTRDPreprocessorOffline();
40 virtual ~AliTRDPreprocessorOffline();
41
42 void SetLinearFitForVdrift(Bool_t methodsecond) { fMethodSecond = methodsecond;};
43 Bool_t GetLinearFitForVdrift() const { return fMethodSecond;};
01239968 44 void SetNameList(TString nameList) { fNameList = nameList;};
45 TString GetNameList() const { return fNameList;};
46 void SetCalDetGain(AliTRDCalDet *calDetGainUsed) {fCalDetGainUsed = calDetGainUsed;};
4c865c34 47 void SetCalDetVdrift(AliTRDCalDet *calDetVdriftUsed) {fCalDetVdriftUsed = calDetVdriftUsed;};
008817a3 48 void SetSwitchOnValidation(Bool_t switchOnValidation) {fSwitchOnValidation = switchOnValidation;};
01239968 49 AliTRDCalDet *GetCalDetGain() const { return fCalDetGainUsed;};
4c865c34 50 AliTRDCalDet *GetCalDetVdrift() const { return fCalDetVdriftUsed;};
b3fcfd96 51
4c865c34 52 Bool_t Init(const Char_t* fileName);
53
b3fcfd96 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="");
a5dcf618 57 void CalibChamberStatus(Int_t startRunNumber, Int_t endRunNumber, TString ocdbStorage="");
81a5aeca 58
b3fcfd96 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();
a5dcf618 67 Bool_t AnalyzePRF();
68 Bool_t AnalyzeChamberStatus();
b3fcfd96 69
01239968 70 void CorrectFromDetGainUsed();
4c865c34 71 void CorrectFromDetVdriftUsed();
a5dcf618 72
b3fcfd96 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);
a5dcf618 77 void UpdateOCDBChamberStatus(Int_t startRunNumber, Int_t endRunNumber, const Char_t *storagePath);
b3fcfd96 78
54f2ff1c 79 Bool_t ValidateGain();
00d203b6 80 Bool_t ValidateVdrift();
81 Bool_t ValidateT0();
82 Bool_t ValidatePRF() const;
a5dcf618 83 Bool_t ValidateChamberStatus() const;
00d203b6 84
54f2ff1c 85 Int_t GetStatus() const { return fStatus; }
4c865c34 86 Int_t GetVersionGainUsed() const { return fVersionGainUsed; }
87 Int_t GetSubVersionGainUsed() const { return fSubVersionGainUsed; }
ca7e6e64 88 Int_t GetFirstRunVdriftUsed() const { return fFirstRunVdriftUsed; }
4c865c34 89 Int_t GetVersionVdriftUsed() const { return fVersionVdriftUsed; }
90 Int_t GetSubVersionVdriftUsed() const { return fSubVersionVdriftUsed; }
a2a4ec8e 91
92 void SetMinStatsVdriftT0PH(Int_t minStatsVdriftT0PH) { fMinStatsVdriftT0PH = minStatsVdriftT0PH; }
93 void SetMinStatsVdriftLinear(Int_t minStatsVdriftLinear) { fMinStatsVdriftLinear = minStatsVdriftLinear; }
94 void SetMinStatsGain(Int_t minStatsGain) { fMinStatsGain = minStatsGain; }
95 void SetMinStatsPRF(Int_t minStatsPRF) { fMinStatsPRF = minStatsPRF; }
54f2ff1c 96 void SetBackCorrectGain(Bool_t backCorrectGain) { fBackCorrectGain = backCorrectGain; }
97 void SetBackCorrectVdrift(Bool_t backCorrectVdrift) { fBackCorrectVdrift = backCorrectVdrift; }
81a5aeca 98
a5dcf618 99
4c865c34 100
101 private:
81a5aeca 102 Bool_t fMethodSecond; // Second Method for drift velocity
103 TString fNameList; // Name of the list
104 AliTRDCalDet *fCalDetGainUsed; // CalDet used and to be corrected for
105 AliTRDCalDet *fCalDetVdriftUsed; // CalDet used and to be corrected for
106 TH2I *fCH2d; // Gain
107 TProfile2D *fPH2d; // Drift velocity first method
108 TProfile2D *fPRF2d; // PRF
b3fcfd96 109 AliTRDCalibraVdriftLinearFit *fAliTRDCalibraVdriftLinearFit; // Drift velocity second method
110 TH1I *fNEvents; // Number of events
111 TH2F *fAbsoluteGain; // Absolute Gain calibration
112 TObjArray * fPlots; // array with some plots to check
113 TObjArray * fCalibObjects; // array with calibration objects
4c865c34 114 Int_t fVersionGainUsed; // VersionGainUsed
115 Int_t fSubVersionGainUsed; // SubVersionGainUsed
ca7e6e64 116 Int_t fFirstRunVdriftUsed; // FirstRunVdrift
4c865c34 117 Int_t fVersionVdriftUsed; // VersionVdriftUsed
118 Int_t fSubVersionVdriftUsed; // SubVersionVdriftUsed
00d203b6 119 Bool_t fSwitchOnValidation; // Validation
120 Bool_t fVdriftValidated; // Vdrift validation
121 Bool_t fT0Validated; // T0 validation
a2a4ec8e 122 Int_t fMinStatsVdriftT0PH; // MinStats VdriftT0
123 Int_t fMinStatsVdriftLinear; // MinStats Vdrift Linear
124 Int_t fMinStatsGain; // MinStats Gain
125 Int_t fMinStatsPRF; // MinStats PRF
54f2ff1c 126 Bool_t fBackCorrectGain; // Back correction afterwards gain
127 Bool_t fBackCorrectVdrift; // Back correction afterwards vdrift
128 Bool_t fNotEnoughStatisticsForTheGain;// Take the chamber per chamber distribution from the default distribution
129 Bool_t fNotEnoughStatisticsForTheVdriftLinear;// Take the chamber per chamber distribution from the default distribution
130 Int_t fStatus; // Status of the TRD offline preprocessor: -1 nothing but do not worry; 0 everything ok; 1 not enough stat vdrift, 2 not enough stat to, 3 not enough stat gain and chammber status, 4 not enough stat vdrift but could put a mean, 5 not enough stat gain but could put a mean
a2a4ec8e 131
b3fcfd96 132
4c865c34 133 Int_t GetSubVersion(TString name) const;
134 Int_t GetVersion(TString name) const;
ca7e6e64 135 Int_t GetFirstRun(TString name) const;
b3fcfd96 136
137
138
139private:
140 AliTRDPreprocessorOffline& operator=(const AliTRDPreprocessorOffline&); // not implemented
141 AliTRDPreprocessorOffline(const AliTRDPreprocessorOffline&); // not implemented
54f2ff1c 142 ClassDef(AliTRDPreprocessorOffline,2)
b3fcfd96 143};
144
145#endif
01239968 146
a5dcf618 147