ATLAS Offline Software
SegmentFitHelperFunctions.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
5 
10 #include "GaudiKernel/PhysicalConstants.h"
11 #include "GeoModelHelpers/throwExcept.h"
14 
15 namespace{
16  constexpr double c_inv = 1. / Gaudi::Units::c_light;
17  constexpr auto printLvl = MSG::VERBOSE;
18 }
19 
20 
21 namespace MuonR4 {
22  namespace SegmentFitHelpers{
23  using namespace SegmentFit;
25 
26 
27  double chiSqTerm(const Amg::Vector3D& posInChamber,
28  const Amg::Vector3D& dirInChamber,
29  const MuonR4::SpacePoint& measurement,
30  MsgStream& msg) {
31  double chi2{0.};
32  switch (measurement.type()) {
34  chi2 = chiSqTermMdt(posInChamber, dirInChamber,
35  measurement, msg);
36  break;
39  chi2 = chiSqTermStrip(posInChamber, dirInChamber, measurement, msg);
40  break;
41  default:
42  if (msg.level() <= MSG::WARNING) {
43  msg<<MSG::WARNING<<__FILE__<<":"<<__LINE__<<" - Unsupported measurement: "
44  <<measurement.msSector()->idHelperSvc()->toString(measurement.identify())<<endmsg;
45  }
46  }
47  return chi2;
48  }
49  double chiSqTermMdt(const Amg::Vector3D& segPos,
50  const Amg::Vector3D& segDir,
51  const MuonR4::SpacePoint& mdtSP,
52  MsgStream& msg) {
53 
55 
56  residual[Amg::y] = Amg::lineDistance<3>(mdtSP.positionInChamber(), mdtSP.directionInChamber(),
57  segPos, segDir)
58  - mdtSP.driftRadius();
59  const double chi2{residual.dot(mdtSP.covariance().inverse()* residual)};
60  if (msg.level() <= printLvl) {
61  msg<<printLvl<<"Measurement "<<mdtSP.msSector()->idHelperSvc()->toString(mdtSP.identify());
62  msg<<printLvl<<", position: "<<Amg::toString(mdtSP.positionInChamber())
63  <<", driftRadius: "<<mdtSP.driftRadius()
64  <<", status: "<<static_cast<const xAOD::MdtDriftCircle*>(mdtSP.primaryMeasurement())->status()<<endmsg;
65  msg<<printLvl<<"segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<","<<endmsg;
66  msg<<printLvl<<"residual: "<<Amg::toString(residual) <<", covariance: "<<std::endl
67  <<Amg::toString(mdtSP.covariance())<<std::endl<<", inverse: "
68  <<std::endl<<Amg::toString(mdtSP.covariance().inverse())<<", "<<endmsg;
69  msg<<printLvl<<"chi2 term: "<<chi2<<endmsg;
70  }
71  assert(chi2 >=0.);
72  return chi2;
73  }
74  double chiSqTermStrip(const Amg::Vector3D& segPos,
75  const Amg::Vector3D& segDir,
76  const MuonR4::SpacePoint& stripSP,
77  MsgStream& msg){
78  const Amg::Vector3D normal = stripSP.planeNormal();
79  std::optional<double> travelledDist = Amg::intersect<3>(segPos, segDir, normal, normal.dot(stripSP.positionInChamber()));
80  const Amg::Vector3D planeCrossing = segPos + travelledDist.value_or(0) * segDir;
81 
82  const Amg::Vector2D residual{(planeCrossing - stripSP.positionInChamber()).block<2,1>(0,0)};
83  const double chi2 = residual.dot(stripSP.covariance().inverse()* residual);
84  if (msg.level() <= printLvl) {
85  msg<<printLvl<<"Measurement "<<stripSP.msSector()->idHelperSvc()->toString(stripSP.identify())
86  <<", position: "<<Amg::toString(stripSP.positionInChamber())<<endmsg;
87  msg<<printLvl<<"Segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<endmsg;
88  msg<<printLvl<<"Plane crossing: "<<Amg::toString(planeCrossing)<<", residual: "<<Amg::toString(residual)
89  <<", covariance: " <<std::endl<<Amg::toString(stripSP.covariance())<<", inverse: "
90  <<std::endl<<Amg::toString(stripSP.covariance().inverse())<<","<<endmsg;
91  msg<<printLvl<<"chi2 term: "<<chi2<<endmsg;
92  }
93  assert(chi2 >=0.);
94  return chi2;
95  }
96 
97  double chiSqTerm(const Amg::Vector3D& segPos, const Amg::Vector3D& segDir,
98  const double timeOffset, std::optional<double> arrivalTime,
99  const CalibratedSpacePoint& hit,
100  MsgStream& msg) {
101  double chi2{0.};
102  switch (hit.type()) {
104  chi2 = chiSqTermMdt(segPos, segDir, hit, msg);
105  break;
108  chi2 = chiSqTermStrip(segPos, segDir, timeOffset, arrivalTime, hit, msg);
109  break;
111  chi2 = chiSqTermBeamspot(segPos,segDir, hit, msg);
112  break;
113  default:
114  if (msg.level() <= MSG::WARNING) {
115  msg<<MSG::WARNING<<__FILE__<<":"<<__LINE__<<" - Unsupported measurement: "
117  }
118  }
119  return chi2;
120  }
121 
122  double chiSqTermMdt(const Amg::Vector3D& segPos,
123  const Amg::Vector3D& segDir,
124  const CalibratedSpacePoint& hit,
125  MsgStream& msg) {
127  if (hit.fitState() != State::Valid) return 0.;
128  const Amg::Vector3D& hitPos{hit.positionInChamber()};
129  const Amg::Vector3D& hitDir{hit.directionInChamber()};
130 
131  // Calculate the closest point along the segment to the wire
132  const Amg::Vector3D closePointSeg = segPos + Amg::intersect<3>(hitPos, hitDir, segPos, segDir).value_or(0)* segDir;
133  // Closest point along the wire to the segment
134  const Amg::Vector3D closePointWire = hitPos + hitDir.dot(closePointSeg - hitPos) * hitDir;
136  residual[Amg::x] = (hitPos - closePointSeg).x();
137  residual[Amg::y] = (closePointWire - closePointSeg).mag() - hit.driftRadius();
138  const double chi2{contract(inverse(hit.covariance()), residual)};
139  if (msg.level() <= printLvl) {
140  const SpacePoint* sp = hit.spacePoint();
141  msg<<printLvl<<"Calibrated measurement "<<sp->msSector()->idHelperSvc()->toString(sp->identify());
142  msg<<printLvl<<", position: "<<Amg::toString(hit.positionInChamber())<<", driftRadius: "<<hit.driftRadius()
143  <<", dimension: "<<sp->dimension()<<endmsg;
144  msg<<printLvl<<", segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<endmsg;
145  msg<<printLvl<<", residual: "<<Amg::toString(residual)<<"/ "<<
146  (Amg::lineDistance<3>(hitPos, hitDir, segPos, segDir) -hit.driftRadius())<<std::endl <<", covariance: "<<std::endl
147  <<toString(hit.covariance())<<", inverse: "
148  <<std::endl<<toString(inverse(hit.covariance()))<<", "<<endmsg;
149  msg<<printLvl<<"Chi2 term: "<<chi2<<endmsg;
150  }
151  assert(chi2 >=0.);
152  return chi2;
153  }
154  double chiSqTermStrip(const Amg::Vector3D& segPos,
155  const Amg::Vector3D& segDir,
156  const double offsetTime,
157  std::optional<double> arrivalTime,
158  const CalibratedSpacePoint& strip,
159  MsgStream& msg) {
160 
162  if (strip.fitState() != State::Valid) return 0.;
163 
164  const SpacePoint* spacePoint = strip.spacePoint();
165  const Amg::Vector3D normal = spacePoint->planeNormal();
166  std::optional<double> travelledDist = Amg::intersect<3>(segPos, segDir, normal, normal.dot(spacePoint->positionInChamber()));
167  const Amg::Vector3D planeCrossing = segPos + travelledDist.value_or(0) * segDir;
168  Amg::Vector3D residual{(planeCrossing - strip.positionInChamber())};
169  if (strip.measuresTime() && arrivalTime) {
170  residual[Amg::z] = strip.time() - (*arrivalTime) - travelledDist.value_or(0) * c_inv - offsetTime;
171  } else {
172  residual[Amg::z] = 0;
173  }
174  const double chi2 = contract(inverse(strip.covariance()), residual);
175  if (msg.level() <= printLvl) {
176  msg<<printLvl<<"Calibrated measurement "<<spacePoint->msSector()->idHelperSvc()->toString(spacePoint->identify())
177  <<", position: "<<Amg::toString(strip.positionInChamber())<<endmsg;
178  msg<<printLvl<<"Segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<endmsg;
179  msg<<printLvl<<"Plane crossing: "<<Amg::toString(planeCrossing)<<", residual: "<<Amg::toString(residual)
180  <<", covariance: "<<std::endl<<toString(strip.covariance())<<", inverse: "
181  <<std::endl<<toString(inverse(strip.covariance()))<<endmsg;
182  msg<<printLvl<<" -- final chi2 term: "<<chi2<<endmsg;
183  }
184  assert(chi2 >=0.);
185  return chi2;
186  }
187  double chiSqTermBeamspot(const Amg::Vector3D& segPos,
188  const Amg::Vector3D& segDir,
189  const CalibratedSpacePoint& beamSpotMeas,
190  MsgStream& msg) {
191 
193  if (beamSpotMeas.fitState() != State::Valid) return 0.;
194  const Amg::Vector3D planeCrossing{segPos + Amg::intersect<3>(segPos, segDir, Amg::Vector3D::UnitZ(),
195  beamSpotMeas.positionInChamber().z()).value_or(0) * segDir};
196 
197  const Amg::Vector2D residual = (planeCrossing - beamSpotMeas.positionInChamber()).block<2,1>(0,0);
198  const double chi2 = contract(inverse(beamSpotMeas.covariance()), residual);
199  if (msg.level() <= printLvl) {
200  msg<<printLvl<<"Print beamspot constraint "<<Amg::toString(beamSpotMeas.positionInChamber())<<endmsg;
201  msg<<printLvl<<"Segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<endmsg;
202  msg<<printLvl<<"Plane crossing: "<<Amg::toString(planeCrossing)<<", residual: "<<Amg::toString(residual)
203  <<", covariance: "<<std::endl<<toString(beamSpotMeas.covariance())<<std::endl
204  <<", inverse: "<<std::endl<<toString(inverse(beamSpotMeas.covariance()))<<std::endl
205  <<"chi2 term: "<<chi2<<endmsg;
206  }
207  return chi2;
208  }
209  std::vector<int> driftSigns(const Amg::Vector3D& segPos,
210  const Amg::Vector3D& segDir,
211  const std::vector<const SpacePoint*>& uncalibHits,
212  MsgStream& msg) {
213 
214  std::vector<int> signs{};
215  signs.reserve(uncalibHits.size());
216  for (const SpacePoint* sp : uncalibHits) {
217  signs.push_back( sp ? driftSign(segPos,segDir, *sp, msg) : 0);
218  }
219  return signs;
220  }
221  int driftSign(const Amg::Vector3D& segPos, const Amg::Vector3D& segDir,
222  const SpacePoint& sp, MsgStream& msg) {
224  return 0;
225  }
226  const Amg::Vector3D deltaPos{segPos - sp.positionInChamber()};
227  const double signedDist = deltaPos.y() - (segDir.y() / segDir.z()) * deltaPos.z();
228  if (msg.level() <= printLvl) {
229  msg<<printLvl<<"Hit "<<sp.msSector()->idHelperSvc()->toString(sp.identify())<<" drift radius "<<sp.driftRadius()
230  <<", signed distance: "<<signedDist<<", unsigned distance: "
231  <<Amg::lineDistance<3>(segPos, segDir, sp.positionInChamber(), sp.directionInChamber())<<endmsg;
232  }
233  return signedDist >0 ? 1 : -1;
234  }
235  int driftSign(const Amg::Vector3D& segPos, const Amg::Vector3D& segDir,
236  const CalibratedSpacePoint& calibHit, MsgStream& msg) {
238  return 0;
239  }
240  const Amg::Vector3D deltaPos{segPos - calibHit.positionInChamber()};
241  const double signedDist = deltaPos.y() - (segDir.y() / segDir.z()) * deltaPos.z();
242  if (msg.level() <= printLvl) {
243  const SpacePoint* sp = calibHit.spacePoint();
244  msg<<printLvl<<"Hit "<<sp->msSector()->idHelperSvc()->toString(sp->identify())<<" drift radius "<<calibHit.driftRadius()
245  <<", signed distance: "<<signedDist<<", unsigned distance: "
246  <<Amg::lineDistance<3>(segPos, segDir, calibHit.positionInChamber(), calibHit.directionInChamber())<<endmsg;
247  }
248  return signedDist >0 ? 1 : -1;
249  }
250  std::pair<std::vector<double>, double> postFitChi2PerMas(const SegmentFit::Parameters& segPars,
251  std::optional<double> arrivalTime,
252  std::vector<std::unique_ptr<CalibratedSpacePoint>>& hits,
253  MsgStream& msg) {
254 
255  std::vector<double> measChi2{};
256  double chi2{0.};
257  const auto [segPos, segDir] = SegmentFit::makeLine(segPars);
258  for (std::unique_ptr<CalibratedSpacePoint>& hit : hits) {
259  if (hit->fitState() == State::Outlier){
260  hit->setFitState(State::Valid);
261  measChi2.push_back(chiSqTerm(segPos,segDir, segPars[toInt(ParamDefs::time)],arrivalTime, *hit, msg));
262  hit->setFitState(State::Outlier);
263  } else {
264  measChi2.push_back(chiSqTerm(segPos,segDir, segPars[toInt(ParamDefs::time)],arrivalTime, *hit, msg));
265  chi2+= measChi2.back();
266  }
267  }
268  return std::make_pair(std::move(measChi2), chi2);
269  }
270  }
271 }
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
MuonR4::SpacePoint::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:116
MuonR4::SpacePoint::type
xAOD::UncalibMeasType type() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:131
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
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonR4::SpacePoint::planeNormal
Amg::Vector3D planeNormal() const
Returns the vector pointing out of the measurement plane.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:128
Amg::y
@ y
Definition: GeoPrimitives.h:35
MuonR4::CalibratedSpacePoint::State::Outlier
@ Outlier
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
MuonR4::SegmentFit::makeLine
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
Definition: SegmentFitterEventData.cxx:30
x
#define x
MuonR4::toString
std::string toString(const CalibratedSpacePoint::Covariance_t &mat)
Returns the matrix in string.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:75
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
MuonR4::SpacePoint::primaryMeasurement
const xAOD::UncalibratedMeasurement * primaryMeasurement() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:107
CalibratedSpacePoint.h
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
Amg::z
@ z
Definition: GeoPrimitives.h:36
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
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonR4::inverse
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:65
UtilFunctions.h
SegmentFitHelperFunctions.h
Amg::x
@ x
Definition: GeoPrimitives.h:34
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
MuonR4::CalibratedSpacePoint::State
State
State flag to distinguish different space point states.
Definition: CalibratedSpacePoint.h:24
xAOD::Other
@ Other
MuonR4::CalibratedSpacePoint::type
xAOD::UncalibMeasType type() const
Returns the space point type.
Definition: CalibratedSpacePoint.cxx:36
MdtDriftCircle.h
MuonR4::SegmentFit::ParamDefs::time
@ time
MuonR4::CalibratedSpacePoint::State::Valid
@ Valid
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
MuonR4::SpacePoint::directionInChamber
const Amg::Vector3D & directionInChamber() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:122
MuonGMR4::SpectrometerSector::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the IdHelpeSvc.
Definition: SpectrometerSector.cxx:40
MuonR4::CalibratedSpacePoint::fitState
State fitState() const
Returns the state of the calibrated space point.
Definition: CalibratedSpacePoint.cxx:55
MuonR4::SegmentFit::toInt
constexpr int toInt(const ParamDefs p)
Definition: MuonHoughDefs.h:42
MuonR4::CalibratedSpacePoint::positionInChamber
const Amg::Vector3D & positionInChamber() const
The position of the calibrated space point inside the chamber.
Definition: CalibratedSpacePoint.cxx:21
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:63
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::SpacePoint::positionInChamber
const Amg::Vector3D & positionInChamber() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:119
SegmentFitterEventData.h
Muon::IMuonIdHelperSvc::toString
virtual std::string toString(const Identifier &id) const =0
print all fields to string
GeoPrimitivesHelpers.h
MuonR4::CalibratedSpacePoint
The calibrated Space point is created during the calibration process.
Definition: CalibratedSpacePoint.h:15
MuonR4::SpacePoint::dimension
unsigned int dimension() const
Is the space point a 1D or combined 2D measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:160
AthMessaging.h
MuonR4::SpacePoint::driftRadius
double driftRadius() const
: Returns the size of the drift radius
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:143
merge.status
status
Definition: merge.py:17
MuonR4::CalibratedSpacePoint::covariance
const Covariance_t & covariance() const
Definition: CalibratedSpacePoint.cxx:33
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
xAOD::MdtDriftCircle_v1
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
Definition: MdtDriftCircle_v1.h:21
MuonR4::CalibratedSpacePoint::spacePoint
const SpacePoint * spacePoint() const
The pointer to the space point out of which this space point has been built.
Definition: CalibratedSpacePoint.cxx:18
MuonR4::CalibratedSpacePoint::directionInChamber
const Amg::Vector3D & directionInChamber() const
The direction of the calibrated space point inside the chamber.
Definition: CalibratedSpacePoint.cxx:24
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
MuonR4::CalibratedSpacePoint::driftRadius
double driftRadius() const
The drift radius of the calibrated space point.
Definition: CalibratedSpacePoint.cxx:27
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
MuonR4::SpacePoint::identify
const Identifier & identify() const
: Identifier of the primary measurement
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:140
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
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
MuonR4::contract
double contract(const CalibratedSpacePoint::Covariance_t &mat, const Amg::Vector3D &a, const Amg::Vector3D &b)
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:13