Belle II Software  release-08-01-10
TOPCalPhotonYields.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 <TObject.h>
12 #include <framework/logging/Logger.h>
13 #include <vector>
14 #include <TH1F.h>
15 #include <TH2F.h>
16 
17 namespace Belle2 {
26  class TOPCalPhotonYields: public TObject {
27 
28  public:
29 
34 
40  void setTimeStamp(unsigned utime, unsigned utimeStd)
41  {
42  m_utime = utime;
43  m_utimeStd = utimeStd;
44  }
45 
57  void set(int slot, const TH1F* photonYields, const TH1F* backgroundYields, const TH1F* alphaRatio,
58  const TH1F* activePixels, const TH2F* pulseHeights, const TH1F* muonZ);
59 
64  unsigned getTimeStamp() const {return m_utime;}
65 
70  unsigned getTimeStampStd() const {return m_utimeStd;}
71 
78  const TH2F* getPhotonYields(int slot) const;
79 
86  const TH2F* getBackgroundYields(int slot) const;
87 
94  const TH2F* getAlphaRatio(int slot) const;
95 
101  const TH2F* getActivePixels(int slot) const;
102 
108  const TH2F* getPulseHeights(int slot) const;
109 
115  const TH1F* getMuonZ(int slot) const;
116 
117  private:
118 
122  enum EPixels {
123  c_numRows = 8,
124  c_numCols = 64
125  };
126 
132  void copyContent(const TH1F* input, TH2F& output);
133 
134  unsigned m_utime = 0;
135  unsigned m_utimeStd = 0;
136  std::vector<TH2F> m_photonYields;
137  std::vector<TH2F> m_backgroundYields;
138  std::vector<TH2F> m_alphaRatio;
139  std::vector<TH2F> m_activePixels;
140  std::vector<TH2F> m_pulseHeights;
141  std::vector<TH1F> m_muonZ;
145  };
146 
148 }
Class to store photon pixel yields for PMT ageing studies, and equalized alpha ratios for finding opt...
std::vector< TH2F > m_activePixels
active pixels (index = slot - 1)
std::vector< TH2F > m_pulseHeights
pixel pulse-heights (index = slot - 1)
unsigned m_utime
average unix time in seconds
unsigned m_utimeStd
standard deviation of unix time in seconds
unsigned getTimeStamp() const
Returns average unix time stamp of events used to make histograms stored in this class.
std::vector< TH1F > m_muonZ
local z distribution of tracks (index = slot - 1)
ClassDef(TOPCalPhotonYields, 2)
ClassDef.
std::vector< TH2F > m_alphaRatio
equalized alpha ratio per pixel (index = slot - 1)
unsigned getTimeStampStd() const
Returns standard deviation of unix time stamps of events used to make histograms stored in this class...
void setTimeStamp(unsigned utime, unsigned utimeStd)
Sets unix time stamp.
TOPCalPhotonYields()
Default constructor.
std::vector< TH2F > m_photonYields
photon yields per pixel (index = slot - 1)
std::vector< TH2F > m_backgroundYields
background yields per pixel (index = slot - 1)
EPixels
Number of pixel rows and columns.
@ c_numCols
number of pixel columns
@ c_numRows
number of pixel rows
void set(int slot, const TH1F *photonYields, const TH1F *backgroundYields, const TH1F *alphaRatio, const TH1F *activePixels, const TH2F *pulseHeights, const TH1F *muonZ)
Sets the data of a given slot.
const TH2F * getAlphaRatio(int slot) const
Returns a 2D histogram of equalized pixel alpha ratio.
const TH1F * getMuonZ(int slot) const
Returns z distribution of tracks used to determine pixel yields.
const TH2F * getActivePixels(int slot) const
Returns a 2D histogram of active pixels.
const TH2F * getPulseHeights(int slot) const
Returns a 2D histogram of pixel pulse-heights.
const TH2F * getBackgroundYields(int slot) const
Returns a 2D histogram of background pixel yields.
void copyContent(const TH1F *input, TH2F &output)
Copy content of 1D histogram into 2D histogram.
const TH2F * getPhotonYields(int slot) const
Returns a 2D histogram of photon pixel yields.
Abstract base class for different kinds of events.