1 #ifndef TrackingTools_DetLayers_GeneralBinFinderInPhi_H
2 #define TrackingTools_DetLayers_GeneralBinFinderInPhi_H
34 std::vector<const Det*> dets(first, last);
51 LogTrace(metname) <<
"GeneralBinFinderInPhi::binIndex,"
59 LogTrace(metname) <<
"bin: " <<
i <<
" border min " << cur <<
" border max: " << next <<
" phi: " << phi_;
67 if (phi_ > cur - epsilon && phi_ < next)
70 throw cms::Exception(
"UnexpectedState") <<
"GeneralBinFinderInPhi::binIndex( T phi) bin not found!";
76 return (ind < 0) ? ind +
theNbins : ind;
T positiveRange(T phi) const
GeneralBinFinderInPhi(const PhiBorderFinder &bf)
Construct from an already initialized PhiBorderFinder.
const std::string metname
std::vector< T > theBorders
int binIndex(int i) const override
Returns an index in the valid range, modulo Nbins.
const std::vector< double > & phiBorders() const
~GeneralBinFinderInPhi() override
int binIndex(T phi) const override
T binPosition(int ind) const override
the middle of the bin in radians
const std::vector< double > & phiBins() const
The centers of the Dets.
GeneralBinFinderInPhi(std::vector< Det * >::const_iterator first, std::vector< Det * >::const_iterator last)
Construct from the list of Det*.