29 std::vector<const GeometricDet*> theCompsPosNeg;
30 theCompsPosNeg.empty();
31 theCompsPosNeg.clear();
33 double theRmin = (**begin).rho();
34 double theRmax = theRmin;
35 for(vector<const GeometricDet*>::const_iterator it=
begin;
37 if((**it).phi() >= 0) theCompsPosNeg.emplace_back(*it);
38 theRmin =
std::min( theRmin, (**it).rho());
39 theRmax =
std::max( theRmax, (**it).rho());
41 for(vector<const GeometricDet*>::const_iterator it=
begin;
43 if((**it).phi() < 0) theCompsPosNeg.emplace_back(*it);
49 double radius_split = 100.;
50 std::vector<const GeometricDet*> theCompsInnerOuter;
51 theCompsInnerOuter.empty();
52 theCompsInnerOuter.clear();
53 unsigned int num_inner = 0;
54 for(vector<const GeometricDet*>::const_iterator it=theCompsPosNeg.begin();
55 it!=theCompsPosNeg.end();it++){
56 if((**it).rho() <= radius_split) {
57 theCompsInnerOuter.emplace_back(*it);
62 for(vector<const GeometricDet*>::const_iterator it=theCompsPosNeg.begin();
63 it!=theCompsPosNeg.end();it++){
64 if((**it).rho() > radius_split) theCompsInnerOuter.emplace_back(*it);
69 std::rotate(theCompsInnerOuter.begin()+num_inner,theCompsInnerOuter.end()-1,theCompsInnerOuter.end());
70 std::rotate(theCompsInnerOuter.begin(),theCompsInnerOuter.begin()+num_inner-1,theCompsInnerOuter.begin()+num_inner);
71 std::copy(theCompsInnerOuter.begin(), theCompsInnerOuter.end(),
begin);
static bool PhiSort(const GeometricDet *Panel1, const GeometricDet *Panel2)
def rotate(angle, cx=0, cy=0)