ATLAS Offline Software
Typedefs | Functions
MuonR4::SegmentFitHelpers Namespace Reference

Typedefs

using State = CalibratedSpacePoint::State
 

Functions

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. More...
 
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. More...
 
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. More...
 
double chiSqTerm (const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const double timeShift, std::optional< double > arrivalTime, const CalibratedSpacePoint &measurement, MsgStream &msg)
 Calculates the chi2 contribution from the given measurement. More...
 
double chiSqTermMdt (const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const CalibratedSpacePoint &mdtSpacePoint, MsgStream &msg)
 Calculates the chi2 contribution from a mdt space point to the segment line. More...
 
double chiSqTermStrip (const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const double timeShift, std::optional< double > arrivalTime, const CalibratedSpacePoint &strip, MsgStream &msg)
 Calculates the chi2 contribution from a strip measurement to the segment line. More...
 
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. More...
 
std::vector< int > driftSigns (const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const std::vector< const SpacePoint * > &uncalibHits, MsgStream &msg)
 Calculates whether a segment line travereses the tube measurements on the left (-1) or right (1) side of the tube wire. More...
 
std::vector< int > driftSigns (const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const std::vector< std::unique_ptr< CalibratedSpacePoint >> &calibHits, MsgStream &msg)
 Calculates whether a segment line travereses the tube measurements on the left (-1) or right (1) side of the tube wire. More...
 
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 of the tube wire. More...
 
int driftSign (const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const CalibratedSpacePoint &calibHit, MsgStream &msg)
 Calculates whether a segement line travereses the tube measurement on the left (-1) or right (1) side of the tube wire. More...
 
Amg::Vector3D extrapolateToPlane (const Amg::Vector3D &pos, const Amg::Vector3D &dir, const SpacePoint &hit)
 Extrapolates the segment line onto the plane defined by the by the space-point's position & plane normal vector. More...
 

Typedef Documentation

◆ State

Definition at line 25 of file SegmentFitHelperFunctions.cxx.

Function Documentation

◆ chiSqTerm() [1/2]

double MuonR4::SegmentFitHelpers::chiSqTerm ( const Amg::Vector3D posInChamber,
const Amg::Vector3D dirInChamber,
const double  timeShift,
std::optional< double >  arrivalTime,
const CalibratedSpacePoint measurement,
MsgStream &  msg 
)

Calculates the chi2 contribution from the given measurement.

Currently, MdtDriftCircles, Rpc & Tgc as well as the Beamspot are supported

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
timeShiftShift from the nominal arrival time, that's calculated as R / c.
arrivalTimeArrival time of the particle at the segment's refernce plane. If the arrival time is passed, the timing information of the measurement is explicitly taken into account.
measurementSpace point to which the chi2 term is calculated
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Definition at line 103 of file SegmentFitHelperFunctions.cxx.

106  {
107  double chi2{0.};
108  switch (hit.type()) {
110  chi2 = chiSqTermMdt(segPos, segDir, hit, msg);
111  break;
116  chi2 = chiSqTermStrip(segPos, segDir, timeOffset, arrivalTime, hit, msg);
117  break;
119  chi2 = chiSqTermBeamspot(segPos,segDir, hit, msg);
120  break;
121  default:
122  if (msg.level() <= MSG::WARNING) {
123  msg<<MSG::WARNING<<__FILE__<<":"<<__LINE__<<" - Unsupported measurement: "
124  <<hit.spacePoint()->msSector()->idHelperSvc()->toString(hit.spacePoint()->identify())<<endmsg;
125  }
126  }
127  return chi2;
128  }

◆ chiSqTerm() [2/2]

double MuonR4::SegmentFitHelpers::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.

Currently only Mdt, Tgc & Rpc are supported

Parameters
posInChamberPosition of the chamber crossing expressed at z=0
dirInChamberSegment direction inside the chamber
measurementMdt measurement
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Definition at line 28 of file SegmentFitHelperFunctions.cxx.

