CbmRoot
Loading...
Searching...
No Matches
CbmQaCompare.h
Go to the documentation of this file.
1/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
12#include <cassert>
13#include <string>
14
15class TH1;
16class TCanvas;
17
21template<class Obj>
23 public:
24 struct Result {
25 bool fPointByPoint = true;
26 double fRatioLo = 1.;
27 double fRatioUp = 1.;
28 double fChi2NDF = 0.;
29 bool fConsistent = true;
30 };
31
36 CbmQaCompare(const Obj* pHistL, const Obj* pHistR, int verbose);
37
40
48 Result operator()(const std::string& opt, const std::string& optStat = "UU") const;
49
54 TCanvas* GetComparisonCanvas(const std::string& opt);
55
59 void SetObjectLabels(const std::string& labelL, const std::string& labelR);
60
61 private:
62 const Obj* fpObjL = nullptr;
63 const Obj* fpObjR = nullptr;
64 std::string fsLabelL = "this";
65 std::string fsLabelR = "default";
66 int fVerbose = 0;
67};
Class to compare histograms of the QA task with default ones.
std::string fsLabelR
std::string fsLabelL
Result operator()(const std::string &opt, const std::string &optStat="UU") const
Compares two histograms, returns a comparison status.
~CbmQaCompare()
Destructor.
const Obj * fpObjL
Left (new) histogram.
const Obj * fpObjR
Right (default) histogram.
void SetObjectLabels(const std::string &labelL, const std::string &labelR)
Set version lables.
int fVerbose
Verbosity.
TCanvas * GetComparisonCanvas(const std::string &opt)
Creates a comparison canvas.
CbmQaCompare(const Obj *pHistL, const Obj *pHistR, int verbose)
Constructor.
double fRatioUp
Upper bound of the ratio.
bool fConsistent
Consistency flag.
double fRatioLo
Lower bound of the ratio.
double fChi2NDF
Chi2/NDF value.