]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/qaRec/AliTRDresolution.h
- new plot in the PID checker (dQdt=f(t))
[u/mrichter/AliRoot.git] / TRD / qaRec / AliTRDresolution.h
1 #ifndef ALITRDRESOLUTION_H
2 #define ALITRDRESOLUTION_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliTRDresolution.h 27496 2008-07-22 08:35:45Z cblume $ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  Resolution QA                                                     //
11 //                                                                        //
12 ////////////////////////////////////////////////////////////////////////////
13
14 #ifndef ALITRDRECOTASK_H
15 #include "AliTRDrecoTask.h"
16 #endif
17
18 class TH1;
19 class TH2;
20 class TF1;
21 class TGraphErrors;
22 class TObjArray;
23 class AliTRDReconstructor;
24 class AliTRDgeometry;
25 class AliTRDrecoParam;
26 class AliTRDseedV1;
27 class AliTRDtrackInfo;
28 class AliTRDresolution : public AliTRDrecoTask
29 {
30 public:
31   enum ETRDresolutionPlot {
32      kCharge     =  0 // charge resolution
33     ,kCluster    =  1 // cluster - track
34     ,kTrackTRD   =  2 // tracklet - track residuals/pulls
35     ,kTrackTPC   =  3 // tracklet - track residuals/pulls at lower TRD entrance 
36     ,kMCcluster  =  4 // cluster-mc resolution/pulls
37     ,kMCtracklet =  5 // tracklet-mc resolution/pulls
38     ,kMCtrackTPC =  6 // TPC track monitor
39     ,kMCtrackTOF =  7 // TOF/HMPID track monitor
40     ,kMCtrackTRD =  8 // TRD track monitor
41     ,kNhistos    =  9
42   };
43   enum ETRDresolutionSteer {
44     kVerbose  = 0
45     ,kVisual  = 1
46   };
47
48   AliTRDresolution();
49   virtual ~AliTRDresolution();
50   
51   void    CreateOutputObjects();
52   Bool_t  GetRefFigure(Int_t ifig);
53   TObjArray*  Histos(); 
54   TObjArray*  Results(Int_t i=0) const {return i ? fGraphS : fGraphM;} 
55   void    Exec(Option_t *);
56   Bool_t  IsVerbose() const {return TESTBIT(fStatus, kVerbose);}
57   Bool_t  IsVisual() const {return TESTBIT(fStatus, kVisual);}
58   Bool_t  PostProcess();
59
60   TH1*    PlotCharge(const AliTRDtrackV1 *t=0x0);
61   TH1*    PlotCluster(const AliTRDtrackV1 *t=0x0);
62   TH1*    PlotTracklet(const AliTRDtrackV1 *t=0x0);
63   TH1*    PlotTrackTPC(const AliTRDtrackV1 *t=0x0);
64   TH1*    PlotMC(const AliTRDtrackV1 *t=0x0);
65
66   void    SetRecoParam(AliTRDrecoParam *r);
67   void    SetVerbose(Bool_t v = kTRUE) {v ? SETBIT(fStatus ,kVerbose): CLRBIT(fStatus ,kVerbose);}
68   void    SetVisual(Bool_t v = kTRUE) {v ? SETBIT(fStatus, kVisual) : CLRBIT(fStatus, kVisual);}
69
70   void    Terminate(Option_t *);
71   Bool_t  GetGraphPlot(Float_t *bb, ETRDresolutionPlot ip, Int_t idx=-1);
72   Bool_t  GetGraphTrack(Float_t *bb, Int_t idx, Int_t ily);
73   Bool_t  GetGraphTrackTPC(Float_t *bb, Int_t selector);
74   
75 private:
76   AliTRDresolution(const AliTRDresolution&);
77   AliTRDresolution& operator=(const AliTRDresolution&);
78   void    AdjustF1(TH1 *h, TF1 *f);
79   void    GetLandauMpvFwhm(TF1 *f, Float_t &mpv, Float_t &xm, Float_t &xM);
80   Bool_t  Process(TH2* h2, TF1 *f, Float_t k, TGraphErrors **g);
81   Bool_t  Process2D(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=0x0,  Float_t scale=1.);
82   Bool_t  Process3D(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=0x0,  Float_t scale=1.);
83   Bool_t  Process3DL(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=0x0,  Float_t scale=1.);
84   Bool_t  Process4D(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=0x0,  Float_t scale=1.);
85
86   UChar_t             fStatus;          // steer parameter of the task
87   UChar_t             fIdxPlot;         //! plot counter (internal)
88   static UChar_t      fNElements[kNhistos]; // number of componets per task
89   static Char_t       *fAxTitle[46][3]; // axis title for all ref histos
90   AliTRDReconstructor *fReconstructor;  //! local reconstructor
91   AliTRDgeometry      *fGeo;            //! TRD geometry
92   TObjArray           *fGraphS;         //! result holder - sigma values
93   TObjArray           *fGraphM;         //! result holder - mean values
94
95   // calibration containers
96   TObjArray           *fCl;     //! cluster2track calib
97   TObjArray           *fTrklt;  //! tracklet2track calib
98   TObjArray           *fMCcl;   //! cluster2mc calib
99   TObjArray           *fMCtrklt;//! tracklet2mc calib
100   
101   ClassDef(AliTRDresolution, 2) // TRD tracking resolution task
102 };
103 #endif