52 const math::XYZPoint regOrigin(origin().x(), origin().y(), origin().z());
53 auto phi0 = phiDirection() + 0.5 * (phiMargin().right() - phiMargin().left());
54 auto dphi = 0.5 * (phiMargin().right() + phiMargin().left());
87 return UseMeasurementTracker::kNever;
88 if (
tmp ==
"forsistrips")
89 return UseMeasurementTracker::kForSiStrips;
91 return UseMeasurementTracker::kAlways;
93 <<
"', valid values are 'Never', 'ForSiStrips', 'Always' (case insensitive)";
99 theLambdaRange =
Range(std::sinh(theEtaRange.min()), std::sinh(theEtaRange.max()));
100 theMeanLambda = std::sinh(theEtaRange.mean());
109 float outerred_r =
std::sqrt(
sqr(ohit.
x() - origin().x()) +
sqr(ohit.
y() - origin().y()));
112 float zMinOrigin = origin().z() - originZBound();
113 float zMaxOrigin = origin().z() + originZBound();
116 float vcotMin = (
outer.z() > zMaxOrigin) ? (
outer.z() - zMaxOrigin) / (
outer.r() + originRBound())
117 : (
outer.z() - zMaxOrigin) / (
outer.r() - originRBound());
118 float vcotMax = (
outer.z() > zMinOrigin) ? (
outer.z() - zMinOrigin) / (
outer.r() - originRBound())
119 : (
outer.z() - zMinOrigin) / (
outer.r() + originRBound());
120 float cotRight =
std::max(vcotMin, theLambdaRange.min());
121 float cotLeft =
std::min(vcotMax, theLambdaRange.max());
122 return std::make_unique<HitEtaCheck>(
isBarrel,
outer, cotLeft, cotRight);
125 float outerZscatt = 0;
126 float innerScatt = 0;
130 float cotThetaOuter = theMeanLambda;
131 float sinThetaOuterInv =
std::sqrt(1.
f +
sqr(cotThetaOuter));
132 outerZscatt = 3.f * oSigma(
ptMin(), cotThetaOuter) * sinThetaOuterInv;
137 float zMinLine = boundL.
zAtR(0.) - outerZscatt;
138 float zMaxLine = boundR.zAtR(0.) + outerZscatt;
163 auto corr = innerScatt * sinThetaInv;
167 auto corr = innerScatt * cosThetaInv;
177 float halfLength = 0.5f *
layer->surface().bounds().length();
178 float halfThickness = 0.5f *
layer->surface().bounds().thickness();
179 float z0 =
layer->position().z();
184 Range detZWindow(
z0 - halfLength,
z0 + halfLength);
189 if (hitZWindow.
empty())
201 auto cotTheta = (hitZWindow.
mean() - origin().z()) * invR;
204 auto scatt = 3.f * msSigma(
ptMin(), cotTheta);
207 float hitErrRPhi = 0.;
209 float corrPhi = (scatt + hitErrRPhi) * invR;
210 float corrZ = scatt * sinThetaInv + bendR *
std::abs(cotTheta) + hitErrZ;
225 phiRange = phiPrediction(detRWindow.
mean());
237 float halfThickness = 0.5f *
layer->surface().bounds().thickness();
238 float zLayer =
layer->position().z();
239 Range detZWindow(zLayer - halfThickness, zLayer + halfThickness);
240 Range detRWindow(
layer->specificSurface().innerRadius(),
layer->specificSurface().outerRadius());
245 if (hitRWindow.
empty())
256 float cotTheta = (detZWindow.
mean() - origin().z()) / hitRWindow.
mean();
257 float cosThetaInv =
std::sqrt(1 +
sqr(cotTheta)) / cotTheta;
259 float scatt = 3.f * msSigma(
ptMin(), cotTheta);
261 float hitErrRPhi = 0.;
263 float corrPhi = (scatt + hitErrRPhi) / detRWindow.min();
264 float corrR = scatt *
std::abs(cosThetaInv) + bendR + hitErrR;
274 w1 = rPrediction.range(detZWindow.
min());
275 w2 = rPrediction.range(detZWindow.
max());
277 w1 = rPrediction.range(detZWindow.
max());
278 w2 = rPrediction.range(detZWindow.
min());
289 auto phi0 = phiDirection();
298 float zMin = origin().z() - originZBound();
299 float zMax = origin().z() + originZBound();
300 float rMin = -originRBound();
301 float rMax = originRBound();
302 if (theEtaRange.max() > 0) {
307 if (theEtaRange.min() > 0.) {
312 return HitRZConstraint(pLeft, theLambdaRange.min(), pRight, theLambdaRange.max());
323 bool measurementMethod =
false;
324 if (theMeasurementTrackerUsage == UseMeasurementTracker::kAlways)
325 measurementMethod =
true;
326 else if (theMeasurementTrackerUsage == UseMeasurementTracker::kForSiStrips &&
328 measurementMethod =
true;
330 if (measurementMethod) {
338 std::unique_ptr<MeasurementEstimator> est;
342 const BarrelDetLayer& bl = dynamic_cast<const BarrelDetLayer&>(*detLayer);
347 const ForwardDetLayer& fl = dynamic_cast<const ForwardDetLayer&>(*detLayer);
352 (thePhiMargin.left() + thePhiMargin.right()) * 0.5
f);
355 LogDebug(
"RectangularEtaPhiTrackingRegion") <<
"use pixel specific estimator.";
356 findDetAndHits = est.get();
358 LogDebug(
"RectangularEtaPhiTrackingRegion") <<
"use generic etat phi estimator.";
362 float phi = phiDirection();
375 LayerMeasurements lm(theMeasurementTracker->measurementTracker(), *theMeasurementTracker);
377 auto hits = lm.recHits(*detLayer, tsos, prop, *findDetAndHits);
380 for (
auto h :
hits) {
385 LogDebug(
"RectangularEtaPhiTrackingRegion")
386 <<
" found " <<
hits.size() <<
" minus one measurements on layer: " << detLayer->
subDetector();
394 const BarrelDetLayer& bl = dynamic_cast<const BarrelDetLayer&>(*detLayer);
400 auto layerHits =
layer.hits();
401 result.reserve(layerHits.size());
402 for (
auto&& ih : layerHits) {
408 const ForwardDetLayer& fl = dynamic_cast<const ForwardDetLayer&>(*detLayer);
414 auto layerHits =
layer.hits();
415 result.reserve(layerHits.size());
416 for (
auto&& ih : layerHits) {
429 std::ostringstream
str;