1 #ifndef PhiBorderFinder_H
2 #define PhiBorderFinder_H
40 const std::string
metname =
"Muon|RecoMuon|RecoMuonDetLayers|PhiBorderFinder";
44 LogTrace(metname) <<
"RecoMuonDetLayers::PhiBorderFinder "
45 <<
"step w: " << step <<
" # of bins: " <<
theNbins;
47 std::vector<double> spread(theNbins);
48 std::vector<std::pair<double,double> > phiEdge;
49 phiEdge.reserve(theNbins);
58 <<
" spread: " << spread[
i];
62 dynamic_cast<const BoundPlane*
>(&theDets[
i]->surface());
65 throw cms::Exception(
"UnexpectedState") << (
"PhiBorderFinder: det surface is not a BoundPlane");
68 std::vector<GlobalPoint> dc =
72 for (std::vector<GlobalPoint>::const_iterator pt=dc.begin();
74 float phi = (*pt).phi();
77 if (phi > phimax) phimax =
phi;
84 phiEdge.push_back(std::pair<double,double>(
phimin,phimax));
103 fabs(firstPhi-secondPhi) <
Geom::pi() )
118 if ( rms < 0.01*step) {
125 throw cms::Exception(
"UnexpectedState") <<
"PhiBorderFinder: consistency error";
163 return (ind < 0) ? ind+
theNbins : ind;
const std::string metname
geomsort::ExtractPhi< Det, float > DetPhi
PhiBorderFinder(std::vector< const Det * > theDets)
virtual ~PhiBorderFinder()
static int position[TOTALCHAMBERS][3]
static std::vector< GlobalPoint > corners(const BoundPlane &)
U second(std::pair< T, U > const &p)
const std::vector< double > & phiBorders() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< double > thePhiBorders
double stat_RMS(const CONT &cont)
T value() const
Explicit access to value in case implicit conversion not OK.
bool isPhiPeriodic() const
Returns true if the Dets are periodic in phi.
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
double positiveRange(double phi) const
std::vector< double > thePhiBins
bool isPhiOverlapping() const
Returns true if any 2 of the Det overlap in phi.
int binIndex(int i) const
tuple size
Write out results.
const std::vector< double > & phiBins() const
The centers of the Dets.