]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/EMCALTasks/AliAnalysisTaskEMCALTriggerQA.h
in internal trigger selection, no GetTriggerMask unless ( kNoSelection == fInternalTr...
[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(Int_t triggerNumber, Bool_t maxCluster,
29                                Float_t e,Float_t eta,Float_t phi,
30                                Float_t ietamax,Float_t iphimax,
31                                Float_t centrality, 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             *fhFORAmpL1G2;      //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma2 trigger event
92   TH2F             *fhFORAmpL1J;      //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet trigger event
93   TH2F             *fhFORAmpL1J2;      //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet2 trigger event
94   TH2F             *fhL0Amp;          //! FALTRO signal per Row and Column for FOR involves L0 patch
95   TH2F             *fhL0AmpL1G;       //! FALTRO signal per Row and Column for FOR involves L0 patch, with L1G trigger event
96   TH2F             *fhL0AmpL1J;       //! FALTRO signal per Row and Column for FOR involves L0 patch, with L1J trigger event
97   TH2F             *fhL1Amp;          //! STU signal per Row and Column for FOR involves L0 patch
98   TH2F             *fhL1GAmp;         //! STU signal per Row and Column for FOR position of L1 Gamma patch (top-left)
99   TH2F             *fhL1G2Amp;        //! STU signal per Row and Column for FOR position of L1 Gamma2 patch (top-left)
100   TH2F             *fhL1JAmp;         //! STU signal per Row and Column for FOR position of L1 Jet patch (top-left)
101   TH2F             *fhL1J2Amp;         //! STU signal per Row and Column for FOR position of L1 Jet2 patch (top-left)
102   TH2F             *fhL1FOREnergy;         //! STU signal per Row and Column for FOR position vs FOR energy
103   TH2F             *fhL0Patch;        //! FOR with L0 patch associated
104   TH2F             *fhL1GPatch;       //! FOR with L1 Gamma patch associated
105   TH2F             *fhL1G2Patch;       //! FOR with L1 Gamma patch associated
106   TH2F             *fhL1GPatchNotFake;       //! FOR with L1 Gamma patch associated but no energy in the related cells
107   TH2F             *fhL1GPatchFake;       //! FOR with L1 Gamma patch associated
108   TH2F             *fhL1GPatchNotAllFake;       //! FOR with at least 1 L1 Gamma patch associated that has energy in the related celles : not a fake event
109   TH2F             *fhL1GPatchAllFake;       //! FOR without any L1 Gamma patch associated with energy in the related cells: fake patch
110   TH2F             *fhL1GPatchNotAllFakeMax;       //! FOR with at least one L1 Gamma patch associated with energy in the related cell, maximal energy patch : not fake events
111   TH2F             *fhL1GPatchAllFakeMax;       //! FOR without any L1 Gamma patch associated with energy in the related cell, maximal energy patch : fake events
112   TH1F             *fhL1GPatchNotAllFakeMaxE;       //! Energy distrib of FOR for non fake events, patch of maximal energy
113   TH1F             *fhL1GPatchAllFakeMaxE;       //! Energy distrib FOR for fake events, patch of maximal energy
114   TH1F             *fhL1GPatchNotAllFakeE;      
115   TH1F             *fhL1GPatchAllFakeE;
116   TH1F             *fhL1GPatchFakeE;
117   TH1F             *fhL1GPatchNotFakeE;
118   TH2F             *fhnpatchFake; //! number of fake patchs per event vs. if all were fakes or not
119   TH2F             *fhnpatchNotFake; //! number of non fake patchs per events vs. if all were fakes or not
120   
121   TH2F             *fhL1JPatch;       //! FOR with L1 Jet patch associated
122   TH2F             *fhL1J2Patch;       //! FOR with L1 Jet patch associated
123   TH2F             *fhFEESTU;         //! Correlation FEE vs STU
124   TH2F             *fhTRUSTU;         //! Correlation TRU vs STU
125   TH2I             *fhV0STU;          //! Total signal STU vs V0C+V0S
126   
127   TH2F             *fhGPMaxVV0TT;     //! V0 signal vs maximum gamma L1 patch
128   TH2F             *fhJPMaxVV0TT;     //! V0 signal vs maximum jet L1 patch
129   TProfile2D       *fhFORMeanAmp;     //! Mean FastOR(FEE) signal per Row and Column
130   TProfile2D       *fhL0MeanAmp;      //! Mean FastOR(TRU) signal per Row and Column
131   TProfile2D       *fhL1MeanAmp;      //! Mean FastOR(STU) signal per Row and Column
132   TH1F             *fhV0[10];          //! V0 distribution for a triggered event
133   TH2F             *fhL1GPatchMax;    //! FOR of max. amplitude patch with L1 Gamma patch associated
134   TH2F             *fhL1G2PatchMax;    //! FOR of max. amplitude patch with L1 Gamma patch associated
135   TH2F             *fhL1JPatchMax;    //! FOR of max. amplitude patch with L1 Jet patch associated  
136   TH2F             *fhL1J2PatchMax;    //! FOR of max. amplitude patch with L1 Jet patch associated  
137   
138   // Cluster vs trigger histograms
139   enum triggerType{kMBTrig = 0, kL0Trig = 1, kL1GammaTrig = 2, kL1GammaTrig2 = 3, kL1JetTrig = 4, kL1JetTrig2 = 5, kL1GammaOnlyTrig = 6, kL1JetOnlyTrig = 7, kCentralTrig = 8, kSemiCentralTrig = 9 };
140   
141   TH1F             *fhClusMBPure[3];      //! Clusters E distribution for pure MB trigger  
142   TH1F             *fhClusMaxMBPure[3];   //! Maximum E Cluster per event distribution for pure MB trigger
143   
144   TH1F             *fhClus[10];            //! Clusters E distribution for a trigger
145   TH1F             *fhClusMax[10];         //! Maximum E Cluster per event distribution for MB trigger
146
147   TH2F             *fhClusCen[10];         //! Clusters Centrality vs E distribution for a trigger
148   TH2F             *fhClusCenMax[10];      //! Maximum E Cluster  vs Centrality per event distribution for a trigger
149   
150   TH2F             *fhClusV0[10];          //! Clusters V0 vs E distribution for a trigger
151   TH2F             *fhClusV0Max[10];       //! Maximum E Cluster  vs Centrality per event distribution for a trigger
152
153   TH2F             *fhClusEta[10];         //! Clusters eta vs E distribution for a trigger
154   TH2F             *fhClusEtaMax[10];      //! Maximum E Cluster  vs Eta per event distribution for a trigger
155
156   TH2F             *fhClusPhi[10];         //! Clusters Phi vs E distribution for a trigger
157   TH2F             *fhClusPhiMax[10];      //! Maximum E Cluster  vs Phi per event distribution for a trigger
158
159   TH2F             *fhClusEtaPhiHigh[10];               //! Clusters eta vs phi distribution for a trigger, energy above 10 GeV
160   TH2F             *fhClusEtaPhiHighCluMax[10];         //! Maximum E Cluster, Phi vs Eta per event distribution for a trigger, energy above 10 GeV
161  
162   TH2F             *fhClusEtaPhiHighCellMax[10];        //! Clusters maximum energy cell index eta vs phi distribution for MB trigger, energy above 10 GeV
163   TH2F             *fhClusEtaPhiHighCellMaxCluMax[10];  //! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger, energy above 10 GeV
164  
165   TH2F             *fhClusEtaPhiLow[10];                //! Clusters eta vs phi distribution for MB trigger, energy below 10 GeV
166   TH2F             *fhClusEtaPhiLowCluMax[10];          //! Maximum E Cluster, Phi vs Eta per event distribution for MB trigger, energy below 10 GeV
167  
168   TH2F             *fhClusEtaPhiLowCellMax[10];         //! Clusters maximum energy cell index eta vs phi distribution for MB trigger, energy below 10 GeV
169   TH2F             *fhClusEtaPhiLowCellMaxCluMax[10];   //! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger, energy below 10 GeV
170
171   // Histograms bins
172   
173   Int_t             fNBinsSTUSignal   ;     // Number of bins for STU total signal histograms
174   Float_t           fMaxSTUSignal     ;     // Maximum value for TRU total signal histograms
175   Int_t             fNBinsTRUSignal   ;     // Number of bins for TRU total signal histograms
176   Float_t           fMaxTRUSignal     ;     // Maximum value for TRU total signal histograms
177   Int_t             fNBinsV0Signal    ;     // Number of bins for V0 total signal histograms
178   Float_t           fMaxV0Signal      ;     // Maximum value for V0 total signal histograms
179   Int_t             fNBinsSTUFEERatio ;     // Number of bins for STU/FEE ratios histograms
180   Float_t           fMaxSTUFEERatio   ;     // Maximum value for STU/FEE ratios histograms
181   Int_t             fNBinsSTUTRURatio ;     // Number of bins for STU/TRU ratios histograms
182   Float_t           fMaxSTUTRURatio   ;     // Maximum value for STU/TRU ratios histograms
183   Int_t             fNBinsClusterE    ;     // Number of bins for E cluster histograms
184   Float_t           fMaxClusterE      ;     // Maximum value for E cluster histograms
185
186   //Constants needed by the class: EMCAL 
187   static const int  fgkFALTRORows = AliEMCALGeoParams::fgkEMCALRows*(AliEMCALGeoParams::fgkEMCALModules-7)/2;   // total number 
188   // of fake altro rows    in EMCAL
189   // (ALTRO channels in one SM times 5 SM divided by 2 per FALTRO)
190   
191   static const int  fgkFALTROCols = AliEMCALGeoParams::fgkEMCALCols; // total number of fake altro columns in EMCAL 
192   // (ALTRO channels in one SM times 2 SM divided by 2 per FALTRO)
193   
194   
195   AliAnalysisTaskEMCALTriggerQA           (const AliAnalysisTaskEMCALTriggerQA&); // not implemented
196   
197   AliAnalysisTaskEMCALTriggerQA& operator=(const AliAnalysisTaskEMCALTriggerQA&); // not implemented
198   
199   ClassDef(AliAnalysisTaskEMCALTriggerQA, 11);   
200 };
201
202 #endif