31  {
32  double chi2{0.};
33  switch (measurement.type()) {
35  chi2 = chiSqTermMdt(posInChamber, dirInChamber,
36  measurement, msg);
37  break;
42  chi2 = chiSqTermStrip(posInChamber, dirInChamber, measurement, msg);
43  break;
44  default:
45  if (msg.level() <= MSG::WARNING) {
46  msg<<MSG::WARNING<<__FILE__<<":"<<__LINE__<<" - Unsupported measurement: "
47  <<measurement.msSector()->idHelperSvc()->toString(measurement.identify())<<endmsg;
48  }
49  }
50  return chi2;
51  }

◆ chiSqTermBeamspot()

double MuonR4::SegmentFitHelpers::chiSqTermBeamspot ( const Amg::Vector3D posInChamber,
const Amg::Vector3D dirInChamber,
const CalibratedSpacePoint beamSpotMeas,
MsgStream &  msg 
)

Calculates the chi2 contribution from an external beam spot constraint.

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
beamSpotMeasStrip measurement to consider.
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Invalid spacepoints do not contribute to the chi2

Invalid spacepoints do not contribute to the chi2

Definition at line 195 of file SegmentFitHelperFunctions.cxx.

198  {
199 
201  if (beamSpotMeas.fitState() != State::Valid) return 0.;
202  const Amg::Vector3D planeCrossing{segPos + Amg::intersect<3>(segPos, segDir, Amg::Vector3D::UnitZ(),
203  beamSpotMeas.positionInChamber().z()).value_or(0) * segDir};
204 
205  const Amg::Vector2D residual = (planeCrossing - beamSpotMeas.positionInChamber()).block<2,1>(0,0);
206  const double chi2 = contract(inverse(beamSpotMeas.covariance()), residual);
207  if (msg.level() <= printLvl) {
208  msg<<printLvl<<"Print beamspot constraint "<<Amg::toString(beamSpotMeas.positionInChamber())<<endmsg;
209  msg<<printLvl<<"Segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<endmsg;
210  msg<<printLvl<<"Plane crossing: "<<Amg::toString(planeCrossing)<<", residual: "<<Amg::toString(residual)
211  <<", covariance: "<<std::endl<<toString(beamSpotMeas.covariance())<<std::endl
212  <<", inverse: "<<std::endl<<toString(inverse(beamSpotMeas.covariance()))<<std::endl
213  <<"chi2 term: "<<chi2<<endmsg;
214  }
215  return chi2;
216  }

◆ chiSqTermMdt() [1/2]

double MuonR4::SegmentFitHelpers::chiSqTermMdt ( const Amg::Vector3D posInChamber,
const Amg::Vector3D dirInChamber,
const CalibratedSpacePoint mdtSpacePoint,
MsgStream &  msg 
)

Calculates the chi2 contribution from a mdt space point to the segment line.

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
mdtSpacePointSpace point to which the chi2 term is calculated
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Invalid spacepoints do not contribute to the chi2

Invalid spacepoints do not contribute to the chi2

Definition at line 130 of file SegmentFitHelperFunctions.cxx.

133  {
135  if (hit.fitState() != State::Valid) return 0.;
136  const Amg::Vector3D& hitPos{hit.positionInChamber()};
137  const Amg::Vector3D& hitDir{hit.directionInChamber()};
138 
139  // Calculate the closest point along the segment to the wire
140  const Amg::Vector3D closePointSeg = segPos + Amg::intersect<3>(hitPos, hitDir, segPos, segDir).value_or(0)* segDir;
141  // Closest point along the wire to the segment
142  const Amg::Vector3D closePointWire = hitPos + hitDir.dot(closePointSeg - hitPos) * hitDir;
144  residual[Amg::x] = (hitPos - closePointSeg).x();
145  residual[Amg::y] = (closePointWire - closePointSeg).mag() - hit.driftRadius();
146  const double chi2{contract(inverse(hit.covariance()), residual)};
147  if (msg.level() <= printLvl) {
148  const SpacePoint* sp = hit.spacePoint();
149  msg<<printLvl<<"Calibrated measurement "<<sp->msSector()->idHelperSvc()->toString(sp->identify());
150  msg<<printLvl<<", position: "<<Amg::toString(hit.positionInChamber())<<", driftRadius: "<<hit.driftRadius()
151  <<", dimension: "<<sp->dimension()<<endmsg;
152  msg<<printLvl<<", segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<endmsg;
153  msg<<printLvl<<", residual: "<<Amg::toString(residual)<<"/ "<<
154  (Amg::lineDistance<3>(hitPos, hitDir, segPos, segDir) -hit.driftRadius())<<std::endl <<", covariance: "<<std::endl
155  <<toString(hit.covariance())<<", inverse: "
156  <<std::endl<<toString(inverse(hit.covariance()))<<", "<<endmsg;
157  msg<<printLvl<<"Chi2 term: "<<chi2<<endmsg;
158  }
159  assert(chi2 >=0.);
160  return chi2;
161  }

