19 class DetGroupElementPerpLess {
22 return (
a.front().det()->position().perp() <
b.front().det()->position().perp());
28 vector<const GeomDet*>& outerDets,
29 const vector<const GeomDet*>& innerDetBrothers,
30 const vector<const GeomDet*>& outerDetBrothers)
32 theInnerDets(innerDets),
33 theOuterDets(outerDets),
34 theInnerDetBrothers(innerDetBrothers),
35 theOuterDetBrothers(outerDetBrothers) {
52 LogDebug(
"TkDetLayers") <<
"==== DEBUG Phase2OTBarrelRod =====";
54 LogDebug(
"TkDetLayers") <<
"inner Phase2OTBarrelRod's Det pos z,perp,eta,phi: " << (**i).position().z() <<
" , "
55 << (**i).position().perp() <<
" , " << (**i).position().eta() <<
" , "
56 << (**i).position().phi();
60 LogDebug(
"TkDetLayers") <<
"inner Phase2OTBarrelRod's Det Brother pos z,perp,eta,phi: " << (**i).position().z()
61 <<
" , " << (**i).position().perp() <<
" , " << (**i).position().eta() <<
" , "
62 << (**i).position().phi();
65 LogDebug(
"TkDetLayers") <<
"==== with stacks =====";
67 LogDebug(
"TkDetLayers") <<
"==== without stacks =====";
70 LogDebug(
"TkDetLayers") <<
"outer Phase2OTBarrelRod's Det pos z,perp,eta,phi: " << (**i).position().z() <<
" , "
71 << (**i).position().perp() <<
" , " << (**i).position().eta() <<
" , "
72 << (**i).position().phi();
76 LogDebug(
"TkDetLayers") <<
"outer Phase2OTBarrelRod's Det Brother pos z,perp,eta,phi: " << (**i).position().z()
77 <<
" , " << (**i).position().perp() <<
" , " << (**i).position().eta() <<
" , "
78 << (**i).position().phi();
80 LogDebug(
"TkDetLayers") <<
"==== end DEBUG Phase2OTBarrelRod =====";
87 throw DetLayerException(
"Phase2OTBarrelRod doesn't have GeometricSearchDet components");
93 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of Phase2OTBarrelRod::compatible()!!";
94 return pair<bool, TrajectoryStateOnSurface>();
100 std::vector<DetGroup>&
result)
const {
106 std::vector<DetGroup> closestResult;
107 std::vector<DetGroup> closestBrotherResult;
108 addClosest(tsos, prop, est, crossings.
closest(), closestResult, closestBrotherResult);
109 if (closestResult.empty()) {
110 std::vector<DetGroup> nextResult;
111 std::vector<DetGroup> nextBrotherResult;
112 addClosest(tsos, prop, est, crossings.
other(), nextResult, nextBrotherResult);
113 if (nextResult.empty())
118 std::vector<DetGroup> closestCompleteResult;
120 std::move(closestResult),
std::move(closestBrotherResult), closestCompleteResult, 0, crossingSide);
121 std::vector<DetGroup> nextCompleteResult;
123 std::move(nextResult),
std::move(nextBrotherResult), nextCompleteResult, 0, crossingSide);
134 std::vector<DetGroup> closestCompleteResult;
136 std::move(closestResult),
std::move(closestBrotherResult), closestCompleteResult, 0, crossingSide);
138 std::vector<DetGroup> nextResult;
139 std::vector<DetGroup> nextBrotherResult;
142 std::vector<DetGroup> nextCompleteResult;
144 std::move(nextResult),
std::move(nextBrotherResult), nextCompleteResult, 0, crossingSide);
152 for (
auto& grp :
result) {
155 LogTrace(
"TkDetLayers") <<
"New group in Phase2OTBarrelRod made by : ";
156 for (
auto const& det : grp) {
157 LogTrace(
"TkDetLayers") <<
" geom det at r: " << det.det()->position().perp()
158 <<
" id:" << det.det()->geographicalId().rawId()
159 <<
" tsos at:" << det.trajectoryState().globalPosition();
172 std::pair<bool, double> outerPath = crossing.pathLength(*
theOuterPlane);
173 if (!outerPath.first)
175 GlobalPoint gOuterPoint(crossing.position(outerPath.second));
177 std::pair<bool, double> innerPath = crossing.pathLength(*
theInnerPlane);
178 if (!innerPath.first)
180 GlobalPoint gInnerPoint(crossing.position(innerPath.second));
190 if (innerDist < outerDist) {
202 vector<DetGroup>& brotherresult)
const {
213 return firstgroup || brothergroup;
228 constexpr
float relativeMargin = 1.01;
236 float localY = localCrossPoint.y();
253 vector<DetGroup>& brotherresult,
254 bool checkClosest)
const {
261 int negStartIndex = closestIndex - 1;
262 int posStartIndex = closestIndex + 1;
265 if (gCrossingPos.
z() < sRod[closestIndex]->surface().position().z()) {
266 posStartIndex = closestIndex;
268 negStartIndex = closestIndex;
273 for (
int idet = negStartIndex; idet >= 0; idet--) {
281 Adder::add(*sBrotherRod[idet], tsos, prop, est, brotherresult);
283 for (
int idet = posStartIndex; idet < static_cast<int>(sRod.size()); idet++) {
291 Adder::add(*sBrotherRod[idet], tsos, prop, est, brotherresult);