Centrality Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
src
BordersFinder2D.hpp
1
7
8
#ifndef CENTRALITY_BORDERSFINDER2D_H
9
#define CENTRALITY_BORDERSFINDER2D_H
10
11
#include "BordersFinder.hpp"
12
13
#include "array"
14
#include "vector"
15
16
#include "TF1.h"
17
#include "TH2.h"
18
19
namespace
Centrality {
20
21
class
BordersFinder2D :
public
BordersFinder {
22
23
public
:
24
BordersFinder2D() =
default
;
25
26
void
SetHisto2D(TH2F&& histo2d) { histo2d_ = histo2d; }
27
TH2F&& GetHisto2D() {
return
std::move(histo2d_); }
28
29
void
Init();
30
std::unique_ptr<TH1F>
Convert
();
31
void
Fit2D(
const
TString& func);
32
std::array<double, 2>
FindNorm
(
const
std::vector<double>& par,
double
x);
33
double
FindIntegral
(
const
std::array<double, 2>& norm1,
const
std::array<double, 2>& norm2);
34
void
SaveBorders2D(
const
std::string& filename,
const
std::string& getter_name);
35
43
static
double
polN
(
const
std::vector<double>& par,
double
x) {
44
double
res{0.};
45
double
xn{1.};
46
for
(
const
auto
ipar : par) {
47
res += ipar * xn;
48
xn *= x;
49
}
50
return
res;
51
}
52
53
private
:
54
TH2F histo2d_;
55
TF1* fit_{
nullptr
};
56
57
TString fitname_{
""
};
58
59
double
xmax_{1.};
60
double
ymax_{1.};
61
62
// ClassDef(BordersFinder2D, 1);
63
};
64
}
// namespace Centrality
65
66
#endif
//CENTRALITY_BORDERSFINDER2D_H
Centrality::BordersFinder2D::FindIntegral
double FindIntegral(const std::array< double, 2 > &norm1, const std::array< double, 2 > &norm2)
Definition
BordersFinder2D.cpp:75
Centrality::BordersFinder2D::FindNorm
std::array< double, 2 > FindNorm(const std::vector< double > &par, double x)
Definition
BordersFinder2D.cpp:143
Centrality::BordersFinder2D::polN
static double polN(const std::vector< double > &par, double x)
Definition
BordersFinder2D.hpp:43
Centrality::BordersFinder2D::Convert
std::unique_ptr< TH1F > Convert()
Definition
BordersFinder2D.cpp:40
Generated by
1.17.0