Belle II Software development
PXDCalibrationUtilities.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 <vector>
11#include <TH1I.h>
12
13namespace Belle2 {
18 namespace PXD {
19
21 void getNumberOfBins(const std::shared_ptr<TH1I>& histo_ptr, unsigned short& nBinsU, unsigned short& nBinsV);
22
24 unsigned short getNumberOfSensors(const std::shared_ptr<TH1I>& histo_ptr);
25
27 double CalculateMedian(std::vector<double>& signals);
28
30 double CalculateMedian(TH1* hist);
31
33 double FitLandau(TH1* hist);
34
36 double FitLandau(std::vector<double>& signals);
37
38 }// namespace PXD
40} // namespace Belle2
unsigned short getNumberOfSensors(const std::shared_ptr< TH1I > &histo_ptr)
Helper function to extract number of sensors from counter histogram labels.
void getNumberOfBins(const std::shared_ptr< TH1I > &histo_ptr, unsigned short &nBinsU, unsigned short &nBinsV)
Helper function to extract number of bins along u side and v side from counter histogram labels.
double CalculateMedian(std::vector< double > &signals)
Helper function to calculate a median from unsorted signal vector.
double FitLandau(TH1 *hist)
Helper function to estimate MPV from 1D histogram.
Abstract base class for different kinds of events.