ATLAS Offline Software
Loading...
Searching...
No Matches
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
8namespace MuonR4::HoughHelpers {
9 using namespace SegmentFit;
10 namespace Eta{
11 double houghParamMdtLeft(double tanBeta, const MuonR4::HoughHitType & DC){
12 return DC->localPosition().y() - tanBeta * DC->localPosition().z() -
13 DC->driftRadius() * Acts::fastHypot(1., tanBeta); // using cos(theta) = sqrt(1/[1+tan²(theta)])
14 }
15 double houghParamMdtRight(double tanBeta, const MuonR4::HoughHitType & DC){
16 return DC->localPosition().y() - tanBeta * DC->localPosition().z() +
17 DC->driftRadius() * Acts::fastHypot(1., tanBeta); // using cos(theta) = sqrt(1/[1+tan²(theta)])
18 }
19 double houghParamStrip(double tanBeta, const MuonR4::HoughHitType & strip){
20 return strip->localPosition().y() - tanBeta * strip->localPosition().z();
21 }
22 double houghWidthMdt(double /*tanBeta*/, 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 /*tanBeta*/, 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 tanAlpha, const MuonR4::HoughHitType & strip){
36 return strip->localPosition().x() - tanAlpha * strip->localPosition().z();
37 }
38 double houghWidthStrip(double /*tanAlpha*/, 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}
double driftRadius() const
: Returns the size of the drift radius
const Cov_t & covariance() const
Returns the covariance array.
double houghWidthStrip(double tanBeta, const MuonR4::HoughHitType &strip, double targetReso)
Uncertainty parametrisation for strip measurements.
double houghParamMdtRight(double tanBeta, const MuonR4::HoughHitType &dc)
right-side straight line parametrisation for drift circles
double houghParamStrip(double tanBeta, const MuonR4::HoughHitType &strip)
straight line parametrisation for strip detector measurements
double houghWidthMdt(double tanBeta, const MuonR4::HoughHitType &dc, double targetReso)
uncertainty parametrisation for drift circles
double houghParamMdtLeft(double tanBeta, const MuonR4::HoughHitType &dc)
left-side straight line parametrisation for drift circles
double houghWidthStrip(double tanAlpha, const MuonR4::HoughHitType &dc, double targetReso)
Uncertainty parametrisation for strip measurements.
double houghParamStrip(double tanAlpha, const MuonR4::HoughHitType &dc)
straight line parametrisation for strip detector measurements, in the x-direction
const SpacePoint * HoughHitType