AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEMCALTriggerQA.h
Go to the documentation of this file.
1 
6 #ifndef ALIEMCALTRIGGERQA_H
7 #define ALIEMCALTRIGGERQA_H
8 /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
9  * See cxx source for full Copyright notice */
10 
11 #include <TNamed.h>
12 #include <TArrayI.h>
13 #include <cstring>
14 
16 
18 class TCollection;
19 class TObjArray;
21 class AliVCaloCells;
22 class AliEMCALGeometry;
23 
29 class AliEMCALTriggerQA : public TNamed {
30 public:
31 
33 
34  enum PatchTypes_t {
38  };
39 
42  void Set(Int_t absId, Double_t e) { fAbsId = absId; fEnergy = e; }
43 
44  Short_t fAbsId;
45  Double_t fEnergy;
46  };
47 
49  AliEMCALTriggerQA(const char* name);
51  virtual ~AliEMCALTriggerQA();
52 
53  void SetDebugLevel(Int_t l) { fDebugLevel = l; }
54  void SetADCperBin(Int_t i) { fADCperBin = i; }
55 
56  Int_t GetDebugLevel() const { return fDebugLevel ; }
57 
58  void EnablePatchType(PatchTypes_t patchtype, EMCalTriggerType_t triggertype, Bool_t e);
59  Bool_t IsPatchTypeEnabled(Int_t patchtype, Int_t triggertype) const;
60  void EnableHistogramsByTimeStamp(UInt_t binWidth = 600){ fTimeStampBinWidth = binWidth ; }
61  void SetEMCALGeometry(const AliEMCALGeometry* geom) { fGeom = geom; }
62 
63  // This is the minimum set of methods that must be implemented by derived classes
64  virtual void Init() = 0;
65  virtual void ProcessPatch(const AliEMCALTriggerPatchInfo* patch) = 0;
66  virtual void ProcessFastor(const AliEMCALTriggerFastOR* fastor, AliVCaloCells* cells = 0) = 0;
67  virtual void EventCompleted() = 0;
68  virtual TCollection* GetListOfHistograms() = 0;
69 
70  // Additional virtual methods that can optionally be overloaded
71  virtual void ExecOnce();
72  virtual void ProcessCell(const AliEMCALCellInfo& /*cell*/) {;}
73  virtual void EventTimeStamp(UInt_t timeStamp);
74 
75  // These virtual methods are implemented only for PbPb
76  virtual void ProcessBkgPatch(const AliEMCALTriggerPatchInfo* /*patch*/) {;}
77  virtual void ComputeBackground() {;}
78  virtual void GetEMCalMedian(Double_t /*median*/[3]) const {;}
79  virtual void GetDCalMedian(Double_t /*median*/[3]) const {;}
80  virtual void GetEMCalBkg(Double_t /*bkg*/[3]) const {;}
81  virtual void GetDCalBkg(Double_t /*bkg*/[3]) const {;}
82 
83  static Int_t GetAmplitude(const AliEMCALTriggerPatchInfo* patch, Int_t itype);
84 
85  static const Int_t fgkSM = 20;
86  static const Int_t fgkNPatchTypes = 3;
87  static const Int_t fgkNTriggerTypes = 6;
88  static const Int_t fgkNDet = 2;
89 
90  static const Int_t fgkMaxPatchAmp[fgkNTriggerTypes];
91  static const TString fgkPatchTypes[fgkNPatchTypes];
92 
93 protected:
95  Int_t fFastorL0Th;
96  Int_t fFastorL1Th;
97  Int_t fADCperBin;
98  Int_t fDebugLevel;
100 
101  const AliEMCALGeometry *fGeom;
104 
105 private:
106  AliEMCALTriggerQA &operator=(const AliEMCALTriggerQA &); // not implemented
107 
109  ClassDef(AliEMCALTriggerQA, 3);
111 };
112 
113 #endif
void SetADCperBin(Int_t i)
virtual void Init()=0
virtual TCollection * GetListOfHistograms()=0
virtual void ProcessPatch(const AliEMCALTriggerPatchInfo *patch)=0
void SetEMCALGeometry(const AliEMCALGeometry *geom)
Int_t GetDebugLevel() const
#define TObjArray
static const TString fgkPatchTypes[fgkNPatchTypes]
Patch type names.
virtual void GetDCalBkg(Double_t[3]) const
UInt_t fEventTimeStamp
! Time stamp of the current event
Int_t fADCperBin
ADC counts per bin.
virtual void ExecOnce()
Actions to be executed only once for the first event.
static Int_t GetAmplitude(const AliEMCALTriggerPatchInfo *patch, Int_t itype)
virtual void GetEMCalMedian(Double_t[3]) const
Int_t fDebugLevel
Debug level.
virtual void ProcessBkgPatch(const AliEMCALTriggerPatchInfo *)
virtual void GetEMCalBkg(Double_t[3]) const
virtual void EventTimeStamp(UInt_t timeStamp)
UInt_t fEventTimeStampBin
! Time stamp bin
Bool_t IsPatchTypeEnabled(Int_t patchtype, Int_t triggertype) const
virtual void ComputeBackground()
void EnableHistogramsByTimeStamp(UInt_t binWidth=600)
static const Int_t fgkSM
virtual void EventCompleted()=0
static const Int_t fgkMaxPatchAmp[fgkNTriggerTypes]
Maximum patch amplitude for the histograms.
void Set(Int_t absId, Double_t e)
virtual void ProcessFastor(const AliEMCALTriggerFastOR *fastor, AliVCaloCells *cells=0)=0
UInt_t fTimeStampBinWidth
Time stamp bin width.
UInt_t fEnabledTriggerPatches[fgkNPatchTypes]
Patch types to be plotted.
static const Int_t fgkNDet
Main data structure storing all relevant information of EMCAL/DCAL trigger patches.
void SetDebugLevel(Int_t l)
Class to generate EMCal trigger QA plots.
static const Int_t fgkNPatchTypes
Int_t fFastorL1Th
FastOR L1 threshold.
Int_t fFastorL0Th
FastOR L0 threshold.
EMCALTrigger::EMCalTriggerType_t EMCalTriggerType_t
virtual void ProcessCell(const AliEMCALCellInfo &)
static const Int_t fgkNTriggerTypes
TEveGeoShape * geom
Definition: tpc_tracks.C:10
EMCalTriggerType_t
Definition of different trigger patch types.
virtual void GetDCalMedian(Double_t[3]) const
const AliEMCALGeometry * fGeom
! Pointer to the EMCal geometry
void EnablePatchType(PatchTypes_t patchtype, EMCalTriggerType_t triggertype, Bool_t e)
AliEMCALTriggerQA & operator=(const AliEMCALTriggerQA &)