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