QualityControl  1.5.1
O2 Data Quality Control Framework
PhysicsTaskDigits.h
Go to the documentation of this file.
1 
8 #ifndef QC_MODULE_MUONCHAMBERS_PHYSICSTASKDIGITS_H
9 #define QC_MODULE_MUONCHAMBERS_PHYSICSTASKDIGITS_H
10 
12 #include "MCHRawElecMap/Mapper.h"
13 #include "MCHBase/Digit.h"
14 #include "MCH/GlobalHistogram.h"
15 
16 class TH1F;
17 class TH2F;
18 
19 #define MCH_FEEID_NUM 64
20 
21 using namespace o2::quality_control::core;
22 
23 namespace o2
24 {
25 namespace quality_control_modules
26 {
27 namespace muonchambers
28 {
29 
33 class PhysicsTaskDigits /*final*/ : public TaskInterface // todo add back the "final" when doxygen is fixed
34 {
35  public:
39  ~PhysicsTaskDigits() override;
40 
41  // Definition of the methods for the template method pattern
42  void initialize(o2::framework::InitContext& ctx) override;
43  void startOfActivity(Activity& activity) override;
44  void startOfCycle() override;
45  void monitorData(o2::framework::ProcessingContext& ctx) override;
46  void endOfCycle() override;
47  void endOfActivity(Activity& activity) override;
48  void reset() override;
49 
50  private:
51  void plotDigit(const o2::mch::Digit& digit);
52 
53  o2::mch::raw::Elec2DetMapper mElec2DetMapper;
54  o2::mch::raw::Det2ElecMapper mDet2ElecMapper;
55  o2::mch::raw::FeeLink2SolarMapper mFeeLink2SolarMapper;
56  o2::mch::raw::Solar2FeeLinkMapper mSolar2FeeLinkMapper;
57 
58  uint32_t norbits[MCH_FEEID_NUM][12];
59  uint32_t lastorbitseen[MCH_FEEID_NUM][12];
60  // Mesn Occupancy on each DE
61  double MeanOccupancyDE[1100];
62  // Mean Occupancy on each DE during the elapsed cycle, and arrays needed to compute it
63  double MeanOccupancyDECycle[1100];
64  // Arrays needed for the computation of Occupancy on elapsed cycle
65  double LastMeanNhitsDE[1100];
66  double LastMeanNorbitsDE[1100];
67  double NewMeanNhitsDE[1100];
68  double NewMeanNorbitsDE[1100];
69 
70  int NbinsDE[1100];
71 
72  // 2D Histograms, using Elec view (where x and y uniquely identify each pad based on its Elec info (fee, link, de)
73  TH2F* mHistogramNHitsElec;
74  TH2F* mHistogramNorbitsElec;
75  TH2F* mHistogramOccupancyElec;
76 
77  // TH1 of the Mean Occupancy on each DE, integrated or only on elapsed cycle - Sent for Trending
78  TH1F* mMeanOccupancyPerDE;
79  TH1F* mMeanOccupancyPerDECycle;
80 
81  TH2F* mHistogramNhits[1100];
82  TH1F* mHistogramADCamplitude[1100];
83  std::map<int, TH1F*> mHistogramADCamplitudeDE;
84  std::map<int, TH2F*> mHistogramNhitsDE[2];
85  std::map<int, TH2F*> mHistogramNorbitsDE[2];
86  std::map<int, TH2F*> mHistogramOccupancyXY[2];
87 
88  GlobalHistogram* mHistogramOccupancy[1];
89  GlobalHistogram* mHistogramOrbits[1];
90 };
91 
92 } // namespace muonchambers
93 } // namespace quality_control_modules
94 } // namespace o2
95 
96 #endif // QC_MODULE_MUONCHAMBERS_PHYSICSDATAPROCESSOR_H
Skeleton of a QC task.
Definition: TaskInterface.h:53
Dummy class that should be removed when there is the official one. This corresponds to a Run1/2 "run"...
Definition: Activity.h:25
Quality Control Task for the analysis of MCH physics data.
Definition: PhysicsTaskDigits.h:33
These methods can be used to build a complex processing topology. It spawns 3 separate dummy processi...
Definition: Activity.h:19