ATLAS Offline Software
Loading...
Searching...
No Matches
TFCS2DFunction.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_TFCS2DFunction_h
6#define ISF_FASTCALOSIMEVENT_TFCS2DFunction_h
7
9
11#include <vector>
12
13class TH2;
14
16public:
19
20 virtual int ndim() const { return 2; };
21
22 virtual void rnd_to_fct(float &valuex, float &valuey, float rnd0,
23 float rnd1) const = 0;
24 virtual void rnd_to_fct(float value[], const float rnd[]) const;
25
26 static double CheckAndIntegrate2DHistogram(const TH2 *hist,
27 std::vector<double> &integral_vec,
28 int &first, int &last);
29
30 static void unit_test ATLAS_NOT_THREAD_SAFE(
31 TH2 *hist = nullptr, TFCS2DFunction *rtof = nullptr,
32 const char *outfilename = "TFCS2DFunction_unit_test.root",
33 int nrnd = 10000000);
34 static void unit_tests ATLAS_NOT_THREAD_SAFE(
35 TH2 *hist = nullptr,
36 const char *outfilename = "TFCS2DFunction_unit_test.root",
37 int nrnd = 10000000);
38
39private:
40 ClassDef(TFCS2DFunction, 1) // TFCS2DFunction
41};
42
43#endif
static TRandom * rnd
Define macros for attributes used to control the static checker.
static void unit_test ATLAS_NOT_THREAD_SAFE(TH2 *hist=nullptr, TFCS2DFunction *rtof=nullptr, const char *outfilename="TFCS2DFunction_unit_test.root", int nrnd=10000000)
static double CheckAndIntegrate2DHistogram(const TH2 *hist, std::vector< double > &integral_vec, int &first, int &last)
virtual void rnd_to_fct(float &valuex, float &valuey, float rnd0, float rnd1) const =0
static void unit_tests ATLAS_NOT_THREAD_SAFE(TH2 *hist=nullptr, const char *outfilename="TFCS2DFunction_unit_test.root", int nrnd=10000000)
virtual int ndim() const
Return the number of dimensions for the function.