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