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) {
23 std::sort(begin,
end, PhiSort);
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);
62 theCompsInnerOuter.begin() + num_inner, theCompsInnerOuter.begin() + num_inner + 1, theCompsInnerOuter.end());
63 std::copy(theCompsInnerOuter.begin(), theCompsInnerOuter.end(), begin);
66 template <
class FilteredView>
78 theCmsTrackerPanelBuilder.
build(fv, subdet,
s);
84 g->addComponent(subdet);
87 template <
class FilteredView>
93 PhiPosNegSplit_innerOuter(
comp.begin(),
comp.end());
97 <<
"ERROR - wrong SubDet to sort..... " << det->
components().front()->type();
103 uint32_t totalblade =
comp.size() / 2;
106 zminpanels.reserve(totalblade);
107 zmaxpanels.reserve(totalblade);
108 for (uint32_t
j = 0;
j < totalblade;
j++) {
110 zmaxpanels.emplace_back(det->
component(2 *
j));
111 zminpanels.emplace_back(det->
component(2 *
j + 1));
114 zmaxpanels.emplace_back(det->
component(2 *
j + 1));
115 zminpanels.emplace_back(det->
component(2 *
j));
117 edm::LogWarning(
"CmsTrackerPhase2TPDiskBuilder") <<
"WARNING - The Z of both panels are equal! ";
121 for (uint32_t
fn = 0;
fn < zminpanels.size();
fn++) {
122 uint32_t blade =
fn + 1;
124 uint32_t
temp = (blade << 2) | panel;
125 zminpanels[
fn]->setGeographicalID(
temp);
128 for (uint32_t bn = 0; bn < zmaxpanels.size(); bn++) {
129 uint32_t blade = bn + 1;
131 uint32_t
temp = (blade << 2) | panel;
132 zmaxpanels[bn]->setGeographicalID(
temp);