Belle II Software  release-08-01-10
SVDCoGTimeCalibrationAlgorithm.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 <calibration/CalibrationAlgorithm.h>
12 
13 #include <optional>
14 
15 namespace Belle2 {
24  public:
25 
27  explicit SVDCoGTimeCalibrationAlgorithm(const std::string& str);
28 
31 
33  void setAllowedTimeShift(float value) {m_allowedTimeShift = value;}
34 
37 
39  void setMinEntries(int minEntries) {m_minEntries = minEntries;}
40 
42  int getMinEntries() {return m_minEntries;}
43 
44  protected:
45 
47  virtual EResult calibrate() override;
48 
51  virtual bool isBoundaryRequired(const Calibration::ExpRun& currentRun) override;
52 
54  virtual void boundaryFindingSetup(std::vector<Calibration::ExpRun> /*runs*/, int /*iteration = 0*/) override
55  {
57  }
58 
59 
60  private:
61 
62  std::string m_id = "";
63  std::optional<float> m_previousRawTimeMeanL3V;
65  float m_allowedTimeShift = 2.;
66  float m_minEntries = 10000;
67  };
69 } // namespace Belle2
70 
71 
Base class for calibration algorithms.
EResult
The result of calibration.
Class implementing SVDCoGTimeCalibration calibration algorithm.
void setMinEntries(int minEntries)
Set the minimum entries required in the histograms.
std::string m_id
Parameter given to set the UniqueID of the payload.
std::optional< float > m_previousRawTimeMeanL3V
CoG time mean of the previous run for V side of layer 3.
virtual void boundaryFindingSetup(std::vector< Calibration::ExpRun >, int) override
setup of the boundary finding
float getAllowedTimeShift()
Getter for m_allowedT0Shift.
float m_minEntries
Set the minimun number of entries required in the histograms of layer 3.
virtual EResult calibrate() override
Run algo on data.
SVDCoGTimeCalibrationAlgorithm(const std::string &str)
Constructor set the prefix to SVDTimeCalibrationCollector.
virtual bool isBoundaryRequired(const Calibration::ExpRun &currentRun) override
If the event T0 changes significantly return true.
void setAllowedTimeShift(float value)
Setter for m_allowedT0Shift.
int getMinEntries()
Get the minimum entries required in the histograms.
Abstract base class for different kinds of events.