]>
Commit | Line | Data |
---|---|---|
b2dc316d | 1 | #ifndef ALITRDCLUSTERRESOLUTION_H |
2 | #define ALITRDCLUSTERRESOLUTION_H | |
3 | ||
4 | ||
5 | #ifndef ALITRDRECOTASK_H | |
6 | #include "AliTRDrecoTask.h" | |
7 | #endif | |
8 | ||
f2231ce8 | 9 | class TCanvas; |
b2dc316d | 10 | class TObjArray; |
fc0946a7 | 11 | class TAxis; |
b2dc316d | 12 | class AliTRDclusterResolution : public AliTRDrecoTask |
13 | { | |
14 | public: | |
9462866a | 15 | enum EAxisBinning { // bins in z and x direction |
dad4c5fc | 16 | kNTB = 24 |
17 | ,kND = 25 | |
18 | ,kN = kND*kNTB | |
fc0946a7 | 19 | }; |
6fc46cba | 20 | enum EResultContainer { // results container type |
1fd9389f | 21 | kCenter = 0 // cluster2center pad calibration |
22 | ,kQRes = 1 // resolution on charge dependence | |
23 | ,kSigm = 2 // sigma cluster as func of x and z | |
24 | ,kMean = 3 // shift cluster as func of x and z | |
25 | ,kNtasks = 4 // total number os sub tasks | |
b2dc316d | 26 | }; |
9462866a | 27 | enum ECheckBits { // force setting the ExB |
ec3f0161 | 28 | kSaveAs = BIT(22) |
29 | ,kExB = BIT(23) | |
f2231ce8 | 30 | }; |
eb0b16c1 | 31 | AliTRDclusterResolution(const char *name="ClErrParam", const char *title="Cluster error monitor"); |
b2dc316d | 32 | virtual ~AliTRDclusterResolution(); |
33 | ||
ec3f0161 | 34 | void ConnectInputData(Option_t *); |
35 | void CreateOutputObjects(); | |
36 | void Exec(Option_t *); | |
37 | Int_t GetDetector() const { return fDet; } | |
6bc4a8f4 | 38 | inline Float_t GetExB() const; |
9462866a | 39 | inline Float_t GetVdrift() const; |
ec3f0161 | 40 | Bool_t GetRefFigure(Int_t ifig); |
41 | Bool_t HasProcess(EResultContainer bit) const {return TESTBIT(fStatus, bit);} | |
42 | Bool_t HasExB() const { return TestBit(kExB);} | |
43 | ||
44 | TObjArray* Histos(); | |
dad4c5fc | 45 | TObjArray* Results() const {return fResults;}; |
ec3f0161 | 46 | |
47 | Bool_t IsVisual() const {return Bool_t(fCanvas);} | |
48 | Bool_t IsSaveAs() const {return TestBit(kSaveAs);} | |
49 | ||
50 | Bool_t PostProcess(); | |
51 | Bool_t SetExB(Int_t det=-1, Int_t c = 70, Int_t r = 7); | |
52 | void SetVisual(); | |
53 | void SetProcess(EResultContainer bit, Bool_t v = kTRUE) {v ? SETBIT(fStatus, bit) : CLRBIT(fStatus, bit);} | |
54 | void SetSaveAs(Bool_t v = kTRUE) {SetBit(kSaveAs, v);} | |
55 | inline void ResetProcess(); | |
f2231ce8 | 56 | |
b2dc316d | 57 | void Terminate(Option_t *){}; |
fc0946a7 | 58 | |
9462866a | 59 | protected: |
60 | void ProcessCharge(); | |
61 | void ProcessCenterPad(); | |
62 | void ProcessSigma(); | |
63 | void ProcessMean(); | |
64 | ||
b2dc316d | 65 | private: |
66 | AliTRDclusterResolution(const AliTRDclusterResolution&); | |
67 | AliTRDclusterResolution& operator=(const AliTRDclusterResolution&); | |
68 | ||
f2231ce8 | 69 | TCanvas *fCanvas; //! visualization canvas |
70 | TObjArray *fInfo; //! list of cluster info | |
fc0946a7 | 71 | TObjArray *fResults;// list of result graphs/histos |
f2231ce8 | 72 | TAxis *fAt; //! binning in the x(radial) direction (time) |
f2231ce8 | 73 | UChar_t fStatus; // steer parameter of the task |
74 | Short_t fDet; // detector (-1 for all) | |
fc0946a7 | 75 | Float_t fExB; // tg of the Lorentz angle |
9462866a | 76 | Float_t fVdrift; // mean drift velocity |
ec3f0161 | 77 | static const Float_t fgkTimeBinLength;// time bin length (invers of sampling frequency) |
b2dc316d | 78 | |
dad4c5fc | 79 | // working named variables |
80 | UChar_t fLy; //! TRD plane | |
81 | Float_t fX; //! local drift length | |
82 | Float_t fY; //! local rphi offset | |
83 | Float_t fZ; //! local anode wire offset | |
1fd9389f | 84 | Float_t fR[4]; //! mean/sgm resolution |
85 | Float_t fP[4]; //! mean/sgm pulls | |
dad4c5fc | 86 | |
1fd9389f | 87 | ClassDef(AliTRDclusterResolution, 3) // cluster resolution |
b2dc316d | 88 | }; |
89 | ||
9462866a | 90 | //___________________________________________________ |
6bc4a8f4 | 91 | inline Float_t AliTRDclusterResolution::GetExB() const |
92 | { | |
93 | if(!HasExB()){ | |
94 | printf("WARNING :: ExB was not set. Use B=0.\n"); | |
95 | } | |
96 | return fExB; | |
97 | } | |
9462866a | 98 | |
99 | //___________________________________________________ | |
100 | inline Float_t AliTRDclusterResolution::GetVdrift() const | |
101 | { | |
102 | if(!HasExB()){ | |
103 | printf("WARNING :: ExB was not set. Use B=0.\n"); | |
104 | } | |
105 | return fVdrift; | |
106 | } | |
ec3f0161 | 107 | |
108 | //___________________________________________________ | |
109 | inline void AliTRDclusterResolution::ResetProcess() | |
110 | { | |
111 | CLRBIT(fStatus, kQRes); | |
112 | CLRBIT(fStatus, kCenter); | |
113 | CLRBIT(fStatus, kSigm); | |
114 | CLRBIT(fStatus, kMean); | |
115 | } | |
116 | ||
b2dc316d | 117 | #endif |
118 |