ATLAS Offline Software
MdtSegmentSeedGenerator.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
10 
11 #include <Acts/Utilities/Enumerate.hpp>
12 
13 #include <Acts/Utilities/Enumerate.hpp>
14 #include <CxxUtils/sincos.h>
15 #include <format>
16 
17 namespace MuonR4{
18  using namespace SegmentFit;
19  using namespace SegmentFitHelpers;
21 
22  double driftCov(const CalibratedSpacePoint& dcHit){
23  return std::visit([](const auto& cov) ->double{
25  }, dcHit.covariance());
26  }
27  constexpr bool passRangeCut(const std::array<double, 2>& cutRange, const double value) {
28  return cutRange[0] <= value && value <= cutRange[1];
29  }
30 
31  std::ostream& MdtSegmentSeedGenerator::SeedSolution::print(std::ostream& ostr) const{
32  ostr<<"two circle solution with ";
33  ostr<<"theta: "<<theta / Gaudi::Units::deg<<" pm "<<dTheta / Gaudi::Units::deg<<", ";
34  ostr<<"y0: "<<Y0<<" pm "<<dY0;
35  return ostr;
36  }
38  return m_cfg;
39  }
42  const SegmentSeed* segmentSeed,
43  const Config& configuration):
45  m_cfg{configuration},
46  m_segmentSeed{segmentSeed} {
47 
48  if (m_hitLayers.mdtHits().empty()) return;
49 
50  if (std::ranges::find_if(m_hitLayers.mdtHits(), [this](const HitVec& vec){
51  return vec.size() > m_cfg.busyLayerLimit;
52  }) != m_hitLayers.mdtHits().end()) {
53  m_cfg.startWithPattern = false;
54  }
55  // Set the start for the upper layer
56  m_upperLayer = m_hitLayers.mdtHits().size()-1;
57 
59  while (m_lowerLayer < m_upperLayer && m_hitLayers.mdtHits()[m_lowerLayer].size() >m_cfg.busyLayerLimit){
60  ++m_lowerLayer;
61  }
63  while (m_lowerLayer < m_upperLayer && m_hitLayers.mdtHits()[m_upperLayer].size() > m_cfg.busyLayerLimit) {
64  --m_upperLayer;
65  }
66 
67  if (msgLvl(MSG::VERBOSE)) {
68  std::stringstream sstr{};
69  for (const auto& [layCount, layer] : Acts::enumerate(m_hitLayers.mdtHits())) {
70  sstr<<"Mdt-hits in layer "<<layCount<<": "<<layer.size()<<std::endl;
71  for (const HoughHitType& hit : layer) {
72  sstr<<" **** "<<hit->msSector()->idHelperSvc()->toString(hit->identify())<<" "
73  <<Amg::toString(hit->positionInChamber())<<", driftRadius: "<<hit->driftRadius()<<std::endl;
74  }
75  }
76  for (const auto& [layCount, layer] : Acts::enumerate(m_hitLayers.stripHits())) {
77  sstr<<"Hits in layer "<<layCount<<": "<<layer.size()<<std::endl;
78  for (const HoughHitType& hit : layer) {
79  sstr<<" **** "<<hit->msSector()->idHelperSvc()->toString(hit->identify())<<" "
80  <<Amg::toString(hit->positionInChamber())<<", driftRadius: "<<hit->driftRadius()<<std::endl;
81  }
82  }
83  ATH_MSG_VERBOSE("SeedGenerator - sorting of hits done. Mdt layers: "<<m_hitLayers.mdtHits().size()
84  <<", strip layers: "<<m_hitLayers.stripHits().size()<<std::endl<<sstr.str());
85  }
86  }
87 
89  return m_nGenSeeds;
90  }
92  const HitVec& lower = m_hitLayers.mdtHits()[m_lowerLayer];
95  if (++m_signComboIndex < s_signCombos.size()) {
96  return;
97  }
98  m_signComboIndex = 0;
99 
101  if (++m_lowerHitIndex < lower.size()) {
102  return;
103  }
104  m_lowerHitIndex=0;
106  if (++m_upperHitIndex < upper.size()) {
107  return;
108  }
109  m_upperHitIndex = 0;
113  }
114 
115  if (m_lowerLayer < m_upperLayer) {
116  return;
117  }
121  return;
122  }
123  m_lowerLayer = 0;
125 
126  }
127  }
128  std::optional<MdtSegmentSeedGenerator::DriftCircleSeed>
129  MdtSegmentSeedGenerator::nextSeed(const EventContext& ctx) {
130  std::optional<DriftCircleSeed> found = std::nullopt;
132  ++m_nGenSeeds;
133  found = std::make_optional<DriftCircleSeed>();
134  found->parameters = m_segmentSeed->parameters();
135  found->measurements = m_cfg.calibrator->calibrate(ctx,
139  found->parentBucket = m_segmentSeed->parentBucket();
140 
141  SeedSolution patternSeed{};
142  patternSeed.seedHits.resize(2*m_hitLayers.mdtHits().size());
143  patternSeed.solutionSigns.resize(2*m_hitLayers.mdtHits().size());
144  patternSeed.Y0 = m_segmentSeed->interceptY();
145  patternSeed.theta = m_segmentSeed->tanTheta();
146  m_seenSolutions.push_back(std::move(patternSeed));
147  return found;
148  }
149 
150  while (m_lowerLayer < m_upperLayer) {
151  const HitVec& lower = m_hitLayers.mdtHits().at(m_lowerLayer);
153  ATH_MSG_VERBOSE("Layers with hits: "<<m_hitLayers.mdtHits().size()
154  <<" -- next bottom hit: "<<m_lowerLayer<<", hit: "<<m_lowerHitIndex
155  <<" ("<<lower.size()<<"), topHit " <<m_upperLayer<<", "<<m_upperHitIndex
156  <<" ("<<upper.size()<<") - ambiguity "<<s_signCombos[m_signComboIndex]);
157 
162  if (found) {
163  return found;
164  }
165  }
166  return std::nullopt;
167  }
168  std::optional<MdtSegmentSeedGenerator::DriftCircleSeed>
169  MdtSegmentSeedGenerator::buildSeed(const EventContext& ctx,
170  const HoughHitType& topHit,
171  const HoughHitType& bottomHit,
172  const SignComboType& signs) {
173 
174  const auto* bottomPrd = static_cast<const xAOD::MdtDriftCircle*>(bottomHit->primaryMeasurement());
175  const auto* topPrd = static_cast<const xAOD::MdtDriftCircle*>(topHit->primaryMeasurement());
176  if (bottomPrd->status() != Muon::MdtDriftCircleStatus::MdtStatusDriftTime ||
180  return std::nullopt;
181  }
182  const auto&[signTop, signBot] = signs;
183  double R = signBot *bottomHit->driftRadius() - signTop * topHit->driftRadius();
184  const Amg::Vector3D& bottomPos{bottomHit->positionInChamber()};
185  const Amg::Vector3D& topPos{topHit->positionInChamber()};
186  const Muon::IMuonIdHelperSvc* idHelperSvc{topHit->msSector()->idHelperSvc()};
187  const Amg::Vector3D D = topPos - bottomPos;
188  const double thetaTubes = std::atan2(D.y(), D.z());
189  const double distTubes = std::hypot(D.y(), D.z());
190  ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<": Bottom tube "<<idHelperSvc->toString(bottomHit->identify())<<" "<<Amg::toString(bottomPos)
191  <<", driftRadius: "<<bottomHit->driftRadius()<<" - top tube "<<idHelperSvc->toString(topHit->identify())
192  <<" "<<Amg::toString(topPos)<<", driftRadius: "<<topHit->driftRadius()
193  <<", tube distance: "<<Amg::toString(D));
194 
195  DriftCircleSeed candidateSeed{};
196  candidateSeed.parameters = m_segmentSeed->parameters();
197  candidateSeed.parentBucket = m_segmentSeed->parentBucket();
198  double theta{thetaTubes - std::asin(std::clamp(R / distTubes, -1., 1.))};
199  Amg::Vector3D seedDir = Amg::dirFromAngles(90.*Gaudi::Units::deg, theta);
200  double Y0 = bottomPos.y()*seedDir.z() - bottomPos.z()*seedDir.y() + signBot*bottomHit->driftRadius();
201  double combDriftUncert{std::sqrt(bottomPrd->driftRadiusCov() + topPrd->driftRadiusCov())};
202  std::unique_ptr<CalibratedSpacePoint> calibBottom{}, calibTop{};
204  candidateSeed.parameters[toInt(ParamDefs::theta)] = theta;
205  candidateSeed.parameters[toInt(ParamDefs::y0)] = Y0 / seedDir.z();
208  const auto [linePos, lineDir] = makeLine(candidateSeed.parameters);
209  calibBottom = m_cfg.calibrator->calibrate(ctx, bottomHit, linePos, lineDir,
210  candidateSeed.parameters[toInt(ParamDefs::time)]);
211  calibTop = m_cfg.calibrator->calibrate(ctx, topHit, linePos, lineDir,
212  candidateSeed.parameters[toInt(ParamDefs::time)]);
213  R = signBot * calibBottom->driftRadius() - signTop * calibTop->driftRadius();
215  theta = thetaTubes - std::asin(std::clamp(R / distTubes, -1., 1.));
216  seedDir = Amg::dirFromAngles(90.*Gaudi::Units::deg, theta);
217  Y0 = bottomPos.y()*seedDir.z() - bottomPos.z()*seedDir.y() + signBot*bottomHit->driftRadius();
218  combDriftUncert = std::sqrt(driftCov(*calibBottom) + driftCov(*calibTop));
219  }
220 
221  candidateSeed.parameters[toInt(ParamDefs::theta)] = theta;
222  candidateSeed.parameters[toInt(ParamDefs::y0)] = Y0 / seedDir.z();
224  if (!passRangeCut(m_cfg.thetaRange, theta) ||
225  !passRangeCut(m_cfg.interceptRange, candidateSeed.parameters[toInt(ParamDefs::y0)])) {
226  return std::nullopt;
227  }
228 
229  const Amg::Vector3D seedPos = Y0 / seedDir.z() * Amg::Vector3D::UnitY();
230 
231  assert(std::abs(topPos.y()*seedDir.z() - topPos.z() * seedDir.y() + signTop*topHit->driftRadius() - Y0) < std::numeric_limits<float>::epsilon() );
232  ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<": Candidate seed theta: "<<theta<<", tanTheta: "<<(seedDir.y() / seedDir.z())<<", y0: "<<Y0/seedDir.z());
233 
234  SeedSolution solCandidate{};
235  solCandidate.Y0 = seedPos[toInt(ParamDefs::y0)];
236  solCandidate.theta = theta;
238  const double denomSquare = 1. - std::pow(R / distTubes, 2);
239  if (denomSquare < std::numeric_limits<double>::epsilon()){
240  ATH_MSG_VERBOSE("Invalid seed, rejecting");
241  return std::nullopt;
242  }
243  solCandidate.dTheta = combDriftUncert / std::sqrt(denomSquare) / distTubes;
244  solCandidate.dY0 = std::hypot(-bottomPos.y()*seedDir.y() + bottomPos.z()*seedDir.z(), 1.) * solCandidate.dTheta;
245  ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<": Test new "<<solCandidate<<". "<<m_seenSolutions.size());
246 
247 
248  if (std::ranges::find_if(m_seenSolutions,
249  [&solCandidate, this] (const SeedSolution& seen) {
250  const double deltaY = std::abs(seen.Y0 - solCandidate.Y0);
251  const double limitY = std::hypot(seen.dY0, solCandidate.dY0);
252  const double dTheta = std::abs(seen.theta - solCandidate.theta);
253  const double limitTh = std::hypot(seen.dTheta, solCandidate.dTheta);
254  ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<": "<<seen
255  <<std::format(" delta Y: {:.2f} {:} {:.2f}", deltaY, deltaY < limitY ? '<' : '>', limitY)
256  <<std::format(" delta theta: {:.2f} {:} {:.2f}", dTheta, dTheta < limitTh ? '<' : '>', limitTh) );
257  return deltaY < limitY && dTheta < limitTh;;
258  }) != m_seenSolutions.end()){
259  ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<": Reject due to similarity");
260  return std::nullopt;
261  }
263  unsigned int nMdt{0};
265  for (const auto& [layerNr, hitsInLayer] : Acts::enumerate(m_hitLayers.mdtHits())) {
266  ATH_MSG_VERBOSE( hitsInLayer.size()<<" hits in layer "<<(layerNr +1));
267  bool hadGoodHit{false};
268  for (const HoughHitType testMe : hitsInLayer){
269  const double pull = std::sqrt(SegmentFitHelpers::chiSqTermMdt(seedPos, seedDir, *testMe, msg()));
270  ATH_MSG_VERBOSE("Test hit "<<idHelperSvc->toString(testMe->identify())
271  <<" "<<Amg::toString(testMe->positionInChamber())<<", pull: "<<pull);
272  if (pull < m_cfg.hitPullCut) {
273  hadGoodHit = true;
274  solCandidate.seedHits.emplace_back(testMe);
275  ++nMdt;
276  }
277  else if (hadGoodHit) {
278  break;
279  }
280  }
281  }
283  if (1.*nMdt < std::max(1.*m_cfg.nMdtHitCut, m_cfg.nMdtLayHitCut * m_hitLayers.mdtHits().size())) {
284  return std::nullopt;
285  }
286  /* Calculate the left-right signs of the used hits */
287  if (m_cfg.overlapCorridor) {
288  solCandidate.solutionSigns = driftSigns(seedPos, seedDir, solCandidate.seedHits, msg());
289  ATH_MSG_VERBOSE("Circle solutions for seed "<<idHelperSvc->toStringChamber(bottomHit->identify())<<" - "
290  <<solCandidate);
292  for (unsigned int a = m_cfg.startWithPattern; a< m_seenSolutions.size() ;++a) {
293  const SeedSolution& accepted = m_seenSolutions[a];
294  unsigned int nOverlap{0};
295  std::vector<int> corridor = driftSigns(seedPos, seedDir, accepted.seedHits, msg());
296  ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<": Test seed against accepted "<<accepted<<", updated signs: "<<corridor);
298  for (unsigned int l = 0; l < accepted.seedHits.size(); ++l){
299  nOverlap += corridor[l] == accepted.solutionSigns[l];
300  }
303  if (nOverlap == corridor.size() && accepted.seedHits.size() >= solCandidate.seedHits.size()) {
304  ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<": Same set of hits collected within the same corridor");
305  return std::nullopt;
306  }
307  }
308  }
310  for (const HoughHitType& hit : solCandidate.seedHits){
311  //calibBottom is nullptr after it has been moved, so...
312  //cppcheck-suppress accessMoved
313  if (hit == bottomHit && calibBottom) {
314  candidateSeed.measurements.emplace_back(std::move(calibBottom));
315  }
316  //calibTop is nullptr after it has been moved, so...
317  //cppcheck-suppress accessMoved
318  else if (hit == topHit && calibTop) {
319  candidateSeed.measurements.emplace_back(std::move(calibTop));
320  } else {
321  candidateSeed.measurements.emplace_back(m_cfg.calibrator->calibrate(ctx, hit, seedPos, seedDir, 0.));
322  }
323  }
325  m_seenSolutions.emplace_back(std::move(solCandidate));
328  if (m_cfg.tightenHitCut) {
330  }
331  ++m_nGenSeeds;
332  ATH_MSG_VERBOSE("In event "<<ctx.eventID().event_number()<<" found new seed solution "<<toString(candidateSeed.parameters));
333  if (m_cfg.fastSeedFit) {
334  if (!m_cfg.fastSegFitWithT0) {
335  fitDriftCircles(candidateSeed);
336  } else {
337  fitDriftCirclesWithT0(ctx, candidateSeed);
338  }
339  }
340 
341  // Combine the seed with the phi estimate
342  {
343  const Amg::Vector3D parDir = dirFromTangents(m_segmentSeed->tanPhi(), std::tan(theta));
344  candidateSeed.parameters[toInt(ParamDefs::theta)] = parDir.theta();
345  candidateSeed.parameters[toInt(ParamDefs::phi)] = parDir.phi();
346  }
347 
349  {
350  const auto [seedPos, seedDir] = makeLine(candidateSeed.parameters);
351  for (const std::vector<HoughHitType>& hitsInLayer : m_hitLayers.stripHits()) {
352  HoughHitType bestHit{nullptr};
353  double bestPull{m_cfg.hitPullCut};
354  for (const HoughHitType testMe : hitsInLayer){
355  const double pull = std::sqrt(SegmentFitHelpers::chiSqTermStrip(seedPos, seedDir, *testMe, msg()))
356  / testMe->dimension();
357  ATH_MSG_VERBOSE("Test hit "<<idHelperSvc->toString(testMe->identify())
358  <<" "<<Amg::toString(testMe->positionInChamber())<<", pull: "<<pull);
360  if (pull <= bestPull) {
361  bestHit = testMe;
362  bestPull = pull;
363  }
364  }
365  if (!bestHit) {
366  continue;
367  }
368  candidateSeed.measurements.push_back(m_cfg.calibrator->calibrate(ctx,bestHit, seedPos, seedDir, 0));
369  }
370  }
371  return candidateSeed;
372  }
375 
376  SeedFitAuxilliaries aux{};
379  seed.parameters[toInt(ParamDefs::theta)]);
381  const double y0 = seed.parameters[toInt(ParamDefs::y0)] * seedDir.z();
382 
383  aux.invCovs.reserve(seed.measurements.size());
384  aux.driftSigns.reserve(seed.measurements.size());
385  double norm{0.};
387  for (const std::unique_ptr<CalibratedSpacePoint>& hit : seed.measurements) {
388  const double invCov = 1./ driftCov(*hit);
389  const Amg::Vector3D& pos{hit->positionInChamber()};
390  const int sign = y0 - pos.y() * seedDir.z() + pos.z()* seedDir.y() > 0 ? 1 : -1;
391 
392  aux.centerOfGrav+= invCov * pos;
393  aux.invCovs.push_back(invCov);
394  aux.driftSigns.push_back(sign);
395 
396  norm += invCov;
397  }
399  aux.covNorm = 1./ norm;
400  aux.centerOfGrav *= aux.covNorm;
402  for (const auto&[covIdx, hit] : Acts::enumerate(seed.measurements)) {
403  const double& invCov = aux.invCovs[covIdx];
404  const int& sign = aux.driftSigns[covIdx];
405  const Amg::Vector3D pos = hit->positionInChamber() - aux.centerOfGrav;
406  const double signedCov = invCov * sign;
407  aux.T_zzyy += invCov * (std::pow(pos.z(), 2) - std::pow(pos.y(), 2));
408  aux.T_yz += invCov * pos.y()*pos.z();
409  aux.T_rz += signedCov * pos.z() * hit->driftRadius();
410  aux.T_ry += signedCov * pos.y() * hit->driftRadius();
411  aux.fitY0 += signedCov * aux.covNorm * hit->driftRadius();
412  }
413  ATH_MSG_VERBOSE("Estimated T_zzyy: "<<aux.T_zzyy<<", T_yz: "<<aux.T_yz<<", T_rz: "<<aux.T_rz
414  <<", T_ry: "<<aux.T_ry<<", centre "<<Amg::toString(aux.centerOfGrav)<<", y0: "<<aux.fitY0
415  <<", norm: "<<aux.covNorm<<"/"<<norm);
416  return aux;
417  }
419 
420  const SeedFitAuxilliaries auxVars = estimateAuxillaries(inSeed);
421 
422  double theta = inSeed.parameters[toInt(ParamDefs::theta)];
424  const double thetaMin = - (auxVars.T_zzyy - auxVars.T_ry) / (4* auxVars.T_yz + auxVars.T_rz);
425  const double thetaDet = std::pow(auxVars.T_zzyy -auxVars.T_ry,2) + 4*(auxVars.T_yz + auxVars.T_rz)*(2*auxVars.T_yz + 0.5*auxVars.T_rz);
426  const double thetaGuess = thetaMin + (theta > thetaMin ? 1. : -1.)*std::sqrt(thetaDet) / (4*auxVars.T_yz + auxVars.T_rz);
427  // const double thetaGuess = std::atan2( 2.*(T_yz - T_rz), T_zzyy) / 2.;
428 
429  ATH_MSG_VERBOSE("Start fast fit seed: "<<theta<<", guess: "<<thetaGuess
430  <<", y0: "<<inSeed.parameters[toInt(ParamDefs::y0)]
431  <<", fitY0: "<<auxVars.fitY0<<", centre: "<<Amg::toString(auxVars.centerOfGrav));
433  theta = thetaGuess;
434  CxxUtils::sincos thetaCS{theta};
435  bool converged{false};
436  while (!converged && inSeed.nIter++ <= m_cfg.nMaxIter) {
437  const CxxUtils::sincos twoTheta{2.*theta};
438  const double thetaPrime = 0.5*auxVars.T_zzyy *twoTheta.sn - auxVars.T_yz * twoTheta.cs
439  - auxVars.T_rz * thetaCS.cs - auxVars.T_ry * thetaCS.sn;
440  if (std::abs(thetaPrime) < m_cfg.precCutOff){
441  converged = true;
442  break;
443  }
444 
445  const double thetaTwoPrime = auxVars.T_zzyy * twoTheta.cs + 2.* auxVars.T_yz * twoTheta.sn
446  + auxVars.T_rz * thetaCS.sn - auxVars.T_ry * thetaCS.cs;
447  const double update = thetaPrime / thetaTwoPrime;
448  ATH_MSG_VERBOSE("Fit iteration #"<<inSeed.nIter<<" -- theta: "<<theta<<", thetaPrime: "<<thetaPrime
449  <<", thetaTwoPrime: "<<thetaTwoPrime<<" -- "<<std::format("{:.8f}", update)
450  <<" --> next theta "<<(theta - thetaPrime / thetaTwoPrime));
451 
452  if (std::abs(update) < m_cfg.precCutOff) {
453  converged = true;
454  break;
455  }
456  theta -= update;
457  thetaCS = CxxUtils::sincos{theta};
458  }
459  if (!converged) {
460  return;
461  }
462  double fitY0 = (auxVars.centerOfGrav.y() *thetaCS.cs - auxVars.centerOfGrav.z() * thetaCS.sn + auxVars.fitY0) / thetaCS.cs;
463  ATH_MSG_VERBOSE("Drift circle fit converged within "<<inSeed.nIter<<" iterations giving "<<toString(inSeed.parameters)<<", chi2: "<<inSeed.chi2
464  <<" - theta: "<<theta / Gaudi::Units::deg<<", y0: "<<fitY0);
465  inSeed.parameters[toInt(ParamDefs::theta)] = theta;
466  inSeed.parameters[toInt(ParamDefs::y0)] = fitY0;
467  }
468 
471  const DriftCircleSeed& seed) const {
473  for (const auto& [idx, hit] : Acts::enumerate(seed.measurements)){
474  const double signedCov = aux.driftSigns[idx] * aux.invCovs[idx];
475  const double weight = aux.covNorm * signedCov;
476  const double velocity = m_cfg.calibrator->driftVelocity(ctx, *hit);
477  const double acceleration = m_cfg.calibrator->driftAcceleration(ctx, *hit);
478  const Amg::Vector3D pos = hit->positionInChamber() - aux.centerOfGrav;
479  aux.fitY0Prime+= weight * velocity;
480  aux.fitY0TwoPrime+= weight * acceleration;
481 
482  aux.T_vz += signedCov * pos.z()*velocity;
483  aux.T_vy += signedCov * pos.y()*velocity;
484  aux.T_az += signedCov * pos.z()*acceleration;
485  aux.T_ay += signedCov * pos.y()*acceleration;
486 
487  aux.R_vr += signedCov * hit->driftRadius() * velocity;
488  aux.R_va += signedCov * hit->driftRadius() * acceleration;
489  aux.R_vv += signedCov * velocity * velocity;
490  }
491  ATH_MSG_VERBOSE("Estimated T_vz: "<<aux.T_vz<<", T_vy: "<<aux.T_vy
492  <<", T_az: "<<aux.T_az<<", T_ay: "<<aux.T_ay<<" --- R_vr: "<<aux.R_vr
493  <<", R_va: "<<aux.R_va<<", R_vv: "<<aux.R_vv<<" -- Y0^{'}: "<<aux.fitY0Prime
494  <<", Y0^{''}: "<<aux.fitY0TwoPrime);
495  return aux;
496  }
497 
498  void MdtSegmentSeedGenerator::fitDriftCirclesWithT0(const EventContext& ctx, DriftCircleSeed& inSeed) const {
500  SeedFitAuxWithT0 auxVars{estimateAuxillaries(ctx, inSeed)};
501 
502 
503  bool converged{false};
504  AmgSymMatrix(2) cov{AmgSymMatrix(2)::Zero()};
505  AmgVector(2) grad{AmgVector(2)::Zero()};
507  inSeed.parameters[toInt(ParamDefs::time)]};
508 
509 
510  while (!converged && inSeed.nIter++ <= m_cfg.nMaxIter) {
511 
512  const CxxUtils::sincos thetaCS{pars[0]};
513  const CxxUtils::sincos twoTheta{2.*pars[0]};
515  cov(0,0) = auxVars.T_zzyy * twoTheta.cs + 2.* auxVars.T_yz * twoTheta.sn
516  + auxVars.T_rz * thetaCS.sn - auxVars.T_ry * thetaCS.cs;
517 
518  // cov(1,0) = cov(0,1) = auxVars.T_vz * thetaCS.cs + auxVars.T_vy * thetaCS.sn;
519  cov(1,1) = - auxVars.fitY0Prime *auxVars.fitY0Prime - auxVars.fitY0Prime * auxVars.fitY0TwoPrime
520  - auxVars.T_az * thetaCS.sn - auxVars.T_ay * thetaCS.cs + auxVars.R_vv + auxVars.R_va;
521 
522  grad[0] =0.5*auxVars.T_zzyy *twoTheta.sn - auxVars.T_yz * twoTheta.cs
523  - auxVars.T_rz * thetaCS.cs - auxVars.T_ry * thetaCS.sn;
524  grad[1] = auxVars.fitY0 * auxVars.fitY0Prime - auxVars.R_vr + auxVars.T_vz * thetaCS.sn - auxVars.T_vy * thetaCS.cs;
525 
526 
527  const AmgVector(2) update = cov.inverse()* grad;
528  ATH_MSG_VERBOSE("Iteration: "<<inSeed.nIter<<", theta: "<<pars[0] / Gaudi::Units::deg<<", time: "<<
529  pars[1]<<" gradient: ("<<(grad[0])<<", "<<grad[1]<<"), covariance:"
530  <<std::endl<<Amg::toString(cov)<<std::endl<<" update: ("<<update[0] / Gaudi::Units::deg
531  <<", "<<update[1]<<").");
532  pars -= update;
533  }
534 
535  }
536 
537 }
MuonR4::MdtSegmentSeedGenerator::m_upperHitIndex
std::size_t m_upperHitIndex
Explicit hit to pick in the selected top layer.
Definition: MdtSegmentSeedGenerator.h:215
MuonR4::SegmentFitHelpers::driftSigns
std::vector< int > driftSigns(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const std::vector< const SpacePoint * > &uncalibHits, MsgStream &msg)
Calculates whether a segment line travereses the tube measurements on the left (-1) or right (1) side...
Definition: SegmentFitHelperFunctions.cxx:210
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxilliaries::fitY0
double fitY0
Prediced y0 given as the expection value of the radii divided by the inverse covariance sum.
Definition: MdtSegmentSeedGenerator.h:155
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxilliaries::T_rz
double T_rz
Expectation value of T_{z} * r
Definition: MdtSegmentSeedGenerator.h:150
MuonR4::MdtSegmentSeedGenerator::SeedSolution::dTheta
double dTheta
: Uncertainty on the slope
Definition: MdtSegmentSeedGenerator.h:111
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MuonR4::SegmentSeed::parentBucket
const SpacePointBucket * parentBucket() const
Returns the bucket out of which the seed was formed.
Definition: SegmentSeed.cxx:38
MuonR4::SpacePoint::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:116
MuonR4::MdtSegmentSeedGenerator::Config::overlapCorridor
bool overlapCorridor
Check whether a new seed candidate shares the same left-right solution with already accepted ones Rej...
Definition: MdtSegmentSeedGenerator.h:50
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
MuonR4::MdtSegmentSeedGenerator::numGenerated
unsigned int numGenerated() const
Returns how many seeds have been generated.
Definition: MdtSegmentSeedGenerator.cxx:88
MuonR4::MdtSegmentSeedGenerator::DriftCircleSeed::parameters
SegmentFit::Parameters parameters
Seed parameters.
Definition: MdtSegmentSeedGenerator.h:67
MuonR4::MdtSegmentSeedGenerator::Config::nMdtHitCut
unsigned int nMdtHitCut
How many drift circle hits needs the seed to contain in order to be valid.
Definition: MdtSegmentSeedGenerator.h:41
MuonR4::MdtSegmentSeedGenerator::SignComboType
std::array< int, 2 > SignComboType
Sign combinations to draw the 4 lines tangent to 2 drift circles The first two are indicating whether...
Definition: MdtSegmentSeedGenerator.h:99
vtune_athena.format
format
Definition: vtune_athena.py:14
MuonR4::MdtSegmentSeedGenerator::Config::busyLayerLimit
unsigned int busyLayerLimit
How many drift circles may be on a layer to be used for seeding.
Definition: MdtSegmentSeedGenerator.h:39
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxilliaries::T_ry
double T_ry
Expectation value of T_{y} * r
Definition: MdtSegmentSeedGenerator.h:152
makeComparison.deltaY
int deltaY
Definition: makeComparison.py:44
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonR4::SegmentSeed::tanPhi
double tanPhi() const
Returns the angle from the phi extension.
Definition: SegmentSeed.cxx:31
EventPrimitivesHelpers.h
MuonR4::MdtSegmentSeedGenerator::SeedSolution::solutionSigns
std::vector< int > solutionSigns
Vector of radial signs of the valid hits.
Definition: MdtSegmentSeedGenerator.h:117
MuonR4::driftCov
double driftCov(const CalibratedSpacePoint &dcHit)
Definition: MdtSegmentSeedGenerator.cxx:22
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
MuonR4::MdtSegmentSeedGenerator::config
const Config & config() const
Returns the current seed configuration.
Definition: MdtSegmentSeedGenerator.cxx:37
sincos.h
Helper to simultaneously calculate sin and cos of the same angle.
MuonR4::MdtSegmentSeedGenerator::MdtSegmentSeedGenerator
MdtSegmentSeedGenerator(const std::string &name, const SegmentSeed *segmentSeed, const Config &configuration)
Standard constructor taking the segmentSeed to start with and then few configuration tunes.
Definition: MdtSegmentSeedGenerator.cxx:41
MuonR4::SegmentSeed::positionInChamber
Amg::Vector3D positionInChamber() const
Returns the position of the seed in the sector frame.
Definition: SegmentSeed.cxx:41
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonR4::HitVec
SpacePointPerLayerSorter::HitVec HitVec
Definition: SpacePointPerLayerSorter.cxx:9
athena.value
value
Definition: athena.py:124
MuonR4::MdtSegmentSeedGenerator::estimateAuxillaries
SeedFitAuxilliaries estimateAuxillaries(const DriftCircleSeed &seed) const
Helper function to estimate the auxillary variables that remain constant during the fit.
Definition: MdtSegmentSeedGenerator.cxx:374
MuonR4::MdtSegmentSeedGenerator::SeedSolution
Cache of all solutions seen thus far.
Definition: MdtSegmentSeedGenerator.h:105
ISpacePointCalibrator.h
MuonR4::MdtSegmentSeedGenerator::Config::fastSeedFit
bool fastSeedFit
Toggle whether the seed is rapidly refitted.
Definition: MdtSegmentSeedGenerator.h:56
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
upper
int upper(int c)
Definition: LArBadChannelParser.cxx:49
MuonR4::MdtSegmentSeedGenerator::m_nGenSeeds
unsigned int m_nGenSeeds
Counter on how many seeds have been generated.
Definition: MdtSegmentSeedGenerator.h:221
MuonR4::MdtSegmentSeedGenerator::Config::nMdtLayHitCut
double nMdtLayHitCut
Hit cut based on the fraction of collected tube layers.
Definition: MdtSegmentSeedGenerator.h:44
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
MuonR4::ISpacePointCalibrator::calibrate
virtual CalibSpacePointPtr calibrate(const EventContext &ctx, const SpacePoint *spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const =0
Calibrates a single space point.
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonR4::ISpacePointCalibrator::driftVelocity
virtual double driftVelocity(const EventContext &ctx, const CalibratedSpacePoint &spacePoint) const =0
Returns the drift velocity for a given drift-circle space point.
MuonR4::MdtSegmentSeedGenerator::Config::recalibSeedCircles
bool recalibSeedCircles
Recalibrate the seed drift circles from the initial estimate
Definition: MdtSegmentSeedGenerator.h:52
MuonR4::SegmentFit::makeLine
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
Definition: SegmentFitterEventData.cxx:26
MuonR4::HoughHitType
HoughMaximum::HitType HoughHitType
Definition: MuonHoughDefs.h:18
MuonR4::toString
std::string toString(const CalibratedSpacePoint::Covariance_t &mat)
Returns the matrix in string.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:75
Muon::MdtStatusDriftTime
@ MdtStatusDriftTime
The tube produced a vaild measurement.
Definition: MdtDriftCircleStatus.h:34
MuonR4::SegmentFit::ParamDefs::phi
@ phi
MuonR4::MdtSegmentSeedGenerator::Config::startWithPattern
bool startWithPattern
Try at the first time the pattern seed as candidate.
Definition: MdtSegmentSeedGenerator.h:37
MuonR4::MdtSegmentSeedGenerator::m_lowerHitIndex
std::size_t m_lowerHitIndex
Explicit hit to pick in the selected bottom layer.
Definition: MdtSegmentSeedGenerator.h:213
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxilliaries
Auxillary struct to calculate fit constants.
Definition: MdtSegmentSeedGenerator.h:136
MuonR4::SpacePoint::primaryMeasurement
const xAOD::UncalibratedMeasurement * primaryMeasurement() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:107
CalibratedSpacePoint.h
MuonR4::SegmentFit::dirFromTangents
Amg::Vector3D dirFromTangents(const double tanPhi, const double tanTheta)
Constructs a direction vector from tanPhi & tanTheta.
Definition: SegmentFitterEventData.cxx:23
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxilliaries::T_yz
double T_yz
Expectation value of T_{y} * T_{z}.
Definition: MdtSegmentSeedGenerator.h:148
MuonR4::MdtSegmentSeedGenerator::Config
Configuration switches of the module
Definition: MdtSegmentSeedGenerator.h:29
MuonR4::MdtSegmentSeedGenerator::s_signCombos
constexpr static std::array< SignComboType, 4 > s_signCombos
Definition: MdtSegmentSeedGenerator.h:100
MdtSegmentSeedGenerator.h
MuonR4::MdtSegmentSeedGenerator::Config::fastSegFitWithT0
bool fastSegFitWithT0
Toggle whether an initial t0 fit shall be executed.
Definition: MdtSegmentSeedGenerator.h:58
MuonR4::SegmentFitHelpers::chiSqTermStrip
double chiSqTermStrip(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const SpacePoint &measurement, MsgStream &msg)
Calculates the chi2 contribuation to a linear segment line from an uncalibrated strip measurement.
Definition: SegmentFitHelperFunctions.cxx:74
MuonR4::MdtSegmentSeedGenerator::SeedSolution::theta
double theta
: Theta of the line
Definition: MdtSegmentSeedGenerator.h:107
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonR4::ISpacePointCalibrator::driftAcceleration
virtual double driftAcceleration(const EventContext &ctx, const CalibratedSpacePoint &spacePoint) const =0
Returns the drift acceleration for a given drift-circle space point.
MuonR4::SegmentSeed::tanTheta
double tanTheta() const
Returns the angular coordinate of the eta transform.
Definition: SegmentSeed.cxx:32
MuonR4::MdtSegmentSeedGenerator::m_cfg
Config m_cfg
Definition: MdtSegmentSeedGenerator.h:202
MuonR4::SegmentFitHelpers::chiSqTermMdt
double chiSqTermMdt(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const SpacePoint &measurement, MsgStream &msg)
Calculates the chi2 contribuation to a linear segment line from an uncalibrated Mdt measurement.
Definition: SegmentFitHelperFunctions.cxx:50
MuonR4::MdtSegmentSeedGenerator::SeedSolution::print
std::ostream & print(std::ostream &ostr) const
Definition: MdtSegmentSeedGenerator.cxx:31
MuonR4::SpacePointPerLayerSorter::HitVec
std::vector< const SpacePoint * > HitVec
Definition: SpacePointPerLayerSorter.h:16
MuonR4::MdtSegmentSeedGenerator::Config::thetaRange
std::array< double, 2 > thetaRange
Cut on the theta angle.
Definition: MdtSegmentSeedGenerator.h:31
SegmentFitHelperFunctions.h
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
MuonR4::MdtSegmentSeedGenerator::buildSeed
std::optional< DriftCircleSeed > buildSeed(const EventContext &ctx, const HoughHitType &topHit, const HoughHitType &bottomHit, const SignComboType &signs)
Tries to build the seed from the two hits.
Definition: MdtSegmentSeedGenerator.cxx:169
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonR4::MdtSegmentSeedGenerator::m_upperLayer
std::size_t m_upperLayer
Considered layer to pick the top drift circle from.
Definition: MdtSegmentSeedGenerator.h:209
MuonR4::SegmentSeed::interceptY
double interceptY() const
Returns the intercept coordinate of the eta transform.
Definition: SegmentSeed.cxx:34
MuonR4::SegmentSeed::getHitsInMax
const std::vector< HitType > & getHitsInMax() const
Returns the list of assigned hits.
Definition: SegmentSeed.cxx:37
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:282
MuonR4::MdtSegmentSeedGenerator::SeedSolution::seedHits
HitVec seedHits
Used hits in the seed.
Definition: MdtSegmentSeedGenerator.h:115
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxilliaries::driftSigns
std::vector< int > driftSigns
Vector of drfit signs.
Definition: MdtSegmentSeedGenerator.h:142
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
MuonR4::MdtSegmentSeedGenerator::SeedSolution::dY0
double dY0
: Uncertainty on the intercept
Definition: MdtSegmentSeedGenerator.h:113
MuonR4::MdtSegmentSeedGenerator::Config::hitPullCut
double hitPullCut
Upper cut on the hit chi2 w.r.t.
Definition: MdtSegmentSeedGenerator.h:35
MuonR4::SegmentFit::AxisDefs::eta
@ eta
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
MuonR4::MdtSegmentSeedGenerator::fitDriftCirclesWithT0
void fitDriftCirclesWithT0(const EventContext &ctx, DriftCircleSeed &seed) const
Refine the seed by performing a fast Mdt segment fit with t0 constraint.
Definition: MdtSegmentSeedGenerator.cxx:498
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxilliaries::T_zzyy
double T_zzyy
Expectation value of T_{z}^{2} - T_{y}^{2}.
Definition: MdtSegmentSeedGenerator.h:146
MdtDriftCircle.h
MuonR4::SegmentFit::ParamDefs::time
@ time
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:18
MuonR4::MdtSegmentSeedGenerator::~MdtSegmentSeedGenerator
~MdtSegmentSeedGenerator()
MuonR4::ISpacePointCalibrator::CalibSpacePointPtr
std::unique_ptr< CalibratedSpacePoint > CalibSpacePointPtr
Definition: ISpacePointCalibrator.h:25
MuonR4::SpacePointPerLayerSorter::stripHits
const HitLayVec & stripHits() const
Returns the sorted strip hits.
Definition: SpacePointPerLayerSorter.h:31
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxWithT0
Definition: MdtSegmentSeedGenerator.h:158
MuonR4::SegmentFit::ParamDefs::y0
@ y0
MuonR4::sign
constexpr double sign(const double x)
Returns the sign of a number.
Definition: MatrixUtils.h:11
MuonR4::passRangeCut
constexpr bool passRangeCut(const std::array< double, 2 > &cutRange, const double value)
Definition: MdtSegmentSeedGenerator.cxx:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonGMR4::SpectrometerSector::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the IdHelpeSvc.
Definition: SpectrometerSector.cxx:40
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
MuonR4::SegmentFit::toInt
constexpr int toInt(const ParamDefs p)
Definition: MuonHoughDefs.h:42
MuonR4::MdtSegmentSeedGenerator::DriftCircleSeed::chi2
double chi2
Seed chi2.
Definition: MdtSegmentSeedGenerator.h:73
MuonR4::MdtSegmentSeedGenerator::moveToNextCandidate
void moveToNextCandidate()
Prepares the generator to generate the seed from the next pair of drift circles.
Definition: MdtSegmentSeedGenerator.cxx:91
MuonR4::MdtSegmentSeedGenerator::DriftCircleSeed::nIter
unsigned int nIter
Iterations to obtain the seed.
Definition: MdtSegmentSeedGenerator.h:71
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Amg::dirFromAngles
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
Definition: GeoPrimitivesHelpers.h:299
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::MdtSegmentSeedGenerator::Config::nMaxIter
unsigned int nMaxIter
Maximum number of iterations in the fast segment fit.
Definition: MdtSegmentSeedGenerator.h:60
MuonR4::SpacePoint::positionInChamber
const Amg::Vector3D & positionInChamber() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:119
a
TList * a
Definition: liststreamerinfos.cxx:10
MuonR4::MdtSegmentSeedGenerator::m_segmentSeed
const SegmentSeed * m_segmentSeed
Definition: MdtSegmentSeedGenerator.h:205
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
MuonR4::CalibSpacePointPtr
ISpacePointCalibrator::CalibSpacePointPtr CalibSpacePointPtr
Definition: SpacePointCalibrator.cxx:23
MuonR4::SpacePointPerLayerSorter::mdtHits
const HitLayVec & mdtHits() const
Returns the sorted Mdt hits.
Definition: SpacePointPerLayerSorter.h:23
MuonR4::MdtSegmentSeedGenerator::Config::tightenHitCut
bool tightenHitCut
Once a seed with even more than initially required hits is found, reject all following seeds with les...
Definition: MdtSegmentSeedGenerator.h:47
MuonR4::CalibratedSpacePoint
The calibrated Space point is created during the calibration process.
Definition: CalibratedSpacePoint.h:15
MuonR4::SegmentSeed
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
Definition: SegmentSeed.h:14
MuonR4::MdtSegmentSeedGenerator::m_seenSolutions
std::vector< SeedSolution > m_seenSolutions
Vector caching equivalent solutions to avoid double seeding.
Definition: MdtSegmentSeedGenerator.h:219
MuonR4::MdtSegmentSeedGenerator::Config::interceptRange
std::array< double, 2 > interceptRange
Cut on the intercept range.
Definition: MdtSegmentSeedGenerator.h:33
MuonR4::SegmentSeed::parameters
const Parameters & parameters() const
Returns the parameter array.
Definition: SegmentSeed.cxx:35
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:76
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
MuonR4::MdtSegmentSeedGenerator::DriftCircleSeed
Helper struct from a generated Mdt seed.
Definition: MdtSegmentSeedGenerator.h:65
MuonR4::MdtSegmentSeedGenerator::fitDriftCircles
void fitDriftCircles(DriftCircleSeed &seed) const
Refine the seed by performing a fast Mdt segment fit.
Definition: MdtSegmentSeedGenerator.cxx:418
MuonR4::MdtSegmentSeedGenerator::m_signComboIndex
std::size_t m_signComboIndex
Index of the left-right ambiguity between the circles.
Definition: MdtSegmentSeedGenerator.h:217
MuonR4::MdtSegmentSeedGenerator::Config::precCutOff
double precCutOff
Precision cut off in the fast segment fit.
Definition: MdtSegmentSeedGenerator.h:62
MuonR4::SpacePoint::driftRadius
double driftRadius() const
: Returns the size of the drift radius
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:143
MuonR4::CalibratedSpacePoint::covariance
const Covariance_t & covariance() const
Definition: CalibratedSpacePoint.cxx:33
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
MuonR4::SegmentSeed::directionInChamber
Amg::Vector3D directionInChamber() const
Returns the direction of the seed in the sector frame.
Definition: SegmentSeed.cxx:42
xAOD::MdtDriftCircle_v1
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
Definition: MdtDriftCircle_v1.h:21
MuonR4::SpacePointPerLayerSorter::firstLayerFrom2ndMl
unsigned int firstLayerFrom2ndMl() const
Returns the layer index with hits from the second multilayer
Definition: SpacePointPerLayerSorter.h:39
MuonR4::MdtSegmentSeedGenerator::Config::calibrator
const ISpacePointCalibrator * calibrator
Pointer to the space point calibrator.
Definition: MdtSegmentSeedGenerator.h:54
MuonR4::AmgSymMatrix
const AmgSymMatrix(2) &SpacePoint
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:150
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
MuonR4::MdtSegmentSeedGenerator::m_hitLayers
SpacePointPerLayerSorter m_hitLayers
Definition: MdtSegmentSeedGenerator.h:206
MuonR4::MdtSegmentSeedGenerator::HitVec
SpacePointPerLayerSorter::HitVec HitVec
Definition: MdtSegmentSeedGenerator.h:26
WriteBchToCool.update
update
Definition: WriteBchToCool.py:67
MuonR4::MdtSegmentSeedGenerator::m_lowerLayer
std::size_t m_lowerLayer
Considered layer to pick the bottom drift circle from.
Definition: MdtSegmentSeedGenerator.h:211
MuonR4::SpacePoint::identify
const Identifier & identify() const
: Identifier of the primary measurement
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:140
MuonR4::SegmentFit::ParamDefs::theta
@ theta
MuonR4::MdtSegmentSeedGenerator::SeedFitAuxilliaries::centerOfGrav
Amg::Vector3D centerOfGrav
Tube position center weigthed with inverse covariances.
Definition: MdtSegmentSeedGenerator.h:138
MuonR4::MdtSegmentSeedGenerator::nextSeed
std::optional< DriftCircleSeed > nextSeed(const EventContext &ctx)
returns the next seed in the row
Definition: MdtSegmentSeedGenerator.cxx:129
MuonR4::MdtSegmentSeedGenerator::SeedSolution::Y0
double Y0
Intersecpt of the line.
Definition: MdtSegmentSeedGenerator.h:109