Belle II Software development
CDCDedxRunGainAlgorithm.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 <reconstruction/dbobjects/CDCDedxRunGain.h>
12#include <calibration/CalibrationAlgorithm.h>
13#include <framework/database/DBObjPtr.h>
14#include <TH1D.h>
15
16namespace Belle2 {
26
27 public:
28
33
38
42 void setMergePayload(bool value = true) {isMergePayload = value;}
43
47 void generateNewPayloads(double RunGainConst, double ExistingRG);
48
52 void setMonitoringPlots(bool value = false) {isMakePlots = value;}
53
57 void FitGaussianWRange(TH1D*& temphist, TString& status);
58
62 void setFitWidth(double value = 2.5) {fSigLim = value;}
63
67 void setHistBins(int value = 600) {fdEdxBins = value;}
68
72 void setAdjustment(double value = 1.0) {fAdjust = value;}
73
77 void setHistRange(double min = 0.0, double max = 3.0) {fdEdxMin = min; fdEdxMax = max;}
78
79 protected:
80
84 virtual EResult calibrate() override;
85
86 private:
87
92 TString fsrun;
93 double fSigLim;
95 double fdEdxMin;
96 double fdEdxMax;
97 double fAdjust;
98 };
100} // namespace Belle2
A calibration algorithm for CDC dE/dx run gains.
CDCDedxRunGainAlgorithm()
Constructor: Sets the description, the properties and the parameters of the algorithm.
DBObjPtr< CDCDedxRunGain > m_DBRunGain
Run gain DB object.
void setFitWidth(double value=2.5)
function to make flag active for plotting
void generateNewPayloads(double RunGainConst, double ExistingRG)
function to store new payload after full calibration
double fdEdxMax
max dedx range for gain cal
bool isMergePayload
merge payload at the of calibration
void setHistBins(int value=600)
function to set dedx hist bins
double fAdjust
factor to adjust dedx gain
virtual ~CDCDedxRunGainAlgorithm()
Destructor.
void setMergePayload(bool value=true)
function to decide merged vs relative run-gains
virtual EResult calibrate() override
Run algorithm.
double fdEdxMin
min dedx range for gain cal
void FitGaussianWRange(TH1D *&temphist, TString &status)
function to perform fit run by run
TString fsrun
flag to identify low stats runs
int fdEdxBins
number of bins for dedx histogram
bool isMakePlots
produce plots for status
double fSigLim
fit range limit based on sigma
void setHistRange(double min=0.0, double max=3.0)
function to set dedx hist range
void setMonitoringPlots(bool value=false)
function to hand flag for monitoring plotting
void setAdjustment(double value=1.0)
function to set dedx gain adjustment
Base class for calibration algorithms.
EResult
The result of calibration.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Abstract base class for different kinds of events.