Belle II Software development
ARICHChannelHist.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
9#pragma once
10
11#include <TH2Poly.h>
12#include <TLine.h>
13#include <TText.h>
14
15namespace Belle2 {
27 class ARICHChannelHist: public TH2Poly {
28
29 public:
30
35
43 ARICHChannelHist(const char* name, const char* title, int type = 0,
44 const std::vector<unsigned>& moduleIDs = std::vector<unsigned>());
45
52 void fillBin(unsigned hapdID, unsigned chID, double weight = 1.);
53
60 void setBinContent(unsigned hapdID, unsigned chID, double value);
61
67 void fillBin(unsigned hapdID, double weight = 1.);
68
74 void setBinContent(unsigned hapdID, double value);
75
80 void Draw(Option_t* option = "") override;
81
91 void fillFromTH1(TH1* hist);
92
96 void setPoly(TH2Poly* poly);
97
98 protected:
99
100 TLine lines[6];
101 TText labels[6];
102 int m_type = 0;
103 std::vector<unsigned> m_hapd2binMap;
106 };
107
109} // end namespace Belle2
ARICH histogram with HAPD plane 3 options for bin segmentation are available type 0 - one bin per HAP...
void fillFromTH1(TH1 *hist)
Fill the channelHist from the histogram Type 0 channelHist has to be filled with 420*144bin TH1 (each...
void Draw(Option_t *option="") override
Draw the histogram.
void setBinContent(unsigned hapdID, unsigned chID, double value)
Set content of bin corresponding to hapd hapdID and channel chID.
ClassDefOverride(ARICHChannelHist, 2)
ClassDef.
std::vector< unsigned > m_hapd2binMap
map of bins
TLine lines[6]
array of lines
ARICHChannelHist()
Default constructor.
void fillBin(unsigned hapdID, unsigned chID, double weight=1.)
Add entry to bin corresponding to hapd hapdID and channel chID.
int m_type
histogram type
TText labels[6]
array of labels
void setPoly(TH2Poly *poly)
Fill pure TH2Poly from ARICHChannelHist, makes bins and fills content.
Abstract base class for different kinds of events.