◆ chiSqTermMdt() [2/2]

double MuonR4::SegmentFitHelpers::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.

Parameters
posInChamberPosition of the chamber crossing expressed at z=0
dirInChamberSegment direction inside the chamber
measurementMdt measurement
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Definition at line 52 of file SegmentFitHelperFunctions.cxx.

55  {
56 
58 
59  residual[Amg::y] = std::abs(Amg::signedDistance(mdtSP.positionInChamber(), mdtSP.directionInChamber(), segPos, segDir))
60  - mdtSP.driftRadius();
61  const double chi2{residual.dot(mdtSP.covariance().inverse()* residual)};
62  if (msg.level() <= printLvl) {
63  msg<<printLvl<<"Measurement "<<mdtSP.msSector()->idHelperSvc()->toString(mdtSP.identify());
64  msg<<printLvl<<", position: "<<Amg::toString(mdtSP.positionInChamber())
65  <<", driftRadius: "<<mdtSP.driftRadius()
66  <<", status: "<<static_cast<const xAOD::MdtDriftCircle*>(mdtSP.primaryMeasurement())->status()<<endmsg;
67  msg<<printLvl<<"segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<","<<endmsg;
68  msg<<printLvl<<"residual: "<<Amg::toString(residual) <<", covariance: "<<std::endl
69  <<Amg::toString(mdtSP.covariance())<<std::endl<<", inverse: "
70  <<std::endl<<Amg::toString(mdtSP.covariance().inverse())<<", "<<endmsg;
71  msg<<printLvl<<"chi2 term: "<<chi2<<endmsg;
72  }
73  assert(chi2 >=0.);
74  return chi2;
75  }

◆ chiSqTermStrip() [1/2]

double MuonR4::SegmentFitHelpers::chiSqTermStrip ( const Amg::Vector3D posInChamber,
const Amg::Vector3D dirInChamber,
const double  timeShift,
std::optional< double >  arrivalTime,
const CalibratedSpacePoint strip,
MsgStream &  msg 
)

Calculates the chi2 contribution from a strip measurement to the segment line.

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
timeShiftShift from the nominal arrival time, that's calculated as R / c.
arrivalTimeArrival time of the particle at the segment's refernce plane. If the arrival time is passed, the timing information of the measurement is explicitly taken into account.
stripStrip measurement to consider.
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Invalid spacepoints do not contribute to the chi2

Invalid spacepoints do not contribute to the chi2

Definition at line 162 of file SegmentFitHelperFunctions.cxx.

167  {
168 
170  if (strip.fitState() != State::Valid) return 0.;
171 
172  const SpacePoint* spacePoint = strip.spacePoint();
173  const Amg::Vector3D normal = spacePoint->planeNormal();
174  std::optional<double> travelledDist = Amg::intersect<3>(segPos, segDir, normal, normal.dot(spacePoint->positionInChamber()));
175  const Amg::Vector3D planeCrossing = segPos + travelledDist.value_or(0) * segDir;
176  Amg::Vector3D residual{(planeCrossing - strip.positionInChamber())};
177  if (strip.measuresTime() && arrivalTime) {
178  residual[Amg::z] = strip.time() - (*arrivalTime) - travelledDist.value_or(0) * c_inv - offsetTime;
179  } else {
180  residual[Amg::z] = 0;
181  }
182  const double chi2 = contract(inverse(strip.covariance()), residual);
183  if (msg.level() <= printLvl) {
184  msg<<printLvl<<"Calibrated measurement "<<spacePoint->msSector()->idHelperSvc()->toString(spacePoint->identify())
185  <<", position: "<<Amg::toString(strip.positionInChamber())<<endmsg;
186  msg<<printLvl<<"Segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<endmsg;
187  msg<<printLvl<<"Plane crossing: "<<Amg::toString(planeCrossing)<<", residual: "<<Amg::toString(residual)
188  <<", covariance: "<<std::endl<<toString(strip.covariance())<<", inverse: "
189  <<std::endl<<toString(inverse(strip.covariance()))<<endmsg;
190  msg<<printLvl<<" -- final chi2 term: "<<chi2<<endmsg;
191  }
192  assert(chi2 >=0.);
193  return chi2;
194  }

