1 #ifndef GeneralBinFinderInZ_H
2 #define GeneralBinFinderInZ_H
19 std::vector<const GeometricSearchDet*>::const_iterator
first,
20 std::vector<const GeometricSearchDet*>::const_iterator
last) :
24 for (std::vector<const GeometricSearchDet*>::const_iterator
i=first;
i<last-1;
i++) {
25 theBins.push_back((**i).position().z());
27 (**(
i+1)).position().z()) / 2.);
42 for (
int i=bin-1; ;
i--) {
54 for (
int i=bin+1; ;
i++) {
76 static double pi() {
return 3.141592653589793238;}
virtual T binPosition(int ind) const
the middle of the bin.
std::vector< float > theBorders
GeneralBinFinderInZforGeometricSearchDet(std::vector< const GeometricSearchDet * >::const_iterator first, std::vector< const GeometricSearchDet * >::const_iterator last)
GeneralBinFinderInZforGeometricSearchDet()
virtual int binIndex(int i) const
returns an index in the valid range
const T & max(const T &a, const T &b)
virtual int binIndex(T z) const
returns an index in the valid range for the bin closest to Z