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