Belle II Software development
EclPainterPolar.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//ECL
12#include <ecl/modules/eclDisplay/EclPainter.h>
13
14class TH2F;
15class TCrown;
16class TText;
17
18namespace Belle2 {
26 class EclPainterPolar : public EclPainter {
27 public:
31 enum Type {PHI, THETA};
32
36 EclPainterPolar(EclData* data, Type type);
38 EclPainterPolar(const EclPainterPolar& other) : EclPainter(other) { cloneFrom(other); }
43
45 EclPainterPolar& operator=(const EclPainterPolar& other) { cloneFrom(other); return *this; }
46
47 private:
51 TH2F* m_hist;
53 TCrown** m_segs;
55 TText** m_labels;
56
60 void cloneFrom(const EclPainterPolar& other);
64 int channelToSegId(int channel);
68 void setTitles();
69
70 public:
78 virtual void getInformation(int px, int py, MultilineWidget* panel) override;
79
83 Type getType();
84
88 virtual void Draw() override;
89 };
91}
This class contains data for ECLSimHit's and provides several relevant conversion functions for bette...
Definition: EclData.h:31
Painter for EclData, polar energy/event_count distribution.
Type m_type
Type for polar histogram.
Type
Type for polar histogram.
void setTitles()
Update titles of the histogram.
int channelToSegId(int channel)
Convert ECL channel id to id of the phi (theta) segment.
void cloneFrom(const EclPainterPolar &other)
Clone attributes from other EclPainterPolar.
virtual void getInformation(int px, int py, MultilineWidget *panel) override
Sets the information to be displayed in the provided MultilineWidget.
Type getType()
Return subtype of ECLPainterPolar.
EclPainterPolar(const EclPainterPolar &other)
Copy constructor.
TText ** m_labels
Labels for phi segments.
TCrown ** m_segs
Phi (or theta) segments of the ECL.
TH2F * m_hist
Histogram that generates Z-axis.
~EclPainterPolar()
Destructor for EclPainter subclass.
EclPainterPolar & operator=(const EclPainterPolar &other)
Assignment operator.
virtual void Draw() override
Redraw the canvas.
Painter for EclData, parent class, created with EclPainterFactory.
Definition: EclPainter.h:29
Widget which contains the dynamic amount of TGLabel objects.
Abstract base class for different kinds of events.