Belle II Software development
TOPWaveformQualityPlotterModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10// from basf2
11#include <framework/core/HistoModule.h>
12#include <framework/datastore/StoreArray.h>
13#include <top/dataobjects/TOPRawWaveform.h>
14
15// stl
16#include <string>
17#include <set>
18#include <map>
19
20// ROOT
21#include "TH1F.h"
22#include "TH2F.h"
23#include "TProfile.h"
24#include "TMultiGraph.h"
25#include "TDirectory.h"
26
27namespace Belle2 {
36 typedef unsigned long long top_channel_id_t;
37 public:
42
46 void defineHisto() override;
47
51 void initialize() override;
52
56 void event() override;
57
62 void endRun() override;
63
68 void drawWaveforms(const TOPRawWaveform& rawwave);
69
74 void basicDebuggingPlots(const TOPRawWaveform& rawwave);
75
76 private:
77 int m_iEvent = -1;
78 TH1F* m_samples = 0;
79 std::map<int, TH2F*> m_hitmap;
80 TH1F* m_scrod_id = 0;
81 TH1F* m_asic = 0;
82 TH1F* m_carrier = 0;
83 TH1F* m_asic_ch = 0;
84 TH1F* m_errorFlag = 0;
85 TH1F* m_asic_win = 0;
86 TH1F* m_entries = 0;
87 TH1F* m_moduleID = 0;
88 TH1F* m_pixelID = 0;
91 std::map<top_channel_id_t, TH1F*> m_channelNoiseMap;
92 std::map<top_channel_id_t, int> m_channelEventMap;
94 std::map<int, std::map<std::string, TMultiGraph*>> m_channels;
95 std::map<int, std::map<std::string, std::set<int>>> m_channelLabels;
97 std::map<int, std::map<int, std::map<int, std::map<int, TProfile*>>>> m_waveformHists;
99 bool m_DRAWWAVES = true;
100 bool m_DEBUGGING = true;
101 bool m_NOISE = false;
104 TDirectory* m_directory = 0;
106 };
107
109}
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Class to store raw data waveforms.
Plots and histograms of waveforms and feature extracted parameters.
unsigned long long top_channel_id_t
topcaf channel ID (deprecated?)
std::map< int, std::map< std::string, TMultiGraph * > > m_channels
per board stack, per asic
std::map< top_channel_id_t, int > m_channelEventMap
to find in which chunk a given channel is
TH1F * m_asic_ch
plot of ASIC channel ID debugging
std::map< int, std::map< int, std::map< int, std::map< int, TProfile * > > > > m_waveformHists
scrod, carrier, asic, channel
int m_iEvent
keeps track of iterations within run
TH1F * m_pixelID
plot of pixel ID for debugging
std::string m_histogramDirectoryName
the name of the directory inside the output file
std::map< int, TH2F * > m_hitmap
hitmaps for each SCROD
std::map< top_channel_id_t, TH1F * > m_channelNoiseMap
histogram of the values after correction
TH1F * m_carrier
plot of carrier IDs for debugging
StoreArray< TOPRawWaveform > m_waveform
the raw waveforms
std::map< int, std::map< std::string, std::set< int > > > m_channelLabels
per board stack, per asic
TH1F * m_errorFlag
plot of error flag (not impemented)
TH1F * m_scrod_id
plot of SCROD IDs for debugging
TH1F * m_asic
plot of ASIC number for debugging
void initialize() override
Module initialization, calls defineHisto and gets waveform.
void basicDebuggingPlots(const TOPRawWaveform &rawwave)
Fills the debugging 1D histograms and hitmaps.
void drawWaveforms(const TOPRawWaveform &rawwave)
Draws the full waveforms onto the TProfiles.
void defineHisto() override
Books the empty histograms.
Abstract base class for different kinds of events.