npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
convertAxis.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_CONVERTAXIS_HH_
2 #define NPSTAT_CONVERTAXIS_HH_
3 
4 /**
5 // \file convertAxis.hh
6 //
7 // \brief Functions for converting between grid and histogram axes
8 //
9 // For histogram axes it is assumed that the "active" coordinate is
10 // at the bin center, while for grid axes the relevant coordinate
11 // is at the point itself.
12 //
13 // Author: I. Volobouev
14 //
15 // July 2012
16 */
17 
18 #include "npstat/nm/DualAxis.hh"
20 
21 namespace npstat {
22  /** Convert uniform grid axis to uniform histogram axis */
24 
25  /** Convert uniform histogram to uniform grid axis axis */
27 
28  /**
29  // Note that conversion from non-uniform histogram axis into
30  // the grid axis is always possible, but it is loosing information
31  // (we are writing the positions of bin centers only, not edges)
32  */
34 
35  /**
36  // The conversion from non-uniform grid axis to non-uniform
37  // histogram axis is only unambiguous when some additional
38  // info is available. Here, in particular, we are asking for
39  // the position of the axis minimum. This function will throw
40  // std::invalid_argument in case the conversion is impossible.
41  */
42  NUHistoAxis convertToHistoAxis(const GridAxis& gridAxis, double xMin);
43 
44  /** Convert dual histogram axis into dual grid axis */
46 }
47 
48 #endif // NPSTAT_CONVERTAXIS_HH_
Represent both equidistant and non-uniform coordinate sets for rectangular grids.
Represent both equidistant and non-uniform histogram axis binning.
Definition: DualAxis.hh:25
Definition: DualHistoAxis.hh:24
Definition: GridAxis.hh:31
Definition: HistoAxis.hh:31
Definition: NUHistoAxis.hh:28
Definition: UniformAxis.hh:28
Definition: AbsArrayProjector.hh:14
UniformAxis convertToGridAxis(const HistoAxis &histoAxis)
HistoAxis convertToHistoAxis(const UniformAxis &gridAxis)