◆ chiSqTermStrip() [2/2]

double MuonR4::SegmentFitHelpers::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.

Currently only Tgc & Rpc are supported

Parameters
posInChamberPosition of the chamber crossing expressed at z=0
dirInChamberSegment direction inside the chamber
measurementMdt measurement
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Definition at line 82 of file SegmentFitHelperFunctions.cxx.

85  {
86 
87  const Amg::Vector3D planeCrossing = extrapolateToPlane(segPos, segDir, stripSP);
88  const Amg::Vector2D residual{(planeCrossing - stripSP.positionInChamber()).block<2,1>(0,0)};
89  const double chi2 = residual.dot(stripSP.covariance().inverse()* residual);
90  if (msg.level() <= printLvl) {
91  msg<<printLvl<<"Measurement "<<stripSP.msSector()->idHelperSvc()->toString(stripSP.identify())
92  <<", position: "<<Amg::toString(stripSP.positionInChamber())<<endmsg;
93  msg<<printLvl<<"Segment: "<<Amg::toString(segPos) <<" + x "<<Amg::toString(segDir)<<endmsg;
94  msg<<printLvl<<"Plane crossing: "<<Amg::toString(planeCrossing)<<", residual: "<<Amg::toString(residual)
95  <<", covariance: " <<std::endl<<Amg::toString(stripSP.covariance())<<", inverse: "
96  <<std::endl<<Amg::toString(stripSP.covariance().inverse())<<","<<endmsg;
97  msg<<printLvl<<"chi2 term: "<<chi2<<endmsg;
98  }
99  assert(chi2 >=0.);
100  return chi2;
101  }

◆ driftSign() [1/2]

int MuonR4::SegmentFitHelpers::driftSign ( const Amg::Vector3D posInChamber,
const Amg::Vector3D dirInChamber,
const CalibratedSpacePoint calibHit,
MsgStream &  msg 
)

Calculates whether a segement line travereses the tube measurement on the left (-1) or right (1) side of the tube wire.

Strip measurements & nullptrs are assigned with 0

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
calibHitCalibrated hit to consider
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Definition at line 252 of file SegmentFitHelperFunctions.cxx.

253  {
254  if (calibHit.type() != xAOD::UncalibMeasType::MdtDriftCircleType){
255  return 0;
256  }
257  const double signedDist = Amg::signedDistance(segPos, segDir, calibHit.positionInChamber(), calibHit.directionInChamber());
258  if (msg.level() <= printLvl) {
259  const SpacePoint* sp = calibHit.spacePoint();
260  msg<<printLvl<<"Hit "<<sp->msSector()->idHelperSvc()->toString(sp->identify())<<" drift radius "<<calibHit.driftRadius()
261  <<", signed distance: "<<signedDist<<", unsigned distance: "
262  <<Amg::lineDistance<3>(segPos, segDir, calibHit.positionInChamber(), calibHit.directionInChamber())<<endmsg;
263  }
264  return sign(signedDist);
265  }

◆ driftSign() [2/2]

int MuonR4::SegmentFitHelpers::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 of the tube wire.

Strip measurements & nullptrs are assigned with 0

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
uncalibHitUncalibrated hit to consider
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Definition at line 239 of file SegmentFitHelperFunctions.cxx.

