ATLAS Offline Software
SegmentFitHelperFunctions.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONR4__MuonSegmentFitHelperFunctions__H
6 #define MUONR4__MuonSegmentFitHelperFunctions__H
7 
9 #include "Acts/Seeding/HoughTransformUtils.hpp"
10 
11 
12 class MsgStream;
13 
14 namespace MuonR4{
15  class CalibratedSpacePoint;
16  class SpacePoint;
17 
18  namespace SegmentFitHelpers{
26  double chiSqTerm(const Amg::Vector3D& posInChamber,
27  const Amg::Vector3D& dirInChamber,
28  const SpacePoint& measurement,
29  MsgStream& msg);
36  double chiSqTermMdt(const Amg::Vector3D& posInChamber,
37  const Amg::Vector3D& dirInChamber,
38  const SpacePoint& measurement,
39  MsgStream& msg);
47  double chiSqTermStrip(const Amg::Vector3D& posInChamber,
48  const Amg::Vector3D& dirInChamber,
49  const SpacePoint& measurement,
50  MsgStream& msg);
51 
52 
64  double chiSqTerm(const Amg::Vector3D& posInChamber,
65  const Amg::Vector3D& dirInChamber,
66  const double timeShift,
67  std::optional<double> arrivalTime,
68  const CalibratedSpacePoint& measurement,
69  MsgStream& msg);
76  double chiSqTermMdt(const Amg::Vector3D& posInChamber,
77  const Amg::Vector3D& dirInChamber,
78  const CalibratedSpacePoint& mdtSpacePoint,
79  MsgStream& msg);
90  double chiSqTermStrip(const Amg::Vector3D& posInChamber,
91  const Amg::Vector3D& dirInChamber,
92  const double timeShift,
93  std::optional<double> arrivalTime,
94  const CalibratedSpacePoint& strip,
95  MsgStream& msg);
102  double chiSqTermBeamspot(const Amg::Vector3D& posInChamber,
103  const Amg::Vector3D& dirInChamber,
104  const CalibratedSpacePoint& beamSpotMeas,
105  MsgStream& msg);
106 
114  std::vector<int> driftSigns(const Amg::Vector3D& posInChamber,
115  const Amg::Vector3D& dirInChamber,
116  const std::vector<const SpacePoint*>& uncalibHits,
117  MsgStream& msg);
118 
126  int driftSign (const Amg::Vector3D& posInChamber,
127  const Amg::Vector3D& dirInChamber,
128  const SpacePoint& uncalibHit,
129  MsgStream& msg);
130 
138  int driftSign(const Amg::Vector3D& posInChamber,
139  const Amg::Vector3D& dirInChamber,
140  const CalibratedSpacePoint& calibHit,
141  MsgStream& msg);
142 
150  std::pair<std::vector<double>, double> postFitChi2PerMas(const SegmentFit::Parameters& segPars,
151  std::optional<double> arrivalTime,
152  std::vector<std::unique_ptr<CalibratedSpacePoint>>& hits,
153  MsgStream& msg);
154  }
155 }
156 
157 #endif // MUONR4__MuonSegmentFitHelperFunctions__H
MuonR4::SegmentFitHelpers::driftSigns
std::vector< int > driftSigns(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const std::vector< const SpacePoint * > &uncalibHits, MsgStream &msg)
Calculates whether a segement line travereses the tube measurements on the left (-1) or right (1) sid...
Definition: SegmentFitHelperFunctions.cxx:209
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonR4::SegmentFit::Parameters
AmgVector(toInt(ParamDefs::nPars)) Parameters
Definition: MuonHoughDefs.h:48
MuonR4::SegmentFitHelpers::postFitChi2PerMas
std::pair< std::vector< double >, double > postFitChi2PerMas(const SegmentFit::Parameters &segPars, std::optional< double > arrivalTime, std::vector< std::unique_ptr< CalibratedSpacePoint >> &hits, MsgStream &msg)
Calculates the chi2 per measurement and the chi2 itself after the fit is finished.
Definition: SegmentFitHelperFunctions.cxx:250
MuonR4::SegmentFitHelpers::chiSqTerm
double chiSqTerm(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const SpacePoint &measurement, MsgStream &msg)
Calculates the chi2 contribuation to a linear segment line from an uncalibrated measurement.
Definition: SegmentFitHelperFunctions.cxx:27
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
MuonR4::SegmentFitHelpers::driftSign
int driftSign(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const SpacePoint &uncalibHit, MsgStream &msg)
Calculates whether a segement line travereses the tube measurement on the left (-1) or right (1) side...
Definition: SegmentFitHelperFunctions.cxx:221
MuonR4::SegmentFitHelpers::chiSqTermStrip
double chiSqTermStrip(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const SpacePoint &measurement, MsgStream &msg)
Calculates the chi2 contribuation to a linear segment line from an uncalibrated strip measurement.
Definition: SegmentFitHelperFunctions.cxx:74
MuonR4::SegmentFitHelpers::chiSqTermMdt
double chiSqTermMdt(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const SpacePoint &measurement, MsgStream &msg)
Calculates the chi2 contribuation to a linear segment line from an uncalibrated Mdt measurement.
Definition: SegmentFitHelperFunctions.cxx:49
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:18
MuonHoughDefs.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::CalibratedSpacePoint
The calibrated Space point is created during the calibration process.
Definition: CalibratedSpacePoint.h:15
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
MuonR4::SegmentFitHelpers::chiSqTermBeamspot
double chiSqTermBeamspot(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const CalibratedSpacePoint &beamSpotMeas, MsgStream &msg)
Calculates the chi2 contribution from an external beam spot constraint.
Definition: SegmentFitHelperFunctions.cxx:187