GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TEfficiencyCalibration.h
Go to the documentation of this file.
1#ifndef TEFFICIENCYCALIBRATION_H
2#define TEFFICIENCYCALIBRATION_H
3
4/** \addtogroup Calibration
5 * @{
6 */
7
8#include <map>
9
10#include "TNamed.h"
11#include "TMultiGraph.h"
12#include "TF1.h"
13
14#include "TEfficiencyGraph.h"
15
16class TEfficiencyCalibration : public TNamed {
17public:
19 TEfficiencyCalibration(const char* name, const char* title);
22 TEfficiencyCalibration& operator=(const TEfficiencyCalibration&) = default;
23 TEfficiencyCalibration& operator=(TEfficiencyCalibration&&) noexcept = default;
25
26 void AddEfficiencyGraph(const TEfficiencyGraph& graph);
27 void AddEfficiencyGraph(const TEfficiencyGraph& graph, const char* name);
28 void ScaleGuess();
29
30 void Copy(TObject& copy) const override;
31
32 void Clear(Option_t* opt = "") override;
33 void Print(Option_t* opt = "") const override;
34 TFitResultPtr Fit(Option_t* opt = "");
35
36 void Draw(Option_t* opt = "") override;
37 void DrawRelative(Option_t* opt = "");
38 void DrawAbsolute(Option_t* opt = "");
39
40 Double_t GetEfficiency(const Double_t& eng);
41 Double_t GetEfficiencyErr(const Double_t& eng);
42
43 bool ScaleToAbsolute();
44
45private:
47 Double_t PhotoPeakEfficiency(Double_t* x, Double_t* par);
48 Double_t AbsoluteEfficiency(Double_t* x, Double_t* par);
49
50 std::map<const char*, TEfficiencyGraph> fGraphMap;
51 TMultiGraph* fRelativeEffGraph{nullptr};
52 TMultiGraph* fAbsEffGraph{nullptr};
53 mutable bool fFitting{false};
54 TF1* fRelativeFit{nullptr};
55 TF1* fAbsoluteFunc{nullptr};
56
57 /// \cond CLASSIMP
58 ClassDefOverride(TEfficiencyCalibration, 1) // NOLINT(readability-else-after-return)
59 /// \endcond
60};
61/*! @} */
62#endif
void AddEfficiencyGraph(const TEfficiencyGraph &graph)
Double_t GetEfficiencyErr(const Double_t &eng)
TEfficiencyCalibration(TEfficiencyCalibration &&) noexcept=default
void Print(Option_t *opt="") const override
TFitResultPtr Fit(Option_t *opt="")
void Draw(Option_t *opt="") override
void DrawAbsolute(Option_t *opt="")
void Clear(Option_t *opt="") override
std::map< const char *, TEfficiencyGraph > fGraphMap
Double_t AbsoluteEfficiency(Double_t *x, Double_t *par)
Double_t GetEfficiency(const Double_t &eng)
void Copy(TObject &copy) const override
void DrawRelative(Option_t *opt="")
Double_t PhotoPeakEfficiency(Double_t *x, Double_t *par)