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;
26 theBins.push_back((**i).position().z());
28 (**(
i+1)).position().z()) / 2.);
43 for (
int i=bin-1; ;
i--) {
55 for (
int i=bin+1; ;
i++) {
77 static double pi() {
return 3.141592653589793238;}
GenericBinFinderInZ(ConstItr first, ConstItr last)
virtual T binPosition(int ind) const
the middle of the bin.
const T & max(const T &a, const T &b)
std::vector< const G * >::const_iterator ConstItr
virtual int binIndex(T z) const
returns an index in the valid range for the bin closest to Z
std::vector< float > theBorders
virtual int binIndex(int i) const
returns an index in the valid range