55 return UseMeasurementTracker::kNever;
56 if (
tmp ==
"forsistrips")
57 return UseMeasurementTracker::kForSiStrips;
59 return UseMeasurementTracker::kAlways;
61 <<
"', valid values are 'Never', 'ForSiStrips', 'Always' (case insensitive)";
67 theLambdaRange =
Range(std::sinh(theEtaRange.min()), std::sinh(theEtaRange.max()));
68 theMeanLambda = std::sinh(theEtaRange.mean());
77 float outerred_r =
std::sqrt(
sqr(ohit.
x() - origin().x()) +
sqr(ohit.
y() - origin().y()));
80 float zMinOrigin = origin().z() - originZBound();
81 float zMaxOrigin = origin().z() + originZBound();
84 float vcotMin = (
outer.z() > zMaxOrigin) ? (
outer.z() - zMaxOrigin) / (
outer.r() + originRBound())
85 : (
outer.z() - zMaxOrigin) / (
outer.r() - originRBound());
86 float vcotMax = (
outer.z() > zMinOrigin) ? (
outer.z() - zMinOrigin) / (
outer.r() - originRBound())
87 : (
outer.z() - zMinOrigin) / (
outer.r() + originRBound());
88 float cotRight =
std::max(vcotMin, theLambdaRange.min());
89 float cotLeft =
std::min(vcotMax, theLambdaRange.max());
90 return std::make_unique<HitEtaCheck>(
isBarrel,
outer, cotLeft, cotRight);
93 float outerZscatt = 0;
98 float cotThetaOuter = theMeanLambda;
100 outerZscatt = 3.f * oSigma(
ptMin(), cotThetaOuter) * sinThetaOuterInv;
105 float zMinLine = boundL.
zAtR(0.) - outerZscatt;
106 float zMaxLine = boundR.zAtR(0.) + outerZscatt;
131 auto corr = innerScatt * sinThetaInv;
135 auto corr = innerScatt * cosThetaInv;
152 Range detZWindow(
z0 - halfLength,
z0 + halfLength);
157 if (hitZWindow.
empty())
169 auto cotTheta = (hitZWindow.
mean() - origin().z()) * invR;
172 auto scatt = 3.f * msSigma(
ptMin(), cotTheta);
175 float hitErrRPhi = 0.;
177 float corrPhi = (scatt + hitErrRPhi) * invR;
178 float corrZ = scatt * sinThetaInv + bendR *
std::abs(cotTheta) + hitErrZ;
193 phiRange = phiPrediction(detRWindow.
mean());
196 return std::make_unique<OuterEstimator<Algo>>(
OuterDetCompatibility(layer, phiRange, detRWindow, hitZWindow),
207 Range detZWindow(zLayer - halfThickness, zLayer + halfThickness);
213 if (hitRWindow.
empty())
224 float cotTheta = (detZWindow.
mean() - origin().z()) / hitRWindow.
mean();
225 float cosThetaInv =
std::sqrt(1 +
sqr(cotTheta)) / cotTheta;
227 float scatt = 3.f * msSigma(
ptMin(), cotTheta);
229 float hitErrRPhi = 0.;
231 float corrPhi = (scatt + hitErrRPhi) / detRWindow.min();
232 float corrR = scatt *
std::abs(cosThetaInv) + bendR + hitErrR;
242 w1 = rPrediction.range(detZWindow.
min());
243 w2 = rPrediction.range(detZWindow.
max());
245 w1 = rPrediction.range(detZWindow.
max());
246 w2 = rPrediction.range(detZWindow.
min());
251 return std::make_unique<OuterEstimator<Algo>>(
OuterDetCompatibility(layer, phiRange, hitRWindow, detZWindow),
257 auto phi0 = phiDirection();
266 float zMin = origin().z() - originZBound();
267 float zMax = origin().z() + originZBound();
268 float rMin = -originRBound();
269 float rMax = originRBound();
270 if (theEtaRange.max() > 0) {
275 if (theEtaRange.min() > 0.) {
280 return HitRZConstraint(pLeft, theLambdaRange.min(), pRight, theLambdaRange.max());
291 bool measurementMethod =
false;
292 if (theMeasurementTrackerUsage == UseMeasurementTracker::kAlways)
293 measurementMethod =
true;
294 else if (theMeasurementTrackerUsage == UseMeasurementTracker::kForSiStrips &&
296 measurementMethod =
true;
298 if (measurementMethod) {
306 std::unique_ptr<MeasurementEstimator> est;
310 const BarrelDetLayer& bl = dynamic_cast<const BarrelDetLayer&>(*detLayer);
315 const ForwardDetLayer& fl = dynamic_cast<const ForwardDetLayer&>(*detLayer);
320 (thePhiMargin.left() + thePhiMargin.right()) * 0.5
f);
323 LogDebug(
"RectangularEtaPhiTrackingRegion") <<
"use pixel specific estimator.";
324 findDetAndHits = est.get();
326 LogDebug(
"RectangularEtaPhiTrackingRegion") <<
"use generic etat phi estimator.";
330 float phi = phiDirection();
343 LayerMeasurements lm(theMeasurementTracker->measurementTracker(), *theMeasurementTracker);
345 auto hits = lm.recHits(*detLayer, tsos, prop, *findDetAndHits);
348 for (
auto h :
hits) {
353 LogDebug(
"RectangularEtaPhiTrackingRegion")
354 <<
" found " <<
hits.size() <<
" minus one measurements on layer: " << detLayer->
subDetector();
362 const BarrelDetLayer& bl = dynamic_cast<const BarrelDetLayer&>(*detLayer);
368 auto layerHits = layer.
hits();
369 result.reserve(layerHits.size());
370 for (
auto&& ih : layerHits) {
376 const ForwardDetLayer& fl = dynamic_cast<const ForwardDetLayer&>(*detLayer);
382 auto layerHits = layer.
hits();
383 result.reserve(layerHits.size());
384 for (
auto&& ih : layerHits) {
397 std::ostringstream
str;