14 template <
class FilteredView>
16 return (Panel1->
phi() < Panel2->
phi());
19 template <
class FilteredView>
21 std::vector<GeometricDet const*>::iterator
begin, std::vector<GeometricDet const*>::iterator
end) {
26 std::vector<const GeometricDet*> theCompsPosNeg;
28 double theRmin = (**begin).rho();
29 double theRmax = theRmin;
30 for (vector<const GeometricDet*>::const_iterator it =
begin; it !=
end; it++) {
31 if ((**it).phi() >= 0)
32 theCompsPosNeg.emplace_back(*it);
33 theRmin =
std::min(theRmin, (**it).rho());
34 theRmax =
std::max(theRmax, (**it).rho());
36 for (vector<const GeometricDet*>::const_iterator it =
begin; it !=
end; it++) {
38 theCompsPosNeg.emplace_back(*it);
44 double radius_split = 100.;
45 std::vector<const GeometricDet*> theCompsInnerOuter;
46 unsigned int num_inner = 0;
47 for (vector<const GeometricDet*>::const_iterator it = theCompsPosNeg.begin(); it != theCompsPosNeg.end(); it++) {
48 if ((**it).rho() <= radius_split) {
49 theCompsInnerOuter.emplace_back(*it);
54 for (vector<const GeometricDet*>::const_iterator it = theCompsPosNeg.begin(); it != theCompsPosNeg.end(); it++) {
55 if ((**it).rho() > radius_split)
56 theCompsInnerOuter.emplace_back(*it);
61 std::rotate(theCompsInnerOuter.begin() + num_inner, theCompsInnerOuter.end() - 1, theCompsInnerOuter.end());
63 theCompsInnerOuter.begin(), theCompsInnerOuter.begin() + num_inner - 1, theCompsInnerOuter.begin() + num_inner);
64 std::copy(theCompsInnerOuter.begin(), theCompsInnerOuter.end(),
begin);
67 template <
class FilteredView>
79 theCmsTrackerPanelBuilder.
build(fv, subdet,
s);
85 g->addComponent(subdet);
88 template <
class FilteredView>
94 PhiPosNegSplit_innerOuter(
comp.begin(),
comp.end());
98 <<
"ERROR - wrong SubDet to sort..... " << det->
components().front()->type();
104 uint32_t totalblade =
comp.size() / 2;
107 zminpanels.reserve(totalblade);
108 zmaxpanels.reserve(totalblade);
109 for (uint32_t
j = 0;
j < totalblade;
j++) {
111 zmaxpanels.emplace_back(det->
component(2 *
j));
112 zminpanels.emplace_back(det->
component(2 *
j + 1));
115 zmaxpanels.emplace_back(det->
component(2 *
j + 1));
116 zminpanels.emplace_back(det->
component(2 *
j));
118 edm::LogWarning(
"CmsTrackerPhase1DiskBuilder") <<
"WARNING - The Z of both panels are equal! ";
122 for (uint32_t
fn = 0;
fn < zminpanels.size();
fn++) {
123 uint32_t blade =
fn + 1;
125 uint32_t
temp = (blade << 2) | panel;
126 zminpanels[
fn]->setGeographicalID(
temp);
129 for (uint32_t bn = 0; bn < zmaxpanels.size(); bn++) {
130 uint32_t blade = bn + 1;
132 uint32_t
temp = (blade << 2) | panel;
133 zmaxpanels[bn]->setGeographicalID(
temp);