#include <rootEnergyHist.h>
Public Methods | |
| rootEnergyHist (int bins, double min_energy, double max_energy) | |
| Constructor creates an empty energy histogram. More... | |
| ~rootEnergyHist (void) | |
| rootEnergyHist (const rootEnergyHist& oldHist) | |
| void | setTitle (std::string title) |
| Sets the title for the graph. More... | |
| void | setXLabel (std::string label) |
| Sets the x-axis label on the flux vs. energy graph. More... | |
| void | setYLabel (std::string label) |
| Sets the y-axis label on the flux vs. energy graph. More... | |
| void | setGraphType (const char *graph_type) |
| Sets the type of scaling used on the graph Valid values are "linear", "semilogx", "semilogy", and "log". More... | |
| void | store (double energy) |
| Increments the temporary bin (by +1) corresponding to the given energy. More... | |
| double | retrieveCount (int binNumber) |
| Retrieves the raw count associated with the given bin number. More... | |
| double | retrieveFlux (int binNumber) |
| Retrieves the flux associated with the given bin number. More... | |
| double | retrieveFluxUncertainty (int binNumber) |
| Retrieves the flux uncertainty associated with the given bin number. More... | |
| double | retrieveEnergy (int binNumber) |
| Retrieves the energy associated with the given bin number. More... | |
| double | retrieveRange (void) |
| Retrieves the logorithmic (base 10) energy range for the histogram. More... | |
| void | setFluxMode (void) |
| This function changes the graph type from E*flux vs. E to flux vs. E. More... | |
| void | setFluxMin (double f) |
| This function manually sets the minimum flux to be displayed on the graph. More... | |
| void | setFluxMax (double f) |
| This function manually sets the maximum flux to be displayed on the graph. More... | |
| void | apply (double scale_factor) |
| Applies the scaling factor to the raw counts to obtain the fluxes. More... | |
| void | reset (void) |
| This function clears everything in the object except for the number of bins. More... | |
| void | draw (double scale_factor, std::string mode, int current_plot, int total_plots) |
| Writes the contents of the flux and flux uncertainty histograms to a script file. More... | |
| void | writeFile (double scale_factor, std::ostream& out_file) |
| Writes the contents of the flux histogram to an output file with the following format. More... | |
Private Types | |
| enum | graphType { linear, semilogx, semilogy, loglog } |
| Enumeration that determines the graph type. More... | |
Private Attributes | |
| rootHist* | flux_hist |
| histogram to store fluxes. More... | |
| rootHist* | flux_sigma_hist |
| histogram to store uncertainties. More... | |
| rootHist* | raw_hist |
| histogram to store raw counts. More... | |
| const int | num_bins |
| number of bins for the histogram. More... | |
| const double | emin |
| minimum energy. More... | |
| const double | emax |
| maximum energy. More... | |
| double | range |
| logarithmic range of energies. More... | |
| std::string | graphTitle |
| title of graph. More... | |
| std::string | xlabel |
| x axis title. More... | |
| std::string | ylabel |
| y axis title. More... | |
| enum rootEnergyHist::graphType | currentType |
| Enumeration that determines the graph type. | |
| bool | fluxMode |
| If true flux is graphed instead of E*flux. More... | |
| bool | use_flux_min |
| If true flux_min is used as the minimum flux on the graph. More... | |
| bool | use_flux_max |
| If true flux_max is used as the maximum flux on the graph. More... | |
| double | flux_min |
| Manually specified minimum flux. More... | |
| double | flux_max |
| Manually specified maximum flux. More... | |
Normal usage typically entails 1. calling the constructor 2. calling setTitle, setXLabel, setYLabel, etc. 3. storing energies in the object using store 4. calling apply to normalize the histogram 5. calling draw or writeFile to output the results
Definition at line 25 of file rootEnergyHist.h.
|
|
Enumeration that determines the graph type.
Definition at line 124 of file rootEnergyHist.h. |
|
|
Constructor creates an empty energy histogram.
Definition at line 12 of file rootEnergyHist.cxx. |
|
|
Definition at line 32 of file rootEnergyHist.cxx. |
|
|
Definition at line 39 of file rootEnergyHist.cxx. |
|
|
Applies the scaling factor to the raw counts to obtain the fluxes. This function clears the raw count histogram, stores the flux values in the flux histogram, and calculates the uncertainties. If there was a previous value in the flux and flux uncertainty histograms, this function does not overwrite the values, but adds them together. This function must be used before the draw member function. Definition at line 163 of file rootEnergyHist.cxx. |
|
|
Writes the contents of the flux and flux uncertainty histograms to a script file. This file is then interpreted by root.
Definition at line 205 of file rootEnergyHist.cxx. |
|
|
This function clears everything in the object except for the number of bins.
Definition at line 181 of file rootEnergyHist.cxx. |
|
|
Retrieves the raw count associated with the given bin number.
Definition at line 119 of file rootEnergyHist.cxx. |
|
|
Retrieves the energy associated with the given bin number.
Definition at line 134 of file rootEnergyHist.cxx. Referenced by writeFile(). |
|
|
Retrieves the flux associated with the given bin number.
Definition at line 124 of file rootEnergyHist.cxx. |
|
|
Retrieves the flux uncertainty associated with the given bin number.
Definition at line 129 of file rootEnergyHist.cxx. Referenced by draw(). |
|
|
Retrieves the logorithmic (base 10) energy range for the histogram.
Definition at line 139 of file rootEnergyHist.cxx. Referenced by draw(). |
|
|
This function manually sets the maximum flux to be displayed on the graph.
Definition at line 156 of file rootEnergyHist.cxx. |
|
|
This function manually sets the minimum flux to be displayed on the graph.
Definition at line 150 of file rootEnergyHist.cxx. |
|
|
This function changes the graph type from E*flux vs. E to flux vs. E.
Definition at line 145 of file rootEnergyHist.cxx. |
|
|
Sets the type of scaling used on the graph Valid values are "linear", "semilogx", "semilogy", and "log".
Definition at line 86 of file rootEnergyHist.cxx. |
|
|
Sets the title for the graph.
Definition at line 71 of file rootEnergyHist.cxx. |
|
|
Sets the x-axis label on the flux vs. energy graph.
Definition at line 76 of file rootEnergyHist.cxx. |
|
|
Sets the y-axis label on the flux vs. energy graph.
Definition at line 81 of file rootEnergyHist.cxx. |
|
|
Increments the temporary bin (by +1) corresponding to the given energy.
Definition at line 100 of file rootEnergyHist.cxx. |
|
|
Writes the contents of the flux histogram to an output file with the following format. The first line is a comment describing the file. The following lines contain two pairs of numbers, the energy (MeV), and the flux (particles/(m^2*s*sr*MeV)).
Definition at line 422 of file rootEnergyHist.cxx. |
|
|
Enumeration that determines the graph type.
|
|
|
maximum energy.
Definition at line 117 of file rootEnergyHist.h. |
|
|
minimum energy.
Definition at line 116 of file rootEnergyHist.h. |
|
|
If true flux is graphed instead of E*flux.
Definition at line 132 of file rootEnergyHist.h. |
|
|
histogram to store fluxes.
Definition at line 112 of file rootEnergyHist.h. |
|
|
Manually specified maximum flux.
Definition at line 136 of file rootEnergyHist.h. |
|
|
Manually specified minimum flux.
Definition at line 135 of file rootEnergyHist.h. |
|
|
histogram to store uncertainties.
Definition at line 113 of file rootEnergyHist.h. |
|
|
title of graph.
Definition at line 119 of file rootEnergyHist.h. |
|
|
number of bins for the histogram.
Definition at line 115 of file rootEnergyHist.h. |
|
|
logarithmic range of energies.
Definition at line 118 of file rootEnergyHist.h. |
|
|
histogram to store raw counts.
Definition at line 114 of file rootEnergyHist.h. |
|
|
If true flux_max is used as the maximum flux on the graph.
Definition at line 134 of file rootEnergyHist.h. |
|
|
If true flux_min is used as the minimum flux on the graph.
Definition at line 133 of file rootEnergyHist.h. |
|
|
x axis title.
Definition at line 120 of file rootEnergyHist.h. |
|
|
y axis title.
Definition at line 121 of file rootEnergyHist.h. |
1.2.3 written by Dimitri van Heesch,
© 1997-2000