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