Belle II Software development
PXDGainCalibrationAlgorithm.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 <vxd/dataobjects/VxdID.h>
12#include <vector>
13
14
15namespace Belle2 {
24 public:
25
28
31
34
37
40
43
44 protected:
45
47 virtual EResult calibrate() override;
48
49 private:
50
52 double EstimateGain(VxdID sensorID, unsigned short uBin, unsigned short vBin);
53
55 double CalculateMedian(std::vector<double>& signals);
56
58 double FitLandau(std::vector<double>& signals);
59
61 double GetChargeMedianFromDB(VxdID sensorID, unsigned short uBin, unsigned short vBin);
62
64 double GetCurrentGainFromDB(VxdID sensorID, unsigned short uBin, unsigned short vBin);
65 };
67} // namespace Belle2
68
69
Base class for calibration algorithms.
EResult
The result of calibration.
Class implementing the PXD gain calibration algorithm.
double EstimateGain(VxdID sensorID, unsigned short uBin, unsigned short vBin)
Estimate gain as ratio of medians from MC and data for a part of PXD.
double FitLandau(std::vector< double > &signals)
Calculate MPV from signal vector using a landau fit.
double GetCurrentGainFromDB(VxdID sensorID, unsigned short uBin, unsigned short vBin)
Retrive current gain value from pulled in data base payload.
PXDGainCalibrationAlgorithm()
Constructor set the prefix to PXDGainCalibrationAlgorithm.
int minClusters
Minimum number of collected clusters for estimating gains.
float noiseSigma
Artificial noise sigma for smearing cluster charge.
virtual EResult calibrate() override
Run algo on data.
int strategy
strategy to used for gain calibration, 0 for medians, 1 for landau fit
double GetChargeMedianFromDB(VxdID sensorID, unsigned short uBin, unsigned short vBin)
Retrive charge median value from pulled in data base payload.
float safetyFactor
Safety factor for determining whether the collected number of clusters is enough.
double CalculateMedian(std::vector< double > &signals)
Calculate a median from unsorted signal vector. The input vector gets sorted.
bool forceContinue
Force continue in low statistics runs instead of returning c_NotEnoughData.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.