]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/EMCALTasks/AliAnalysisTaskEMCALTriggerQA.h
Update AddTask (Rossella)
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / AliAnalysisTaskEMCALTriggerQA.h
1 #ifndef ALIANALYSISTASKEMCALTRIGGERQA_H
2 #define ALIANALYSISTASKEMCALTRIGGERQA_H
3
4 // $Id$
5
6 //--- Root ---
7 class TList;
8 class TH1F;
9 class TH2I;
10 class TH2F;
11 class AliEMCALGeometry;
12 class TProfile2D;
13
14 //--- AliRoot ---
15 class AliEMCALRecoUtils;
16 #include "AliEMCALGeoParams.h"
17 #include "AliAnalysisTaskSE.h"
18
19 class AliAnalysisTaskEMCALTriggerQA : public AliAnalysisTaskSE 
20 {
21 public:
22   AliAnalysisTaskEMCALTriggerQA();                   // default constructor
23   
24   AliAnalysisTaskEMCALTriggerQA(const char *name);   // named constructor
25   
26   virtual ~AliAnalysisTaskEMCALTriggerQA() { ; }     // destructor
27   
28   void   FillClusterHistograms(const Int_t triggerNumber, const Bool_t maxCluster,
29                                const Float_t e,const Float_t eta,const Float_t phi,
30                                const Int_t ieta,const Int_t iphi,
31                                const Float_t centrality, const Float_t v0AC);
32   
33   void   Init() ;
34
35   void   InitHistogramArrays() ;
36
37   void   LocalInit()                     { Init()                       ; }
38
39   void   UserCreateOutputObjects();    
40   
41   void   UserExec(Option_t *option);   
42   
43   AliEMCALRecoUtils* GetRecoUtils()      { if(!fRecoUtils) fRecoUtils = new AliEMCALRecoUtils ;
44                                            return fRecoUtils            ; }
45   
46   void   SetEtaPhiEnMin(Float_t en)      { fEtaPhiEnMin       = en      ; }
47
48   // OADB and geometry settings
49   
50   void   InitGeometry();
51   
52   void   SetGeometryName(TString name)   { fGeoName           = name    ; }   
53   
54   void   AccessOADB() ;
55   
56   void   SwitchOnEMCALOADB()             { fAccessOADB        = kTRUE   ; }
57   void   SwitchOffEMCALOADB()            { fAccessOADB        = kFALSE  ; }
58   
59   void   SetOADBFilePath(TString path)   { fOADBFilePath      = path    ; }
60   
61   //Histogram setters
62
63   void   SetTRUTotalSignalHistogramsRange(Int_t nbins,  Float_t max) { fNBinsTRUSignal   = nbins; fMaxTRUSignal   = max ; }
64   void   SetSTUTotalSignalHistogramsRange(Int_t nbins,  Float_t max) { fNBinsSTUSignal   = nbins; fMaxSTUSignal   = max ; }
65   void   SetV0TotalSignalHistogramsRange (Int_t nbins,  Float_t max) { fNBinsV0Signal    = nbins; fMaxV0Signal    = max ; }
66   void   SetSTUFEERatioHistogramsRange   (Int_t nbins,  Float_t max) { fNBinsSTUFEERatio = nbins; fMaxSTUFEERatio = max ; }
67   void   SetSTUTRURatioHistogramsRange   (Int_t nbins,  Float_t max) { fNBinsSTUTRURatio = nbins; fMaxSTUFEERatio = max ; }
68   void   SetClusterEHistogramsRange      (Int_t nbins,  Float_t max) { fNBinsClusterE    = nbins; fMaxClusterE    = max ; }
69     
70 private:
71   TList            *fOutputList;      //! Output list
72   
73   AliEMCALRecoUtils *fRecoUtils;      //  RecoUtils
74
75   Bool_t            fGeoSet  ;        //  Geometry already set
76   AliEMCALGeometry *fGeometry;        //  Access to EMCAL geometry utils
77   TString           fGeoName;         //  Name of geometry used
78   
79   Bool_t            fOADBSet ;        //  AODB parameters already set
80   Bool_t            fAccessOADB ;     //  Get calibration from OADB for EMCAL
81   TString           fOADBFilePath ;   //  Default path $ALICE_ROOT/OADB/EMCAL, if needed change
82   
83   Int_t             fBitEGA;          //  fBitEGA
84   Int_t             fBitEJE;          //  fBitEJE
85   
86   Float_t           fEtaPhiEnMin;     //  Min energy for Eta/Phi histograms   
87   
88   TH1F             *fhNEvents;        //! Number of selected events
89   TH2F             *fhFORAmp;         //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column
90   TH2F             *fhFORAmpL1G;      //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma trigger event
91   TH2F             *fhFORAmpL1J;      //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet trigger event
92   TH2F             *fhL0Amp;          //! FALTRO signal per Row and Column for FOR involves L0 patch
93   TH2F             *fhL0AmpL1G;       //! FALTRO signal per Row and Column for FOR involves L0 patch, with L1G trigger event
94   TH2F             *fhL0AmpL1J;       //! FALTRO signal per Row and Column for FOR involves L0 patch, with L1J trigger event
95   TH2F             *fhL1Amp;          //! STU signal per Row and Column for FOR involves L0 patch
96   TH2F             *fhL1GAmp;         //! STU signal per Row and Column for FOR position of L1 Gamma patch (top-left)
97   TH2F             *fhL1JAmp;         //! STU signal per Row and Column for FOR position of L1 Jet patch (top-left)
98   TH2F             *fhL0Patch;        //! FOR with L0 patch associated
99   TH2F             *fhL1GPatch;       //! FOR with L1 Gamma patch associated
100   TH2F             *fhL1JPatch;       //! FOR with L1 Jet patch associated
101   TH2F             *fhFEESTU;         //! Correlation FEE vs STU
102   TH2F             *fhTRUSTU;         //! Correlation TRU vs STU
103   TH2I             *fhV0STU;          //! Total signal STU vs V0C+V0S
104   
105   TH2F             *fhGPMaxVV0TT;     //! V0 signal vs maximum gamma L1 patch
106   TH2F             *fhJPMaxVV0TT;     //! V0 signal vs maximum jet L1 patch
107   TProfile2D       *fhFORMeanAmp;     //! Mean FastOR(FEE) signal per Row and Column
108   TProfile2D       *fhL0MeanAmp;      //! Mean FastOR(TRU) signal per Row and Column
109   TProfile2D       *fhL1MeanAmp;      //! Mean FastOR(STU) signal per Row and Column
110   TH1F             *fhV0[8];          //! V0 distribution for a triggered event
111   TH2F             *fhL1GPatchMax;    //! FOR of max. amplitude patch with L1 Gamma patch associated
112   TH2F             *fhL1JPatchMax;    //! FOR of max. amplitude patch with L1 Jet patch associated  
113   
114   // Cluster vs trigger histograms
115   enum triggerType{kMBTrig = 0, kL0Trig = 1, kL1GammaTrig = 2, kL1JetTrig = 3, kL1GammaOnlyTrig = 4, kL1JetOnlyTrig = 5, kCentralTrig = 6, kSemiCentralTrig = 7 };
116   
117   TH1F             *fhClusMBPure[3];      //! Clusters E distribution for pure MB trigger  
118   TH1F             *fhClusMaxMBPure[3];   //! Maximum E Cluster per event distribution for pure MB trigger
119   
120   TH1F             *fhClus[8];            //! Clusters E distribution for a trigger
121   TH1F             *fhClusMax[8];         //! Maximum E Cluster per event distribution for MB trigger
122
123   TH2F             *fhClusCen[8];         //! Clusters Centrality vs E distribution for a trigger
124   TH2F             *fhClusCenMax[8];      //! Maximum E Cluster  vs Centrality per event distribution for a trigger
125   
126   TH2F             *fhClusV0[8];          //! Clusters V0 vs E distribution for a trigger
127   TH2F             *fhClusV0Max[8];       //! Maximum E Cluster  vs Centrality per event distribution for a trigger
128
129   TH2F             *fhClusEta[8];         //! Clusters eta vs E distribution for a trigger
130   TH2F             *fhClusEtaMax[8];      //! Maximum E Cluster  vs Eta per event distribution for a trigger
131
132   TH2F             *fhClusPhi[8];         //! Clusters Phi vs E distribution for a trigger
133   TH2F             *fhClusPhiMax[8];      //! Maximum E Cluster  vs Phi per event distribution for a trigger
134
135   TH2F             *fhClusEtaPhiHigh[8];               //! Clusters eta vs phi distribution for a trigger, energy above 10 GeV
136   TH2F             *fhClusEtaPhiHighCluMax[8];         //! Maximum E Cluster, Phi vs Eta per event distribution for a trigger, energy above 10 GeV
137  
138   TH2F             *fhClusEtaPhiHighCellMax[8];        //! Clusters maximum energy cell index eta vs phi distribution for MB trigger, energy above 10 GeV
139   TH2F             *fhClusEtaPhiHighCellMaxCluMax[8];  //! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger, energy above 10 GeV
140  
141   TH2F             *fhClusEtaPhiLow[8];                //! Clusters eta vs phi distribution for MB trigger, energy below 10 GeV
142   TH2F             *fhClusEtaPhiLowCluMax[8];          //! Maximum E Cluster, Phi vs Eta per event distribution for MB trigger, energy below 10 GeV
143  
144   TH2F             *fhClusEtaPhiLowCellMax[8];         //! Clusters maximum energy cell index eta vs phi distribution for MB trigger, energy below 10 GeV
145   TH2F             *fhClusEtaPhiLowCellMaxCluMax[8];   //! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger, energy below 10 GeV
146
147   // Histograms bins
148   
149   Int_t             fNBinsSTUSignal   ;     // Number of bins for STU total signal histograms
150   Float_t           fMaxSTUSignal     ;     // Maximum value for TRU total signal histograms
151   Int_t             fNBinsTRUSignal   ;     // Number of bins for TRU total signal histograms
152   Float_t           fMaxTRUSignal     ;     // Maximum value for TRU total signal histograms
153   Int_t             fNBinsV0Signal    ;     // Number of bins for V0 total signal histograms
154   Float_t           fMaxV0Signal      ;     // Maximum value for V0 total signal histograms
155   Int_t             fNBinsSTUFEERatio ;     // Number of bins for STU/FEE ratios histograms
156   Float_t           fMaxSTUFEERatio   ;     // Maximum value for STU/FEE ratios histograms
157   Int_t             fNBinsSTUTRURatio ;     // Number of bins for STU/TRU ratios histograms
158   Float_t           fMaxSTUTRURatio   ;     // Maximum value for STU/TRU ratios histograms
159   Int_t             fNBinsClusterE    ;     // Number of bins for E cluster histograms
160   Float_t           fMaxClusterE      ;     // Maximum value for E cluster histograms
161
162   //Constants needed by the class: EMCAL 
163   static const int  fgkFALTRORows = AliEMCALGeoParams::fgkEMCALRows*(AliEMCALGeoParams::fgkEMCALModules-7)/2;   // total number 
164   // of fake altro rows    in EMCAL
165   // (ALTRO channels in one SM times 5 SM divided by 2 per FALTRO)
166   
167   static const int  fgkFALTROCols = AliEMCALGeoParams::fgkEMCALCols; // total number of fake altro columns in EMCAL 
168   // (ALTRO channels in one SM times 2 SM divided by 2 per FALTRO)
169   
170   
171   AliAnalysisTaskEMCALTriggerQA           (const AliAnalysisTaskEMCALTriggerQA&); // not implemented
172   
173   AliAnalysisTaskEMCALTriggerQA& operator=(const AliAnalysisTaskEMCALTriggerQA&); // not implemented
174   
175   ClassDef(AliAnalysisTaskEMCALTriggerQA, 11);   
176 };
177
178 #endif