Belle II Software development
TOPModuleT0DeltaTAlgorithm.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#include <calibration/CalibrationAlgorithm.h>
11#include <TH1F.h>
12
13namespace Belle2 {
18 namespace TOP {
19
30 public:
31
34
38 void setMinEntries(int minEntries) {m_minEntries = minEntries;}
39
46 void setFitInitializers(double sigmaCore, double sigmaTail, double tailFract)
47 {
48 m_sigmaCoreInit = sigmaCore;
49 m_sigmaTailInit = sigmaTail;
50 m_tailFractInit = tailFract;
51 }
52
58 void setCutoffEntries(int cutoffEntries) {m_cutoffEntries = cutoffEntries;}
59
64 void setMinError(double minError) {m_minError = minError;}
65
66 private:
67
71 virtual EResult calibrate() final;
72
78 int fitSingleGaus(std::shared_ptr<TH1F> h);
79
85 int fitDoubleGaus(std::shared_ptr<TH1F> h);
86
92 int fitHistogram(std::shared_ptr<TH1F> h);
93
94 // algorithm parameters
95 int m_minEntries = 10;
96 double m_sigmaCoreInit = 0.120;
97 double m_sigmaTailInit = 0.240;
98 double m_tailFractInit = 0.20;
99 int m_cutoffEntries = 100;
100 double m_minError = 0.100;
101
102 // temporary store for results of a single fit
103 double m_delT0 = 0;
104 double m_error = 0;
105 double m_chi2 = 0;
106 double m_ndf = 0;
107
108 };
109
110 } // end namespace TOP
112} // end namespace Belle2
EResult
The result of calibration.
CalibrationAlgorithm(const std::string &collectorModuleName)
Constructor - sets the prefix for collected objects (won't be accesses until execute(....
int fitDoubleGaus(std::shared_ptr< TH1F > h)
Fit double gaus w/ same mean + constant.
int m_minEntries
minimal number of histogram entries to perform fit
void setMinEntries(int minEntries)
Sets minimal number of histogram entries to perform a fit.
virtual EResult calibrate() final
algorithm implementation
void setCutoffEntries(int cutoffEntries)
Sets cutoff on the number of histogram entries for steering btw.
int fitHistogram(std::shared_ptr< TH1F > h)
Fit histogram.
int m_cutoffEntries
cutoff entries for single/double gaussian fit
double m_minError
minimal moduleT0 uncertainty [ns] to declare c_OK
double m_tailFractInit
fraction of tail gaussian
int fitSingleGaus(std::shared_ptr< TH1F > h)
Fit single gaus + constant.
void setMinError(double minError)
Sets minimal result uncertainty to declare this calibration as c_OK.
void setFitInitializers(double sigmaCore, double sigmaTail, double tailFract)
Sets values for the initialization of several fit parameters.
Abstract base class for different kinds of events.
STL namespace.