1 #ifndef GeneralBinFinderInPhi_H
2 #define GeneralBinFinderInPhi_H
36 std::vector<Det*>::const_iterator
last)
39 std::vector<Det*> dets(first,last);
52 const std::string
metname =
"Muon|RecoMuon|RecoMuonDetLayers|GeneralBinFinderInPhi";
57 LogTrace(metname) <<
"GeneralBinFinderInPhi::binIndex,"
67 <<
" border min " << cur <<
" border max: " << next <<
" phi: "<< phi_;
75 if (phi_ > cur-epsilon && phi_ < next)
return i;
77 throw cms::Exception(
"UnexpectedState") <<
"GeneralBinFinderInPhi::binIndex( T phi) bin not found!";
83 return (ind < 0) ? ind+
theNbins : ind;
T positiveRange(T phi) const
virtual int binIndex(T phi) const
GeneralBinFinderInPhi(const PhiBorderFinder &bf)
Construct from an already initialized PhiBorderFinder.
const std::string metname
std::vector< T > theBorders
const std::vector< double > & phiBorders() const
virtual ~GeneralBinFinderInPhi()
virtual int binIndex(int i) const
Returns an index in the valid range, modulo Nbins.
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*.
virtual T binPosition(int ind) const
the middle of the bin in radians