AliPhysics  4c20e6b (4c20e6b)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalTriggerQAPP.h
Go to the documentation of this file.
1 
9 #ifndef ALIEMCALTRIGGERQAPP_H
10 #define ALIEMCALTRIGGERQAPP_H
11 
12 /**************************************************************************
13 * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
14 * *
15 * Author: The ALICE Off-line Project. *
16 * Contributors are mentioned in the code where appropriate. *
17 * *
18 * Permission to use, copy, modify and distribute this software and its *
19 * documentation strictly for non-commercial purposes is hereby granted *
20 * without fee, provided that the above copyright notice appears in all *
21 * copies and that both the copyright notice and this permission notice *
22 * appear in the supporting documentation. The authors make no claims *
23 * about the suitability of this software for any purpose. It is *
24 * provided "as is" without express or implied warranty. *
25 **************************************************************************/
26 
27 #include <set>
28 #include <iostream>
29 #include <TNamed.h>
30 #include <TArrayF.h>
31 #include "THistManager.h"
32 
33 class AliEMCALTriggerPatchInfo;
34 class TObjArray;
35 class THashList;
36 class AliEMCALTriggerFastOR;
37 class AliEMCALGeometry;
38 class AliVCaloCells;
39 
40 class AliEmcalTriggerQAPP : public TNamed {
41 public:
42 
43  typedef EMCALTrigger::EMCalTriggerType_t EMCalTriggerType_t;
44 
45  enum PatchTypes_t {
49  };
50 
53  void Set(Int_t absId, Double_t e) { fAbsId = absId; fEnergy = e; }
54 
55  Short_t fAbsId;
56  Double_t fEnergy;
57  };
58 
60  AliEmcalTriggerQAPP(const char* name);
61  AliEmcalTriggerQAPP(const AliEmcalTriggerQAPP& triggerQA);
62  virtual ~AliEmcalTriggerQAPP();
63 
64  void SetDebugLevel(Int_t l) { fDebugLevel = l; }
65  void SetADCperBin(Int_t i) { fADCperBin = i; }
66  void SetL0TimeRange(Int_t min, Int_t max) { fL0MinTime = min; fL0MaxTime = max; }
67  void AddFastORBadChannel(Short_t absId) { fBadChannels.insert(absId); }
68  void ReadFastORBadChannelFromStream(std::istream& stream);
69  void ReadFastORBadChannelFromFile(const char* fname);
70  void AddOfflineBadChannel(Short_t absId) { fOfflineBadChannels.insert(absId) ; }
71  void ReadOfflineBadChannelFromFile(const char* fname);
72  void ReadOfflineBadChannelFromStream(std::istream& stream);
73  void ReadFastORPedestalFromStream(std::istream& stream);
74  void ReadFastORPedestalFromFile(const char* fname);
75  void SetFastORPedestal(Short_t absId, Float_t ped);
77 
78  Int_t GetDebugLevel() const { return fDebugLevel ; }
79  void SetFastORandCellThresholds(Int_t l0, Int_t l1, Double_t cell) { fMinL0FastORAmp = l0; fMinL1FastORAmp = l1; fMinCellAmp = cell; }
80 
81  void EnablePatchType(PatchTypes_t type, Bool_t e = kTRUE);
82  void EnableTriggerType(EMCalTriggerType_t type, Bool_t e = kTRUE);
83  void EnableDCal(Bool_t e = kTRUE) { fDCalPlots = e; }
84  void EnableHistogramsByTimeStamp(UInt_t binWidth = 600){ fTimeStampBinWidth = binWidth ; }
85 
86  void Init();
87  void ExecOnce();
88  void ProcessPatch(AliEMCALTriggerPatchInfo* patch);
89  void ProcessFastor(AliEMCALTriggerFastOR* fastor, AliVCaloCells* cells);
90  void ProcessCell(const AliEmcalCellInfo& cell);
91  void EventCompleted();
92  void EventTimeStamp(UInt_t timeStamp);
93 
94  static Int_t GetAmplitude(AliEMCALTriggerPatchInfo* patch, Int_t itype);
95 
96  THashList* GetListOfHistograms() { return fHistManager.GetListOfHistograms(); }
97 
98  static const Int_t fgkMaxPatchAmp[6];
99  static const TString fgkPatchTypes[3];
100 
101 protected:
102 
103  std::set<Short_t> fOfflineBadChannels;
104  std::set<Short_t> fBadChannels;
105  TArrayF fFastORPedestal;
106  Bool_t fEnabledPatchTypes[3];
108  Int_t fFastorL0Th;
109  Int_t fFastorL1Th;
110  Int_t fADCperBin;
111  Int_t fDebugLevel;
112  Int_t fL0MinTime;
113  Int_t fL0MaxTime;
114  Double_t fMinCellAmp;
117  THistManager fHistManager;
118  Bool_t fDCalPlots;
120 
121  AliEMCALGeometry *fGeom;
122  AliEMCALTriggerPatchInfo *fMaxPatchEMCal[6][3];
123  AliEMCALTriggerPatchInfo *fMaxPatchDCal[6][3];
124  Double_t fSumOfflineEMCal;
125  Int_t fSumL0EMCal;
126  Int_t fSumL1EMCal;
127  Double_t fSumOfflineDCal;
128  Int_t fSumL0DCal;
129  Int_t fSumL1DCal;
130  Int_t fNCellEMCal;
131  Int_t fNL0EMCal;
132  Int_t fNL1EMCal;
133  Int_t fNCellDCal;
134  Int_t fNL0DCal;
135  Int_t fNL1DCal;
138  Int_t fNTotTRU;
139  Int_t fMaxFORabsId;
140 
141 private:
143 
145  ClassDef(AliEmcalTriggerQAPP, 3);
147 };
148 
149 #endif
Int_t fNL0EMCal
! EMCal number of L0 FastORs (will be reset each event)
AliEmcalTriggerQAPP & operator=(const AliEmcalTriggerQAPP &)
static Int_t GetAmplitude(AliEMCALTriggerPatchInfo *patch, Int_t itype)
Double_t fMinCellAmp
Minimum offline amplitude of the cells.
void EnablePatchType(PatchTypes_t type, Bool_t e=kTRUE)
Int_t fNCellDCal
! DCal number of offline cells (will be reset each event)
UInt_t fEventTimeStamp
! Time stamp of the current event
void EventTimeStamp(UInt_t timeStamp)
TArrayF fFastORPedestal
FastOR pedestal.
void Set(Int_t absId, Double_t e)
Int_t fSumL1EMCal
! EMCal sum of all online energy deposition (will be reset each event)
AliEMCALGeometry * fGeom
! EMCal geometry
THashList * GetListOfHistograms()
EMCALTrigger::EMCalTriggerType_t EMCalTriggerType_t
void SetDebugLevel(Int_t l)
void SetFastORandCellThresholds(Int_t l0, Int_t l1, Double_t cell)
void ExecOnce()
Actions to be executed only once for the first event.
Int_t fNCellEMCal
! EMCal number of offline cells (will be reset each event)
void EnableTriggerType(EMCalTriggerType_t type, Bool_t e=kTRUE)
Int_t fFastorL1Th
FastOR L1 threshold.
void SetFastORPedestal(Short_t absId, Float_t ped)
Bool_t fDCalPlots
Whether to add DCal QA plots.
void SetADCperBin(Int_t i)
void ReadFastORBadChannelFromStream(std::istream &stream)
void ReadFastORPedestalFromFile(const char *fname)
Int_t fMinL1FastORAmp
Minimum L1 amplitude of the FastORs.
static const Int_t fgkMaxPatchAmp[6]
Maximum patch amplitude for the histograms.
AliEMCALTriggerPatchInfo * fMaxPatchDCal[6][3]
! DCal max patch (will be reset each event)
void ReadFastORPedestalFromStream(std::istream &stream)
std::set< Short_t > fOfflineBadChannels
Abs ID of offline bad channels.
void ReadOfflineBadChannelFromFile(const char *fname)
void ProcessFastor(AliEMCALTriggerFastOR *fastor, AliVCaloCells *cells)
void EnableDCal(Bool_t e=kTRUE)
Double_t fSumOfflineEMCal
! EMCal sum of all offline energy deposition (will be reset each event)
Int_t fNTotTRU
! Total number of TRUs
Int_t fMaxFORabsId
! Maximum FastOR abs id
Int_t fADCperBin
ADC counts per bin.
virtual ~AliEmcalTriggerQAPP()
Destructor.
AliEmcalTriggerQAPP()
Dummy constructor for ROOT I/O.
void ReadOfflineBadChannelFromStream(std::istream &stream)
Int_t fNL0DCal
! DCal number of L0 FastORs (will be reset each event)
void AddOfflineBadChannel(Short_t absId)
UInt_t fTimeStampBinWidth
Time stamp bin width.
Int_t fL0MaxTime
Maximum L0 time.
Bool_t fEnabledTriggerTypes[6]
Trigger types to be plotted.
void EnableHistogramsByTimeStamp(UInt_t binWidth=600)
void ProcessPatch(AliEMCALTriggerPatchInfo *patch)
Int_t fSumL0DCal
! DCal sum of all online energy deposition (will be reset each event)
Int_t GetDebugLevel() const
Int_t fFastorL0Th
FastOR L0 threshold.
static const TString fgkPatchTypes[3]
Patch type names.
Double_t fSumOfflineDCal
! DCal sum of all offline energy deposition (will be reset each event)
Int_t fSumL0EMCal
! EMCal sum of all online energy deposition (will be reset each event)
void SetL0TimeRange(Int_t min, Int_t max)
THistManager fHistManager
Histogram manager.
Int_t fNL1DCal
! DCal number of L1 FastORs (will be reset each event)
void Init()
Initialize the class, i.e. allocate histograms.
Int_t fL0MinTime
Minimum L0 time.
void ReadFastORBadChannelFromFile(const char *fname)
Bool_t fEnabledPatchTypes[3]
Patch types to be plotted.
Int_t fDebugLevel
Debug level.
Class to generate EMCal trigger QA plots in pp collisions.
Int_t fSumL1DCal
! DCal sum of all online energy deposition (will be reset each event)
UInt_t fEventTimeStampBin
! Time stamp bin
Int_t fMinL0FastORAmp
Minimum L0 amplitude of the FastORs.
std::set< Short_t > fBadChannels
Container of bad channels.
AliEMCALTriggerPatchInfo * fMaxPatchEMCal[6][3]
! EMCal max patch (will be reset each event)
Int_t fNL1EMCal
! EMCal number of L1 FastORs (will be reset each event)
void AddFastORBadChannel(Short_t absId)
void ProcessCell(const AliEmcalCellInfo &cell)