Belle II Software development
PXDDataMCGainCalibrationAlgorithm.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#include <string>
14#include <TH1D.h>
15
16
17namespace Belle2 {
26 public:
27
30
33
36
39
42
45
50
53
55 std::string chargePayloadName;
56
57 protected:
58
60 virtual EResult calibrate() override;
61
62 private:
63
65 double EstimateCharge(VxdID sensorID, unsigned short uBin, unsigned short vBin, unsigned short histoBin);
66
68 double EstimateGain(VxdID sensorID, unsigned short uBin, unsigned short vBin);
69
71 double CalculateMedian(std::vector<double>& signals);
72
74 double CalculateMedian(TH1D* histo_signals);
75
77 double FitLandau(std::vector<double>& signals);
78
80 double FitLandau(TH1D* histo_signals);
81
83 //double GetChargeFromDB(VxdID sensorID, unsigned short uBin, unsigned short vBin, TTree *dbtree);
84
85 };
87} // namespace Belle2
88
89
Base class for calibration algorithms.
EResult
The result of calibration.
Class implementing the PXD median cluster charge calibration algorithm.
bool doCalibration
flag to perform full calibration or only esitmate charge: False: only estimate charge,...
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 of unsorted signal vector using a Landau fit
double EstimateCharge(VxdID sensorID, unsigned short uBin, unsigned short vBin, unsigned short histoBin)
Estimate median charge form collected clusters on part of PXD.
int minClusters
Minimum number of collected clusters for estimating median charge.
std::string chargePayloadName
Payload name for Cluster Charge.
float noiseSigma
Artificial noise sigma for smearing cluster charge.
bool useChargeHistogram
Flag to use histogram as charge input.
virtual EResult calibrate() override
Run algo on data.
int strategy
strategy to used for gain calibration, 0 for medians, 1 for landau fit
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.
PXDDataMCGainCalibrationAlgorithm()
Constructor set the prefix to PXDDataMCGainCalibrationAlgorithm.
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.