61 v.assign(
a,
a + (
size_t)(
size + 1));
85TH1DModel::TH1DModel(const ::TH1D &
h) : fName(
h.GetName()), fTitle(
h.GetTitle()), fNbinsX(
h.GetNbinsX())
89TH1DModel::TH1DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup)
90 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup)
93TH1DModel::TH1DModel(
const char *
name,
const char *title,
int nbinsx,
const float *xbins)
94 : fName(
name), fTitle(title), fNbinsX(nbinsx)
98TH1DModel::TH1DModel(
const char *
name,
const char *title,
int nbinsx,
const double *xbins)
99 : fName(
name), fTitle(title), fNbinsX(nbinsx)
103std::shared_ptr<::TH1D> TH1DModel::GetHistogram()
const
105 std::shared_ptr<::TH1D>
h;
111 h->SetDirectory(
nullptr);
114TH1DModel::~TH1DModel()
118TH2DModel::TH2DModel(const ::TH2D &
h)
119 : fName(
h.GetName()), fTitle(
h.GetTitle()), fNbinsX(
h.GetNbinsX()), fNbinsY(
h.GetNbinsY())
124TH2DModel::TH2DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup,
int nbinsy,
double ylow,
126 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup), fNbinsY(nbinsy), fYLow(ylow), fYUp(yup)
129TH2DModel::TH2DModel(
const char *
name,
const char *title,
int nbinsx,
const double *xbins,
int nbinsy,
double ylow,
131 : fName(
name), fTitle(title), fNbinsX(nbinsx), fNbinsY(nbinsy), fYLow(ylow), fYUp(yup)
135TH2DModel::TH2DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup,
int nbinsy,
137 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup), fNbinsY(nbinsy)
141TH2DModel::TH2DModel(
const char *
name,
const char *title,
int nbinsx,
const double *xbins,
int nbinsy,
143 : fName(
name), fTitle(title), fNbinsX(nbinsx), fNbinsY(nbinsy)
148TH2DModel::TH2DModel(
const char *
name,
const char *title,
int nbinsx,
const float *xbins,
int nbinsy,
150 : fName(
name), fTitle(title), fNbinsX(nbinsx), fNbinsY(nbinsy)
155std::shared_ptr<::TH2D> TH2DModel::GetHistogram()
const
159 std::shared_ptr<::TH2D>
h;
160 if (xEdgesEmpty && yEdgesEmpty)
162 else if (!xEdgesEmpty && yEdgesEmpty)
164 else if (xEdgesEmpty && !yEdgesEmpty)
169 h->SetDirectory(
nullptr);
172TH2DModel::~TH2DModel()
176TH3DModel::TH3DModel(const ::TH3D &
h)
177 : fName(
h.GetName()), fTitle(
h.GetTitle()), fNbinsX(
h.GetNbinsX()), fNbinsY(
h.GetNbinsY()), fNbinsZ(
h.GetNbinsZ())
183TH3DModel::TH3DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup,
int nbinsy,
double ylow,
184 double yup,
int nbinsz,
double zlow,
double zup)
185 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup), fNbinsY(nbinsy), fYLow(ylow), fYUp(yup),
186 fNbinsZ(nbinsz), fZLow(zlow), fZUp(zup)
189TH3DModel::TH3DModel(
const char *
name,
const char *title,
int nbinsx,
const double *xbins,
int nbinsy,
190 const double *ybins,
int nbinsz,
const double *zbins)
191 : fName(
name), fTitle(title), fNbinsX(nbinsx), fNbinsY(nbinsy), fNbinsZ(nbinsz)
197TH3DModel::TH3DModel(
const char *
name,
const char *title,
int nbinsx,
const float *xbins,
int nbinsy,
198 const float *ybins,
int nbinsz,
const float *zbins)
199 : fName(
name), fTitle(title), fNbinsX(nbinsx), fNbinsY(nbinsy), fNbinsZ(nbinsz)
205std::shared_ptr<::TH3D> TH3DModel::GetHistogram()
const
207 std::shared_ptr<::TH3D>
h;
209 h = std::make_shared<::TH3D>(
fName,
fTitle,
fNbinsX,
fXLow,
fXUp,
fNbinsY,
fYLow,
fYUp,
fNbinsZ,
fZLow,
fZUp);
214 h->SetDirectory(
nullptr);
217TH3DModel::~TH3DModel()
221THnDModel::THnDModel(const ::THnD &
h)
222 : fName(
h.GetName()), fTitle(
h.GetTitle()), fDim(
h.GetNdimensions()), fNbins(fDim), fXmin(fDim), fXmax(fDim),
225 for (
int idim = 0; idim <
fDim; ++idim) {
226 fNbins[idim] =
h.GetAxis(idim)->GetNbins();
231THnDModel::THnDModel(
const char *
name,
const char *title,
int dim,
const int *nbins,
const double *
xmin,
233 : fName(
name), fTitle(title), fDim(dim), fBinEdges(dim)
238 for (
int idim = 0; idim <
fDim; ++idim) {
239 fNbins.push_back(nbins[idim]);
245THnDModel::THnDModel(
const char *
name,
const char *title,
int dim,
const std::vector<int> &nbins,
246 const std::vector<double> &
xmin,
const std::vector<double> &
xmax)
247 : fName(
name), fTitle(title), fDim(dim), fNbins(nbins), fXmin(
xmin), fXmax(
xmax), fBinEdges(dim)
251THnDModel::THnDModel(
const char *
name,
const char *title,
int dim,
const int *nbins,
252 const std::vector<std::vector<double>> &xbins)
253 : fName(
name), fTitle(title), fDim(dim), fXmin(dim, 0.), fXmax(dim, 64.), fBinEdges(xbins)
256 for (
int idim = 0; idim <
fDim; ++idim) {
257 fNbins.push_back(nbins[idim]);
261THnDModel::THnDModel(
const char *
name,
const char *title,
int dim,
const std::vector<int> &nbins,
262 const std::vector<std::vector<double>> &xbins)
263 : fName(
name), fTitle(title), fDim(dim), fNbins(nbins), fXmin(dim, 0.), fXmax(dim, 64.), fBinEdges(xbins)
267std::shared_ptr<::THnD> THnDModel::GetHistogram()
const
269 bool varbinning =
false;
276 std::shared_ptr<::THnD>
h;
284THnDModel::~THnDModel() {}
288TProfile1DModel::TProfile1DModel(const ::TProfile &
h)
289 : fName(
h.GetName()), fTitle(
h.GetTitle()), fNbinsX(
h.GetNbinsX()), fXLow(
h.GetXaxis()->GetXmin()),
290 fXUp(
h.GetXaxis()->GetXmax()), fYLow(
h.GetYmin()), fYUp(
h.GetYmax()), fOption(
h.GetErrorOption())
294TProfile1DModel::TProfile1DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup,
296 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup), fOption(
option)
300TProfile1DModel::TProfile1DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup,
double ylow,
301 double yup,
const char *option)
302 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup), fYLow(ylow), fYUp(yup), fOption(
option)
306TProfile1DModel::TProfile1DModel(
const char *
name,
const char *title,
int nbinsx,
const float *xbins,
308 : fName(
name), fTitle(title), fNbinsX(nbinsx), fOption(
option)
312TProfile1DModel::TProfile1DModel(
const char *
name,
const char *title,
int nbinsx,
const double *xbins,
314 : fName(
name), fTitle(title), fNbinsX(nbinsx), fOption(
option)
318TProfile1DModel::TProfile1DModel(
const char *
name,
const char *title,
int nbinsx,
const double *xbins,
double ylow,
319 double yup,
const char *option)
320 : fName(
name), fTitle(title), fNbinsX(nbinsx), fYLow(ylow), fYUp(yup), fOption(
option)
324std::shared_ptr<::TProfile> TProfile1DModel::GetProfile()
const
326 std::shared_ptr<::TProfile> prof;
333 prof->SetDirectory(
nullptr);
336TProfile1DModel::~TProfile1DModel()
340TProfile2DModel::TProfile2DModel(const ::TProfile2D &
h)
341 : fName(
h.GetName()), fTitle(
h.GetTitle()), fNbinsX(
h.GetNbinsX()), fXLow(
h.GetXaxis()->GetXmin()),
342 fXUp(
h.GetXaxis()->GetXmax()), fNbinsY(
h.GetNbinsY()), fYLow(
h.GetYaxis()->GetXmin()),
343 fYUp(
h.GetYaxis()->GetXmax()), fZLow(
h.GetZmin()), fZUp(
h.GetZmax()), fOption(
h.GetErrorOption())
348TProfile2DModel::TProfile2DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup,
int nbinsy,
349 double ylow,
double yup,
const char *option)
350 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup), fNbinsY(nbinsy), fYLow(ylow), fYUp(yup),
355TProfile2DModel::TProfile2DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup,
int nbinsy,
356 double ylow,
double yup,
double zlow,
double zup,
const char *option)
357 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup), fNbinsY(nbinsy), fYLow(ylow), fYUp(yup),
358 fZLow(zlow), fZUp(zup), fOption(
option)
362TProfile2DModel::TProfile2DModel(
const char *
name,
const char *title,
int nbinsx,
const double *xbins,
int nbinsy,
363 double ylow,
double yup,
const char *option)
364 : fName(
name), fTitle(title), fNbinsX(nbinsx), fNbinsY(nbinsy), fYLow(ylow), fYUp(yup), fOption(
option)
369TProfile2DModel::TProfile2DModel(
const char *
name,
const char *title,
int nbinsx,
double xlow,
double xup,
int nbinsy,
370 const double *ybins,
const char *option)
371 : fName(
name), fTitle(title), fNbinsX(nbinsx), fXLow(xlow), fXUp(xup), fNbinsY(nbinsy), fOption(
option)
376TProfile2DModel::TProfile2DModel(
const char *
name,
const char *title,
int nbinsx,
const double *xbins,
int nbinsy,
377 const double *ybins,
const char *option)
378 : fName(
name), fTitle(title), fNbinsX(nbinsx), fNbinsY(nbinsy), fOption(
option)
384std::shared_ptr<::TProfile2D> TProfile2DModel::GetProfile()
const
393 std::shared_ptr<::TProfile2D> prof;
394 if (xEdgesEmpty && yEdgesEmpty) {
395 prof = std::make_shared<::TProfile2D>(
fName,
fTitle,
fNbinsX,
fXLow,
fXUp,
fNbinsY,
fYLow,
fYUp,
fZLow,
fZUp,
397 }
else if (!xEdgesEmpty && yEdgesEmpty) {
399 }
else if (xEdgesEmpty && !yEdgesEmpty) {
411TProfile2DModel::~TProfile2DModel()
void FillVector< double >(std::vector< double > &v, int size, double *a)
void FillVector(std::vector< double > &v, int size, T *a)
void SetAxisProperties(const TAxis *axis, double &low, double &up, std::vector< double > &edges)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
A pseudo container class which is a generator of indices.
Class to manage histogram axis.
const TArrayD * GetXbins() const
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
std::vector< double > fBinXEdges
std::vector< double > fBinYEdges
std::vector< double > fBinXEdges
std::vector< double > fBinZEdges
std::vector< double > fBinYEdges
std::vector< double > fBinXEdges
std::vector< double > fXmax
std::vector< std::vector< double > > fBinEdges
std::vector< double > fXmin
std::vector< int > fNbins
std::vector< double > fBinXEdges
std::vector< double > fBinXEdges
std::vector< double > fBinYEdges