4 : theNbins(utheDets.
size()), isRPeriodic_(
false), isROverlapping_(
false) {
5 std::vector<const Det*> theDets = utheDets;
8 std::vector<ConstReferenceCountingPointer<BoundDisk> >
disks(
theNbins);
10 disks[
i] =
dynamic_cast<const BoundDisk*
>(&(theDets[
i]->surface()));
11 if (disks[
i] ==
nullptr) {
12 throw cms::Exception(
"UnexpectedState") <<
"RBorderFinder: implemented for BoundDisks only";
18 theRBorders.push_back(disks.front()->innerRadius());
19 theRBins.push_back((disks.front()->outerRadius() + disks.front()->innerRadius()));
24 double step = (disks.back()->innerRadius() - disks.front()->innerRadius()) / (theNbins - 1);
25 std::vector<double> spread;
26 std::vector<std::pair<double, double> > REdge;
27 REdge.reserve(theNbins);
30 spread.reserve(theNbins);
33 theRBins.push_back((disks[
i]->outerRadius() + disks[
i]->innerRadius()) / 2.);
35 REdge.push_back(std::pair<double, double>(disks[
i]->innerRadius(), disks[
i]->outerRadius()));
41 double br = (REdge[(
i - 1)].
second + REdge[
i].first) / 2.;
46 if (REdge[
i].first - REdge[
i - 1].
second < 0) {
53 if (rms < 0.01 * step) {
60 throw cms::Exception(
"UnexpectedState") <<
"RBorderFinder consistency error";
RBorderFinder(const std::vector< const Det * > &utheDets)
U second(std::pair< T, U > const &p)
double stat_RMS(const CONT &cont)
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
std::vector< double > theRBorders
geomsort::ExtractR< Det, float > DetR
tuple size
Write out results.
std::vector< double > theRBins