ATLAS Offline Software
Loading...
Searching...
No Matches
TFCS1DFunction.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_FASTCALOSIMEVENT_TFCS1DFunction_h
6#define ISF_FASTCALOSIMEVENT_TFCS1DFunction_h
7
8// STL includes
9#include <vector>
10
12
14
15class TH1;
16
18public:
21
22 virtual int ndim() const { return 1; };
23
27 virtual void rnd_to_fct(float value[], const float rnd[]) const;
28
31 virtual double rnd_to_fct(double rnd) const = 0;
32
36 virtual bool operator==(const TFCS1DFunction &ref) const {
37 return this == &ref;
38 };
39
40 static double get_maxdev(TH1 *, TH1 *);
41
42 static double CheckAndIntegrate1DHistogram(const TH1 *hist,
43 std::vector<double> &integral_vec,
44 int &first, int &last);
45
46 static TH1 *generate_histogram_random_slope
47 ATLAS_NOT_THREAD_SAFE(int nbinsx = 50, double xmin = 0, double xmax = 1,
48 double zerothreshold = 0.1);
49 static TH1 *generate_histogram_random_gauss ATLAS_NOT_THREAD_SAFE(
50 int nbinsx = 50, int ntoy = 100000, double xmin = 1, double xmax = 5,
51 double xpeak = 1.5, double sigma = 0.6);
52 static void unit_test ATLAS_NOT_THREAD_SAFE(TH1 *hist, TFCS1DFunction *rtof,
53 int nrnd = 1000000,
54 TH1 *histfine = nullptr);
55
56private:
57 ClassDef(TFCS1DFunction, 2) // TFCS1DFunction
58};
59
60#endif
const boost::regex ref(r_ef)
static TRandom * rnd
Define macros for attributes used to control the static checker.
static TH1 *generate_histogram_random_slope ATLAS_NOT_THREAD_SAFE(int nbinsx=50, double xmin=0, double xmax=1, double zerothreshold=0.1)
static void unit_test ATLAS_NOT_THREAD_SAFE(TH1 *hist, TFCS1DFunction *rtof, int nrnd=1000000, TH1 *histfine=nullptr)
static double get_maxdev(TH1 *, TH1 *)
virtual double rnd_to_fct(double rnd) const =0
Function gets random number rnd in the range [0,1) as argument and returns function value.
static double CheckAndIntegrate1DHistogram(const TH1 *hist, std::vector< double > &integral_vec, int &first, int &last)
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...
virtual int ndim() const
Return the number of dimensions for the function.
static TH1 *generate_histogram_random_gauss ATLAS_NOT_THREAD_SAFE(int nbinsx=50, int ntoy=100000, double xmin=1, double xmax=5, double xpeak=1.5, double sigma=0.6)
virtual bool operator==(const TFCS1DFunction &ref) const
The == operator compares the content of instances.
double xmax
Definition listroot.cxx:61
double xmin
Definition listroot.cxx:60