Belle II Software  release-05-01-25
EclPainterPolar.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Mikhail Remnev, Dmitry Matvienko *
7  * *
8  * This software is provided "as is" without any warranty. *
9  ***************************************************************************/
10 
11 #pragma once
12 
13 //ECL
14 #include <ecl/modules/eclDisplay/EclPainter.h>
15 
16 class TH2F;
17 class TCrown;
18 class TText;
19 
20 namespace Belle2 {
28  class EclPainterPolar : public EclPainter {
29  public:
33  enum Type {PHI, THETA};
34 
38  EclPainterPolar(EclData* data, Type type);
40  EclPainterPolar(const EclPainterPolar& other) : EclPainter(other) { cloneFrom(other); }
45 
47  EclPainterPolar& operator=(const EclPainterPolar& other) { cloneFrom(other); return *this; }
48 
49  private:
53  TH2F* m_hist;
55  TCrown** m_segs;
57  TText** m_labels;
58 
62  void cloneFrom(const EclPainterPolar& other);
66  int channelToSegId(int channel);
70  void setTitles();
71 
72  public:
79  virtual void getInformation(int px, int py, MultilineWidget* panel) override;
80 
84  Type getType();
85 
89  virtual void Draw() override;
90  };
92 }
Belle2::EclPainterPolar::operator=
EclPainterPolar & operator=(const EclPainterPolar &other)
Assignment operator.
Definition: EclPainterPolar.h:47
Belle2::EclPainterPolar::cloneFrom
void cloneFrom(const EclPainterPolar &other)
Clone attributes from other EclPainterPolar.
Definition: EclPainterPolar.cc:58
Belle2::EclPainterPolar::m_hist
TH2F * m_hist
Histogram that generates Z-axis.
Definition: EclPainterPolar.h:53
Belle2::EclPainterPolar::setTitles
void setTitles()
Update titles of the histogram.
Definition: EclPainterPolar.cc:84
Belle2::EclPainterPolar
Painter for EclData, polar energy/event_count distribution.
Definition: EclPainterPolar.h:28
Belle2::EclPainterPolar::m_segs
TCrown ** m_segs
Phi (or theta) segments of the ECL.
Definition: EclPainterPolar.h:55
Belle2::EclPainter
Painter for EclData, parent class, created with EclPainterFactory.
Definition: EclPainter.h:31
Belle2::EclPainterPolar::Draw
virtual void Draw() override
Redraw the canvas.
Definition: EclPainterPolar.cc:110
Belle2::EclPainterPolar::getInformation
virtual void getInformation(int px, int py, MultilineWidget *panel) override
Sets the information to be displayed in the provided MultilineWidget.
Definition: EclPainterPolar.cc:100
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::MultilineWidget
Widget which contains the dynamic amount of TGLabel objects.
Definition: MultilineWidget.h:32
Belle2::EclPainterPolar::EclPainterPolar
EclPainterPolar(EclData *data, Type type)
Constructor for EclPainter subclass.
Definition: EclPainterPolar.cc:27
Belle2::EclPainterPolar::~EclPainterPolar
~EclPainterPolar()
Destructor for EclPainter subclass.
Definition: EclPainterPolar.cc:53
Belle2::EclPainterPolar::m_labels
TText ** m_labels
Labels for phi segments.
Definition: EclPainterPolar.h:57
Belle2::EclData
This class contains data for ECLSimHit's and provides several relevant conversion functions for bette...
Definition: EclData.h:41
Belle2::EclPainterPolar::m_type
Type m_type
Type for polar histogram.
Definition: EclPainterPolar.h:51
Belle2::EclPainterPolar::getType
Type getType()
Return subtype of ECLPainterPolar.
Definition: EclPainterPolar.cc:105
Belle2::EclPainterPolar::Type
Type
Type for polar histogram.
Definition: EclPainterPolar.h:33
Belle2::EclPainterPolar::EclPainterPolar
EclPainterPolar(const EclPainterPolar &other)
Copy constructor.
Definition: EclPainterPolar.h:40
Belle2::EclPainterPolar::channelToSegId
int channelToSegId(int channel)
Convert ECL channel id to id of the phi (theta) segment.
Definition: EclPainterPolar.cc:68