1 #ifndef ALITRDCLUSTERRESOLUTION_H
2 #define ALITRDCLUSTERRESOLUTION_H
4 ///////////////////////////////////////////////////////////////////////////////
6 // TRD cluster error parameterization
8 // Alexandru Bercuci <A.Bercuci@gsi.de> //
9 ////////////////////////////////////////////////////////////////////////////
11 #ifndef ALITRDRECOTASK_H
12 #include "AliTRDrecoTask.h"
18 class AliTRDclusterResolution : public AliTRDrecoTask
21 enum EAxisBinning { // bins in z and x direction
26 enum EResultContainer { // results container type
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
33 enum ECheckBits { // force setting the ExB
37 AliTRDclusterResolution(const char *name="ClErrParam", const char *title="Cluster error monitor");
38 virtual ~AliTRDclusterResolution();
40 void ConnectInputData(Option_t *);
41 void CreateOutputObjects();
42 void Exec(Option_t *);
43 Int_t GetDetector() const { return fDet; }
44 inline Float_t GetExB() const;
45 inline Float_t GetVdrift() const;
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);}
51 TObjArray* Results() const {return fResults;};
53 Bool_t IsVisual() const {return Bool_t(fCanvas);}
54 Bool_t IsSaveAs() const {return TestBit(kSaveAs);}
57 Bool_t SetExB(Int_t det=-1, Int_t c = 70, Int_t r = 7);
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();
65 void ProcessCenterPad();
70 AliTRDclusterResolution(const AliTRDclusterResolution&);
71 AliTRDclusterResolution& operator=(const AliTRDclusterResolution&);
73 TCanvas *fCanvas; //! visualization canvas
74 TObjArray *fInfo; //! list of cluster info
75 TObjArray *fResults;// list of result graphs/histos
76 TAxis *fAt; //! binning in the x(radial) direction (time)
77 UChar_t fStatus; // steer parameter of the task
78 Short_t fDet; // detector (-1 for all)
79 Float_t fExB; // tg of the Lorentz angle
80 Float_t fVdrift; // mean drift velocity
81 static const Float_t fgkTimeBinLength;// time bin length (invers of sampling frequency)
83 // working named variables
84 UChar_t fLy; //! TRD plane
85 Float_t fX; //! local drift length
86 Float_t fY; //! local rphi offset
87 Float_t fZ; //! local anode wire offset
88 Float_t fR[4]; //! mean/sgm resolution
89 Float_t fP[4]; //! mean/sgm pulls
91 ClassDef(AliTRDclusterResolution, 3) // cluster resolution
94 //___________________________________________________
95 inline Float_t AliTRDclusterResolution::GetExB() const
98 printf("WARNING :: ExB was not set. Use B=0.\n");
103 //___________________________________________________
104 inline Float_t AliTRDclusterResolution::GetVdrift() const
107 printf("WARNING :: ExB was not set. Use B=0.\n");
112 //___________________________________________________
113 inline void AliTRDclusterResolution::ResetProcess()
115 CLRBIT(fStatus, kQRes);
116 CLRBIT(fStatus, kCenter);
117 CLRBIT(fStatus, kSigm);
118 CLRBIT(fStatus, kMean);