ATLAS Offline Software
HoughHelperFunctions.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "Acts/Utilities/MathHelpers.hpp"
7 
8 namespace MuonR4::HoughHelpers {
9  using namespace SegmentFit;
10  namespace Eta{
11  double houghParamMdtLeft(double tanTheta, const MuonR4::HoughHitType & DC){
12  return DC->localPosition().y() - tanTheta * DC->localPosition().z() -
13  DC->driftRadius() * Acts::fastHypot(1., tanTheta); // using cos(theta) = sqrt(1/[1+tan²(theta)])
14  }
15  double houghParamMdtRight(double tanTheta, const MuonR4::HoughHitType & DC){
16  return DC->localPosition().y() - tanTheta * DC->localPosition().z() +
17  DC->driftRadius() * Acts::fastHypot(1., tanTheta); // using cos(theta) = sqrt(1/[1+tan²(theta)])
18  }
19  double houghParamStrip(double tanTheta, const MuonR4::HoughHitType & strip){
20  return strip->localPosition().y() - tanTheta * strip->localPosition().z();
21  }
22  double houghWidthMdt(double /*tanTheta*/, const MuonR4::HoughHitType & DC, double targetReso){
25  return std::max(3.* std::sqrt(DC->covariance()[Acts::toUnderlying(AxisDefs::etaCov)]),
26  targetReso); // scale reported errors up to at least 1mm or 3
27  }
28  double houghWidthStrip(double /*tanTheta*/, const MuonR4::HoughHitType& strip, double targetReso) {
29  const double nomCov = 3.*std::sqrt(strip->covariance()[Acts::toUnderlying(AxisDefs::etaCov)]);
30  return std::max(targetReso, nomCov* ((strip->type() == xAOD::UncalibMeasType::TgcStripType && !strip->measuresPhi()) ? 1.5 : 1.0));
31  // return positional uncertainty defined during SP creation
32  }
33  }
34  namespace Phi {
35  double houghParamStrip(double tanPhi, const MuonR4::HoughHitType & strip){
36  return strip->localPosition().x() - tanPhi * strip->localPosition().z();
37  }
38  double houghWidthStrip(double /*tanPhi*/, const MuonR4::HoughHitType & strip, double targetReso){
39  const double nomCov = 3.*std::sqrt(strip->covariance()[Acts::toUnderlying(AxisDefs::phiCov)]);
40  return std::max(targetReso, 3 * nomCov); // return positional uncertainty defined during SP creation
41  }
42  }
43 }
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
HoughHelperFunctions.h
Phi
@ Phi
Definition: RPCdef.h:8
MuonR4::SpacePoint::CovIdx::etaCov
@ etaCov
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
MuonR4::HoughHelpers::Eta::houghWidthStrip
double houghWidthStrip(double tanTheta, const MuonR4::HoughHitType &strip, double targetReso)
Uncertainty parametrisation for strip measurements.
Definition: HoughHelperFunctions.cxx:28
MuonR4::HoughHelpers::Eta::houghWidthMdt
double houghWidthMdt(double tanTheta, const MuonR4::HoughHitType &dc, double targetReso)
uncertainty parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:22
MuonR4::HoughHelpers
Definition: HoughHelperFunctions.h:11
MuonR4::SpacePoint::covariance
const Cov_t & covariance() const
Returns the covariance array.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:61
MuonR4::HoughHelpers::Eta::houghParamMdtLeft
double houghParamMdtLeft(double tanTheta, const MuonR4::HoughHitType &dc)
left-side straight line parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:11
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:24
MuonR4::SpacePoint::CovIdx::phiCov
@ phiCov
MuonR4::SpacePoint::localPosition
const Amg::Vector3D & localPosition() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:50
MuonR4::HoughHelpers::Eta::houghParamMdtRight
double houghParamMdtRight(double tanTheta, const MuonR4::HoughHitType &dc)
right-side straight line parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:15
MuonR4::SpacePoint::driftRadius
double driftRadius() const
: Returns the size of the drift radius
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:54
MuonR4::HoughHelpers::Eta::houghParamStrip
double houghParamStrip(double tanTheta, const MuonR4::HoughHitType &strip)
straight line parametrisation for strip detector measurements
Definition: HoughHelperFunctions.cxx:19
Eta
@ Eta
Definition: RPCdef.h:8