36 float theRmax = theRmin;
37 for (vector<const GeometricSearchDet*>::const_iterator it =
theComps.begin(); it !=
theComps.end(); it++) {
38 theRmin =
std::min(theRmin, (*it)->surface().position().perp());
39 theRmax =
std::max(theRmax, (*it)->surface().position().perp());
43 float split_inner_outer_radius = 10.;
45 for (vector<const GeometricSearchDet*>::const_iterator it =
theComps.begin(); it !=
theComps.end(); it++) {
46 if ((**it).surface().position().perp() <= split_inner_outer_radius)
50 edm::LogInfo(
"TkDetLayers") <<
" Rmin, Rmax, R_average = " << theRmin <<
", " << theRmax <<
", "
51 << split_inner_outer_radius << std::endl
55 for (vector<const GeometricSearchDet*>::const_iterator it =
theComps.begin(); it !=
theComps.end(); it++) {
67 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for PixelForwardLayerPhase1"
70 <<
"Based on phi separation for inner: " <<
theComps.front()->surface().position().phi()
71 <<
" and on phi separation for outer: "
73 <<
"PixelForwardLayerPhase1.surfcace.phi(): " << std::endl
75 <<
"PixelForwardLayerPhase1.surfcace.z(): " << this->
surface().
position().
z() <<
"\n"
76 <<
"PixelForwardLayerPhase1.surfcace.innerR(): " << this->
specificSurface().innerRadius()
78 <<
"PixelForwardLayerPhase1.surfcace.outerR(): " << this->
specificSurface().outerRadius();
80 for (vector<const GeometricSearchDet*>::const_iterator it =
theComps.begin(); it !=
theComps.end(); it++) {
81 LogDebug(
"TkDetLayers") <<
"blades phi,z,r: " << (*it)->surface().position().phi() <<
" , "
82 << (*it)->surface().position().z() <<
" , " << (*it)->surface().position().perp();
92 vector<const GeometricSearchDet*>::const_iterator
i;
101 std::vector<DetGroup>&
result)
const {
102 std::vector<DetGroup> closestResult_inner;
103 std::vector<DetGroup> closestResult_outer;
104 std::vector<DetGroup> nextResult_inner;
105 std::vector<DetGroup> nextResult_outer;
106 std::vector<DetGroup> result_inner;
107 std::vector<DetGroup> result_outer;
108 int frontindex_inner = 0;
109 int frontindex_outer = 0;
120 if (!crossings_outer.isValid) {
122 <<
"outer computeCrossings returns invalid in PixelForwardLayerPhase1::groupedCompatibleDets:";
131 if (closestResult_inner.empty()) {
133 frontindex_inner = crossings_inner.
nextIndex;
140 std::vector<DetGroup> tmp99 = closestResult_inner;
142 std::move(tmp99),
std::move(nextResult_inner), result_inner, theHelicity, crossingSide);
143 if (theHelicity == crossingSide)
146 frontindex_inner = crossings_inner.
nextIndex;
148 result_inner.swap(closestResult_inner);
153 if (!closestResult_inner.empty()) {
168 closestResult_outer);
170 if (closestResult_outer.empty()) {
176 frontindex_outer = crossings_outer.nextIndex;
187 std::vector<DetGroup> tmp99 = closestResult_outer;
189 std::move(tmp99),
std::move(nextResult_outer), result_outer, theHelicity, crossingSide);
190 if (theHelicity == crossingSide)
191 frontindex_outer = crossings_outer.closestIndex;
193 frontindex_outer = crossings_outer.nextIndex;
195 result_outer.swap(closestResult_outer);
196 frontindex_outer = crossings_outer.closestIndex;
199 if (!closestResult_outer.empty()) {
205 if (result_inner.empty() && result_outer.empty())
207 if (result_inner.empty())
208 result.swap(result_outer);
209 else if (result_outer.empty())
210 result.swap(result_inner);
226 bool innerDisk)
const {
236 for (
int idet = negStart; idet >= negStart - quarter + 1; idet--) {
237 std::vector<DetGroup> tmp1;
238 std::vector<DetGroup> newResult;
243 if (!
Adder::add(*neighbor, tsos, prop, est, tmp1))
247 std::vector<DetGroup> tmp2;
249 Merger::orderAndMergeTwoLevels(
std::move(tmp1),
std::move(tmp2), newResult, theHelicity, crossingSide);
254 if (!
Adder::add(*neighbor, tsos, prop, est, tmp1))
258 std::vector<DetGroup> tmp2;
260 Merger::orderAndMergeTwoLevels(
std::move(tmp1),
std::move(tmp2), newResult, theHelicity, crossingSide);
264 for (
int idet = posStart; idet < posStart + quarter - 1; idet++) {
265 std::vector<DetGroup> tmp1;
266 std::vector<DetGroup> newResult;
271 if (!
Adder::add(*neighbor, tsos, prop, est, tmp1))
275 std::vector<DetGroup> tmp2;
277 Merger::orderAndMergeTwoLevels(
std::move(tmp2),
std::move(tmp1), newResult, theHelicity, crossingSide);
282 if (!
Adder::add(*neighbor, tsos, prop, est, tmp1))
286 std::vector<DetGroup> tmp2;
288 Merger::orderAndMergeTwoLevels(
std::move(tmp2),
std::move(tmp1), newResult, theHelicity, crossingSide);
311 if (!thePath.first) {
317 int closestIndex = 0;
326 float closestDist = 0;
330 pair<bool, double> theClosestBladePath = theBladeCrossing.
pathLength(closestPlane);
332 closestDist = closestPos.
x();
334 nextIndex =
Geom::phiLess(closestPlane.phi(), turbinePoint.barePhi()) ? closestIndex + 1 : closestIndex - 1;
339 pair<bool, double> theClosestBladePath = theBladeCrossing.
pathLength(closestPlane);
341 closestDist = closestPos.
x();
343 nextIndex =
Geom::phiLess(closestPlane.phi(), turbinePoint.barePhi()) ? closestIndex + 1 : closestIndex - 1;
350 pair<bool, double> theNextBladePath = theBladeCrossing.
pathLength(nextPlane);
352 nextDist = nextPos.
x();
356 pair<bool, double> theNextBladePath = theBladeCrossing.
pathLength(nextPlane);
358 nextDist = nextPos.
x();