ATLAS Offline Software
MdtDriftCircleOnTrackCreator.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 
19 
20 #include <optional>
21 
22 namespace Muon {
23 
26 
28  const std::string& na,
29  const IInterface* pa)
30  : AthAlgTool(ty, na, pa) {
31  // algtool interface - necessary!
32  declareInterface<IMdtDriftCircleOnTrackCreator>(this);
33  declareInterface<IRIO_OnTrackCreator>(this);
34 }
35 
37  ATH_CHECK(m_mdtCalibrationTool.retrieve());
38  ATH_CHECK(m_idHelperSvc.retrieve());
39  m_BME_idx = m_idHelperSvc->mdtIdHelper().stationNameIndex("BME");
40 
41 
51  using Property = ToolSettings::Property;
52  ToolSettings calibSettings = m_mdtCalibrationTool->getSettings();
54  calibSettings.isActive(Property::TofCorrection));
56  calibSettings.isActive(Property::PropCorrection));
58  calibSettings.isActive(Property::TempCorrection));
60  calibSettings.isActive(Property::MagFieldCorrection));
62  calibSettings.isActive(Property::SlewCorrection));
64  calibSettings.isActive(Property::BackgroundCorrection));
65  m_errorStrategy.setCalibWindow(calibSettings.window);
66 
67  if ("Moore" == m_defaultStrategy) {
69  } else if ("Muon" == m_defaultStrategy) {
71  } else {
72  // By default use one of the real strategies - don't default to unknown!
74  ATH_MSG_FATAL("Unknown error strategy "<<m_errorStrategy);
75  return StatusCode::FAILURE;
76  }
77  if (msgLevel(MSG::INFO)) {
78  std::stringstream ss;
79  ss << "Constructed default MuonDriftCircleErrorStrategy:";
81  ss << " Broad";
83  ss << " Scaled";
85  ss << " Fixed";
87  ss << " Parm";
89  ss << " Station";
91  ss << " ErrAtPos";
93  ss << " T0";
95  ss << " WireG";
97  ss << " TOF";
99  ss << " Prop";
101  ss << " Temp";
103  ss << " Mag";
105  ss << " WireT";
107  ss << " Slew";
109  ss << " Back";
111  ss << " Seg";
112  ss << ". ";
113  if (!m_isMC && m_looseErrors)
114  ss << "Using Data Loose error tuning";
115  if (!m_isMC && !m_looseErrors)
116  ss << "Using Data Tight error tuning";
117 
118  msg(MSG::INFO) << ss.str() << endmsg;
119  }
120  if (m_isMC)
121  ATH_MSG_INFO("Using MC error tuning");
122  ATH_MSG_VERBOSE("A correction is made if set to true: do_MDT = " << m_doMdt);
123 
126  ATH_MSG_ERROR("Detected bad default configuration, using Cosmic TOF without "
127  <<"time of flight corrections does not work");
128  return StatusCode::FAILURE;
129  }
130  }
131  ATH_MSG_DEBUG("Timing mode set to " << m_timeCorrectionType);
133  ATH_MSG_ERROR("Time Correction Type too large! Aborting.");
134  return StatusCode::FAILURE;
135  }
136 
137  if (!m_wasConfigured) {
138  ATH_MSG_ERROR("This tool is too complicated to rely on defaults. Potential configuration issue.");
139  return StatusCode::FAILURE;
140  }
141  return StatusCode::SUCCESS;
142 }
143 
145  const Amg::Vector3D& GP,
146  const Amg::Vector3D* GD,
147  const double t0Shift,
149  const double beta,
150  const double tTrack) const {
151 
152  const EventContext& ctx{Gaudi::Hive::currentContext()};
153 
155 
156  const Identifier iD = mdtPrd.identify();
157 
158  MdtCalibInput calibInput{mdtPrd};
159  calibInput.setClosestApproach(GP);
160  if (GD) calibInput.setTrackDirection((*GD).unit());
161 
162  switch (m_timeCorrectionType) {
163  case ATLTIME:
164  // normal time of flight corrections assuming IP + light speed
165  calibInput.setTimeOfFlight(calibInput.closestApproach().mag() * s_inverseSpeedOfLight);
166  ATH_MSG_VERBOSE(" running in ATLTIME mode, tof: " << calibInput.timeOfFlight());
167  break;
168  case NO_CORRECTIONS:
169  // special case for cosmics taken with scintilator trigger or
170  // cosmic simulation without TOF
171  calibInput.setTimeOfFlight(0);
172  ATH_MSG_VERBOSE("running in NO_CORRECTIONS mode, tof: " << calibInput.timeOfFlight());
173  break;
174  case COSMICS_TRIGGERTIME:
175  // special case for cosmics taken with scintilator trigger which
176  // is read out so the offset with respect to the clock is known
177  // getTriggerTime() NOT IMPLEMENETED YET!!!!!!
178  calibInput.setTriggerTime(getTriggerTime());
179  ATH_MSG_VERBOSE(" running in COSMICS_TRIGGERTIME mode, triggerOffset: "
180  << calibInput.triggerTime());
181  break;
182  case COSMICS_TOF:
183  calibInput.setTimeOfFlight(timeOfFlight(calibInput.closestApproach(), beta, tTrack, t0Shift));
184  ATH_MSG_VERBOSE(" running in COSMICS_TOF mode, tof: "
185  << calibInput.timeOfFlight() << " tTrack: " << tTrack
186  << " t0Shift: " << t0Shift
187  << " applyToF: " << m_applyToF);
188  break;
189  default:
190  // default, no tof. Indicates wrong configuration
191  ATH_MSG_WARNING("No valid mode selected, cannot apply tof correction");
192  calibInput.setTimeOfFlight(0);
193  break;
194  }
195 
196  Amg::Vector2D posOnWire{Amg::Vector2D::Zero()};
197  // if wire sag is taken into account, cast the surface to
198  // StraightLineSurface so it can be added to the ROT
199  const Trk::Surface& surf{calibInput.legacySurface()};
200  std::optional<Amg::Vector2D> posOnIdealWire = surf.globalToLocal(GP, m_globalToLocalTolerance);
201  if (!posOnIdealWire) {
202  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" globalToLocal() failed for ideal surface");
203  return nullptr;
204  }
205  posOnWire = std::move(*posOnIdealWire);
206 
207  double positionAlongWire = posOnWire[Trk::locZ];
208  // set driftcirclestatus, NODRIFTTIME if creating tube hits else UNDECIDED
210 
211  CalibrationOutput calibOutput = getLocalMeasurement(ctx, mdtPrd, calibInput, myStrategy);
212  // This basically determines the error etc and is where the bulk of the work
213  // is done.
214 
215  // hack to determine whether we are before or after the spectrum, until we
216  // sort this out properly
217  if (!calibOutput.calibOk && calibOutput.driftTime > 500.) {
218  ATH_MSG_WARNING("Unable to perform calibration ");
219  return nullptr;
220  }
221 
222  std::unique_ptr<MdtDriftCircleOnTrack> rot{};
223 
224  // we have to calculate sign, check whether direction is given
225  if (m_doMdt && GD) {
226  // calculate sign using surface
227  const Trk::Surface& surf{calibInput.legacySurface()};
228  std::optional<Amg::Vector2D> pos = surf.globalToLocal(GP, calibInput.trackDirection());
229 
230  // check this might still fail....
231  if (!pos) {
232  ATH_MSG_WARNING("Unexpected globalToLocal failure, cannot create MDT ROT ");
233  return nullptr;
234  }
235 
236  // calculate sign
237  double sign = (*pos)[Trk::driftRadius] < 0 ? -1.0 : 1.0;
238  calibOutput.locPars[Trk::driftRadius] *= sign;
239  rot = std::make_unique<MdtDriftCircleOnTrack>(&mdtPrd,
240  std::move(calibOutput.locPars),
241  std::move(calibOutput.locErr),
242  calibOutput.driftTime,
243  Trk::DECIDED,
244  calibInput.trackDirection(),
245  positionAlongWire,
246  myStrategy);
247 
248  } else {
249  // If the track direction is missing, the B-field correction was not
250  // applied
251  if (GD) {
252  // do not have access to direction, so have to use partial
253  // constructor:
254  rot = std::make_unique<MdtDriftCircleOnTrack>(&mdtPrd,
255  std::move(calibOutput.locPars),
256  std::move(calibOutput.locErr),
257  calibOutput.driftTime,
258  dcstatus,
259  positionAlongWire,
260  myStrategy);
261  } else {
262  MuonDriftCircleErrorStrategy tmpStrategy(myStrategy.getBits());
264  rot = std::make_unique<MdtDriftCircleOnTrack>(&mdtPrd,
265  std::move(calibOutput.locPars),
266  std::move(calibOutput.locErr),
267  calibOutput.driftTime,
268  dcstatus,
269  positionAlongWire,
270  tmpStrategy);
271  }
272  }
273  ATH_MSG_DEBUG("MDT ROT: radius = "
274  << rot->localParameters().get(Trk::driftRadius) << " error = "
275  << Amg::error(rot->localCovariance(), Trk::locR)
276  <<" ,channel "
277  << m_idHelperSvc->toString(iD));
278 
279  return rot.release();
280 }
281 
283  Trk::DriftCircleSide si) const {
284  // ************************
285  // Apply additional corrections to local position
286  Trk::LocalParameters lpos(caliDriftCircle.localParameters());
287 
288  // set sign LocalPosition
289  if (si == Trk::LEFT) {
290  lpos[Trk::driftRadius] = -std::abs(lpos[Trk::driftRadius]);
291  } else {
292  lpos[Trk::driftRadius] = std::abs(lpos[Trk::driftRadius]);
293  }
294 
295  caliDriftCircle.setLocalParameters(lpos);
296  caliDriftCircle.m_status = Trk::DECIDED;
297  ATH_MSG_VERBOSE("MDT DriftCircleOnTrack made with radius = " << lpos);
298 }
299 
301  const MdtPrepData& DC,
302  const MdtCalibInput& calibInput,
303  const MuonDriftCircleErrorStrategy& myStrategy) const {
304 
305 
306  ATH_MSG_VERBOSE("getLocalMeasurement "<<calibInput<<" with m_doMdt=" << m_doMdt << " and " << myStrategy);
307  const Amg::Vector3D& gpos{calibInput.closestApproach()};
308  const Amg::Vector3D& gdir{calibInput.trackDirection()};
309 
310  double sigmaR{1.}, driftTime{0.}, radius{0.}, errRadius{0.};
311  MdtCalibOutput calibOutput{};
312  if (m_doMdt) {
313  // call the calibration service providing the time when the particle
314  // passed the tube
315  calibOutput = m_mdtCalibrationTool->calibrate(ctx, calibInput);
316  ATH_MSG_VERBOSE("getLocalMeasurement() - Calibrated output "<<calibOutput);
317  driftTime = calibOutput.driftTime();
318  radius = calibOutput.driftRadius();
319  errRadius = radius;
320 
322  const Trk::Surface& surf{calibInput.legacySurface()};
323  std::optional<Amg::Vector2D> myLocalPosition = surf.globalToLocal(gpos, gdir);
324  if (myLocalPosition) {
325  errRadius = (*myLocalPosition)[Trk::driftRadius];
326  } else {
327  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" ErrorAtPredictedPosition failed because local position "<<
328  "transformation didn't succeed. Using measured radius instead.");
329  errRadius = radius;
330  }
331  }
332  } else {
333  // use PRD values
334  radius = DC.localPosition().x();
335  errRadius = radius;
336  // check consistency of error matrix
337  if (DC.localCovariance().cols() > 1) {
338  ATH_MSG_WARNING("Error matrix of DC doesn't have dimension 1 "<< DC.localCovariance());
339  ATH_MSG_WARNING("Reducing size to 1 dim");
340  }
341  }
342 
343  // Handle the errors here. Begin by getting the first part of the
344  // resolution term
345  if (!m_doMdt) {
348  sigmaR = parametrisedSigma(errRadius);
349  } else {
350  sigmaR = calibOutput.driftRadiusUncert();
351  }
352  ATH_MSG_DEBUG("Tube : " << m_idHelperSvc->toString(calibInput.identify())
353  << " SigmaR = " << sigmaR);
354  double sigmaR2 = 0.0;
355  // Handle the errors scaling / addition of fixed terms
356  if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Moore) {
357  sigmaR2 = mooreErrorStrategy(myStrategy, sigmaR * sigmaR, calibInput.identify());
358  ATH_MSG_DEBUG("After scaling etc:\t Moore sigmaR2 = " << sigmaR2);
359  } else if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Muon) {
360  sigmaR2 = muonErrorStrategy(myStrategy, sigmaR * sigmaR, calibInput.identify());
361  ATH_MSG_DEBUG("After scaling etc:\t Muon ErrorStrategy sigmaR2 = " << sigmaR2);
362  }
364  // update or copy drift radius and error
365 
366  // new radius
368 
369  // create new error matrix
370  Amg::MatrixX newLocalCov(1, 1);
371  newLocalCov(0, 0) = sigmaR2;
372 
373  // return new values
374  bool ok = true;
375  return {Trk::LocalParameters(radiusPar), newLocalCov, driftTime,
376  ok};
377 }
378 
380  const Trk::TrackParameters& tp,
382  const double beta,
383  const double tTrack) const {
384 
385  const Amg::Vector3D& momentum = tp.momentum();
386  return createRIO_OnTrack(prd, tp.position(), &momentum, 0, strategy, beta, tTrack);
387 }
388 
390  const Trk::TrackParameters& tp,
391  const EventContext& /*ctx*/) const {
393  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Incorrect hit type: "
394  <<" Trk::PrepRawData not a MdtPrepData!! No rot created ");
395  return nullptr;
396  }
397  Amg::Vector3D momentum = tp.momentum();
398 
399  return createRIO_OnTrack(static_cast<const MdtPrepData&>(prd), tp.position(), &momentum);
400 }
402  const Trk::TrackParameters* ,
403  const MuonDriftCircleErrorStrategy* strategy) const {
404 
406 
407  // calculate error
408  double sigmaR(1.);
409  double t = DCT.driftTime();
410 
411  const MuonGM::MdtReadoutElement* detEl = DCT.detectorElement();
412  if (!detEl) {
413  ATH_MSG_WARNING("MdtDriftCircleOnTrack without MdtReadoutElement "
414  << m_idHelperSvc->toString(DCT.identify()));
415  return nullptr;
416  }
417 
418  double radius = DCT.driftRadius();
419 
423  sigmaR = detEl->innerTubeRadius() / std::sqrt(3.0); // Tube hit
424  } else {
426  ATH_MSG_WARNING("updateError: ErrorAtPredictedPosition is not yet supported!");
427  // get error
429  if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Moore) {
430  sigmaR = parametrisedSigma(radius);
431  } else if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Muon) {
432  sigmaR = parametrisedSigma(radius);
433  ATH_MSG_DEBUG("Muon drift errors:" << sigmaR
434  << " for radius=" << radius);
435  }
436  } else {
437  const EventContext& ctx{Gaudi::Hive::currentContext()};
438  sigmaR = m_mdtCalibrationTool->getResolutionFromRt(ctx,
439  DCT.identify(),
440  DCT.driftTime());
441  if (sigmaR < 0.0001 || sigmaR * sigmaR < 0.0001) {
442  ATH_MSG_WARNING("Bad obtained from calibration service: error "
443  << m_idHelperSvc->toString(DCT.identify())
444  << " reso " << sigmaR << " sigma2 "
445  << sigmaR * sigmaR << " drift time " << t
446  << " original " << DCT.driftTime());
447  return nullptr;
448  }
449  }
450 
451  } // end of tube hit check
452 
453  double sigmaR2 = 0.0;
454  // Handle the errors scaling / addition of fixed terms
455  if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Moore) {
456  sigmaR2 = mooreErrorStrategy(myStrategy, sigmaR * sigmaR, DCT.identify());
457  } else if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Muon) {
458  sigmaR2 = muonErrorStrategy(myStrategy, sigmaR * sigmaR, DCT.identify());
459  ATH_MSG_DEBUG("After scaling etc:\t Muon ErrorStrategy sigmaR2 = " << sigmaR2);
460  }
461  std::unique_ptr<MdtDriftCircleOnTrack> rot{DCT.clone()};
462  rot->m_localCovariance(0, 0) = sigmaR2;
463  rot->setErrorStrategy(myStrategy);
464 
465  ATH_MSG_VERBOSE("updated error for "
466  << m_idHelperSvc->toString(DCT.identify()) << " new error "
467  << Amg::error(rot->localCovariance(), Trk::locR)
468  << " old error "
470  return rot.release();
471 }
472 
474  const double beta,
475  const double tTrack,
476  const double tShift) const {
477  return m_applyToF * (pos.mag() * s_inverseSpeedOfLight / beta) +
478  tTrack + tShift;
479 }
480 
483  return 0.23 * std::exp(-std::abs(r) / 6.06) + 0.0362;
484 }
485 
487  double sigmaR2,
488  const Identifier& id) const {
489  if (m_isMC)
490  return mooreErrorStrategyMC(myStrategy, sigmaR2, id);
491 
492  if (m_looseErrors)
493  return mooreErrorStrategyLoose(myStrategy, sigmaR2, id);
494  else
495  return mooreErrorStrategyTight(myStrategy, sigmaR2, id);
496 
497 }
498 
500  double sigmaR2,
501  const Identifier& id) const {
502  ATH_MSG_DEBUG("mooreErrorStrategy sigmaR2=" << sigmaR2<<" "<<m_idHelperSvc->toString(id));
503 
504  // Moore error strategy. Hard coding numbers for the time being - hope to
505  // make them configurable some day
510  ATH_MSG_VERBOSE(" segment error, t0fit ");
511  return sigmaR2 + 0.005; // Collisions with T0 refit (input)
513  ATH_MSG_VERBOSE(" segment error, broad ");
514  return 4 * sigmaR2 + 0.16; // Output segments - broad errors
515  } else {
516  ATH_MSG_VERBOSE(" segment error, precise ");
517  return sigmaR2 + 0.005; // Input segments , no T0 refit
518  }
519  }
520  // Don't know how to handle other cases - error?
521  } else { // Track
522  MuonStationIndex::StIndex stIndex = m_idHelperSvc->stationIndex(id);
524  if (stIndex == MuonStationIndex::BE) {
525  ATH_MSG_VERBOSE(" track error BEE ");
526  return 1.44 * sigmaR2 + 1.44; // 1.2* + 1.2 mm
527  } else if (stIndex == MuonStationIndex::EE) {
528  ATH_MSG_VERBOSE(" track error EE ");
529  if (!m_isMC && m_idHelperSvc->stationEta(id) < 0)
530  return 1.44 * sigmaR2 + 0.16; // 1.2* + 0.4 mm
531  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
532  } else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIS &&
533  std::abs(m_idHelperSvc->stationEta(id)) >= 7) {
534  ATH_MSG_VERBOSE(" track error BIS78 ");
535  if (std::abs(m_idHelperSvc->stationEta(id)) == 7)
536  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
537  else
538  return 4 * sigmaR2 + 25; // 2* + 5. mm
539  }
540  ATH_MSG_VERBOSE(" track station error ");
541  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
542 
544 
546  ATH_MSG_VERBOSE(" track error Fixed/Broad ");
547  return 4 * sigmaR2 + 49.; // 2* + 7 mm -> barrel/endcap overlaps
548  } else {
549  ATH_MSG_VERBOSE(" track error Fixed ");
550  return 4 * sigmaR2 + 4.; // 2* + 2mm S/L overlaps
551  }
552 
554 
556  ATH_MSG_VERBOSE(" track error Scaled/Broad ");
557  return 2.25 * sigmaR2 + 0.09;
558  } else {
559  // use slightly smaller errors for the barrel
560  double fixedTerm = (stIndex == MuonStationIndex::BI ||
561  stIndex == MuonStationIndex::BM ||
562  stIndex == MuonStationIndex::BO)
563  ? 0.014
564  : 0.04;
566  m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIL &&
567  m_idHelperSvc->stationEta(id) == 1 &&
568  m_idHelperSvc->sector(id) == 13 &&
569  m_idHelperSvc->mdtIdHelper().multilayer(id) == 1) {
570  fixedTerm = 1;
571  ATH_MSG_VERBOSE(" track error Scaled: BIL1A13, first multi layer ");
572  } else {
573  ATH_MSG_VERBOSE(" track error Scaled ");
574  }
575  return 1.44 * sigmaR2 + fixedTerm;
576  }
577  }
578  } // End of segment or track
579  return sigmaR2;
580 }
581 
583  double sigmaR2,
584  const Identifier& id) const {
585  ATH_MSG_DEBUG("mooreErrorStrategy sigmaR2=" << sigmaR2<<" "<<m_idHelperSvc->toString(id));
586 
587  // Moore error strategy. Hard coding numbers for the time being - hope to
588  // make them configurable some day
593  ATH_MSG_VERBOSE(" segment error, t0fit ");
594  return sigmaR2 + 0.005; // Collisions with T0 refit (input)
595  } else if (myStrategy.creationParameter(
597  ATH_MSG_VERBOSE(" segment error, broad ");
598  return 4 * sigmaR2 + 0.16; // Output segments - broad errors
599  } else {
600  ATH_MSG_VERBOSE(" segment error, precise ");
601  return sigmaR2 + 0.005; // Input segments , no T0 refit
602  }
603  }
604  // Don't know how to handle other cases - error?
605  } else { // Track
606  MuonStationIndex::StIndex stIndex = m_idHelperSvc->stationIndex(id);
607  if (myStrategy.creationParameter(
609  if (stIndex == MuonStationIndex::BE) {
610  ATH_MSG_VERBOSE(" track error BEE ");
611  return 1.44 * sigmaR2 + 4; // 1.2* + 2 mm
612  } else if (stIndex == MuonStationIndex::EE) {
613  ATH_MSG_VERBOSE(" track error EE ");
614  return 1.44 * sigmaR2 + 0.04; // 1.2* + 0.2 mm
615  } else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIS &&
616  std::abs(m_idHelperSvc->stationEta(id)) >= 7) {
617  ATH_MSG_VERBOSE(" track error BIS78 ");
618  if (std::abs(m_idHelperSvc->stationEta(id)) == 7)
619  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
620  return 4 * sigmaR2 + 25; // 2* + 5. mm
621  } else if (m_idHelperSvc->mdtIdHelper().stationName(id) == m_BME_idx &&
622  m_idHelperSvc->stationPhi(id) == 7) {
623  ATH_MSG_VERBOSE(" track error BME ");
624  return 1.44 * sigmaR2 + 0.25; // 1.2* + 0.5 mm
625  }
627  else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BOL &&
628  std::abs(m_idHelperSvc->stationEta(id)) == 7 &&
629  m_idHelperSvc->stationPhi(id) == 7) {
630  ATH_MSG_VERBOSE(" track error BOE ");
631  return 1.44 * sigmaR2 + 0.25; // 1.2* + 0.5 mm
632  }
633  ATH_MSG_VERBOSE(" track station error ");
634  return 1.44 * sigmaR2 + 0.04; // 1.2* + 0.2 mm
635 
637 
638  if (myStrategy.creationParameter(
640  ATH_MSG_VERBOSE(" track error Fixed/Broad ");
641  return 4 * sigmaR2 + 4.; // 2* + 2 mm -> barrel/endcap overlaps
642  } else {
643  ATH_MSG_VERBOSE(" track error Fixed ");
644  return 4 * sigmaR2 + 4.; // 2* + 2mm S/L overlaps
645  }
646 
648 
650  ATH_MSG_VERBOSE(" track error Scaled/Broad ");
651  return 2.25 * sigmaR2 + 0.09;
652  } else {
653  // use slightly smaller errors for the barrel
654  double fixedTerm = (stIndex == MuonStationIndex::BI ||
655  stIndex == MuonStationIndex::BM ||
656  stIndex == MuonStationIndex::BO)
657  ? 0.015
658  : 0.015;
660  m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIL &&
661  m_idHelperSvc->stationEta(id) == 1 &&
662  m_idHelperSvc->sector(id) == 13 &&
663  m_idHelperSvc->mdtIdHelper().multilayer(id) == 1) {
664  fixedTerm = 1;
665  ATH_MSG_VERBOSE(" track error Scaled: BIL1A13, first multi layer ");
666  } else {
667  ATH_MSG_VERBOSE(" track error Scaled ");
668  }
669 
670  return 1.44 * sigmaR2 + fixedTerm;
671  }
672  }
673  } // End of segment or track
674  return sigmaR2;
675 }
676 
678  double sigmaR2,
679  const Identifier& id) const {
680  ATH_MSG_DEBUG("mooreErrorStrategy sigmaR2=" << sigmaR2);
681 
682  // Moore error strategy. Hard coding numbers for the time being - hope to
683  // make them configurable some day
688  ATH_MSG_VERBOSE(" segment error, t0fit ");
689  return sigmaR2 + 0.005; // Collisions with T0 refit (input)
691  ATH_MSG_VERBOSE(" segment error, broad ");
692  return 4 * sigmaR2 + 0.16; // Output segments - broad errors
693  } else {
694  ATH_MSG_VERBOSE(" segment error, precise ");
695  return sigmaR2 + 0.005; // Input segments , no T0 refit
696  }
697  }
698  // Don't know how to handle other cases - error?
699  } else { // Track
700  MuonStationIndex::StIndex stIndex = m_idHelperSvc->stationIndex(id);
702  if (stIndex == MuonStationIndex::BE) {
703  ATH_MSG_VERBOSE(" track error BEE ");
704  return 1.44 * sigmaR2 + 0.04; // 1.2* + 0.2 mm
705  } else if (stIndex == MuonStationIndex::EE) {
706  ATH_MSG_VERBOSE(" track error EE ");
707  if (m_idHelperSvc->isSmallChamber(id))
708  return 1.21 * sigmaR2 + 0.01; // 1.1* + 0.1 mm
709  else
710  return 1.21 * sigmaR2 + 0.01; // 1.1* + 0.1 mm
711  } else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIS &&
712  std::abs(m_idHelperSvc->stationEta(id)) >= 7) {
713  ATH_MSG_VERBOSE(" track error BIS78 ");
714  if (std::abs(m_idHelperSvc->stationEta(id)) == 7)
715  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
716 
717  return 4 * sigmaR2 + 1.; // 2* + 1. mm
718  } else if (stIndex == MuonStationIndex::BM &&
719  m_idHelperSvc->stationPhi(id) == 7 &&
720  (m_idHelperSvc->mdtIdHelper()).stationName(id) == m_BME_idx) {
721  ATH_MSG_VERBOSE(" track error BME ");
722  return 1.21 * sigmaR2 + 0.25; // 1.1* + 0.5 mm
723  }
725  else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BOL &&
726  std::abs(m_idHelperSvc->stationEta(id)) == 7 &&
727  m_idHelperSvc->stationPhi(id) == 7) {
728  ATH_MSG_VERBOSE(" track error BOE ");
729  return 1.21 * sigmaR2 + 0.25; // 1.1* + 0.5 mm
730  } else if (stIndex == MuonStationIndex::EE &&
731  m_idHelperSvc->chamberIndex(id) == MuonStationIndex::EEL &&
732  m_idHelperSvc->stationEta(id) < 0 &&
733  m_idHelperSvc->stationPhi(id) == 3) {
734  ATH_MSG_VERBOSE(" track error EEL1C05 ");
735  return 1.21 * sigmaR2 + 25.; // 1.1* + 5 mm
736  }
737  ATH_MSG_VERBOSE(" track station error ");
738  return 1.21 * sigmaR2 + 0.04; // 1.1* + 0.2 mm
739 
741 
743  ATH_MSG_VERBOSE(" track error Fixed/Broad ");
744  return 4 * sigmaR2 + 4.; // 2* + 2 mm -> barrel/endcap overlaps
745  } else {
746  ATH_MSG_VERBOSE(" track error Fixed ");
747  return 4 * sigmaR2 + 4.; // 2* + 2mm S/L overlaps
748  }
749 
751 
753  ATH_MSG_VERBOSE(" track error Scaled/Broad ");
754  return 2.25 * sigmaR2 + 0.09;
755  } else {
756 
757  // use slightly smaller errors for the barrel
758  //
759  double fixedTerm = 0.01;
761  if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIL &&
762  m_idHelperSvc->stationEta(id) == 1 &&
763  m_idHelperSvc->sector(id) == 13 &&
764  m_idHelperSvc->mdtIdHelper().multilayer(id) == 1) {
765  fixedTerm = 1;
766  ATH_MSG_VERBOSE(" track error Scaled: BIL1A13, first multi layer ");
767  }
768  } else {
769  ATH_MSG_VERBOSE(" track error Scaled ");
770  }
771 
772  return 1.21 * sigmaR2 + fixedTerm;
773  }
774  }
775  } // End of segment or track
776  return sigmaR2;
777 }
778 
780  double sigmaR2,
781  const Identifier& /*id*/) const {
782 
783  //
784  // the new muonErrorStrategy is identical for Data and MC
785  // it assumes that for tracks the alignment uncertainties are added later
786  // this is done by the AignmentErrorTool where AlignmentEffectsOnTrack are
787  // used. (for segment errors the mooreStrategy is coded)
788  //
789  // it is inspired by the mooreErrorStrategyTight but does not need a constant term
790  //
791 
792  ATH_MSG_DEBUG("muonErrorStrategy sigmaR2=" << sigmaR2);
793 
794  // Muon error strategy. Hard coding numbers for the time being - hope to
795  // make them configurable some day
800  ATH_MSG_VERBOSE(" segment error, t0fit ");
801  return sigmaR2 + 0.005; // Collisions with T0 refit (input)
803  ATH_MSG_VERBOSE(" segment error, broad ");
804  return 4 * sigmaR2 + 0.16; // Output segments - broad errors
805  } else {
806  ATH_MSG_VERBOSE(" segment error, precise ");
807  return sigmaR2 + 0.005; // Input segments , no T0 refit
808  }
809  }
810  } else { // Track
812  ATH_MSG_VERBOSE(" track station error ");
813  return 1.21 * sigmaR2; // 1.1* mm
815  ATH_MSG_VERBOSE(" track error Fixed ");
816  return 4 * sigmaR2; // 2*
819  ATH_MSG_VERBOSE(" track error Scaled/Broad ");
820  return 2.25 * sigmaR2;
821  } else {
822  ATH_MSG_VERBOSE(" Track scaled error ");
823  return 1.21 * sigmaR2;
824  }
825  }
826  } // End of segment or track
827  return sigmaR2;
828 }
829 }
Muon::MdtDriftCircleOnTrackCreator::mooreErrorStrategyTight
double mooreErrorStrategyTight(const MuonDriftCircleErrorStrategy &myStrategy, double sigmaR, const Identifier &id) const
Definition: MdtDriftCircleOnTrackCreator.cxx:677
Muon::MdtDriftCircleOnTrackCreator::parametrisedSigma
static double parametrisedSigma(double r)
Definition: MdtDriftCircleOnTrackCreator.cxx:481
xAOD::strategy
strategy
Definition: L2CombinedMuon_v1.cxx:107
Muon::MuonStationIndex::BIS
@ BIS
Definition: MuonStationIndex.h:17
Muon::MdtDriftCircleOnTrackCreator::mooreErrorStrategy
double mooreErrorStrategy(const MuonDriftCircleErrorStrategy &myStrategy, double sigmaR, const Identifier &id) const
Definition: MdtDriftCircleOnTrackCreator.cxx:486
beamspotman.r
def r
Definition: beamspotman.py:676
Trk::LocalParameters
Definition: LocalParameters.h:98
Muon::MuonStationIndex::BE
@ BE
Definition: MuonStationIndex.h:25
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput::calibOk
bool calibOk
Definition: MdtDriftCircleOnTrackCreator.h:179
Muon::MuonDriftCircleErrorStrategy
Definition: MuonDriftCircleErrorStrategy.h:15
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
MdtReadoutElement.h
Muon::MuonDriftCircleErrorStrategy::WireSagTimeCorrection
@ WireSagTimeCorrection
Wire sag correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:30
Muon::MuonDriftCircleErrorStrategy::Muon
@ Muon
Definition: MuonDriftCircleErrorStrategy.h:17
MuonDriftCircleErrorStrategy.h
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput::locPars
Trk::LocalParameters locPars
Definition: MdtDriftCircleOnTrackCreator.h:176
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Muon::MdtDriftCircleOnTrackCreator::m_errorAtPredictedPosition
Gaudi::Property< bool > m_errorAtPredictedPosition
Add a term to the error to account for very poorly aligned stations.
Definition: MdtDriftCircleOnTrackCreator.h:259
Muon::MdtDriftCircleOnTrackCreator::COSMICS_TRIGGERTIME
@ COSMICS_TRIGGERTIME
case for normal cosmic data with rpc trigger or simulation including TOF.
Definition: MdtDriftCircleOnTrackCreator.h:84
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
TrRelation.h
StraightLineSurface.h
TrackParameters.h
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Muon::MuonDriftCircleErrorStrategy::setCalibWindow
void setCalibWindow(unsigned long)
Only the first nCalibWindowBits bits will be stored!
Definition: MuonDriftCircleErrorStrategy.h:71
Muon::MdtDriftCircleOnTrackCreator::m_stationError
Gaudi::Property< bool > m_stationError
Add a special error to account for the T0 refit.
Definition: MdtDriftCircleOnTrackCreator.h:261
Trk::DriftCircleStatus
DriftCircleStatus
Enumerates the 'status' of the wire on which the tracks passed (based on the TRT_Side enum,...
Definition: DriftCircleStatus.h:16
MdtCalibInput
Definition: MdtCalibInput.h:35
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
Muon::MuonStationIndex::EEL
@ EEL
Definition: MuonStationIndex.h:18
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MdtCalibInput::legacySurface
const Trk::StraightLineSurface & legacySurface() const
Returns the assocaited ideal surface (Throw exception if no legacy RE is available)
Definition: MdtCalibInput.cxx:134
EventPrimitivesHelpers.h
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
ParticleTest.tp
tp
Definition: ParticleTest.py:25
MdtCalibInput::closestApproach
const Amg::Vector3D & closestApproach() const
Returns the point of closest approach to the wire.
Definition: MdtCalibInput.cxx:105
Muon::MdtDriftCircleOnTrackCreator::m_doMdt
Gaudi::Property< bool > m_doMdt
Process MDT ROTs.
Definition: MdtDriftCircleOnTrackCreator.h:228
Muon::MuonDriftCircleErrorStrategy::Moore
@ Moore
Definition: MuonDriftCircleErrorStrategy.h:17
Muon::MuonStationIndex::BI
@ BI
Definition: MuonStationIndex.h:25
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Muon::MdtDriftCircleOnTrackCreator::m_globalToLocalTolerance
Gaudi::Property< double > m_globalToLocalTolerance
Definition: MdtDriftCircleOnTrackCreator.h:235
Trk::PrepRawData::type
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
MdtPrepData.h
Muon::MdtDriftCircleOnTrackCreator::ATLTIME
@ ATLTIME
normal time of flight corrections assuming IP + light speed to be used for simulated data and collisi...
Definition: MdtDriftCircleOnTrackCreator.h:76
Trk::locR
@ locR
Definition: ParamDefs.h:44
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Muon::MdtDriftCircleOnTrack::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
Definition: MdtDriftCircleOnTrack.h:268
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::MdtDriftCircleOnTrackCreator::NO_CORRECTIONS
@ NO_CORRECTIONS
special case for cosmics taken with scintilator trigger which is read out so the offset with respect ...
Definition: MdtDriftCircleOnTrackCreator.h:79
MdtDriftCircleOnTrack.h
Muon::MdtDriftCircleOnTrackCreator::muonErrorStrategy
double muonErrorStrategy(const MuonDriftCircleErrorStrategy &myStrategy, double sigmaR, const Identifier &id) const
Definition: MdtDriftCircleOnTrackCreator.cxx:779
Muon::MdtDriftCircleOnTrackCreator::MdtDriftCircleOnTrackCreator
MdtDriftCircleOnTrackCreator(const std::string &, const std::string &, const IInterface *)
Definition: MdtDriftCircleOnTrackCreator.cxx:27
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
Muon::MdtDriftCircleOnTrackCreator::m_BME_idx
int m_BME_idx
Definition: MdtDriftCircleOnTrackCreator.h:281
Muon::MdtDriftCircleOnTrackCreator::updateSign
virtual void updateSign(MdtDriftCircleOnTrack &rot, const Trk::DriftCircleSide si) const override final
Update of the sign of the drift radius.
Definition: MdtDriftCircleOnTrackCreator.cxx:282
Property
Support class for PropertyMgr.
Definition: Property.h:23
Muon::IMdtDriftCircleOnTrackCreator::MdtRotPtr
MdtDriftCircleOnTrack * MdtRotPtr
Definition: IMdtDriftCircleOnTrackCreator.h:26
Muon::MuonDriftCircleErrorStrategy::PropCorrection
@ PropCorrection
Propagation correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:27
MdtCalibInput::identify
const Identifier & identify() const
Returns the Identifier of the hit.
Definition: MdtCalibInput.cxx:84
Muon::MuonDriftCircleErrorStrategy::TempCorrection
@ TempCorrection
Temperature correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:28
Muon::MdtDriftCircleOnTrack::driftTime
double driftTime() const
Returns the value of the drift time used to obtain the drift radius.
Definition: MdtDriftCircleOnTrack.h:280
Muon::MdtDriftCircleOnTrackCreator::m_mdtCalibrationTool
ToolHandle< IMdtCalibrationTool > m_mdtCalibrationTool
Definition: MdtDriftCircleOnTrackCreator.h:225
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
Muon::MuonDriftCircleErrorStrategy::T0Refit
@ T0Refit
A special error was applied to account for the T0 refit (user defined via jobProperties)
Definition: MuonDriftCircleErrorStrategy.h:24
Muon::MuonDriftCircleErrorStrategy::WireSagGeomCorrection
@ WireSagGeomCorrection
Wire sag was applied, and so will affect errors.
Definition: MuonDriftCircleErrorStrategy.h:25
Trk::UNDECIDED
@ UNDECIDED
sign of drift radius has not been determined
Definition: DriftCircleStatus.h:20
Trk::StraightLineSurface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for StraightLineSurface: GlobalToLocal method without dynamic memory allocation This method...
Definition: StraightLineSurface.cxx:164
Muon::MdtDriftCircleOnTrackCreator::m_errorStrategy
MuonDriftCircleErrorStrategy m_errorStrategy
< Error strategy for created ROTs
Definition: MdtDriftCircleOnTrackCreator.h:240
Muon::MdtDriftCircleOnTrackCreator::COSMICS_TOF
@ COSMICS_TOF
Definition: MdtDriftCircleOnTrackCreator.h:88
Muon::MuonDriftCircleErrorStrategy::SlewCorrection
@ SlewCorrection
Slewing correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:31
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TRT::Hit::driftTime
@ driftTime
Definition: HitInfo.h:43
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:42
Muon::MuonDriftCircleErrorStrategy::FixedError
@ FixedError
A fixed error is given to this hit (user defined via jobProperties)
Definition: MuonDriftCircleErrorStrategy.h:20
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
Muon::MdtDriftCircleOnTrackCreator::initialize
virtual StatusCode initialize() override final
Definition: MdtDriftCircleOnTrackCreator.cxx:36
Muon::MuonStationIndex::BM
@ BM
Definition: MuonStationIndex.h:25
MdtRtRelation.h
Muon::MdtDriftCircleOnTrackCreator::m_looseErrors
Gaudi::Property< bool > m_looseErrors
Definition: MdtDriftCircleOnTrackCreator.h:274
Muon::MuonDriftCircleErrorStrategy::TofCorrection
@ TofCorrection
Time of flight correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:26
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:53
Muon::MdtDriftCircleOnTrackCreator::m_t0Refit
Gaudi::Property< bool > m_t0Refit
Use error strategy for segments by default.
Definition: MdtDriftCircleOnTrackCreator.h:263
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
Muon::MdtDriftCircleOnTrackCreator::mooreErrorStrategyLoose
double mooreErrorStrategyLoose(const MuonDriftCircleErrorStrategy &myStrategy, double sigmaR, const Identifier &id) const
Definition: MdtDriftCircleOnTrackCreator.cxx:582
Muon::MdtDriftCircleOnTrackCreator::m_doIndividualChamberReweights
Gaudi::Property< bool > m_doIndividualChamberReweights
toggle between MC and data alignment errors (to be removed in rel.
Definition: MdtDriftCircleOnTrackCreator.h:267
Muon::MdtDriftCircleOnTrackCreator::s_inverseSpeedOfLight
static constexpr double s_inverseSpeedOfLight
Definition: MdtDriftCircleOnTrackCreator.h:279
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonDriftCircleErrorStrategy::BackgroundCorrection
@ BackgroundCorrection
Background correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:32
Muon::MdtDriftCircleOnTrack::clone
virtual MdtDriftCircleOnTrack * clone() const override final
Pseudo-constructor, needed to avoid excessive RTTI.
Definition: MdtDriftCircleOnTrack.h:256
Trk::NODRIFTTIME
@ NODRIFTTIME
drift time was not used - drift radius is 0.
Definition: DriftCircleStatus.h:24
Trk::ParametersBase
Definition: ParametersBase.h:55
Muon::MdtDriftCircleOnTrack::driftRadius
double driftRadius() const
Returns the value of the drift radius.
Definition: MdtDriftCircleOnTrack.h:277
IRtResolution.h
Muon::MuonDriftCircleErrorStrategy::Segment
@ Segment
Treating a segment or a track.
Definition: MuonDriftCircleErrorStrategy.h:33
Muon::MdtDriftCircleOnTrack::m_status
Trk::DriftCircleStatus m_status
information on the status of the Mdt measurement - see Trk::DriftCircleStatus for definitions
Definition: MdtDriftCircleOnTrack.h:220
Muon::MdtDriftCircleOnTrackCreator::mooreErrorStrategyMC
double mooreErrorStrategyMC(const MuonDriftCircleErrorStrategy &myStrategy, double sigmaR, const Identifier &id) const
Definition: MdtDriftCircleOnTrackCreator.cxx:499
Muon::MuonDriftCircleErrorStrategy::ErrorAtPredictedPosition
@ ErrorAtPredictedPosition
Definition: MuonDriftCircleErrorStrategy.h:23
MdtCalibOutput
Definition: MdtCalibOutput.h:10
Muon::MuonDriftCircleErrorStrategy::MagFieldCorrection
@ MagFieldCorrection
Magnetic field correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:29
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Trk::DECIDED
@ DECIDED
sign of drift radius has been determined
Definition: DriftCircleStatus.h:18
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Muon::MuonDriftCircleErrorStrategy::StationError
@ StationError
A term is added to account for misaligned.
Definition: MuonDriftCircleErrorStrategy.h:22
Muon::MdtDriftCircleOnTrackCreator::m_doSegments
Gaudi::Property< bool > m_doSegments
Deweight individual chambers.
Definition: MdtDriftCircleOnTrackCreator.h:265
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Muon::MdtDriftCircleOnTrackCreator::m_useErrorParametrisation
Gaudi::Property< bool > m_useErrorParametrisation
Use the predicted track position to correct the Error.
Definition: MdtDriftCircleOnTrackCreator.h:254
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
Muon::MdtDriftCircleOnTrack::setLocalParameters
virtual void setLocalParameters(const Trk::LocalParameters &locPos)
Sets the local parameters.
Definition: MdtDriftCircleOnTrack.h:275
Muon::MdtDriftCircleOnTrackCreator::getLocalMeasurement
CalibrationOutput getLocalMeasurement(const EventContext &ctx, const MdtPrepData &DC, const MdtCalibInput &calibInput, const MuonDriftCircleErrorStrategy &strategy) const
preform the mdt calibration
Definition: MdtDriftCircleOnTrackCreator.cxx:300
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:33
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
Muon::MuonDriftCircleErrorStrategy::setParameter
void setParameter(CreationParameter, bool value)
Definition: MuonDriftCircleErrorStrategy.h:65
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Muon::MuonDriftCircleErrorStrategy::setStrategy
void setStrategy(Strategy)
Select the strategy to be used - only one can be set at a time.
Definition: MuonDriftCircleErrorStrategy.h:56
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Muon::MdtDriftCircleOnTrackCreator::timeOfFlight
double timeOfFlight(const Amg::Vector3D &pos, const double beta, const double tTrack, const double tShift) const
Definition: MdtDriftCircleOnTrackCreator.cxx:473
Trk::DriftCircleSide
DriftCircleSide
Enumerates the 'side' of the wire on which the tracks passed (i.e.
Definition: DriftCircleSide.h:16
Muon::MuonDriftCircleErrorStrategy::ParameterisedErrors
@ ParameterisedErrors
Use parameterised errors.
Definition: MuonDriftCircleErrorStrategy.h:21
Muon::MdtDriftCircleOnTrackCreator::m_isMC
Gaudi::Property< bool > m_isMC
toggle whether the time of flight is included in the t0 shifts
Definition: MdtDriftCircleOnTrackCreator.h:269
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
Muon::MdtDriftCircleOnTrackCreator::m_wasConfigured
Gaudi::Property< bool > m_wasConfigured
Definition: MdtDriftCircleOnTrackCreator.h:276
Muon::MdtDriftCircleOnTrackCreator::m_createTubeHits
Gaudi::Property< bool > m_createTubeHits
Scale ROTs depending on local alignment (i.e.
Definition: MdtDriftCircleOnTrackCreator.h:248
Trk::Surface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
Muon::MdtDriftCircleOnTrackCreator::getTriggerTime
double getTriggerTime() const
currently returns 0.
Definition: MdtDriftCircleOnTrackCreator.h:198
Muon::MdtDriftCircleOnTrackCreator::m_applyToF
Gaudi::Property< bool > m_applyToF
toggle between loose errors (initial before alignment) and tight after alignment
Definition: MdtDriftCircleOnTrackCreator.h:271
Muon::MuonStationIndex::BO
@ BO
Definition: MuonStationIndex.h:25
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonStationIndex::BIL
@ BIL
Definition: MuonStationIndex.h:17
IRtRelation.h
MdtFullCalibData.h
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Muon::MdtDriftCircleOnTrackCreator::correct
virtual Trk::RIO_OnTrack * correct(const Trk::PrepRawData &prd, const Trk::TrackParameters &tp, const EventContext &) const override
Base class method for correct.
Definition: MdtDriftCircleOnTrackCreator.cxx:389
Muon::MuonDriftCircleErrorStrategy::BroadError
@ BroadError
Definition: MuonDriftCircleErrorStrategy.h:18
Muon::MdtDriftCircleOnTrackCreator::m_timeCorrectionType
Gaudi::Property< int > m_timeCorrectionType
Definition: MdtDriftCircleOnTrackCreator.h:230
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput::locErr
Amg::MatrixX locErr
Definition: MdtDriftCircleOnTrackCreator.h:177
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
Muon::MuonDriftCircleErrorStrategy::ScaledError
@ ScaledError
Definition: MuonDriftCircleErrorStrategy.h:19
Trk::LEFT
@ LEFT
the drift radius is negative (see Trk::AtaStraightLine)
Definition: DriftCircleSide.h:20
Muon::MdtDriftCircleOnTrackCreator::createRIO_OnTrack
virtual MdtRotPtr createRIO_OnTrack(const MdtPrepData &prd, const Amg::Vector3D &globalPos, const Amg::Vector3D *gdir=nullptr, const double t0Shift=0., const MuonDriftCircleErrorStrategy *strategy=nullptr, const double beta=1, const double tTrack=1) const override final
Calibrate a MdtPrepData object.
Definition: MdtDriftCircleOnTrackCreator.cxx:144
Muon::MdtDriftCircleOnTrackCreator::m_scaleMdtCov
Gaudi::Property< bool > m_scaleMdtCov
Fixed error (not tube radius)
Definition: MdtDriftCircleOnTrackCreator.h:250
ToolSettings
MdtCalibrationTool::ToolSettings ToolSettings
Definition: MdtCalibrationTool.cxx:32
AthAlgTool
Definition: AthAlgTool.h:26
MdtCalibInput::trackDirection
const Amg::Vector3D & trackDirection() const
Returns the track direction (Can be zero)
Definition: MdtCalibInput.cxx:109
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144
Muon::CalibrationOutput
MdtDriftCircleOnTrackCreator::CalibrationOutput CalibrationOutput
Definition: MdtDriftCircleOnTrackCreator.cxx:25
Muon::MuonStationIndex::EE
@ EE
Definition: MuonStationIndex.h:26
Muon::MdtDriftCircleOnTrackCreator::NumberOfTimingModes
@ NumberOfTimingModes
Definition: MdtDriftCircleOnTrackCreator.h:90
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput
struct to hold output of calibration
Definition: MdtDriftCircleOnTrackCreator.h:170
Muon::MuonStationIndex::BOL
@ BOL
Definition: MuonStationIndex.h:17
Muon::MuonDriftCircleErrorStrategy::creationParameter
bool creationParameter(CreationParameter) const
Definition: MuonDriftCircleErrorStrategy.h:84
Muon::MdtDriftCircleOnTrackCreator::updateError
virtual MdtRotPtr updateError(const MdtDriftCircleOnTrack &DCT, const Trk::TrackParameters *pars=nullptr, const MuonDriftCircleErrorStrategy *strategy=nullptr) const override
Update error of a ROT without changing the drift radius.
Definition: MdtDriftCircleOnTrackCreator.cxx:401
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput::driftTime
double driftTime
Definition: MdtDriftCircleOnTrackCreator.h:178
Muon::MdtDriftCircleOnTrackCreator::m_doFixedError
Gaudi::Property< bool > m_doFixedError
Use parameterised errors.
Definition: MdtDriftCircleOnTrackCreator.h:252
Muon::MdtDriftCircleOnTrackCreator::m_defaultStrategy
Gaudi::Property< std::string > m_defaultStrategy
if set to true, the ROT creator create 'tube' hits with a local position of 0 and an error of tube ra...
Definition: MdtDriftCircleOnTrackCreator.h:243
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Muon::MuonDriftCircleErrorStrategy::strategy
Strategy strategy() const
Definition: MuonDriftCircleErrorStrategy.h:104
Identifier
Definition: IdentifierFieldParser.cxx:14
MdtDriftCircleOnTrackCreator.h
Muon::MdtDriftCircleOnTrackCreator::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtDriftCircleOnTrackCreator.h:223