Line data Source code
1 : /**
2 : * @file AliEMCALTriggerOnlineQAPbPb.h
3 : * @date Nov. 23, 2015
4 : * @author Salvatore Aiola <salvatore.aiola@cern.ch>, Yale University
5 : */
6 : #ifndef ALIEMCALONLINETRIGGERQAPBPB_H
7 : #define ALIEMCALONLINETRIGGERQAPBPB_H
8 : /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
9 : * See cxx source for full Copyright notice */
10 :
11 : #include <TArrayI.h>
12 : #include <cstring>
13 : #include <THashList.h>
14 :
15 : #include "AliEMCALTriggerQA.h"
16 :
17 : class AliEMCALTriggerPatchInfo;
18 : class THashList;
19 : class TObjArray;
20 : class AliEMCALTriggerFastOR;
21 : class AliVCaloCells;
22 :
23 : /**
24 : * @class AliEMCALTriggerQAPbPb
25 : * @brief Class to generate EMCal trigger QA plots in PbPb collision mode
26 : */
27 :
28 : class AliEMCALTriggerOnlineQAPbPb : public AliEMCALTriggerQA {
29 : public:
30 :
31 : AliEMCALTriggerOnlineQAPbPb();
32 : AliEMCALTriggerOnlineQAPbPb(const char* name);
33 : AliEMCALTriggerOnlineQAPbPb(const AliEMCALTriggerOnlineQAPbPb& triggerQA);
34 : virtual ~AliEMCALTriggerOnlineQAPbPb();
35 :
36 0 : void SetBkgPatchType(Int_t t) { fBkgPatchType = t; }
37 0 : Int_t GetBkgPatchType() const { return fBkgPatchType ; }
38 :
39 : void Init();
40 : void ProcessPatch(const AliEMCALTriggerPatchInfo* patch);
41 : void ProcessBkgPatch(const AliEMCALTriggerPatchInfo* patch);
42 : void ProcessFastor(const AliEMCALTriggerFastOR* fastor, AliVCaloCells* /*cells*/ = 0);
43 : void EventCompleted();
44 : void ComputeBackground();
45 :
46 0 : void GetEMCalMedian(Double_t median[3]) const { memcpy(median, fMedianEMCal, sizeof(Double_t)*3); }
47 0 : void GetDCalMedian(Double_t median[3]) const { memcpy(median, fMedianDCal, sizeof(Double_t)*3) ; }
48 0 : void GetEMCalBkg(Double_t bkg[3]) const { memcpy(bkg, fBkgEMCal, sizeof(Double_t)*3) ; }
49 0 : void GetDCalBkg(Double_t bkg[3]) const { memcpy(bkg, fBkgDCal, sizeof(Double_t)*3) ; }
50 :
51 0 : TCollection* GetListOfHistograms() { return fHistos; }
52 :
53 : protected:
54 : Int_t fBkgPatchType; ///< Background patch type
55 :
56 : TArrayI fBkgADCAmpEMCal[3]; //!<! ADC EMCal amplitudes (0=online, 1=offline) of background patches (will be reset each event)
57 : Int_t fNBkgPatchesEMCal[3]; //!<! Number of processed background patches (will be reset each event)
58 : Int_t fMaxPatchEMCal[6][3]; //!<! EMCal max ADC amplitude (0=online, 1=offline) (will be reset each event)
59 : TArrayI fBkgADCAmpDCal[3]; //!<! ADC DCal amplitudes (0=online, 1=offline) of background patches (will be reset each event)
60 : Int_t fNBkgPatchesDCal[3]; //!<! Number of processed background patches (will be reset each event)
61 : Int_t fMaxPatchDCal[6][3]; //!<! DCal max ADC amplitude (0=online, 1=offline) (will be reset each event)
62 : Int_t fPatchAreas[6]; //!<! Patch sizes retrieved directly during the patch processing
63 : Double_t fMedianEMCal[3]; //!<! Median of background patches in the EMCal
64 : Double_t fMedianDCal[3]; //!<! Median of background patches in the DCal
65 : Double_t fBkgEMCal[3]; //!<! Background in the EMCal
66 : Double_t fBkgDCal[3]; //!<! Background in the DCal
67 : THashList *fHistos; //!<! Histograms for QA
68 :
69 : private:
70 : void CreateTProfile(const char *name, const char *title, int nbins, double xmin, double xmax);
71 : void CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax);
72 : void CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax);
73 : void CreateTH3(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int nbinsz, double zmin, double zmax);
74 : void FillTProfile(const char *name, double x, double y, double weight = 1.);
75 : void FillTH1(const char *hname, double x, double weight = 1.);
76 : void FillTH2(const char *hname, double x, double y, double weight = 1.);
77 : void FillTH3(const char *hname, double x, double y, double z, double weight = 1.);
78 :
79 : TObject *FindObject(const char *name) const;
80 : virtual TObject *FindObject(const TObject *obj) const;
81 :
82 : AliEMCALTriggerOnlineQAPbPb &operator=(const AliEMCALTriggerOnlineQAPbPb &);
83 :
84 : /// \cond CLASSIMP
85 22 : ClassDef(AliEMCALTriggerOnlineQAPbPb, 1);
86 : /// \endcond
87 : };
88 :
89 : #endif
|