Logo ROOT   6.12/06
Reference Guide
TDFHistoModels.hxx
Go to the documentation of this file.
1 // Author: Enrico Guiraud, Danilo Piparo CERN 09/2017
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_TDFHISTOMODELS
12 #define ROOT_TDFHISTOMODELS
13 
14 #include <TString.h>
15 #include <memory>
16 
17 class TH1D;
18 class TH2D;
19 class TH3D;
20 class TProfile;
21 class TProfile2D;
22 
23 namespace ROOT {
24 namespace Experimental {
25 namespace TDF {
26 
27 struct TH1DModel {
30  int fNbinsX = 128;
31  double fXLow = 0.;
32  double fXUp = 64.;
33  std::vector<double> fBinXEdges;
34 
35  TH1DModel() = default;
36  TH1DModel(const TH1DModel &) = default;
37  ~TH1DModel();
39  TH1DModel(const char *name, const char *title, int nbinsx, double xlow, double xup);
40  TH1DModel(const char *name, const char *title, int nbinsx, const float *xbins);
41  TH1DModel(const char *name, const char *title, int nbinsx, const double *xbins);
42 };
43 
44 struct TH2DModel {
47  int fNbinsX = 128;
48  double fXLow = 0.;
49  double fXUp = 64.;
50  int fNbinsY = 128;
51  double fYLow = 0.;
52  double fYUp = 64.;
53  std::vector<double> fBinXEdges;
54  std::vector<double> fBinYEdges;
55 
56  TH2DModel() = default;
57  TH2DModel(const TH2DModel &) = default;
58  ~TH2DModel();
60  TH2DModel(const char *name, const char *title, int nbinsx, double xlow, double xup, int nbinsy, double ylow,
61  double yup);
62  TH2DModel(const char *name, const char *title, int nbinsx, const double *xbins, int nbinsy, double ylow, double yup);
63  TH2DModel(const char *name, const char *title, int nbinsx, double xlow, double xup, int nbinsy, const double *ybins);
64  TH2DModel(const char *name, const char *title, int nbinsx, const double *xbins, int nbinsy, const double *ybins);
65  TH2DModel(const char *name, const char *title, int nbinsx, const float *xbins, int nbinsy, const float *ybins);
66 };
67 
68 struct TH3DModel {
71  int fNbinsX = 128;
72  double fXLow = 0.;
73  double fXUp = 64.;
74  int fNbinsY = 128;
75  double fYLow = 0.;
76  double fYUp = 64.;
77  int fNbinsZ = 128;
78  double fZLow = 0.;
79  double fZUp = 64.;
80  std::vector<double> fBinXEdges;
81  std::vector<double> fBinYEdges;
82  std::vector<double> fBinZEdges;
83 
84  TH3DModel() = default;
85  TH3DModel(const TH3DModel &) = default;
86  ~TH3DModel();
88  TH3DModel(const char *name, const char *title, int nbinsx, double xlow, double xup, int nbinsy, double ylow,
89  double yup, int nbinsz, double zlow, double zup);
90  TH3DModel(const char *name, const char *title, int nbinsx, const float *xbins, int nbinsy, const float *ybins,
91  int nbinsz, const float *zbins);
92  TH3DModel(const char *name, const char *title, int nbinsx, const double *xbins, int nbinsy, const double *ybins,
93  int nbinsz, const double *zbins);
94 };
95 
99  int fNbinsX = 128;
100  double fXLow = 0.;
101  double fXUp = 64.;
102  double fYLow = 0.;
103  double fYUp = 0.;
105  std::vector<double> fBinXEdges;
106 
107  TProfile1DModel() = default;
108  TProfile1DModel(const TProfile1DModel &) = default;
110  TProfile1DModel(const ::TProfile &h);
111  TProfile1DModel(const char *name, const char *title, int nbinsx, double xlow, double xup, const char *option = "");
112  TProfile1DModel(const char *name, const char *title, int nbinsx, double xlow, double xup, double ylow, double yup,
113  const char *option = "");
114  TProfile1DModel(const char *name, const char *title, int nbinsx, const float *xbins, const char *option = "");
115  TProfile1DModel(const char *name, const char *title, int nbinsx, const double *xbins, const char *option = "");
116  TProfile1DModel(const char *name, const char *title, int nbinsx, const double *xbins, double ylow, double yup,
117  const char *option = "");
118 };
119 
123  int fNbinsX = 128;
124  double fXLow = 0.;
125  double fXUp = 64.;
126  int fNbinsY = 128;
127  double fYLow = 0.;
128  double fYUp = 64.;
129  double fZLow = 0.;
130  double fZUp = 0.;
132  std::vector<double> fBinXEdges;
133  std::vector<double> fBinYEdges;
134 
135  TProfile2DModel() = default;
136  TProfile2DModel(const TProfile2DModel &) = default;
138  TProfile2DModel(const ::TProfile2D &h);
139  TProfile2DModel(const char *name, const char *title, int nbinsx, double xlow, double xup, int nbinsy, double ylow,
140  double yup, const char *option = "");
141  TProfile2DModel(const char *name, const char *title, int nbinsx, double xlow, double xup, int nbinsy, double ylow,
142  double yup, double zlow, double zup, const char *option = "");
143  TProfile2DModel(const char *name, const char *title, int nbinsx, const double *xbins, int nbinsy, double ylow,
144  double yup, const char *option = "");
145  TProfile2DModel(const char *name, const char *title, int nbinsx, double xlow, double xup, int nbinsy,
146  const double *ybins, const char *option = "");
147  TProfile2DModel(const char *name, const char *title, int nbinsx, const double *xbins, int nbinsy,
148  const double *ybins, const char *option = "");
149 };
150 
151 } // ns TDF
152 } // ns Experimental
153 } // ns ROOT
154 
155 #endif // ROOT_TDFHISTOMODELS
A struct which stores the parameters of a TH2D.
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
TH1 * h
Definition: legend2.C:5
Basic string class.
Definition: TString.h:125
A struct which stores the parameters of a TProfile2D.
Profile Histogram.
Definition: TProfile.h:32
A struct which stores the parameters of a TH3D.
THist< 3, double, THistStatContent, THistStatUncertainty > TH3D
Definition: THist.hxx:296
3-D histogram with a double per channel (see TH1 documentation)}
Definition: TH3.h:304
A struct which stores the parameters of a TProfile.
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:599
THist< 2, double, THistStatContent, THistStatUncertainty > TH2D
Definition: THist.hxx:290
Profile2D histograms are used to display the mean value of Z and its RMS for each cell in X...
Definition: TProfile2D.h:27
A struct which stores the parameters of a TH1D.
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
Definition: THist.hxx:284
char name[80]
Definition: TGX11.cxx:109
2-D histogram with a double per channel (see TH1 documentation)}
Definition: TH2.h:290