ATLAS Offline Software
HoughHelperFunctions.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 using namespace MuonR4;
8 
9  double HoughHelpers::Eta::houghParamMdtLeft(double tanTheta, const MuonR4::HoughHitType & DC){
10  return DC->positionInChamber().y() - tanTheta * DC->positionInChamber().z() -
11  DC->driftRadius() * std::sqrt(1 + (tanTheta*tanTheta)); // using cos(theta) = sqrt(1/[1+tanĀ²(theta)])
12  }
13  double HoughHelpers::Eta::houghParamMdtRight(double tanTheta, const MuonR4::HoughHitType & DC){
14  return DC->positionInChamber().y() - tanTheta * DC->positionInChamber().z() +
15  DC->driftRadius() * std::sqrt(1 + (tanTheta*tanTheta)); // using cos(theta) = sqrt(1/[1+tanĀ²(theta)])
16  }
17  double HoughHelpers::Eta::houghParamStrip(double tanTheta, const MuonR4::HoughHitType & strip){
18  return strip->positionInChamber().y() - tanTheta * strip->positionInChamber().z();
19  }
20 
21  double HoughHelpers::Eta::houghWidthMdt(double /*tanTheta*/, const MuonR4::HoughHitType & DC){
22  return std::min(DC->uncertainty().y() * 3.,
23  1.0); // scale reported errors up to at least 1mm or 3
24  // times the reported error as drift circle calib not
25  // fully reliable at this stage
26  }
27  double HoughHelpers::Eta::houghWidthStrip(double /*tanTheta*/, const MuonR4::HoughHitType & strip){
28  return 3. * strip->uncertainty().y() * ((strip->primaryMeasurement()->type() == xAOD::UncalibMeasType::TgcStripType && !strip->measuresPhi()) ? 1.5 : 1.0); // return positional uncertainty defined during SP creation
29  }
30 
31  double HoughHelpers::Phi::houghParamStrip(double tanPhi, const MuonR4::HoughHitType & strip){
32  return strip->positionInChamber().x() - tanPhi * strip->positionInChamber().z();
33  }
34  double HoughHelpers::Phi::houghWidthStrip(double /*tanPhi*/, const MuonR4::HoughHitType & DC){
35  return 3. * DC->uncertainty().x(); // return positional uncertainty defined during SP creation
36  }
MuonR4::HoughHelpers::Eta::houghWidthStrip
double houghWidthStrip(double tanTheta, const MuonR4::HoughHitType &strip)
Uncertainty parametrisation for strip measurements.
Definition: HoughHelperFunctions.cxx:27
MuonR4::HoughHitType
std::shared_ptr< MuonR4::MuonSpacePoint > HoughHitType
Definition: MuonHoughDefs.h:20
HoughHelperFunctions.h
MuonR4::HoughHelpers::Phi::houghParamStrip
double houghParamStrip(double tanPhi, const MuonR4::HoughHitType &dc)
straight line parametrisation for strip detector measurements, in the x-direction
Definition: HoughHelperFunctions.cxx:31
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
MuonR4::HoughHelpers::Eta::houghWidthMdt
double houghWidthMdt(double tanTheta, const MuonR4::HoughHitType &dc)
uncertainty parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:21
MuonR4::HoughHelpers::Eta::houghParamMdtLeft
double houghParamMdtLeft(double tanTheta, const MuonR4::HoughHitType &dc)
left-side straight line parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:9
min
#define min(a, b)
Definition: cfImp.cxx:40
MuonR4::HoughHelpers::Phi::houghWidthStrip
double houghWidthStrip(double tanPhi, const MuonR4::HoughHitType &dc)
Uncertainty parametrisation for strip measurements.
Definition: HoughHelperFunctions.cxx:34
MuonR4
The CsvMuonSimHitDumper reads a Simulation Hit container for muons and dumps information to csv files...
Definition: MuonSpacePoint.h:11
MuonR4::HoughHelpers::Eta::houghParamMdtRight
double houghParamMdtRight(double tanTheta, const MuonR4::HoughHitType &dc)
right-side straight line parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:13
MuonR4::HoughHelpers::Eta::houghParamStrip
double houghParamStrip(double tanTheta, const MuonR4::HoughHitType &strip)
straight line parametrisation for strip detector measurements
Definition: HoughHelperFunctions.cxx:17