ATLAS Offline Software
Loading...
Searching...
No Matches
TFCS1DFunctionHistogram.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_FASTCALOSIMEVENT_TFCS1DFunctionHistogram_h
6#define ISF_FASTCALOSIMEVENT_TFCS1DFunctionHistogram_h
7
9#include "TH1.h"
10#include <vector>
11#include <memory>
12
14
15public:
17 TFCS1DFunctionHistogram(TH1 *hist, double);
18
19 void Initialize(TH1 *hist, double);
20
22 virtual double rnd_to_fct(double rnd) const;
23 TH1 *vector_to_histo();
24 double get_inverse(double rnd) const;
25 static double linear(double y1, double y2, double x1, double x2, double x);
26 static double non_linear(double y1, double y2, double x1, double x2,
27 double x);
28
29 static double get_maxdev(TH1 *, TH1D *);
30 void smart_rebin_loop(TH1 *hist, double);
31 static double get_change(TH1 *);
32 static TH1D *smart_rebin(TH1D *);
33 static std::unique_ptr<double[]> histo_to_array(TH1 *);
34 static double sample_from_histo(TH1 *hist, double);
35 double sample_from_histovalues(double);
36
37 const std::vector<float>& get_HistoBorders() { return m_HistoBorders; };
38 const std::vector<float>& get_HistoContents() { return m_HistoContents; };
39
40protected:
41 std::vector<float> m_HistoBorders;
42 std::vector<float> m_HistoContents;
43
44 ClassDef(TFCS1DFunctionHistogram, 1) // TFCS1DFunctionHistogram
45};
46
47#endif
static TRandom * rnd
#define x
static double linear(double y1, double y2, double x1, double x2, double x)
std::vector< float > m_HistoBorders
virtual double rnd_to_fct(double rnd) const
Function gets random number rnd in the range [0,1) as argument and returns function value.
static std::unique_ptr< double[]> histo_to_array(TH1 *)
double get_inverse(double rnd) const
static double get_maxdev(TH1 *, TH1D *)
static double sample_from_histo(TH1 *hist, double)
const std::vector< float > & get_HistoContents()
void Initialize(TH1 *hist, double)
std::vector< float > m_HistoContents
static double non_linear(double y1, double y2, double x1, double x2, double x)
void smart_rebin_loop(TH1 *hist, double)
const std::vector< float > & get_HistoBorders()
virtual void rnd_to_fct(float value[], const float rnd[]) const
Function gets array of random numbers rnd[] in the range [0,1) as arguments and returns function valu...