BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSBH4DBase.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSBH4DBASE_H
19#define BDSBH4DBASE_H
20
21#include "Rtypes.h"
22#include "TH1D.h"
23#include "TTree.h"
24#include "TFile.h"
25#include "TObject.h"
26
27#include <string>
28#include <vector>
29
35class BDSBH4DBase: public TH1D
36{
37public:
40 BDSBH4DBase(unsigned int h_nxbinsIn, unsigned int h_nybinsIn,
41 unsigned int h_nzbinsIn, unsigned int h_nebinsIn,
42 double xminIn, double xmaxIn, double yminIn, double ymaxIn,
43 double zminIn, double zmaxIn, double eminIn, double emaxIn,
44 const std::string& nameIn,
45 const std::string& titleIn,
46 const std::string& escaleIn);
48 BDSBH4DBase(unsigned int h_nxbinsIn, unsigned int h_nybinsIn, unsigned int h_nzbinsIn,
49 double xminIn, double xmaxIn,
50 double yminIn, double ymaxIn,
51 double zminIn, double zmaxIn,
52 const std::string& nameIn,
53 const std::string& titleIn,
54 const std::string& escaleIn,
55 const std::vector<double>& eBinEdgesIn);
56 virtual ~BDSBH4DBase() override = default;
57
58 int GetNbinsX() const final;
59 int GetNbinsY() const final;
60 int GetNbinsZ() const final;
61 int GetNbinsE() const;
62 const char* GetName() const override;
63 const char* GetTitle() const override;
64 unsigned long GetEntries_BDSBH4D() const;
65
66 void SetName(const char*) override;
67 void SetTitle(const char*) override;
68 void SetEntries_BDSBH4D(double);
69
70 virtual BDSBH4DBase& operator+=(const BDSBH4DBase& other) = 0;
71 virtual void Reset_BDSBH4D() = 0;
72 BDSBH4DBase* Clone(const char*) const override = 0;
73 virtual void Fill_BDSBH4D(double, double, double, double) = 0;
74 virtual void Set_BDSBH4D(int, int, int, int, double) = 0;
75 virtual void SetError_BDSBH4D(int, int, int, int, double) = 0;
76 virtual void Add_BDSBH4D(BDSBH4DBase*) = 0;
77 virtual double At(int, int, int, int) = 0;
78 virtual double AtError(int, int, int, int) = 0;
79 virtual double LowBinEdgeAt(int, int, int, int) = 0;
80 virtual double HighBinEdgeAt(int, int, int, int) = 0;
81 virtual void Print_BDSBH4D(bool with_zero_values = true) = 0;
82 virtual void Print_BDSBH4D(int, int, int, int) = 0;
83
84 unsigned int h_nxbins;
85 unsigned int h_nybins;
86 unsigned int h_nzbins;
87 unsigned int h_nebins;
88 double h_xmin;
89 double h_xmax;
90 double h_ymin;
91 double h_ymax;
92 double h_zmin;
93 double h_zmax;
94 double h_emin;
95 double h_emax;
96 std::string h_name;
97 std::string h_title;
98 std::string h_escale;
99 std::vector<double> h_ebinsedges;
100 unsigned long h_entries;
101
102 ClassDefOverride(BDSBH4DBase,1);
103};
104
105#endif
Base class for the 4D histogram classes.