1 #ifndef BinningTools_GenericBinFinderInZ_H 2 #define BinningTools_GenericBinFinderInZ_H 15 template <
class T,
class G>
18 typedef typename std::vector<const G*>::const_iterator
ConstItr;
25 theBins.push_back((**i).position().z());
26 theBorders.push_back(((**i).position().z() + (**(
i + 1)).position().z()) / 2.);
42 for (
int i =
bin - 1;;
i--) {
56 for (
int i =
bin + 1;;
i++) {
76 static double pi() {
return 3.141592653589793238; }
77 static double twoPi() {
return 2. *
pi(); }
GenericBinFinderInZ(ConstItr first, ConstItr last)
int binIndex(T z) const override
returns an index in the valid range for the bin closest to Z
std::vector< const G * >::const_iterator ConstItr
int binIndex(int i) const override
returns an index in the valid range
static int position[264][3]
std::vector< float > theBorders
T binPosition(int ind) const override
the middle of the bin.