1 #ifndef RBorderFinder_H
2 #define RBorderFinder_H
31 std::vector<const Det*> theDets = utheDets;
34 std::vector<ConstReferenceCountingPointer<BoundDisk> >
disks(
theNbins);
37 dynamic_cast<const BoundDisk*
> (&(theDets[
i]->surface()));
39 throw cms::Exception(
"UnexpectedState") <<
"RBorderFinder: implemented for BoundDisks only";
46 theRBorders.push_back(disks.front()->innerRadius());
47 theRBins.push_back((disks.front()->outerRadius()+disks.front()->innerRadius()));
52 double step = (disks.back()->innerRadius() -
53 disks.front()->innerRadius())/(theNbins-1);
54 std::vector<double> spread;
55 std::vector<std::pair<double,double> > REdge;
56 REdge.reserve(theNbins);
59 spread.reserve(theNbins);
62 theRBins.push_back((disks[
i]->outerRadius()+disks[
i]->innerRadius())/2.);
64 REdge.push_back(std::pair<double,double>(disks[
i]->innerRadius(),
65 disks[
i]->outerRadius()));
71 double br = (REdge[(
i-1)].
second + REdge[
i].first)/2.;
76 if (REdge[
i].first - REdge[
i-1].
second < 0) {
83 if ( rms < 0.01*step) {
100 throw cms::Exception(
"UnexpectedState") <<
"RBorderFinder consistency error";
RBorderFinder(const std::vector< const Det * > &utheDets)
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.
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
bool isROverlapping() const
Returns true if any 2 of the Det overlap in R.
std::vector< double > theRBins