]>
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 |
16 | kNTB = 25 | |
ec3f0161 | 17 | ,kND = 5 |
18 | ,kN = kND*kNTB | |
fc0946a7 | 19 | }; |
6fc46cba | 20 | enum EResultContainer { // results container type |
9462866a | 21 | kQRes = 0 |
ec3f0161 | 22 | ,kCenter= 1 |
23 | ,kSigm = 2 | |
24 | ,kMean = 3 | |
b2dc316d | 25 | }; |
9462866a | 26 | enum ECheckBits { // force setting the ExB |
ec3f0161 | 27 | kSaveAs = BIT(22) |
28 | ,kExB = BIT(23) | |
f2231ce8 | 29 | }; |
6fc46cba | 30 | AliTRDclusterResolution(const char *name="ClErrParam"); |
b2dc316d | 31 | virtual ~AliTRDclusterResolution(); |
32 | ||
ec3f0161 | 33 | void ConnectInputData(Option_t *); |
34 | void CreateOutputObjects(); | |
35 | void Exec(Option_t *); | |
36 | Int_t GetDetector() const { return fDet; } | |
6bc4a8f4 | 37 | inline Float_t GetExB() const; |
9462866a | 38 | inline Float_t GetVdrift() const; |
ec3f0161 | 39 | Bool_t GetRefFigure(Int_t ifig); |
40 | Bool_t HasProcess(EResultContainer bit) const {return TESTBIT(fStatus, bit);} | |
41 | Bool_t HasExB() const { return TestBit(kExB);} | |
42 | ||
43 | TObjArray* Histos(); | |
44 | ||
45 | Bool_t IsVisual() const {return Bool_t(fCanvas);} | |
46 | Bool_t IsSaveAs() const {return TestBit(kSaveAs);} | |
47 | ||
48 | Bool_t PostProcess(); | |
49 | Bool_t SetExB(Int_t det=-1, Int_t c = 70, Int_t r = 7); | |
50 | void SetVisual(); | |
51 | void SetProcess(EResultContainer bit, Bool_t v = kTRUE) {v ? SETBIT(fStatus, bit) : CLRBIT(fStatus, bit);} | |
52 | void SetSaveAs(Bool_t v = kTRUE) {SetBit(kSaveAs, v);} | |
53 | inline void ResetProcess(); | |
f2231ce8 | 54 | |
b2dc316d | 55 | void Terminate(Option_t *){}; |
fc0946a7 | 56 | |
9462866a | 57 | protected: |
58 | void ProcessCharge(); | |
59 | void ProcessCenterPad(); | |
60 | void ProcessSigma(); | |
61 | void ProcessMean(); | |
62 | ||
b2dc316d | 63 | private: |
64 | AliTRDclusterResolution(const AliTRDclusterResolution&); | |
65 | AliTRDclusterResolution& operator=(const AliTRDclusterResolution&); | |
66 | ||
f2231ce8 | 67 | TCanvas *fCanvas; //! visualization canvas |
68 | TObjArray *fInfo; //! list of cluster info | |
fc0946a7 | 69 | TObjArray *fResults;// list of result graphs/histos |
f2231ce8 | 70 | TAxis *fAt; //! binning in the x(radial) direction (time) |
71 | TAxis *fAd; //! binning in the z direction (drift cell) | |
72 | UChar_t fStatus; // steer parameter of the task | |
73 | Short_t fDet; // detector (-1 for all) | |
fc0946a7 | 74 | Float_t fExB; // tg of the Lorentz angle |
9462866a | 75 | Float_t fVdrift; // mean drift velocity |
ec3f0161 | 76 | static const Float_t fgkTimeBinLength;// time bin length (invers of sampling frequency) |
b2dc316d | 77 | |
9462866a | 78 | ClassDef(AliTRDclusterResolution, 1) // cluster resolution |
b2dc316d | 79 | }; |
80 | ||
9462866a | 81 | //___________________________________________________ |
6bc4a8f4 | 82 | inline Float_t AliTRDclusterResolution::GetExB() const |
83 | { | |
84 | if(!HasExB()){ | |
85 | printf("WARNING :: ExB was not set. Use B=0.\n"); | |
86 | } | |
87 | return fExB; | |
88 | } | |
9462866a | 89 | |
90 | //___________________________________________________ | |
91 | inline Float_t AliTRDclusterResolution::GetVdrift() const | |
92 | { | |
93 | if(!HasExB()){ | |
94 | printf("WARNING :: ExB was not set. Use B=0.\n"); | |
95 | } | |
96 | return fVdrift; | |
97 | } | |
ec3f0161 | 98 | |
99 | //___________________________________________________ | |
100 | inline void AliTRDclusterResolution::ResetProcess() | |
101 | { | |
102 | CLRBIT(fStatus, kQRes); | |
103 | CLRBIT(fStatus, kCenter); | |
104 | CLRBIT(fStatus, kSigm); | |
105 | CLRBIT(fStatus, kMean); | |
106 | } | |
107 | ||
b2dc316d | 108 | #endif |
109 |