240  {
242  return 0;
243  }
244  const double signedDist = Amg::signedDistance(segPos, segDir, sp.positionInChamber(), sp.directionInChamber());
245  if (msg.level() <= printLvl) {
246  msg<<printLvl<<"Hit "<<sp.msSector()->idHelperSvc()->toString(sp.identify())<<" drift radius "<<sp.driftRadius()
247  <<", signed distance: "<<signedDist<<", unsigned distance: "
248  <<Amg::lineDistance<3>(segPos, segDir, sp.positionInChamber(), sp.directionInChamber())<<endmsg;
249  }
250  return sign(signedDist);
251  }

◆ driftSigns() [1/2]

std::vector< int > MuonR4::SegmentFitHelpers::driftSigns ( const Amg::Vector3D posInChamber,
const Amg::Vector3D dirInChamber,
const std::vector< const SpacePoint * > &  uncalibHits,
MsgStream &  msg 
)

Calculates whether a segment line travereses the tube measurements on the left (-1) or right (1) side of the tube wire.

Strip measurements & nullptrs are assigned with 0

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
uncalibHitsList of uncalibrated measurements
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Definition at line 217 of file SegmentFitHelperFunctions.cxx.

220  {
221 
222  std::vector<int> signs{};
223  signs.reserve(uncalibHits.size());
224  for (const SpacePoint* sp : uncalibHits) {
225  signs.push_back( sp ? driftSign(segPos,segDir, *sp, msg) : 0);
226  }
227  return signs;
228  }

◆ driftSigns() [2/2]

std::vector< int > MuonR4::SegmentFitHelpers::driftSigns ( const Amg::Vector3D posInChamber,
const Amg::Vector3D dirInChamber,
const std::vector< std::unique_ptr< CalibratedSpacePoint >> &  calibHits,
MsgStream &  msg 
)

Calculates whether a segment line travereses the tube measurements on the left (-1) or right (1) side of the tube wire.

Strip measurements & nullptrs are assigned with 0

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
calibHitsList of calibrated measurements
msgReference to the callers msgStream. If the level is VERBOSE, then all relevant parameters are printed

Definition at line 229 of file SegmentFitHelperFunctions.cxx.

231  {
232  std::vector<int> signs{};
233  signs.reserve(calibHits.size());
234  for (const std::unique_ptr<CalibratedSpacePoint>& hit : calibHits) {
235  signs.push_back(driftSign(segPos,segDir, *hit, msg));
236  }
237  return signs;
238  }

◆ extrapolateToPlane()

Amg::Vector3D MuonR4::SegmentFitHelpers::extrapolateToPlane ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
const SpacePoint hit 
)

Extrapolates the segment line onto the plane defined by the by the space-point's position & plane normal vector.

Parameters
posInChamberPosition of the segment in the sector frame
dirInChamberDirection of flight of the segment expressed in the sector frame
spReference to the space point defining the plane

Definition at line 76 of file SegmentFitHelperFunctions.cxx.

77  {
78  const Amg::Vector3D normal = hit.planeNormal();
79  std::optional<double> travelledDist = Amg::intersect<3>(pos, dir, normal, normal.dot(hit.positionInChamber()));
80  return pos + travelledDist.value_or(0) * dir;
81  }
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Amg::y
@ y
Definition: GeoPrimitives.h:35
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
x
#define x
keylayer_zslicemap.strip
strip
Definition: keylayer_zslicemap.py:151
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
MuonR4::SegmentFitHelpers::extrapolateToPlane
Amg::Vector3D extrapolateToPlane(const Amg::Vector3D &pos, const Amg::Vector3D &dir, const SpacePoint &hit)
Extrapolates the segment line onto the plane defined by the by the space-point's position & plane nor...
Definition: SegmentFitHelperFunctions.cxx:76
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:239
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:82
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:52
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
Amg::x
@ x
Definition: GeoPrimitives.h:34
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:525
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
xAOD::Other
@ Other
beamspotman.dir
string dir
Definition: beamspotman.py:621
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
Amg::signedDistance
double signedDistance(const Amg::Vector3D &posA, const Amg::Vector3D &dirA, const Amg::Vector3D &posB, const Amg::Vector3D &dirB)
Calculates the signed distance between two lines in 3D space.
Definition: GeoPrimitivesHelpers.h:329
merge.status
status
Definition: merge.py:16
xAOD::MdtDriftCircle_v1
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
Definition: MdtDriftCircle_v1.h:21
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
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:195
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