]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/TRD/AliTRDresolution.h
fix compilation problem in GSI train
[u/mrichter/AliRoot.git] / PWG1 / TRD / 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 //  TRD Resolution performance                                            //
11 //                                                                        //
12 //  Authors:                                                              //
13 //    Alexandru Bercuci <A.Bercuci@gsi.de>                                //
14 //    Markus Fasel <M.Fasel@gsi.de>                                       //
15 //                                                                        //
16 ////////////////////////////////////////////////////////////////////////////
17
18 #ifndef ALITRDRECOTASK_H
19 #include "AliTRDrecoTask.h"
20 #endif
21
22 class TH1;
23 class TH2;
24 class TF1;
25 class TGraphErrors;
26 class TObjArray;
27 class TDatabasePDG;
28 class AliTRDReconstructor;
29 class AliTRDgeometry;
30 class AliTRDrecoParam;
31 class AliTRDseedV1;
32 class AliTRDtrackInfo;
33 class AliTRDresolution : public AliTRDrecoTask
34 {
35 public:
36   enum ETRDresolutionPlot {
37      kCharge     =  0 // charge resolution
38     ,kCluster    =  1 // cluster - track
39     ,kTrackTRD   =  2 // tracklet - track residuals/pulls
40     ,kTrackTPC   =  3 // tracklet - track residuals/pulls at lower TRD entrance 
41     ,kMCcluster  =  4 // cluster-mc resolution/pulls
42     ,kMCtracklet =  5 // tracklet-mc resolution/pulls
43     ,kMCtrackTPC =  6 // TPC track monitor
44     ,kMCtrackTOF =  7 // TOF/HMPID track monitor
45     ,kMCtrackTRD =  8 // TRD track monitor
46     ,kNviews     =  9 // total number of resolution views
47     ,kNprojs     = 53 // total number of projections for all views
48   };
49   enum ETRDresolutionSteer {
50     kVerbose  = 0
51     ,kVisual  = 1
52   };
53   enum ETRDresolutionOutSlots {
54      kClToTrk    = 2
55     ,kTrkltToTrk = 3
56     ,kClToMC     = 4
57     ,kTrkltToMC  = 5
58     ,kNOutSlots  = 4
59   };
60
61   AliTRDresolution();
62   AliTRDresolution(char* name);
63   virtual ~AliTRDresolution();
64   
65   void    UserCreateOutputObjects();
66   Bool_t  GetRefFigure(Int_t ifig);
67   TObjArray*  Histos(); 
68   TObjArray*  Results(Int_t i=0) const {return i ? fGraphS : fGraphM;} 
69   void    UserExec(Option_t * opt);
70   Bool_t  IsVerbose() const {return TESTBIT(fStatus, kVerbose);}
71   Bool_t  IsVisual() const {return TESTBIT(fStatus, kVisual);}
72   Bool_t  PostProcess();
73
74   TH1*    PlotCharge(const AliTRDtrackV1 *t=0x0);
75   TH1*    PlotCluster(const AliTRDtrackV1 *t=0x0);
76   TH1*    PlotTracklet(const AliTRDtrackV1 *t=0x0);
77   TH1*    PlotTrackTPC(const AliTRDtrackV1 *t=0x0);
78   TH1*    PlotMC(const AliTRDtrackV1 *t=0x0);
79
80   void    SetRecoParam(AliTRDrecoParam *r);
81   void    SetVerbose(Bool_t v = kTRUE) {v ? SETBIT(fStatus ,kVerbose): CLRBIT(fStatus ,kVerbose);}
82   void    SetVisual(Bool_t v = kTRUE) {v ? SETBIT(fStatus, kVisual) : CLRBIT(fStatus, kVisual);}
83
84   void    Terminate(Option_t * opt);
85   Bool_t  GetGraphPlot(Float_t *bb, ETRDresolutionPlot ip, Int_t idx=-1);
86   Bool_t  GetGraphTrack(Float_t *bb, Int_t idx, Int_t ist, Int_t n=123456789, Bool_t kLEG=kFALSE);
87   Bool_t  GetGraphTrackTPC(Float_t *bb, Int_t idx, Int_t ist=0, Int_t n=123456789, Bool_t kLEG=kFALSE);
88   
89 private:
90   AliTRDresolution(const AliTRDresolution&);
91   AliTRDresolution& operator=(const AliTRDresolution&);
92
93   void    AdjustF1(TH1 *h, TF1 *f);
94   TObjArray*  BuildMonitorContainerCluster(const char* name);
95   TObjArray*  BuildMonitorContainerTracklet(const char* name);
96   TObjArray*  BuildMonitorContainerTrack(const char* name);
97   void    GetLandauMpvFwhm(TF1 * const f, Float_t &mpv, Float_t &xm, Float_t &xM);
98   Bool_t  Process(TH2* const h2, TF1 *f, Float_t k, TGraphErrors **g);
99   Bool_t  Process2D(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=0x0,  Float_t scale=1., Int_t gidx=-1);
100   Bool_t  Process3D(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=0x0,  Float_t scale=1.);
101   Bool_t  Process3Drange(ETRDresolutionPlot ip, Int_t idx=-1, Int_t gidx=-1, TF1 *f=0x0,  Float_t scale=1., Int_t zbin0=0, Int_t zbin1=0);
102   Bool_t  Process3DL(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=0x0,  Float_t scale=1.);
103   Bool_t  Process4D(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=0x0,  Float_t scale=1., Int_t n=-1);
104
105   UChar_t             fStatus;          // steer parameter of the task
106   UShort_t            fIdxPlot;         //! plot counter (internal)
107   UShort_t            fIdxFrame;        //! frame counter (internal)
108   static Char_t const *fgPerformanceName[kNviews]; // name of performance plot
109   static UChar_t const fgNhistos[kNviews]; // number of histos per task
110   static UChar_t const fgNproj[kNviews]; // number of projections per task
111   static UChar_t const fgNcomp[kNprojs]; // number of projections per task
112   static Char_t const *fgAxTitle[kNprojs][4]; // Title for all ref histos
113   AliTRDReconstructor *fReconstructor;  //! local reconstructor
114   AliTRDgeometry      *fGeo;            //! TRD geometry
115   TDatabasePDG        *fDBPDG;          //! PDG database
116   TObjArray           *fGraphS;         //! result holder - sigma values
117   TObjArray           *fGraphM;         //! result holder - mean values
118
119   // calibration containers
120   TObjArray           *fCl;     //! cluster2track calib
121   TObjArray           *fTrklt;  //! tracklet2track calib
122   TObjArray           *fMCcl;   //! cluster2mc calib
123   TObjArray           *fMCtrklt;//! tracklet2mc calib
124   
125   ClassDef(AliTRDresolution, 4) // TRD tracking resolution task
126 };
127 #endif