Belle II Software  release-05-01-25
TOP1Dpdf.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <vector>
14 #include <string>
15 #include <TH1F.h>
16 #include <top/reconstruction/TOPreco.h>
17 #include <framework/datastore/StoreArray.h>
18 #include <top/dataobjects/TOPDigit.h>
19 
20 
21 namespace Belle2 {
26  namespace TOP {
27 
31  class TOP1Dpdf {
32 
33  public:
34 
42  TOP1Dpdf(TOPreco& reco, const StoreArray<TOPDigit>& digits,
43  int moduleID, double binSize);
44 
49  double getBinSize() const {return m_binSize;}
50 
55  int getModuleID() const {return m_moduleID;}
56 
63  TH1F getHistogram(std::string name, std::string title) const;
64 
69  const std::vector<double>& getPhotonTimes() const {return m_times;}
70 
75  int getNumOfPhotons() const {return m_times.size();}
76 
81  double getExpectedSignal() const {return m_expectedSignal;}
82 
87  double getExpectedBG() const {return m_expectedBG;}
88 
93  double getTminPDF() const {return m_tminPDF;}
94 
99  double getTmaxPDF() const {return m_tmaxPDF;}
100 
105  double getTminFot() const {return m_tminFot;}
106 
111  double getTmaxFot() const {return m_tmaxFot;}
112 
117  double getMinT0() const {return m_minT0;}
118 
123  double getMaxT0() const {return m_maxT0;}
124 
129  int getNumBinsT0() const {return m_numBinsT0;}
130 
136  double getLogL(double timeShift) const;
137 
138 
139  private:
140 
141  int m_moduleID = 0;
142  int m_numBins = 0;
143  double m_minTime = 0;
144  double m_maxTime = 0;
146  std::vector<double> m_times;
147  double m_tminPDF = 0;
148  double m_tmaxPDF = 0;
149  double m_tminFot = 0;
150  double m_tmaxFot = 0;
151  double m_minT0 = 0;
152  double m_maxT0 = 0;
153  int m_numBinsT0 = 0;
154  double m_expectedBG = 0;
155  double m_expectedSignal = 0;
157  double m_bkg = 0;
158  double m_binSize = 0;
159  std::vector<double> m_logF;
160  double m_logBkg = 0;
162  };
163 
164  } // namespace TOP
166 } // namespace Belle2
167 
Belle2::TOP::TOP1Dpdf::m_times
std::vector< double > m_times
photon times, from a given slot
Definition: TOP1Dpdf.h:154
Belle2::TOP::TOP1Dpdf::getExpectedBG
double getExpectedBG() const
Returns expected number of background photons.
Definition: TOP1Dpdf.h:95
Belle2::TOP::TOP1Dpdf::m_minT0
double m_minT0
minimal T0
Definition: TOP1Dpdf.h:159
Belle2::TOP::TOP1Dpdf::getTminPDF
double getTminPDF() const
Returns minimal time of signal PDF.
Definition: TOP1Dpdf.h:101
Belle2::TOP::TOP1Dpdf::m_numBinsT0
int m_numBinsT0
number of bins for T0 finder w/ same bin size as PDF
Definition: TOP1Dpdf.h:161
Belle2::TOP::TOP1Dpdf::m_tmaxFot
double m_tmaxFot
maximal time of photons
Definition: TOP1Dpdf.h:158
Belle2::TOP::TOP1Dpdf::getMinT0
double getMinT0() const
Returns lower edge of the T0 search region.
Definition: TOP1Dpdf.h:125
Belle2::TOP::TOP1Dpdf::getNumOfPhotons
int getNumOfPhotons() const
Returns number of photons.
Definition: TOP1Dpdf.h:83
Belle2::TOP::TOP1Dpdf::m_expectedSignal
double m_expectedSignal
expected number of signal photons
Definition: TOP1Dpdf.h:163
Belle2::TOP::TOP1Dpdf::getBinSize
double getBinSize() const
Returns actual bin size used.
Definition: TOP1Dpdf.h:57
Belle2::TOP::TOP1Dpdf::m_logBkg
double m_logBkg
log(m_bkg)
Definition: TOP1Dpdf.h:168
Belle2::TOP::TOP1Dpdf::getMaxT0
double getMaxT0() const
Returns upper edge of the T0 search region.
Definition: TOP1Dpdf.h:131
Belle2::TOP::TOP1Dpdf::getModuleID
int getModuleID() const
Returns slot number.
Definition: TOP1Dpdf.h:63
Belle2::TOP::TOP1Dpdf::m_moduleID
int m_moduleID
slot number
Definition: TOP1Dpdf.h:149
Belle2::TOP::TOP1Dpdf::m_minTime
double m_minTime
lower edge of the first bin
Definition: TOP1Dpdf.h:151
Belle2::TOP::TOP1Dpdf::m_maxTime
double m_maxTime
upper edge of the last bin
Definition: TOP1Dpdf.h:152
Belle2::TOP::TOP1Dpdf::m_tmaxPDF
double m_tmaxPDF
maximal time of signal PDF
Definition: TOP1Dpdf.h:156
Belle2::TOP::TOP1Dpdf::m_binSize
double m_binSize
bin size
Definition: TOP1Dpdf.h:166
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOP::TOP1Dpdf::m_bkg
double m_bkg
background [photons/bin]
Definition: TOP1Dpdf.h:165
Belle2::TOP::TOP1Dpdf::m_logF
std::vector< double > m_logF
log(PDF) values
Definition: TOP1Dpdf.h:167
Belle2::TOP::TOP1Dpdf::getNumBinsT0
int getNumBinsT0() const
Returns number of bins the T0 search region.
Definition: TOP1Dpdf.h:137
Belle2::TOP::TOP1Dpdf::getExpectedSignal
double getExpectedSignal() const
Returns expected number of signal photons.
Definition: TOP1Dpdf.h:89
Belle2::TOP::TOP1Dpdf::m_expectedBG
double m_expectedBG
expected number of background photons
Definition: TOP1Dpdf.h:162
Belle2::TOP::TOP1Dpdf::getPhotonTimes
const std::vector< double > & getPhotonTimes() const
Returns photon times of selected photons in a given slot.
Definition: TOP1Dpdf.h:77
Belle2::TOP::TOP1Dpdf::m_maxT0
double m_maxT0
maximal T0
Definition: TOP1Dpdf.h:160
Belle2::TOP::TOP1Dpdf::m_numBins
int m_numBins
number of bins for signal PDF
Definition: TOP1Dpdf.h:150
Belle2::TOP::TOP1Dpdf::getTmaxPDF
double getTmaxPDF() const
Returns maximal time of signal PDF.
Definition: TOP1Dpdf.h:107
Belle2::TOP::TOP1Dpdf::getTmaxFot
double getTmaxFot() const
Returns maximal time of selected photons.
Definition: TOP1Dpdf.h:119
Belle2::TOP::TOP1Dpdf::m_tminFot
double m_tminFot
minimal time of photons
Definition: TOP1Dpdf.h:157
Belle2::TOP::TOP1Dpdf::getHistogram
TH1F getHistogram(std::string name, std::string title) const
Returns binned one dimensional PDF (projection to time axis)
Definition: TOP1Dpdf.cc:119
Belle2::TOP::TOP1Dpdf::TOP1Dpdf
TOP1Dpdf(TOPreco &reco, const StoreArray< TOPDigit > &digits, int moduleID, double binSize)
Full constructor.
Definition: TOP1Dpdf.cc:30
Belle2::TOP::TOP1Dpdf::getTminFot
double getTminFot() const
Returns minimal time of selected photons.
Definition: TOP1Dpdf.h:113
Belle2::TOP::TOP1Dpdf::m_tminPDF
double m_tminPDF
minimal time of signal PDF
Definition: TOP1Dpdf.h:155
Belle2::TOP::TOP1Dpdf::getLogL
double getLogL(double timeShift) const
Returns log likelihood.
Definition: TOP1Dpdf.cc:102