]>
Commit | Line | Data |
---|---|---|
1ee39b3a | 1 | #ifndef ALITRDCLUSTERRESOLUTION_H |
2 | #define ALITRDCLUSTERRESOLUTION_H | |
3 | ||
4 | /////////////////////////////////////////////////////////////////////////////// | |
5 | // // | |
6 | // TRD cluster error parameterization | |
7 | // Authors: // | |
8 | // Alexandru Bercuci <A.Bercuci@gsi.de> // | |
9 | //////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef ALITRDRECOTASK_H | |
12 | #include "AliTRDrecoTask.h" | |
13 | #endif | |
64d57299 | 14 | #ifndef ALILOG_H |
e3147647 | 15 | #include "AliLog.h" |
64d57299 | 16 | #endif |
1ee39b3a | 17 | |
18 | class TCanvas; | |
19 | class TObjArray; | |
1ee39b3a | 20 | class AliTRDclusterResolution : public AliTRDrecoTask |
21 | { | |
22 | public: | |
23 | enum EAxisBinning { // bins in z and x direction | |
56f313bd | 24 | kND = 1 |
1ee39b3a | 25 | }; |
26 | enum EResultContainer { // results container type | |
ebc01dc0 | 27 | kYSys = 0 // cluster2center pad calibration |
28 | ,kYRes = 1 // resolution on charge dependence | |
1ee39b3a | 29 | ,kSigm = 2 // sigma cluster as func of x and z |
30 | ,kMean = 3 // shift cluster as func of x and z | |
56f313bd | 31 | ,kNtasks = 4 // total number of subtasks |
1ee39b3a | 32 | }; |
56f313bd | 33 | enum ECalibrationParam { // calibration parameters to be used from OCDB |
34 | kVdrift = 0 | |
35 | ,kT0 = 1 | |
36 | ,kGain = 2 | |
37 | }; | |
38 | enum ECheckBits { | |
e3147647 | 39 | kSaveAs = BIT(22) // save intermediary results |
40 | ,kCalibrated = BIT(23) // load calibration | |
1ee39b3a | 41 | }; |
f8f46e4d | 42 | AliTRDclusterResolution(); |
705f8b0a | 43 | AliTRDclusterResolution(const char *name); |
1ee39b3a | 44 | virtual ~AliTRDclusterResolution(); |
45 | ||
f8f46e4d | 46 | void UserCreateOutputObjects(); |
47 | void UserExec(Option_t *); | |
1ee39b3a | 48 | Int_t GetDetector() const { return fDet; } |
801d4d50 | 49 | void GetPad(Int_t &c, Int_t &r) const { c=fCol, r=fRow; return;} |
1ee39b3a | 50 | inline Float_t GetExB() const; |
51 | inline Float_t GetVdrift() const; | |
801d4d50 | 52 | inline Float_t GetT0() const; |
e3147647 | 53 | inline Float_t GetGain() const; |
563d1b38 | 54 | Float_t GetDyRange() const {return fDyRange;} |
1ee39b3a | 55 | Bool_t GetRefFigure(Int_t ifig); |
56f313bd | 56 | Bool_t HasProcess(EResultContainer bit) const {return TESTBIT(fSubTaskMap, bit);} |
e3147647 | 57 | Bool_t IsCalibrated() const { return TestBit(kCalibrated);} |
56f313bd | 58 | Bool_t IsUsingCalibParam(ECalibrationParam par) const {return TESTBIT(fUseCalib, par);} |
1ee39b3a | 59 | |
60 | TObjArray* Histos(); | |
61 | TObjArray* Results() const {return fResults;}; | |
62 | ||
63 | Bool_t IsVisual() const {return Bool_t(fCanvas);} | |
64 | Bool_t IsSaveAs() const {return TestBit(kSaveAs);} | |
65 | ||
66 | Bool_t PostProcess(); | |
801d4d50 | 67 | void SetCalibrationRegion(Int_t det, Int_t col=-1, Int_t row=-1); |
1ee39b3a | 68 | void SetVisual(); |
563d1b38 | 69 | void SetDyRange(Float_t dy) {if(dy>0) fDyRange = dy;} |
56f313bd | 70 | void SetProcess(EResultContainer bit, Bool_t v = kTRUE) {v ? SETBIT(fSubTaskMap, bit) : CLRBIT(fSubTaskMap, bit);} |
1ee39b3a | 71 | void SetSaveAs(Bool_t v = kTRUE) {SetBit(kSaveAs, v);} |
56f313bd | 72 | void SetUseCalibParam(ECalibrationParam par, Bool_t v = kTRUE) {v ? SETBIT(fUseCalib, par) : CLRBIT(fUseCalib, par);} |
5935a6da | 73 | inline void ResetProcesses(); |
1ee39b3a | 74 | |
75 | protected: | |
76 | void ProcessCharge(); | |
77 | void ProcessCenterPad(); | |
78 | void ProcessSigma(); | |
79 | void ProcessMean(); | |
80 | ||
81 | private: | |
82 | AliTRDclusterResolution(const AliTRDclusterResolution&); | |
83 | AliTRDclusterResolution& operator=(const AliTRDclusterResolution&); | |
e3147647 | 84 | Bool_t LoadCalibration(); |
1ee39b3a | 85 | |
86 | TCanvas *fCanvas; //! visualization canvas | |
87 | TObjArray *fInfo; //! list of cluster info | |
5935a6da | 88 | TObjArray *fResults;// list of result graphs/histos/trees |
56f313bd | 89 | UChar_t fSubTaskMap; // steer map for subtasks |
90 | UChar_t fUseCalib; // steer map for calibration params | |
1ee39b3a | 91 | Short_t fDet; // detector (-1 for all) |
801d4d50 | 92 | Char_t fCol; // pad column (-1 for all) |
93 | Char_t fRow; // pad row (-1 for all) | |
1ee39b3a | 94 | Float_t fExB; // tg of the Lorentz angle |
95 | Float_t fVdrift; // mean drift velocity | |
5935a6da | 96 | Float_t fT0; // time 0 |
e3147647 | 97 | Float_t fGain; // gain |
1ee39b3a | 98 | static const Float_t fgkTimeBinLength;// time bin length (invers of sampling frequency) |
99 | ||
100 | // working named variables | |
563d1b38 | 101 | Float_t fDyRange; // min/max dy |
5935a6da | 102 | UChar_t fLy; // TRD plane |
103 | Float_t fT; // calibrated time | |
104 | Float_t fX; // local drift length | |
105 | Float_t fY; // local rphi offset | |
106 | Float_t fZ; // local anode wire offset | |
107 | Float_t fR[4]; // mean/sgm resolution | |
108 | Float_t fP[4]; // mean/sgm pulls | |
1ee39b3a | 109 | |
56f313bd | 110 | ClassDef(AliTRDclusterResolution, 5) // cluster resolution |
1ee39b3a | 111 | }; |
112 | ||
113 | //___________________________________________________ | |
114 | inline Float_t AliTRDclusterResolution::GetExB() const | |
115 | { | |
e3147647 | 116 | if(!IsCalibrated()) AliWarning("Instance not calibrated."); |
1ee39b3a | 117 | return fExB; |
118 | } | |
119 | ||
120 | //___________________________________________________ | |
121 | inline Float_t AliTRDclusterResolution::GetVdrift() const | |
122 | { | |
e3147647 | 123 | if(!IsCalibrated()) AliWarning("Instance not calibrated."); |
1ee39b3a | 124 | return fVdrift; |
125 | } | |
126 | ||
801d4d50 | 127 | //___________________________________________________ |
128 | inline Float_t AliTRDclusterResolution::GetT0() const | |
e3147647 | 129 | { |
130 | if(!IsCalibrated()) AliWarning("Instance not calibrated."); | |
801d4d50 | 131 | return fT0; |
132 | } | |
133 | ||
e3147647 | 134 | //___________________________________________________ |
135 | inline Float_t AliTRDclusterResolution::GetGain() const | |
136 | { | |
137 | if(!IsCalibrated()) AliWarning("Instance not calibrated."); | |
138 | return fGain; | |
139 | } | |
140 | ||
1ee39b3a | 141 | //___________________________________________________ |
5935a6da | 142 | inline void AliTRDclusterResolution::ResetProcesses() |
1ee39b3a | 143 | { |
ebc01dc0 | 144 | CLRBIT(fSubTaskMap, kYRes); |
145 | CLRBIT(fSubTaskMap, kYSys); | |
56f313bd | 146 | CLRBIT(fSubTaskMap, kSigm); |
147 | CLRBIT(fSubTaskMap, kMean); | |
1ee39b3a | 148 | } |
149 | ||
150 | #endif | |
151 |