Project
Loading...
Searching...
No Matches
Helpers.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef O2_ITS_STUDY_HELPERS_H
17#define O2_ITS_STUDY_HELPERS_H
18
19#include <vector>
20#include "TH1F.h"
21#include "TH2F.h"
22#include "TGraphAsymmErrors.h"
23#include "TCanvas.h"
24#include "TPaveText.h"
25
26namespace o2
27{
28namespace its
29{
30namespace study
31{
32namespace helpers
33{
34
37
39std::vector<double> makeLogBinning(const int nbins, const double min, const double max);
40
42void setStyleHistogram1D(TH1F& histo, int color);
43void setStyleHistogram1D(TH1F& histo, int color, TString title, TString titleYaxis, TString titleXaxis);
44void setStyleHistogram1DMeanValues(TH1F& histo, int color);
45void setStyleHistogram2D(TH2F& histo);
46
48TCanvas* prepareSimpleCanvas2Histograms(TH1F& h1, int color1, TH1F& h2, int color2);
49TCanvas* prepareSimpleCanvas2Histograms(TH1F& h1, int color1, TString nameHisto1, TH1F& h2, int color2, TString nameHisto2, bool logScale = true);
50TCanvas* prepareSimpleCanvas2Histograms(TH1F& h1, int color1, TString nameHisto1, TH1F& h2, int color2, TString nameHisto2, TString intRate);
51TCanvas* prepareSimpleCanvas2DcaMeanValues(TH1F& h1, int color1, TString nameHisto1, TH1F& h2, int color2, TString nameHisto2);
52
54TCanvas* plot2DwithMeanAndSigma(TH2F& h2D, TH1F& hMean, TH1F& hSigma, int color);
55
57void paveTextITS(TPaveText* pave, TString intRate);
58
60void ConvertTH1ToTGraphAsymmError(TH1F& hMean, TH1F& hSigma, TGraphAsymmErrors*& gr);
61
62} // namespace helpers
63} // namespace study
64} // namespace its
65} // namespace o2
66
67#endif
GLuint color
Definition glcorearb.h:1272
std::vector< double > makeLogBinning(const int nbins, const double min, const double max)
get a vector containing binning info for constant sized bins on a log axis
Definition Helpers.cxx:21
void paveTextITS(TPaveText *pave, TString intRate)
prepare TPaveText with labels
Definition Helpers.cxx:194
TCanvas * prepareSimpleCanvas2Histograms(TH1F &h1, int color1, TH1F &h2, int color2)
prepare canvas with two TH1F plots
Definition Helpers.cxx:89
TCanvas * prepareSimpleCanvas2DcaMeanValues(TH1F &h1, int color1, TString nameHisto1, TH1F &h2, int color2, TString nameHisto2)
Definition Helpers.cxx:160
void setStyleHistogram1DMeanValues(TH1F &histo, int color)
Definition Helpers.cxx:68
TCanvas * plot2DwithMeanAndSigma(TH2F &h2D, TH1F &hMean, TH1F &hSigma, int color)
plot canvas with TH2D + TH1D(Mean and Sigma) from slice
Definition Helpers.cxx:178
void setStyleHistogram2D(TH2F &histo)
Definition Helpers.cxx:79
void ConvertTH1ToTGraphAsymmError(TH1F &hMean, TH1F &hSigma, TGraphAsymmErrors *&gr)
Convert TH1F in TGraphAsymmetricError.
Definition Helpers.cxx:207
void setStyleHistogram1D(TH1F &histo, int color)
Set nice style for single 1D histograms.
Definition Helpers.cxx:42
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
constexpr size_t min
constexpr size_t max