Belle II Software development
ARICHMergerHist.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * *
4 * This file is licensed under LGPL-3.0, see LICENSE.md. *
5 **************************************************************************/
6
7#pragma once
8
9#include <vector>
10
11#include <TH2Poly.h>
12#include <TH1.h>
13#include <TLine.h>
14
15namespace Belle2 {
20
34 class ARICHMergerHist : public TH2Poly {
35
36 public:
38 ARICHMergerHist() = default;
39
45 ARICHMergerHist(const char* name,
46 const char* title,
47 double globalRotationDeg = 0.0,
48 bool rightToLeftNumbering = true);
49
52 void fillFromTH1(TH1* hist);
53
55 void SetBinContentFromSN(unsigned mergerID, double value);
56
59 void Draw(Option_t* option = "") override;
60
61 protected:
62 std::vector<int> m_merger2bin;
63 double m_globalRotationDeg = 0.0;
64 bool m_rightToLeft = true;
65 TLine m_lines[6];
66
72 static void pol2xy(double r, double angDeg, double& x, double& y);
73
75 ClassDefOverride(ARICHMergerHist, 1);
77 };
78
80} // namespace Belle2
void fillFromTH1(TH1 *hist)
Fill from TH1.
void Draw(Option_t *option="") override
Draw with sector lines and labels.
static void pol2xy(double r, double angDeg, double &x, double &y)
Convert polar coordinates to cartesian.
bool m_rightToLeft
If true, numbering in each ring is right-to-left.
ARICHMergerHist()=default
Default constructor.
double m_globalRotationDeg
Global rotation applied to the geometry (degrees).
TLine m_lines[6]
Sector boundary lines drawn on top of the histogram.
std::vector< int > m_merger2bin
Merger number (1..72) → TH2Poly bin index.
void SetBinContentFromSN(unsigned mergerID, double value)
Set content using the real ARICH hardware MergerID.
Abstract base class for different kinds of events.