BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
HistogramDef1D.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 HISTOGRAMDEF1D_H
19#define HISTOGRAMDEF1D_H
20#include "BinSpecification.hh"
21#include "HistogramDef.hh"
22
23#include <string>
24
25#include "Rtypes.h"
26
34{
35public:
38
40 HistogramDef1D(const std::string& treeNameIn,
41 const std::string& histNameIn,
42 const BinSpecification& xBinningIn,
43 const std::string& variableIn,
44 const std::string& selectionIn = "1",
45 bool perEntryIn = true);
46
47 virtual ~HistogramDef1D();
48
50 virtual HistogramDef* Clone() const {return new HistogramDef1D(*this);}
51
53 virtual std::string GetBinningString() const;
54
56 virtual std::string GetHistogramString() const;
57
58 BinSpecification xBinning;
59
60 ClassDef(HistogramDef1D, 1);
61};
62
63#endif
Binning specification for a single dimension.
Specification for 1D histogram.
HistogramDef1D()
Public constructor only for compatibility with ROOT - not intended for use.
virtual std::string GetBinningString() const
Return n bins and ranges.
virtual std::string GetHistogramString() const
Get the first string that defines the histogram in rebdsim for feedback.
virtual HistogramDef * Clone() const
Copy this instance. Virtual to be overridden in derived classes.
Common specification for a histogram.