1 #ifndef RBorderFinder_H
2 #define RBorderFinder_H
35 std::vector<ConstReferenceCountingPointer<BoundDisk> >
disks(
theNbins);
38 dynamic_cast<const BoundDisk*
> (&(theDets[
i]->surface()));
40 throw cms::Exception(
"UnexpectedState") <<
"RBorderFinder: implemented for BoundDisks only";
47 theRBorders.push_back(disks.front()->innerRadius());
48 theRBins.push_back((disks.front()->outerRadius()+disks.front()->innerRadius()));
53 double step = (disks.back()->innerRadius() -
54 disks.front()->innerRadius())/(theNbins-1);
55 std::vector<double> spread;
56 std::vector<std::pair<double,double> > REdge;
57 REdge.reserve(theNbins);
60 spread.reserve(theNbins);
63 theRBins.push_back((disks[
i]->outerRadius()+disks[
i]->innerRadius())/2.);
65 REdge.push_back(std::pair<double,double>(disks[
i]->innerRadius(),
66 disks[
i]->outerRadius()));
72 double br = (REdge[(
i-1)].
second + REdge[
i].first)/2.;
77 if (REdge[
i].first - REdge[
i-1].
second < 0) {
84 if ( rms < 0.01*step) {
101 throw cms::Exception(
"UnexpectedState") <<
"RBorderFinder consistency error";
geomsort::ExtractR< Det, float > DetR
U second(std::pair< T, U > const &p)
int binIndex(int i) const
const T & max(const T &a, const T &b)
std::vector< double > RBins() const
The centers of the Dets.
double stat_RMS(const CONT &cont)
std::vector< double > RBorders() const
std::vector< double > theRBorders
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
bool isRPeriodic() const
Returns true if the Dets are periodic in R.
tuple size
Write out results.
bool isROverlapping() const
Returns true if any 2 of the Det overlap in R.
RBorderFinder(std::vector< const Det * > theDets)
std::vector< double > theRBins