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 << " TOF";
97  ss << " Prop";
99  ss << " Temp";
101  ss << " Mag";
103  ss << " Slew";
105  ss << " Back";
107  ss << " Seg";
108  ss << ". ";
109  if (!m_isMC && m_looseErrors)
110  ss << "Using Data Loose error tuning";
111  if (!m_isMC && !m_looseErrors)
112  ss << "Using Data Tight error tuning";
113 
114  msg(MSG::INFO) << ss.str() << endmsg;
115  }
116  if (m_isMC)
117  ATH_MSG_INFO("Using MC error tuning");
118  ATH_MSG_VERBOSE("A correction is made if set to true: do_MDT = " << m_doMdt);
119 
122  ATH_MSG_ERROR("Detected bad default configuration, using Cosmic TOF without "
123  <<"time of flight corrections does not work");
124  return StatusCode::FAILURE;
125  }
126  }
127  ATH_MSG_DEBUG("Timing mode set to " << m_timeCorrectionType);
129  ATH_MSG_ERROR("Time Correction Type too large! Aborting.");
130  return StatusCode::FAILURE;
131  }
132 
133  if (!m_wasConfigured) {
134  ATH_MSG_ERROR("This tool is too complicated to rely on defaults. Potential configuration issue.");
135  return StatusCode::FAILURE;
136  }
137  return StatusCode::SUCCESS;
138 }
139 
141  const Amg::Vector3D& GP,
142  const Amg::Vector3D* GD,
143  const double t0Shift,
145  const double beta,
146  const double tTrack) const {
147 
148  const EventContext& ctx{Gaudi::Hive::currentContext()};
149 
151 
152  const Identifier iD = mdtPrd.identify();
153 
154  MdtCalibInput calibInput{mdtPrd};
155  calibInput.setClosestApproach(GP);
156  if (GD) calibInput.setTrackDirection((*GD).unit());
157 
158  switch (m_timeCorrectionType) {
159  case ATLTIME:
160  // normal time of flight corrections assuming IP + light speed
161  calibInput.setTimeOfFlight(calibInput.closestApproach().mag() * s_inverseSpeedOfLight);
162  ATH_MSG_VERBOSE(" running in ATLTIME mode, tof: " << calibInput.timeOfFlight());
163  break;
164  case NO_CORRECTIONS:
165  // special case for cosmics taken with scintilator trigger or
166  // cosmic simulation without TOF
167  calibInput.setTimeOfFlight(0);
168  ATH_MSG_VERBOSE("running in NO_CORRECTIONS mode, tof: " << calibInput.timeOfFlight());
169  break;
170  case COSMICS_TRIGGERTIME:
171  // special case for cosmics taken with scintilator trigger which
172  // is read out so the offset with respect to the clock is known
173  // getTriggerTime() NOT IMPLEMENETED YET!!!!!!
174  calibInput.setTriggerTime(getTriggerTime());
175  ATH_MSG_VERBOSE(" running in COSMICS_TRIGGERTIME mode, triggerOffset: "
176  << calibInput.triggerTime());
177  break;
178  case COSMICS_TOF:
179  calibInput.setTimeOfFlight(timeOfFlight(calibInput.closestApproach(), beta, tTrack, t0Shift));
180  ATH_MSG_VERBOSE(" running in COSMICS_TOF mode, tof: "
181  << calibInput.timeOfFlight() << " tTrack: " << tTrack
182  << " t0Shift: " << t0Shift
183  << " applyToF: " << m_applyToF);
184  break;
185  default:
186  // default, no tof. Indicates wrong configuration
187  ATH_MSG_WARNING("No valid mode selected, cannot apply tof correction");
188  calibInput.setTimeOfFlight(0);
189  break;
190  }
191 
192  Amg::Vector2D posOnWire{Amg::Vector2D::Zero()};
193  // if wire sag is taken into account, cast the surface to
194  // StraightLineSurface so it can be added to the ROT
195  const Trk::Surface& surf{calibInput.legacySurface()};
196  std::optional<Amg::Vector2D> posOnIdealWire = surf.globalToLocal(GP, m_globalToLocalTolerance);
197  if (!posOnIdealWire) {
198  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" globalToLocal() failed for ideal surface");
199  return nullptr;
200  }
201  posOnWire = std::move(*posOnIdealWire);
202 
203  double positionAlongWire = posOnWire[Trk::locZ];
204  // set driftcirclestatus, NODRIFTTIME if creating tube hits else UNDECIDED
206 
207  CalibrationOutput calibOutput = getLocalMeasurement(ctx, mdtPrd, calibInput, myStrategy);
208  // This basically determines the error etc and is where the bulk of the work
209  // is done.
210 
211  // hack to determine whether we are before or after the spectrum, until we
212  // sort this out properly
213  if (!calibOutput.calibOk && calibOutput.driftTime > 500.) {
214  ATH_MSG_WARNING("Unable to perform calibration ");
215  return nullptr;
216  }
217 
218  std::unique_ptr<MdtDriftCircleOnTrack> rot{};
219 
220  // we have to calculate sign, check whether direction is given
221  if (m_doMdt && GD) {
222  // calculate sign using surface
223  const Trk::Surface& surf{calibInput.legacySurface()};
224  std::optional<Amg::Vector2D> pos = surf.globalToLocal(GP, calibInput.trackDirection());
225 
226  // check this might still fail....
227  if (!pos) {
228  ATH_MSG_WARNING("Unexpected globalToLocal failure, cannot create MDT ROT ");
229  return nullptr;
230  }
231 
232  // calculate sign
233  double sign = (*pos)[Trk::driftRadius] < 0 ? -1.0 : 1.0;
234  calibOutput.locPars[Trk::driftRadius] *= sign;
235  rot = std::make_unique<MdtDriftCircleOnTrack>(&mdtPrd,
236  std::move(calibOutput.locPars),
237  std::move(calibOutput.locErr),
238  calibOutput.driftTime,
239  Trk::DECIDED,
240  calibInput.trackDirection(),
241  positionAlongWire,
242  myStrategy);
243 
244  } else {
245  // If the track direction is missing, the B-field correction was not
246  // applied
247  if (GD) {
248  // do not have access to direction, so have to use partial
249  // constructor:
250  rot = std::make_unique<MdtDriftCircleOnTrack>(&mdtPrd,
251  std::move(calibOutput.locPars),
252  std::move(calibOutput.locErr),
253  calibOutput.driftTime,
254  dcstatus,
255  positionAlongWire,
256  myStrategy);
257  } else {
258  MuonDriftCircleErrorStrategy tmpStrategy(myStrategy.getBits());
260  rot = std::make_unique<MdtDriftCircleOnTrack>(&mdtPrd,
261  std::move(calibOutput.locPars),
262  std::move(calibOutput.locErr),
263  calibOutput.driftTime,
264  dcstatus,
265  positionAlongWire,
266  tmpStrategy);
267  }
268  }
269  ATH_MSG_DEBUG("MDT ROT: radius = "
270  << rot->localParameters().get(Trk::driftRadius) << " error = "
271  << Amg::error(rot->localCovariance(), Trk::locR)
272  <<" ,channel "
273  << m_idHelperSvc->toString(iD));
274 
275  return rot.release();
276 }
277 
279  Trk::DriftCircleSide si) const {
280  // ************************
281  // Apply additional corrections to local position
282  Trk::LocalParameters lpos(caliDriftCircle.localParameters());
283 
284  // set sign LocalPosition
285  if (si == Trk::LEFT) {
286  lpos[Trk::driftRadius] = -std::abs(lpos[Trk::driftRadius]);
287  } else {
288  lpos[Trk::driftRadius] = std::abs(lpos[Trk::driftRadius]);
289  }
290 
291  caliDriftCircle.setLocalParameters(lpos);
292  caliDriftCircle.m_status = Trk::DECIDED;
293  ATH_MSG_VERBOSE("MDT DriftCircleOnTrack made with radius = " << lpos);
294 }
295 
297  const MdtPrepData& DC,
298  const MdtCalibInput& calibInput,
299  const MuonDriftCircleErrorStrategy& myStrategy) const {
300 
301 
302  ATH_MSG_VERBOSE("getLocalMeasurement "<<calibInput<<" with m_doMdt=" << m_doMdt << " and " << myStrategy);
303  const Amg::Vector3D& gpos{calibInput.closestApproach()};
304  const Amg::Vector3D& gdir{calibInput.trackDirection()};
305 
306  double sigmaR{1.}, driftTime{0.}, radius{0.}, errRadius{0.};
307  MdtCalibOutput calibOutput{};
308  if (m_doMdt) {
309  // call the calibration service providing the time when the particle
310  // passed the tube
311  calibOutput = m_mdtCalibrationTool->calibrate(ctx, calibInput);
312  ATH_MSG_VERBOSE("getLocalMeasurement() - Calibrated output "<<calibOutput);
313  driftTime = calibOutput.driftTime();
314  radius = calibOutput.driftRadius();
315  errRadius = radius;
316 
318  const Trk::Surface& surf{calibInput.legacySurface()};
319  std::optional<Amg::Vector2D> myLocalPosition = surf.globalToLocal(gpos, gdir);
320  if (myLocalPosition) {
321  errRadius = (*myLocalPosition)[Trk::driftRadius];
322  } else {
323  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" ErrorAtPredictedPosition failed because local position "<<
324  "transformation didn't succeed. Using measured radius instead.");
325  errRadius = radius;
326  }
327  }
328  } else {
329  // use PRD values
330  radius = DC.localPosition().x();
331  errRadius = radius;
332  // check consistency of error matrix
333  if (DC.localCovariance().cols() > 1) {
334  ATH_MSG_WARNING("Error matrix of DC doesn't have dimension 1 "<< DC.localCovariance());
335  ATH_MSG_WARNING("Reducing size to 1 dim");
336  }
337  }
338 
339  // Handle the errors here. Begin by getting the first part of the
340  // resolution term
341  if (!m_doMdt) {
344  sigmaR = parametrisedSigma(errRadius);
345  } else {
346  sigmaR = calibOutput.driftRadiusUncert();
347  }
348  ATH_MSG_DEBUG("Tube : " << m_idHelperSvc->toString(calibInput.identify())
349  << " SigmaR = " << sigmaR);
350  double sigmaR2 = 0.0;
351  // Handle the errors scaling / addition of fixed terms
352  if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Moore) {
353  sigmaR2 = mooreErrorStrategy(myStrategy, sigmaR * sigmaR, calibInput.identify());
354  ATH_MSG_DEBUG("After scaling etc:\t Moore sigmaR2 = " << sigmaR2);
355  } else if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Muon) {
356  sigmaR2 = muonErrorStrategy(myStrategy, sigmaR * sigmaR, calibInput.identify());
357  ATH_MSG_DEBUG("After scaling etc:\t Muon ErrorStrategy sigmaR2 = " << sigmaR2);
358  }
360  // update or copy drift radius and error
361 
362  // new radius
364 
365  // create new error matrix
366  Amg::MatrixX newLocalCov(1, 1);
367  newLocalCov(0, 0) = sigmaR2;
368 
369  // return new values
370  bool ok = true;
371  return {Trk::LocalParameters(radiusPar), newLocalCov, driftTime,
372  ok};
373 }
374 
376  const Trk::TrackParameters& tp,
378  const double beta,
379  const double tTrack) const {
380 
381  const Amg::Vector3D& momentum = tp.momentum();
382  return createRIO_OnTrack(prd, tp.position(), &momentum, 0, strategy, beta, tTrack);
383 }
384 
386  const Trk::TrackParameters& tp,
387  const EventContext& /*ctx*/) const {
389  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Incorrect hit type: "
390  <<" Trk::PrepRawData not a MdtPrepData!! No rot created ");
391  return nullptr;
392  }
393  Amg::Vector3D momentum = tp.momentum();
394 
395  return createRIO_OnTrack(static_cast<const MdtPrepData&>(prd), tp.position(), &momentum);
396 }
398  const Trk::TrackParameters* ,
399  const MuonDriftCircleErrorStrategy* strategy) const {
400 
402 
403  // calculate error
404  double sigmaR(1.);
405  double t = DCT.driftTime();
406 
407  const MuonGM::MdtReadoutElement* detEl = DCT.detectorElement();
408  if (!detEl) {
409  ATH_MSG_WARNING("MdtDriftCircleOnTrack without MdtReadoutElement "
410  << m_idHelperSvc->toString(DCT.identify()));
411  return nullptr;
412  }
413 
414  double radius = DCT.driftRadius();
415 
419  sigmaR = detEl->innerTubeRadius() / std::sqrt(3.0); // Tube hit
420  } else {
422  ATH_MSG_WARNING("updateError: ErrorAtPredictedPosition is not yet supported!");
423  // get error
425  if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Moore) {
426  sigmaR = parametrisedSigma(radius);
427  } else if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Muon) {
428  sigmaR = parametrisedSigma(radius);
429  ATH_MSG_DEBUG("Muon drift errors:" << sigmaR
430  << " for radius=" << radius);
431  }
432  } else {
433  const EventContext& ctx{Gaudi::Hive::currentContext()};
434  sigmaR = m_mdtCalibrationTool->getResolutionFromRt(ctx,
435  DCT.identify(),
436  DCT.driftTime());
437  if (sigmaR < 0.0001 || sigmaR * sigmaR < 0.0001) {
438  ATH_MSG_WARNING("Bad obtained from calibration service: error "
439  << m_idHelperSvc->toString(DCT.identify())
440  << " reso " << sigmaR << " sigma2 "
441  << sigmaR * sigmaR << " drift time " << t
442  << " original " << DCT.driftTime());
443  return nullptr;
444  }
445  }
446 
447  } // end of tube hit check
448 
449  double sigmaR2 = 0.0;
450  // Handle the errors scaling / addition of fixed terms
451  if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Moore) {
452  sigmaR2 = mooreErrorStrategy(myStrategy, sigmaR * sigmaR, DCT.identify());
453  } else if (myStrategy.strategy() == MuonDriftCircleErrorStrategy::Muon) {
454  sigmaR2 = muonErrorStrategy(myStrategy, sigmaR * sigmaR, DCT.identify());
455  ATH_MSG_DEBUG("After scaling etc:\t Muon ErrorStrategy sigmaR2 = " << sigmaR2);
456  }
457  std::unique_ptr<MdtDriftCircleOnTrack> rot{DCT.clone()};
458  rot->m_localCovariance(0, 0) = sigmaR2;
459  rot->setErrorStrategy(myStrategy);
460 
461  ATH_MSG_VERBOSE("updated error for "
462  << m_idHelperSvc->toString(DCT.identify()) << " new error "
463  << Amg::error(rot->localCovariance(), Trk::locR)
464  << " old error "
466  return rot.release();
467 }
468 
470  const double beta,
471  const double tTrack,
472  const double tShift) const {
473  return m_applyToF * (pos.mag() * s_inverseSpeedOfLight / beta) +
474  tTrack + tShift;
475 }
476 
479  return 0.23 * std::exp(-std::abs(r) / 6.06) + 0.0362;
480 }
481 
483  double sigmaR2,
484  const Identifier& id) const {
485  if (m_isMC)
486  return mooreErrorStrategyMC(myStrategy, sigmaR2, id);
487 
488  if (m_looseErrors)
489  return mooreErrorStrategyLoose(myStrategy, sigmaR2, id);
490  else
491  return mooreErrorStrategyTight(myStrategy, sigmaR2, id);
492 
493 }
494 
496  double sigmaR2,
497  const Identifier& id) const {
498  ATH_MSG_DEBUG("mooreErrorStrategy sigmaR2=" << sigmaR2<<" "<<m_idHelperSvc->toString(id));
499 
500  // Moore error strategy. Hard coding numbers for the time being - hope to
501  // make them configurable some day
506  ATH_MSG_VERBOSE(" segment error, t0fit ");
507  return sigmaR2 + 0.005; // Collisions with T0 refit (input)
509  ATH_MSG_VERBOSE(" segment error, broad ");
510  return 4 * sigmaR2 + 0.16; // Output segments - broad errors
511  } else {
512  ATH_MSG_VERBOSE(" segment error, precise ");
513  return sigmaR2 + 0.005; // Input segments , no T0 refit
514  }
515  }
516  // Don't know how to handle other cases - error?
517  } else { // Track
518  MuonStationIndex::StIndex stIndex = m_idHelperSvc->stationIndex(id);
520  if (stIndex == MuonStationIndex::BE) {
521  ATH_MSG_VERBOSE(" track error BEE ");
522  return 1.44 * sigmaR2 + 1.44; // 1.2* + 1.2 mm
523  } else if (stIndex == MuonStationIndex::EE) {
524  ATH_MSG_VERBOSE(" track error EE ");
525  if (!m_isMC && m_idHelperSvc->stationEta(id) < 0)
526  return 1.44 * sigmaR2 + 0.16; // 1.2* + 0.4 mm
527  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
528  } else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIS &&
529  std::abs(m_idHelperSvc->stationEta(id)) >= 7) {
530  ATH_MSG_VERBOSE(" track error BIS78 ");
531  if (std::abs(m_idHelperSvc->stationEta(id)) == 7)
532  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
533  else
534  return 4 * sigmaR2 + 25; // 2* + 5. mm
535  }
536  ATH_MSG_VERBOSE(" track station error ");
537  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
538 
540 
542  ATH_MSG_VERBOSE(" track error Fixed/Broad ");
543  return 4 * sigmaR2 + 49.; // 2* + 7 mm -> barrel/endcap overlaps
544  } else {
545  ATH_MSG_VERBOSE(" track error Fixed ");
546  return 4 * sigmaR2 + 4.; // 2* + 2mm S/L overlaps
547  }
548 
550 
552  ATH_MSG_VERBOSE(" track error Scaled/Broad ");
553  return 2.25 * sigmaR2 + 0.09;
554  } else {
555  // use slightly smaller errors for the barrel
556  double fixedTerm = (stIndex == MuonStationIndex::BI ||
557  stIndex == MuonStationIndex::BM ||
558  stIndex == MuonStationIndex::BO)
559  ? 0.014
560  : 0.04;
562  m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIL &&
563  m_idHelperSvc->stationEta(id) == 1 &&
564  m_idHelperSvc->sector(id) == 13 &&
565  m_idHelperSvc->mdtIdHelper().multilayer(id) == 1) {
566  fixedTerm = 1;
567  ATH_MSG_VERBOSE(" track error Scaled: BIL1A13, first multi layer ");
568  } else {
569  ATH_MSG_VERBOSE(" track error Scaled ");
570  }
571  return 1.44 * sigmaR2 + fixedTerm;
572  }
573  }
574  } // End of segment or track
575  return sigmaR2;
576 }
577 
579  double sigmaR2,
580  const Identifier& id) const {
581  ATH_MSG_DEBUG("mooreErrorStrategy sigmaR2=" << sigmaR2<<" "<<m_idHelperSvc->toString(id));
582 
583  // Moore error strategy. Hard coding numbers for the time being - hope to
584  // make them configurable some day
589  ATH_MSG_VERBOSE(" segment error, t0fit ");
590  return sigmaR2 + 0.005; // Collisions with T0 refit (input)
591  } else if (myStrategy.creationParameter(
593  ATH_MSG_VERBOSE(" segment error, broad ");
594  return 4 * sigmaR2 + 0.16; // Output segments - broad errors
595  } else {
596  ATH_MSG_VERBOSE(" segment error, precise ");
597  return sigmaR2 + 0.005; // Input segments , no T0 refit
598  }
599  }
600  // Don't know how to handle other cases - error?
601  } else { // Track
602  MuonStationIndex::StIndex stIndex = m_idHelperSvc->stationIndex(id);
603  if (myStrategy.creationParameter(
605  if (stIndex == MuonStationIndex::BE) {
606  ATH_MSG_VERBOSE(" track error BEE ");
607  return 1.44 * sigmaR2 + 4; // 1.2* + 2 mm
608  } else if (stIndex == MuonStationIndex::EE) {
609  ATH_MSG_VERBOSE(" track error EE ");
610  return 1.44 * sigmaR2 + 0.04; // 1.2* + 0.2 mm
611  } else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIS &&
612  std::abs(m_idHelperSvc->stationEta(id)) >= 7) {
613  ATH_MSG_VERBOSE(" track error BIS78 ");
614  if (std::abs(m_idHelperSvc->stationEta(id)) == 7)
615  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
616  return 4 * sigmaR2 + 25; // 2* + 5. mm
617  } else if (m_idHelperSvc->mdtIdHelper().stationName(id) == m_BME_idx &&
618  m_idHelperSvc->stationPhi(id) == 7) {
619  ATH_MSG_VERBOSE(" track error BME ");
620  return 1.44 * sigmaR2 + 0.25; // 1.2* + 0.5 mm
621  }
623  else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BOL &&
624  std::abs(m_idHelperSvc->stationEta(id)) == 7 &&
625  m_idHelperSvc->stationPhi(id) == 7) {
626  ATH_MSG_VERBOSE(" track error BOE ");
627  return 1.44 * sigmaR2 + 0.25; // 1.2* + 0.5 mm
628  }
629  ATH_MSG_VERBOSE(" track station error ");
630  return 1.44 * sigmaR2 + 0.04; // 1.2* + 0.2 mm
631 
633 
634  if (myStrategy.creationParameter(
636  ATH_MSG_VERBOSE(" track error Fixed/Broad ");
637  return 4 * sigmaR2 + 4.; // 2* + 2 mm -> barrel/endcap overlaps
638  } else {
639  ATH_MSG_VERBOSE(" track error Fixed ");
640  return 4 * sigmaR2 + 4.; // 2* + 2mm S/L overlaps
641  }
642 
644 
646  ATH_MSG_VERBOSE(" track error Scaled/Broad ");
647  return 2.25 * sigmaR2 + 0.09;
648  } else {
649  // use slightly smaller errors for the barrel
650  double fixedTerm = (stIndex == MuonStationIndex::BI ||
651  stIndex == MuonStationIndex::BM ||
652  stIndex == MuonStationIndex::BO)
653  ? 0.015
654  : 0.015;
656  m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIL &&
657  m_idHelperSvc->stationEta(id) == 1 &&
658  m_idHelperSvc->sector(id) == 13 &&
659  m_idHelperSvc->mdtIdHelper().multilayer(id) == 1) {
660  fixedTerm = 1;
661  ATH_MSG_VERBOSE(" track error Scaled: BIL1A13, first multi layer ");
662  } else {
663  ATH_MSG_VERBOSE(" track error Scaled ");
664  }
665 
666  return 1.44 * sigmaR2 + fixedTerm;
667  }
668  }
669  } // End of segment or track
670  return sigmaR2;
671 }
672 
674  double sigmaR2,
675  const Identifier& id) const {
676  ATH_MSG_DEBUG("mooreErrorStrategy sigmaR2=" << sigmaR2);
677 
678  // Moore error strategy. Hard coding numbers for the time being - hope to
679  // make them configurable some day
684  ATH_MSG_VERBOSE(" segment error, t0fit ");
685  return sigmaR2 + 0.005; // Collisions with T0 refit (input)
687  ATH_MSG_VERBOSE(" segment error, broad ");
688  return 4 * sigmaR2 + 0.16; // Output segments - broad errors
689  } else {
690  ATH_MSG_VERBOSE(" segment error, precise ");
691  return sigmaR2 + 0.005; // Input segments , no T0 refit
692  }
693  }
694  // Don't know how to handle other cases - error?
695  } else { // Track
696  MuonStationIndex::StIndex stIndex = m_idHelperSvc->stationIndex(id);
698  if (stIndex == MuonStationIndex::BE) {
699  ATH_MSG_VERBOSE(" track error BEE ");
700  return 1.44 * sigmaR2 + 0.04; // 1.2* + 0.2 mm
701  } else if (stIndex == MuonStationIndex::EE) {
702  ATH_MSG_VERBOSE(" track error EE ");
703  if (m_idHelperSvc->isSmallChamber(id))
704  return 1.21 * sigmaR2 + 0.01; // 1.1* + 0.1 mm
705  else
706  return 1.21 * sigmaR2 + 0.01; // 1.1* + 0.1 mm
707  } else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIS &&
708  std::abs(m_idHelperSvc->stationEta(id)) >= 7) {
709  ATH_MSG_VERBOSE(" track error BIS78 ");
710  if (std::abs(m_idHelperSvc->stationEta(id)) == 7)
711  return 1.44 * sigmaR2 + 1.; // 1.2* + 1. mm
712 
713  return 4 * sigmaR2 + 1.; // 2* + 1. mm
714  } else if (stIndex == MuonStationIndex::BM &&
715  m_idHelperSvc->stationPhi(id) == 7 &&
716  (m_idHelperSvc->mdtIdHelper()).stationName(id) == m_BME_idx) {
717  ATH_MSG_VERBOSE(" track error BME ");
718  return 1.21 * sigmaR2 + 0.25; // 1.1* + 0.5 mm
719  }
721  else if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BOL &&
722  std::abs(m_idHelperSvc->stationEta(id)) == 7 &&
723  m_idHelperSvc->stationPhi(id) == 7) {
724  ATH_MSG_VERBOSE(" track error BOE ");
725  return 1.21 * sigmaR2 + 0.25; // 1.1* + 0.5 mm
726  } else if (stIndex == MuonStationIndex::EE &&
727  m_idHelperSvc->chamberIndex(id) == MuonStationIndex::EEL &&
728  m_idHelperSvc->stationEta(id) < 0 &&
729  m_idHelperSvc->stationPhi(id) == 3) {
730  ATH_MSG_VERBOSE(" track error EEL1C05 ");
731  return 1.21 * sigmaR2 + 25.; // 1.1* + 5 mm
732  }
733  ATH_MSG_VERBOSE(" track station error ");
734  return 1.21 * sigmaR2 + 0.04; // 1.1* + 0.2 mm
735 
737 
739  ATH_MSG_VERBOSE(" track error Fixed/Broad ");
740  return 4 * sigmaR2 + 4.; // 2* + 2 mm -> barrel/endcap overlaps
741  } else {
742  ATH_MSG_VERBOSE(" track error Fixed ");
743  return 4 * sigmaR2 + 4.; // 2* + 2mm S/L overlaps
744  }
745 
747 
749  ATH_MSG_VERBOSE(" track error Scaled/Broad ");
750  return 2.25 * sigmaR2 + 0.09;
751  } else {
752 
753  // use slightly smaller errors for the barrel
754  //
755  double fixedTerm = 0.01;
757  if (m_idHelperSvc->chamberIndex(id) == MuonStationIndex::BIL &&
758  m_idHelperSvc->stationEta(id) == 1 &&
759  m_idHelperSvc->sector(id) == 13 &&
760  m_idHelperSvc->mdtIdHelper().multilayer(id) == 1) {
761  fixedTerm = 1;
762  ATH_MSG_VERBOSE(" track error Scaled: BIL1A13, first multi layer ");
763  }
764  } else {
765  ATH_MSG_VERBOSE(" track error Scaled ");
766  }
767 
768  return 1.21 * sigmaR2 + fixedTerm;
769  }
770  }
771  } // End of segment or track
772  return sigmaR2;
773 }
774 
776  double sigmaR2,
777  const Identifier& /*id*/) const {
778 
779  //
780  // the new muonErrorStrategy is identical for Data and MC
781  // it assumes that for tracks the alignment uncertainties are added later
782  // this is done by the AignmentErrorTool where AlignmentEffectsOnTrack are
783  // used. (for segment errors the mooreStrategy is coded)
784  //
785  // it is inspired by the mooreErrorStrategyTight but does not need a constant term
786  //
787 
788  ATH_MSG_DEBUG("muonErrorStrategy sigmaR2=" << sigmaR2);
789 
790  // Muon error strategy. Hard coding numbers for the time being - hope to
791  // make them configurable some day
796  ATH_MSG_VERBOSE(" segment error, t0fit ");
797  return sigmaR2 + 0.005; // Collisions with T0 refit (input)
799  ATH_MSG_VERBOSE(" segment error, broad ");
800  return 4 * sigmaR2 + 0.16; // Output segments - broad errors
801  } else {
802  ATH_MSG_VERBOSE(" segment error, precise ");
803  return sigmaR2 + 0.005; // Input segments , no T0 refit
804  }
805  }
806  } else { // Track
808  ATH_MSG_VERBOSE(" track station error ");
809  return 1.21 * sigmaR2; // 1.1* mm
811  ATH_MSG_VERBOSE(" track error Fixed ");
812  return 4 * sigmaR2; // 2*
815  ATH_MSG_VERBOSE(" track error Scaled/Broad ");
816  return 2.25 * sigmaR2;
817  } else {
818  ATH_MSG_VERBOSE(" Track scaled error ");
819  return 1.21 * sigmaR2;
820  }
821  }
822  } // End of segment or track
823  return sigmaR2;
824 }
825 }
Muon::MdtDriftCircleOnTrackCreator::mooreErrorStrategyTight
double mooreErrorStrategyTight(const MuonDriftCircleErrorStrategy &myStrategy, double sigmaR, const Identifier &id) const
Definition: MdtDriftCircleOnTrackCreator.cxx:673
Muon::MdtDriftCircleOnTrackCreator::parametrisedSigma
static double parametrisedSigma(double r)
Definition: MdtDriftCircleOnTrackCreator.cxx:477
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:482
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:177
Muon::MuonDriftCircleErrorStrategy
Definition: MuonDriftCircleErrorStrategy.h:15
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
MdtReadoutElement.h
Muon::MuonDriftCircleErrorStrategy::Muon
@ Muon
Definition: MuonDriftCircleErrorStrategy.h:17
MuonDriftCircleErrorStrategy.h
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput::locPars
Trk::LocalParameters locPars
Definition: MdtDriftCircleOnTrackCreator.h:174
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:257
Muon::MdtDriftCircleOnTrackCreator::COSMICS_TRIGGERTIME
@ COSMICS_TRIGGERTIME
case for normal cosmic data with rpc trigger or simulation including TOF.
Definition: MdtDriftCircleOnTrackCreator.h:82
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:259
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:226
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:233
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:74
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:77
MdtDriftCircleOnTrack.h
Muon::MdtDriftCircleOnTrackCreator::muonErrorStrategy
double muonErrorStrategy(const MuonDriftCircleErrorStrategy &myStrategy, double sigmaR, const Identifier &id) const
Definition: MdtDriftCircleOnTrackCreator.cxx:775
Muon::MdtDriftCircleOnTrackCreator::MdtDriftCircleOnTrackCreator
MdtDriftCircleOnTrackCreator(const std::string &, const std::string &, const IInterface *)
Definition: MdtDriftCircleOnTrackCreator.cxx:27
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
Muon::MdtDriftCircleOnTrackCreator::m_BME_idx
int m_BME_idx
Definition: MdtDriftCircleOnTrackCreator.h:279
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:278
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:223
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
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:238
Muon::MdtDriftCircleOnTrackCreator::COSMICS_TOF
@ COSMICS_TOF
Definition: MdtDriftCircleOnTrackCreator.h:86
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:272
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:261
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:578
Muon::MdtDriftCircleOnTrackCreator::m_doIndividualChamberReweights
Gaudi::Property< bool > m_doIndividualChamberReweights
toggle between MC and data alignment errors (to be removed in rel.
Definition: MdtDriftCircleOnTrackCreator.h:265
Muon::MdtDriftCircleOnTrackCreator::s_inverseSpeedOfLight
static constexpr double s_inverseSpeedOfLight
Definition: MdtDriftCircleOnTrackCreator.h:277
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:495
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:263
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:252
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:296
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:469
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:267
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
Muon::MdtDriftCircleOnTrackCreator::m_wasConfigured
Gaudi::Property< bool > m_wasConfigured
Definition: MdtDriftCircleOnTrackCreator.h:274
Muon::MdtDriftCircleOnTrackCreator::m_createTubeHits
Gaudi::Property< bool > m_createTubeHits
Scale ROTs depending on local alignment (i.e.
Definition: MdtDriftCircleOnTrackCreator.h:246
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:196
Muon::MdtDriftCircleOnTrackCreator::m_applyToF
Gaudi::Property< bool > m_applyToF
toggle between loose errors (initial before alignment) and tight after alignment
Definition: MdtDriftCircleOnTrackCreator.h:269
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:385
Muon::MuonDriftCircleErrorStrategy::BroadError
@ BroadError
Definition: MuonDriftCircleErrorStrategy.h:18
Muon::MdtDriftCircleOnTrackCreator::m_timeCorrectionType
Gaudi::Property< int > m_timeCorrectionType
Definition: MdtDriftCircleOnTrackCreator.h:228
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput::locErr
Amg::MatrixX locErr
Definition: MdtDriftCircleOnTrackCreator.h:175
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:140
Muon::MdtDriftCircleOnTrackCreator::m_scaleMdtCov
Gaudi::Property< bool > m_scaleMdtCov
Fixed error (not tube radius)
Definition: MdtDriftCircleOnTrackCreator.h:248
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:88
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput
struct to hold output of calibration
Definition: MdtDriftCircleOnTrackCreator.h:168
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:397
Muon::MdtDriftCircleOnTrackCreator::CalibrationOutput::driftTime
double driftTime
Definition: MdtDriftCircleOnTrackCreator.h:176
Muon::MdtDriftCircleOnTrackCreator::m_doFixedError
Gaudi::Property< bool > m_doFixedError
Use parameterised errors.
Definition: MdtDriftCircleOnTrackCreator.h:250
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:241
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:221