Belle II Software  release-05-01-25
ARICHChannelHist.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <TH2Poly.h>
14 #include <TLine.h>
15 #include <TText.h>
16 
17 namespace Belle2 {
29  class ARICHChannelHist: public TH2Poly {
30 
31  public:
32 
36  ARICHChannelHist() {};
37 
44  ARICHChannelHist(const char* name, const char* title, int type = 0,
45  const std::vector<unsigned>& moduleIDs = std::vector<unsigned>());
46 
52  void fillBin(unsigned hapdID, unsigned chID, double weight = 1.);
53 
60  void setBinContent(unsigned hapdID, unsigned chID, double value);
61 
66  void fillBin(unsigned hapdID, double weight = 1.);
67 
73  void setBinContent(unsigned hapdID, double value);
74 
79  void Draw(Option_t* option = "") override;
80 
90  void fillFromTH1(TH1* hist);
91 
95  void setPoly(TH2Poly* poly);
96 
97  protected:
98 
99  TLine lines[6];
100  TText labels[6];
101  int m_type = 0;
102  std::vector<unsigned> m_hapd2binMap;
105  };
106 
108 } // end namespace Belle2
Belle2::ARICHChannelHist
ARICH histogram with HAPD plane 3 options for bin segmentation are available type 0 - one bin per HAP...
Definition: ARICHChannelHist.h:37
Belle2::ARICHChannelHist::fillBin
void fillBin(unsigned hapdID, unsigned chID, double weight=1.)
Add entry to bin corresponding to hapd hapdID and channel chID.
Definition: ARICHChannelHist.cc:179
Belle2::ARICHChannelHist::ARICHChannelHist
ARICHChannelHist()
Default constructor.
Definition: ARICHChannelHist.h:44
Belle2::ARICHChannelHist::Draw
void Draw(Option_t *option="") override
Draw the histogram.
Definition: ARICHChannelHist.cc:157
Belle2::ARICHChannelHist::m_type
int m_type
histogram type
Definition: ARICHChannelHist.h:109
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHChannelHist::setPoly
void setPoly(TH2Poly *poly)
Fill pure TH2Poly from ARICHChannelHist, makes bins and fills content.
Definition: ARICHChannelHist.cc:238
Belle2::ARICHChannelHist::m_hapd2binMap
std::vector< unsigned > m_hapd2binMap
map of bins
Definition: ARICHChannelHist.h:110
Belle2::ARICHChannelHist::fillFromTH1
void fillFromTH1(TH1 *hist)
Fill the channelHist from the histogram Type 0 channelHist has to be filled with 420*144bin TH1 (each...
Definition: ARICHChannelHist.cc:205
Belle2::ARICHChannelHist::setBinContent
void setBinContent(unsigned hapdID, unsigned chID, double value)
Set content of bin corresponding to hapd hapdID and channel chID.
Definition: ARICHChannelHist.cc:187
Belle2::ARICHChannelHist::ClassDefOverride
ClassDefOverride(ARICHChannelHist, 2)
ClassDef.