]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/TRD/AliTRDcalibration.h
new PID 2DLQ performance
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDcalibration.h
1 #ifndef ALITRDCALIBRATION_H
2 #define ALITRDCALIBRATION_H
3
4 // macro for extremely simple analysis
5
6 ///////////////////////////////////////////////////////////////////////////////
7 //                                                                           //
8 //  TRD calibration class                                                    //
9 //                                                                           //
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #include "AliTRDrecoTask.h"
13
14 class TList;
15 class TObject;
16 class TH1F;
17 class TProfile2D;
18 class TGraph;
19 class TH2I;
20 class TH2D;
21 class TTree;
22 class TObjArray;
23 class AliTRDtrackV1;
24 class AliTRDCalibraFillHisto;
25 class AliTRDCalibraVector;
26 class AliTRDCalibraMode;
27 class AliTRDcluster;
28 class AliTRDtrackInfo;
29
30 class AliTRDcalibration : public AliTRDrecoTask 
31 {
32  
33 public:
34
35   // Plots registered for this task
36   enum{
37     kNbTrack        =  0     // Nb tracks per event
38       ,kNbTracklet     =  1     // Nb of traklets per detector
39       ,kNbTimeBin      =  2     // Nb of clusters per timebin
40       ,kNbClusters     =  3     // Nb of clusters per tracklet
41       ,kPHSum          =  4     // All integrated PH
42       ,kCHSum          =  5     // All integrated CH
43       ,kPH2D           =  6     // PH2D
44       ,kCH2D           =  7     // CH2D
45       ,kPRF2D          =  8     // PRF2D 
46       ,kPH2DVector     =  9     // PH2D
47       ,kCH2DVector     =  10     // CH2D
48       ,kPRF2DVector    =  11     // PRF2D 
49       ,kLinearFitter   =  12    // For the one with the most stats 
50       ,kGainFactor     =  13    // Gain factor
51       ,kVdriftT0Factor   = 14   // VdriftT0 average pulse height
52       ,kVdriftLorentzAngleFactor = 15  // VdriftLorentzAngle
53       ,kPRFFactor = 16                 //PRF Factor
54       };
55   
56
57   AliTRDcalibration();
58   virtual ~AliTRDcalibration();
59   
60   virtual void    CreateOutputObjects();
61   virtual void    Exec(Option_t *option);
62   virtual void    Terminate(Option_t *);
63   virtual Bool_t  GetRefFigure(Int_t ifig);
64   virtual Bool_t  PostProcess();
65
66   Bool_t FillGraphIndex(const TObjArray *vectora, TGraph *graph) const;
67   Bool_t AddStatsPerDetector(const TH2I *ch);
68   Bool_t AddStatsPerDetector(const TProfile2D *ph, Int_t i);
69
70   Bool_t SetNrphiFromTObject(const char *name, Int_t i, AliTRDCalibraMode *calibMode) const;
71   Bool_t SetNzFromTObject(const char *name, Int_t i, AliTRDCalibraMode *calibMode) const;
72
73   Int_t  GetNumberOfGroupsPRF(const char* nametitle) const;
74   TH2I  *GetSumCH() const                                           { return fCHSum; };
75   TH2D  *GetSumDet() const                                          { return fDetSum;};
76   AliTRDCalibraVector  *GetSumDetVector() const                     { return fDetSumVector;};
77   TObjArray *GetArrayCalib() const                                  { return fArrayCalib;  };
78
79
80   void SetHisto2d(Bool_t histo2d)                                   {fHisto2d=histo2d;};
81   void SetVector2d(Bool_t vector2d)                                 {fVector2d=vector2d;};
82   void SetVdriftLinear(Bool_t vdriftLinear)                         {fVdriftLinear = vdriftLinear;};
83   void SetNbTimeBins(Int_t nbTimeBins)                              {fNbTimeBins=nbTimeBins;};
84   void SetLow(Int_t low)                                            {flow=low;};
85   void SetHigh(Int_t high)                                          {fhigh=high;};
86   void SetNz(Short_t nz, Int_t i)                                   {fNz[i]=nz;};
87   void SetNrphi(Short_t nrphi, Int_t i)                             {fNrphi[i]=nrphi;};
88   void SetFillZero(Bool_t fillZero)                                 {ffillZero =  fillZero;};
89   void SetNormalizeNbOfCluster(Bool_t normalizeNbOfCluster)         {fnormalizeNbOfCluster = normalizeNbOfCluster;};
90   void SetMaxCluster(Float_t maxcluster)                            {fmaxCluster =  maxcluster; }; 
91   void SetOfflineTracks()                                           {fOfflineTracks=kTRUE; fStandaloneTracks=kFALSE; };
92   void SetStandaloneTracks()                                        {fStandaloneTracks=kTRUE; fOfflineTracks=kFALSE; };
93   void SetCompressPerDetector(Bool_t compressPerDetector=kTRUE)     {fCompressPerDetector=compressPerDetector; };
94    
95 private:
96   AliTRDtrackInfo  *fTrackInfo;                  //track info
97
98   AliTRDtrackV1 *ftrdTrack;                      //trdtrack
99   AliTRDcluster *fcl;                            //cluster
100   
101   AliTRDCalibraFillHisto *fTRDCalibraFillHisto;  //! calibration analyse object
102   TH1F        *fNbTRDTrack;                      //! nb ESD tracks used
103   TH1F        *fNbTRDTrackOffline;               //! nb ESD tracks offline used
104   TH1F        *fNbTRDTrackStandalone;            //! nb ESD tracks standalone used
105   TH1F        *fNbTRDTracklet;                   //! nb tracklets used
106   TH1F        *fNbTRDTrackletOffline;            //! nb tracklets offline used
107   TH1F        *fNbTRDTrackletStandalone;         //! nb tracklets standalone used
108   TH1F        *fNbTimeBin;                       //! nb Time Bin
109   TH1F        *fNbTimeBinOffline;                //! nb Time Bin offline
110   TH1F        *fNbTimeBinStandalone;             //! nb Time Bin standalone
111   TH1F        *fNbClusters;                      //! nb Clusters
112   TH1F        *fNbClustersOffline;               //! nb Clusters offline
113   TH1F        *fNbClustersStandalone;            //! nb Clusters standalone
114   TProfile2D  *fPHSM;                            //! Per SM
115   TH2I        *fCHSM;                            //! Per SM
116
117   TProfile2D  *fPHSum;                           //! All together PH
118   TH2I        *fCHSum;                           //! All together CH during the task, used also if want to use AddStatsPerDetector
119   TH2D        *fDetSum;                          //! AddStatsPerDetector
120   AliTRDCalibraVector *fDetSumVector;            //! AddStatsPerDetector
121   
122   Bool_t      fHisto2d;                          //! histo
123   Bool_t      fVector2d;                         //! vector
124   Bool_t      fVdriftLinear;                     //! vdrift Linear
125   
126   Int_t       flow;                              //! lower limit nb of clusters
127   Int_t       fhigh;                             //! higher limit nb of clusters
128   Int_t       fNbTimeBins;                       //! number of timebins 
129   Bool_t      ffillZero;                         //! fill zero
130   Short_t     fNz[3];                            //! Nz mode 
131   Short_t     fNrphi[3];                         //! Nrphi mode
132   Bool_t      fnormalizeNbOfCluster;             //! normalize with number of clusters
133   Float_t     fmaxCluster;                       //! maxcluster (noise at the end)
134   Bool_t      fOfflineTracks;                    //! Offline refited tracks
135   Bool_t      fStandaloneTracks;                 //! Take only standalone tracks
136
137   Bool_t      fCompressPerDetector;              //! Compress per detector 
138
139   TObjArray  *fGraph;                            //! array of graphs filled in PostProcess
140   TObjArray  *fArrayCalib;                       //! array of calibration objects filled in PostProcess
141   Bool_t      fPostProcess;                      //Post process 
142
143   AliTRDcalibration(const AliTRDcalibration&); 
144   AliTRDcalibration& operator=(const AliTRDcalibration&); 
145
146   ClassDef(AliTRDcalibration, 1) // calibration task
147 };
148 #endif