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