AliRoot Core  edcc906 (edcc906)
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 
30 class AliEMCALTriggerQA : public TNamed {
31 public:
32 
34 
35  enum PatchTypes_t {
39  };
40 
43  void Set(Int_t absId, Double_t e) { fAbsId = absId; fEnergy = e; }
44 
45  Short_t fAbsId;
46  Double_t fEnergy;
47  };
48 
50  AliEMCALTriggerQA(const char* name);
52  virtual ~AliEMCALTriggerQA();
53 
54  void SetDebugLevel(Int_t l) { fDebugLevel = l; }
55  void SetADCperBin(Int_t i) { fADCperBin = i; }
56 
57  Int_t GetDebugLevel() const { return fDebugLevel ; }
58 
59  void EnablePatchType(PatchTypes_t patchtype, EMCalTriggerType_t triggertype, Bool_t e);
60  Bool_t IsPatchTypeEnabled(Int_t patchtype, Int_t triggertype) const;
61  void EnableHistogramsByTimeStamp(UInt_t binWidth = 600){ fTimeStampBinWidth = binWidth ; }
63 
64  // This is the minimum set of methods that must be implemented by derived classes
65  virtual void Init() = 0;
66  virtual void ProcessPatch(const AliEMCALTriggerPatchInfo* patch) = 0;
67  virtual void ProcessFastor(const AliEMCALTriggerFastOR* fastor, AliVCaloCells* cells = 0) = 0;
68  virtual void EventCompleted() = 0;
69  virtual TCollection* GetListOfHistograms() = 0;
70 
71  // Additional virtual methods that can optionally be overloaded
72  virtual void ExecOnce();
73  virtual void ProcessCell(const AliEMCALCellInfo& /*cell*/) {;}
74  virtual void EventTimeStamp(UInt_t timeStamp);
75 
76  // These virtual methods are implemented only for PbPb
77  virtual void ProcessBkgPatch(const AliEMCALTriggerPatchInfo* /*patch*/) {;}
78  virtual void ComputeBackground() {;}
79  virtual void GetEMCalMedian(Double_t /*median*/[3]) const {;}
80  virtual void GetDCalMedian(Double_t /*median*/[3]) const {;}
81  virtual void GetEMCalBkg(Double_t /*bkg*/[3]) const {;}
82  virtual void GetDCalBkg(Double_t /*bkg*/[3]) const {;}
83 
84  static Int_t GetAmplitude(const AliEMCALTriggerPatchInfo* patch, Int_t itype);
85 
86  static const Int_t fgkSM = 20;
87  static const Int_t fgkNPatchTypes = 3;
88  static const Int_t fgkNTriggerTypes = 6;
89  static const Int_t fgkNDet = 2;
90 
91  static const Int_t fgkMaxPatchAmp[fgkNTriggerTypes];
92  static const TString fgkPatchTypes[fgkNPatchTypes];
93 
94 protected:
96  Int_t fFastorL0Th;
97  Int_t fFastorL1Th;
98  Int_t fADCperBin;
99  Int_t fDebugLevel;
101 
105 
106 private:
107  AliEMCALTriggerQA &operator=(const AliEMCALTriggerQA &); // not implemented
108 
110  ClassDef(AliEMCALTriggerQA, 3);
112 };
113 
114 #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
Virtual class for calorimeter cell data handling.
Definition: AliVCaloCells.h:19
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
Trigger FastOR data struct.
EMCalTriggerType_t
Definition of different trigger patch types.
virtual void GetDCalMedian(Double_t[3]) const
EMCal geometry, singleton.
const AliEMCALGeometry * fGeom
! Pointer to the EMCal geometry
void EnablePatchType(PatchTypes_t patchtype, EMCalTriggerType_t triggertype, Bool_t e)
AliEMCALTriggerQA & operator=(const AliEMCALTriggerQA &)