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