Belle II Software development
TOPFillPatternOffsetAlgorithm.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
24 public:
25
28
31
36 void setMinEntries(int minEntries) {m_minEntries = minEntries;}
37
42 void setSignalFraction(double p) {m_p = p;}
43
48 void setMinimalFraction(double fract) {m_minFract = fract;}
49
50 private:
51
55 virtual EResult calibrate() final;
56
64 double Chi2(TH1F* recBuckets, TH1F* fillPattern, int i0);
65
72 TH1F* getChi2Histogram(TH1F* recBuckets, TH1F* fillPattern);
73
81 double getFraction(TH1F* recBuckets, TH1F* fillPattern, int offset);
82
83 int m_minEntries = 100;
84 double m_p = 0.99;
85 double m_minFract = 0.9;
87 };
88
89 } // end namespace TOP
91} // end namespace Belle2
Base class for calibration algorithms.
EResult
The result of calibration.
Algorithm for calibration of fill pattern offset.
int m_minEntries
minimal number of entries to perform calibration
void setMinEntries(int minEntries)
Sets minimal number of histogram entries to perform calibration.
double Chi2(TH1F *recBuckets, TH1F *fillPattern, int i0)
Returns chi2 = -2 logL of circularly shifted pattern at a give shift i0.
double m_p
signal fraction for PDF definition
virtual EResult calibrate() final
algorithm implementation
void setSignalFraction(double p)
Sets signal fraction used in PDF.
void setMinimalFraction(double fract)
Sets minimal fraction of matched buckets to save calibration constants.
double getFraction(TH1F *recBuckets, TH1F *fillPattern, int offset)
Returns fraction of reconstructed buckets matched with filled buckets after accounting for the offset...
double m_minFract
minimal fraction of matched buckets to save calibration
TH1F * getChi2Histogram(TH1F *recBuckets, TH1F *fillPattern)
Returns chi2 values at all possible circular shifts.
Abstract base class for different kinds of events.