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 for (ConstItr
i=first;
i<last-1;
i++) {
27 theBins.push_back((**i).position().z());
29 (**(
i+1)).position().z()) / 2.);
45 for (
int i=bin-1; ;
i--) {
57 for (
int i=bin+1; ;
i++) {
79 static double pi() {
return 3.141592653589793238;}
GenericBinFinderInZ(ConstItr first, ConstItr last)
virtual T binPosition(int ind) const
the middle of the bin.
bin
set the eta bin as selection string.
std::vector< const G * >::const_iterator ConstItr
static int position[264][3]
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