ATLAS Offline Software
EtaHoughTransformAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "EtaHoughTransformAlg.h"
6 
9 
14 
15 namespace MuonR4{
17  ISvcLocator* pSvcLocator)
18  : AthReentrantAlgorithm(name, pSvcLocator) {}
19 
23  ATH_CHECK(m_maxima.initialize());
24  ATH_CHECK(m_idHelperSvc.retrieve());
25  ATH_CHECK(m_visionTool.retrieve(EnableTool{!m_visionTool.empty()}));
26  return StatusCode::SUCCESS;
27 }
28 
29 template <class ContainerType>
32  const ContainerType*& contToPush) const {
33  contToPush = nullptr;
34  if (key.empty()) {
35  ATH_MSG_VERBOSE("No key has been parsed for object "
36  << typeid(ContainerType).name());
37  return StatusCode::SUCCESS;
38  }
39  SG::ReadHandle readHandle{key, ctx};
40  ATH_CHECK(readHandle.isPresent());
41  contToPush = readHandle.cptr();
42  return StatusCode::SUCCESS;
43 }
44 
45 StatusCode EtaHoughTransformAlg::execute(const EventContext& ctx) const {
46 
48  const SpacePointContainer* spacePoints{nullptr};
49  ATH_CHECK(retrieveContainer(ctx, m_spacePointKey, spacePoints));
50 
51  // book the output container
53  ATH_CHECK(writeMaxima.record(std::make_unique<EtaHoughMaxContainer>()));
54 
55  const ActsGeometryContext* gctx{nullptr};
57 
59 
61  preProcess(ctx, *gctx, *spacePoints, data);
62 
66  for (auto& [station, stationHoughBuckets] : data.houghSetups) {
67  // reset the list of maxima
68  for (auto& bucket : stationHoughBuckets) {
69  processBucket(ctx, data, bucket);
70  }
71  for (HoughMaximum& max : data.maxima) {
72  writeMaxima->push_back(std::make_unique<HoughMaximum>(std::move(max)));
73  }
74  data.maxima.clear();
75  }
76  std::stable_sort(writeMaxima->begin(), writeMaxima->end(),
77  [](const HoughMaximum* a, const HoughMaximum* b){
78  return (*a->parentBucket()) < (*b->parentBucket());
79  });
80  return StatusCode::SUCCESS;
81 }
82 void EtaHoughTransformAlg::preProcess(const EventContext& ctx,
83  const ActsGeometryContext& gctx,
84  const SpacePointContainer& spacePoints,
85  HoughEventData& data) const {
86 
87  ATH_MSG_DEBUG("Load " << spacePoints.size() << " space point buckets");
88  for (const SpacePointBucket* bucket : spacePoints) {
89  if (m_visionTool.isEnabled()) {
90  m_visionTool->visualizeBucket(ctx, *bucket, "bucket");
91  }
92  std::vector<HoughSetupForBucket>& buckets = data.houghSetups[bucket->front()->msSector()];
93  HoughSetupForBucket& hs{buckets.emplace_back(bucket)};
94  const Amg::Transform3D globToLoc{hs.bucket->msSector()->globalToLocalTrans(gctx)};
95  Amg::Vector3D leftSide = globToLoc.translation() - (hs.bucket->coveredMin() * Amg::Vector3D::UnitY());
96  Amg::Vector3D rightSide = globToLoc.translation() - (hs.bucket->coveredMax() * Amg::Vector3D::UnitY());
97 
98  // get the average z of our hits and use it to correct our angle estimate
99  double zmin{1.e9}, zmax{-1.e9};
100  for (const std::shared_ptr<MuonR4::SpacePoint> & sp : *bucket) {
101  zmin = std::min(zmin, sp->positionInChamber().z());
102  zmax = std::max(zmax, sp->positionInChamber().z());
103  }
104  const double z = 0.5*(zmin + zmax);
105 
106  // estimate the angle, adding extra tolerance based on our target resolution
107  const double tanThetaLeft = (leftSide.y() - m_targetResoIntercept) / (leftSide.z() - z) - m_targetResoTanTheta;
108  const double tanThetaRight = (rightSide.y() + m_targetResoIntercept) / (rightSide.z() - z) + m_targetResoTanTheta;
109  hs.searchWindowTanAngle = {tanThetaLeft, tanThetaRight};
110  double ymin{1e9}, ymax{-1e9};
111 
114  for (const std::shared_ptr<MuonR4::SpacePoint> & hit : *bucket){
115  // two estimates: For the two extrema of tan(theta) resulting from the guesstimate
116  double y0l = hit->positionInChamber().y() - hit->positionInChamber().z() * tanThetaLeft;
117  double y0r = hit->positionInChamber().y() - hit->positionInChamber().z() * tanThetaRight;
118  // pick the widest envelope
121  }
122  hs.searchWindowIntercept = {ymin, ymax};
123  }
124 }
126  switch (hit->type()){
128  const auto* dc = static_cast<const xAOD::MdtDriftCircle*>(hit->primaryMeasurement());
130  break;
131  }
134  return hit->measuresEta();
135  break;
136  default:
137  break;
138  }
139  return false;
140 }
141 
143  HoughPlaneConfig cfg;
144  cfg.nBinsX = m_nBinsTanTheta;
145  cfg.nBinsY = m_nBinsIntercept;
146  ActsPeakFinderForMuonCfg peakFinderCfg;
147  peakFinderCfg.fractionCutoff = m_peakFractionCutOff;
148  peakFinderCfg.threshold = m_peakThreshold;
149  peakFinderCfg.minSpacingBetweenPeaks = {m_minMaxDistTheta, m_minMaxDistIntercept};
150  data.houghPlane = std::make_unique<HoughPlane>(cfg);
151  data.peakFinder = std::make_unique<ActsPeakFinderForMuon>(peakFinderCfg);
152 }
153 
154 bool EtaHoughTransformAlg::passSeedQuality (const HoughSetupForBucket& currentBucket, const MuonR4::ActsPeakFinderForMuon::Maximum & maximum) const{
155 
156  // helper to check if a space-point is inside a chamber
157  auto isInside = [](const SpacePointBucket::chamberLocation & loc, const Amg::Vector3D & SP){
158  return (loc.yLeft < SP.y() && SP.y() < loc.yRight && loc.zBottom < SP.z() && SP.z() < loc.zTop);
159  };
160 
161  // helper to check if our trajectory traverses a chamber
162  auto passesThrough = [](const SpacePointBucket::chamberLocation & loc, double y0, double tanTheta){
163  double yCross = (y0 + 0.5 * (loc.zBottom+loc.zTop) * tanTheta);
164  return (loc.yLeft < yCross && yCross < loc.yRight);
165  };
166 
167  // determines the local residual when traversing a chamber
168  auto proximity = []( HoughHitType dc, double y0, double tanTheta){
169  return std::min(std::abs(HoughHelpers::Eta::houghParamMdtLeft(tanTheta,dc) - y0), std::abs(HoughHelpers::Eta::houghParamMdtRight(tanTheta,dc) - y0));
170  };
171 
172  // now we propagate along the seed trajectory and collect crossed volumes
173  int expectedPrecisionChambers = 0;
174  int seenPrecisionChambers = 0;
175  bool hasTrig = false;
176  // loop over all chambers in the bucker
177  for (auto & mdtChamber : currentBucket.bucket->chamberLocations()){
178  // skip any we don't touch
179  if (!passesThrough(mdtChamber, maximum.y, maximum.x)) continue;
180  // for MDT multilayers, we increase our expected number of crossed chambers / tubes
181  if (mdtChamber.type == ActsTrk::DetectorType::Mdt){
182  ++expectedPrecisionChambers;
183  }
184  // now we check if we have a compatible measurement on our seed
185  bool hasHit = false;
186  for (auto & SP : maximum.hitIdentifiers){
187  // the hit should be inside the current volume and the local residual should be
188  // compatible with the desired resolution
189  if (isInside(mdtChamber, SP->positionInChamber()) && proximity(SP,maximum.y,maximum.x) < 2. * m_targetResoIntercept){
190  hasHit=true;
191  break;
192  }
193  }
194  // if we find an MDT hit, we increment the counter for seen chambers
195  if (mdtChamber.type == ActsTrk::DetectorType::Mdt){
196  seenPrecisionChambers += (hasHit);
197  }
198  // for trigger hits, we set a flag indicating we have at least one
199  else hasTrig |= hasHit;
200  }
201  // now count the total number of MDT tube layers we collected on our seed
202  std::set<std::pair<int,int>> seenLayers;
203  for (auto & SP : maximum.hitIdentifiers){
205  // apply a compatibility window - enforce hits are at least reasonably close
206  if (proximity(SP,maximum.y,maximum.x) < 2. * m_targetResoIntercept){
207  const xAOD::MdtDriftCircle* dc = static_cast<const xAOD::MdtDriftCircle*>(SP->primaryMeasurement());
208  seenLayers.emplace(dc->readoutElement()->multilayer(), dc->tubeLayer());
209  }
210  }
211  }
212  // compute the minimum number of requested precision layers
213  // the integer division will round down (resulting cut: 2 for single-ML, 4 for dual-ML)
214  int minLayers = seenLayers.size() / 2 + 1;
215  // require 2 precision chambers with measurements, except if we only cross one precision multilayer in total
216  int minSeenPrecisionChambers = (expectedPrecisionChambers > 1) + 1;
217  // if we have at least one trigger hit, we loosen the requirements on precision hits and chambers
218  if (hasTrig) {
219  minLayers -= 1;
220  minSeenPrecisionChambers = 1;
221  }
222 
223  return seenPrecisionChambers >= minSeenPrecisionChambers && (int)seenLayers.size() >= minLayers;
224 }
225 
226 
227 void EtaHoughTransformAlg::processBucket(const EventContext& ctx,
229  HoughSetupForBucket& bucket) const {
231 
232  double chamberCenter = 0.5 * (bucket.searchWindowIntercept.first +
233  bucket.searchWindowIntercept.second);
234  // build a symmetric window around the (geometric) chamber center so that
235  // the bin width is equivalent to our target resolution
236  double searchStart = chamberCenter - 0.5 * data.houghPlane->nBinsY() * m_targetResoIntercept;
237  double searchEnd = chamberCenter + 0.5 * data.houghPlane->nBinsY() * m_targetResoIntercept;
238  // Protection for very wide buckets - if the search space does not cover all
239  // of the bucket, widen the bin size so that we cover everything
240  searchStart = std::min(searchStart, bucket.searchWindowIntercept.first -
242  searchEnd = std::max(searchEnd, bucket.searchWindowIntercept.second +
244  // also treat tan(theta)
245  double tanThetaMean = 0.5 * (bucket.searchWindowTanAngle.first +
246  bucket.searchWindowTanAngle.second);
247  double searchStartTanTheta = tanThetaMean - 0.5 * data.houghPlane->nBinsX() * m_targetResoTanTheta;
248  double searchEndTanTheta = tanThetaMean + 0.5 * data.houghPlane->nBinsX() * m_targetResoTanTheta;
249  searchStartTanTheta = std::min(searchStartTanTheta, bucket.searchWindowTanAngle.first -
251  searchEndTanTheta = std::max(searchEndTanTheta, bucket.searchWindowTanAngle.second +
253 
254  data.currAxisRanges = Acts::HoughTransformUtils::HoughAxisRanges{
255  searchStartTanTheta, searchEndTanTheta, searchStart, searchEnd};
256 
257  data.houghPlane->reset();
258  for (const SpacePointBucket::value_type& hit : *(bucket.bucket)) {
259  fillFromSpacePoint(data, hit.get());
260  }
261  auto maxima = data.peakFinder->findPeaks(*(data.houghPlane), data.currAxisRanges);
262  if (m_visionTool.isEnabled()) {
263  m_visionTool->visualizeAccumulator(ctx, *data.houghPlane, data.currAxisRanges, maxima,
264  "#eta Hough accumulator");
265  }
266  if (maxima.empty()) {
267  ATH_MSG_DEBUG("Station "<<bucket.bucket->msSector()->identString()
268  <<":\n Mean tanTheta was "<<tanThetaMean
269  << " and my intercept "<<chamberCenter
270  <<", with hits in the bucket in "<< bucket.bucket->coveredMin()
271  <<" - "<<bucket.bucket->coveredMax()
272  <<". The bucket found a search range of ("
273  <<bucket.searchWindowTanAngle.first<<" - "
274  <<bucket.searchWindowTanAngle.second<<") and ("
275  <<bucket.searchWindowIntercept.first<<" - "
276  <<bucket.searchWindowIntercept.second
277  <<") , and my final search range is ["
278  <<searchStartTanTheta<<" - "<<searchEndTanTheta
279  <<"] and ["<<searchStart<<" - "<<searchEnd
280  <<"] with "<<m_nBinsTanTheta<<" and "
281  <<m_nBinsIntercept<<" bins.");
282  return;
283  }
284 
285  // remember used hits - assign only to first maximum when counting
286  // precision hits
287  std::set<HoughHitType> seenHits;
288 
289  // now clean up and potentially write the maxima
290  for (const auto& max : maxima) {
291 
292  // precision hit cut, using only the measurements on the hough maximum
293  unsigned int nPrec{0};
294  auto toBins = [&data](double x, double y){
295  return std::make_pair(
296  Acts::HoughTransformUtils::binIndex(data.currAxisRanges.xMin, data.currAxisRanges.xMax, data.houghPlane->nBinsX(), x),
297  Acts::HoughTransformUtils::binIndex(data.currAxisRanges.yMin, data.currAxisRanges.yMax, data.houghPlane->nBinsY(), y)
298  );
299  };
300  auto accumulatorBins = toBins(max.x,max.y);
301  for (const HoughHitType& hit : data.houghPlane->hitIds(accumulatorBins.first, accumulatorBins.second)) {
302  auto res = seenHits.emplace(hit);
303  if (res.second){
304  nPrec += isPrecisionHit(hit);
305  }
306  }
307  if (nPrec < m_nPrecHitCut) {
308  ATH_MSG_VERBOSE("The maximum did not pass the precision hit cut");
309  continue;
310  }
311 
312  // convert the set of hit identifiers from ACTS to the vector we need later
313  std::vector<HoughHitType> hitList;
314  hitList.reserve(max.hitIdentifiers.size());
315  for (auto & hit : max.hitIdentifiers){
316  hitList.push_back(hit);
317  }
318 
319  // apply a seed quality cut.
320  if (!passSeedQuality(bucket,max)) {
321  // if seed visualisation is enabled, draw the rejected seed
322  if (m_visionTool.isEnabled()) {
323  const HoughMaximum& houghMax{max.x, max.y, (double)hitList.size(), std::move(hitList), bucket.bucket};
324  const SegmentSeed seed{houghMax};
327  for (auto & chamber : bucket.bucket->chamberLocations()){
328  primitives.push_back(MuonValR4::drawBox(chamber.yLeft, chamber.zBottom, chamber.yRight, chamber.zTop, kGray+2));
329  }
330 
331  primitives.push_back(MuonValR4::drawLabel(std::format("Missed seed - score {}, layer score {}, comprising {} measurements ",data.houghPlane->nHits(accumulatorBins.first, accumulatorBins.second),data.houghPlane->nLayers(accumulatorBins.first, accumulatorBins.second),hitList.size()),0.05,0.03,12));
332 
333  primitivesForAcc.push_back(MuonValR4::drawLabel(std::format("Missed seed - score {}, layer score {}, comprising {} measurements ",data.houghPlane->nHits(accumulatorBins.first, accumulatorBins.second),data.houghPlane->nLayers(accumulatorBins.first, accumulatorBins.second),hitList.size()),0.05,0.03,12));
334  m_visionTool->visualizeAccumulator(ctx, *data.houghPlane, data.currAxisRanges, {max},
335  "MissedAccumulator", std::move(primitivesForAcc));
336  m_visionTool->visualizeSeed(ctx, seed, "Missed seed",std::move(primitives));
337  }
338  continue;
339  }
340 
341  // this seed looks good! Let's finalise it
342  size_t nHits = hitList.size();
343  // add phi measurements - will be filtered for compatibility in separate algorithm
344  extendWithPhiHits(hitList, bucket);
345  // sort hits by layer
346  sortByLayer(hitList);
347  // create hough maximum instance and add it to the event data for later writing!
348  const HoughMaximum& houghMax{data.maxima.emplace_back(max.x, max.y, nHits, std::move(hitList), bucket.bucket)};
349 
350  // if desired, visualise the result
351  if (m_visionTool.isEnabled()) {
352  const SegmentSeed seed{houghMax};
355  for (auto & chamber : bucket.bucket->chamberLocations()){
356  primitives.push_back(MuonValR4::drawBox(chamber.yLeft, chamber.zBottom, chamber.yRight, chamber.zTop, kGray+2));
357  }
358 
359  primitives.push_back(MuonValR4::drawLabel(std::format("score {}, layer score {}, comprising {} measurements. wx = {:.2f}, wy = {:.1f} ",data.houghPlane->nHits(accumulatorBins.first, accumulatorBins.second),data.houghPlane->nLayers(accumulatorBins.first, accumulatorBins.second),hitList.size(), max.wx, max.wy),0.05,0.03,12));
360 
361  primitivesForAcc.push_back(MuonValR4::drawLabel(std::format("score {}, layer score {}, comprising {} measurements. wx = {:.2f}, wy = {:.1f} ",data.houghPlane->nHits(accumulatorBins.first, accumulatorBins.second),data.houghPlane->nLayers(accumulatorBins.first, accumulatorBins.second),hitList.size(), max.wx / m_targetResoTanTheta, max.wy / m_targetResoIntercept),0.05,0.03,12));
362 
363  m_visionTool->visualizeAccumulator(ctx, *data.houghPlane, data.currAxisRanges, {max},"#eta Hough accumulator", std::move(primitivesForAcc));
364  m_visionTool->visualizeSeed(ctx, seed, "#eta-HoughSeed", std::move(primitives));
365  }
366  }
367 }
369 
370  using namespace std::placeholders;
371  double w = 1.0;
372  // downweight RPC measurements in the barrel relative to MDT
374  w = 0.5;
375  }
377  // if invalid time, do not count this hit towards a potential peak.
378  // The hits will still be included in a potential maximum formed by valid hits,
379  // for later recovery.
380  if (!isPrecisionHit(SP)) w = 0;
381  const auto* dc = static_cast<const xAOD::MdtDriftCircle*>(SP->primaryMeasurement());
382  // dummy index for precision layer counting within the hough plane
383  const unsigned precisionLayerIndex = (dc->readoutElement()->multilayer() * 10 + dc->tubeLayer());
384  data.houghPlane->fill<HoughHitType>(SP, data.currAxisRanges, HoughHelpers::Eta::houghParamMdtLeft,
385  std::bind(HoughHelpers::Eta::houghWidthMdt, _1, _2, m_targetResoIntercept), SP, precisionLayerIndex, w);
386  data.houghPlane->fill<HoughHitType>(SP, data.currAxisRanges, HoughHelpers::Eta::houghParamMdtRight,
387  std::bind(HoughHelpers::Eta::houghWidthMdt, _1, _2, m_targetResoIntercept), SP, precisionLayerIndex, w);
388  } else {
389  if (SP->measuresEta()) {
390  data.houghPlane->fill<HoughHitType>(SP, data.currAxisRanges, HoughHelpers::Eta::houghParamStrip,
391  std::bind(HoughHelpers::Eta::houghWidthStrip, _1, _2, m_targetResoIntercept), SP, 0, w * (
392  m_downWeightMultiplePrd ? 1.0 / SP->nEtaInstanceCounts() : 1.));
393  }
394  }
395 }
396 void EtaHoughTransformAlg::extendWithPhiHits(std::vector<HoughHitType>& hitList,
397  HoughSetupForBucket& bucket) const {
398  for (const SpacePointBucket::value_type& hit : *bucket.bucket) {
399  if (!hit->measuresEta()) {
400  hitList.push_back(hit.get());
401  }
402  }
403 }
404 }
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
ymin
double ymin
Definition: listroot.cxx:63
MuonR4::EtaHoughTransformAlg::m_minMaxDistIntercept
DoubleProperty m_minMaxDistIntercept
Definition: EtaHoughTransformAlg.h:103
MuonR4::SpacePoint::type
xAOD::UncalibMeasType type() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:131
MuonR4::EtaHoughTransformAlg::m_downWeightMultiplePrd
BooleanProperty m_downWeightMultiplePrd
Definition: EtaHoughTransformAlg.h:115
MuonR4::SpacePointBucket
: The muon space point bucket represents a collection of points that will bre processed together in t...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:21
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MuonR4::SpacePointBucket::msSector
const MuonGMR4::SpectrometerSector * msSector() const
returns th associated muonChamber
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:36
MuonR4::EtaHoughTransformAlg::m_targetResoIntercept
DoubleProperty m_targetResoIntercept
Definition: EtaHoughTransformAlg.h:91
MuonR4::SpacePointBucket::coveredMin
double coveredMin() const
lower interval value covered by the bucket
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:32
MuonGMR4::SpectrometerSector::chamberLocation::yLeft
double yLeft
Definition: SpectrometerSector.h:49
calibdata.chamber
chamber
Definition: calibdata.py:32
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:169
VisualizationHelpers.h
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonR4::EtaHoughTransformAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: EtaHoughTransformAlg.h:123
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
SegmentSeed.h
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
MuonR4::HoughEventData_impl::HoughSetupForBucket::searchWindowIntercept
std::pair< double, double > searchWindowIntercept
Definition: HoughEventData.h:46
MuonGMR4::SpectrometerSector::chamberLocation::zTop
double zTop
Definition: SpectrometerSector.h:52
MuonValR4::drawBox
std::unique_ptr< TBox > drawBox(const Amg::Vector3D &boxCenter, const double boxWidth, const double boxHeight, const int color=kGreen+2, const int fillStyle=hollowFilling, const int view=objViewEta)
Creates a box for drawing, e.g strip measurements.
Definition: VisualizationHelpers.cxx:32
HoughHelperFunctions.h
MuonR4::EtaHoughTransformAlg::passSeedQuality
bool passSeedQuality(const HoughSetupForBucket &currentBucket, const MuonR4::ActsPeakFinderForMuon::Maximum &maximum) const
apply quality cuts on a given maximum
Definition: EtaHoughTransformAlg.cxx:154
MuonR4::ActsPeakFinderForMuonCfg
Acts::HoughTransformUtils::PeakFinders::IslandsAroundMaxConfig ActsPeakFinderForMuonCfg
Definition: MuonHoughDefs.h:26
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::ReadHandleKey< ContainerType >
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
SpectrometerSector.h
x
#define x
MuonGMR4::SpectrometerSector::identString
std::string identString() const
Returns a string encoding the chamber index & the sector of the MS sector.
Definition: SpectrometerSector.cxx:45
MuonValR4::drawLabel
std::unique_ptr< TLatex > drawLabel(const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18)
Create a TLatex label,.
Definition: VisualizationHelpers.cxx:23
Muon::MdtStatusDriftTime
@ MdtStatusDriftTime
The tube produced a vaild measurement.
Definition: MdtDriftCircleStatus.h:34
MuonR4::EtaHoughTransformAlg::initialize
virtual StatusCode initialize() override
Definition: EtaHoughTransformAlg.cxx:20
ReadCondHandle.h
MuonR4::EtaHoughTransformAlg::m_minSigmasSearchTanTheta
DoubleProperty m_minSigmasSearchTanTheta
Definition: EtaHoughTransformAlg.h:94
MuonR4::EtaHoughTransformAlg::m_visionTool
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Definition: EtaHoughTransformAlg.h:125
xAOD::MdtDriftCircle_v1::readoutElement
const MuonGMR4::MdtReadoutElement * readoutElement() const
Retrieve the associated MdtReadoutElement.
MuonR4::sortByLayer
void sortByLayer(std::vector< const SpacePoint * > &spacePoints)
Sorts the space points in a vector by z.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:80
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
MuonR4::HoughHelpers::Eta::houghWidthStrip
double houghWidthStrip(double tanTheta, const MuonR4::HoughHitType &strip, double targetReso)
Uncertainty parametrisation for strip measurements.
Definition: HoughHelperFunctions.cxx:27
EtaHoughTransformAlg.h
MuonR4::SpacePoint::primaryMeasurement
const xAOD::UncalibratedMeasurement * primaryMeasurement() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:107
MuonR4::SpacePointBucket::coveredMax
double coveredMax() const
upper interval value covered by the bucket
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:34
MuonGMR4::MdtReadoutElement::multilayer
unsigned int multilayer() const
Returns the multi layer of the MdtReadoutElement.
MuonR4::HoughHelpers::Eta::houghWidthMdt
double houghWidthMdt(double tanTheta, const MuonR4::HoughHitType &dc, double targetReso)
uncertainty parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:21
MuonR4::EtaHoughTransformAlg::m_minMaxDistTheta
DoubleProperty m_minMaxDistTheta
Definition: EtaHoughTransformAlg.h:101
MuonR4::EtaHoughTransformAlg::m_peakThreshold
DoubleProperty m_peakThreshold
Definition: EtaHoughTransformAlg.h:99
xAOD::UncalibratedMeasurement_v1::type
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
MuonR4::HoughEventData_impl::HoughSetupForBucket::bucket
const SpacePointBucket * bucket
Definition: HoughEventData.h:42
CreatePhysValWebPage.hs
hs
Definition: CreatePhysValWebPage.py:107
z
#define z
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
UtilFunctions.h
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonR4::EtaHoughTransformAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: EtaHoughTransformAlg.cxx:45
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:169
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonR4::EtaHoughTransformAlg::m_nPrecHitCut
UnsignedIntegerProperty m_nPrecHitCut
Definition: EtaHoughTransformAlg.h:107
IDPVM::binIndex
unsigned int binIndex(const T &val, const std::vector< T > &partitions)
general utility function to return bin index given a value and the upper endpoints of each bin
Definition: InDetPhysValMonitoringUtilities.h:43
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
MuonR4::EtaHoughTransformAlg::processBucket
void processBucket(const EventContext &ctx, HoughEventData &data, HoughSetupForBucket &currentBucket) const
process a bucket.
Definition: EtaHoughTransformAlg.cxx:227
MuonR4::HoughHelpers::Eta::houghParamMdtLeft
double houghParamMdtLeft(double tanTheta, const MuonR4::HoughHitType &dc)
left-side straight line parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:9
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
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::EtaHoughTransformAlg::m_nBinsIntercept
IntegerProperty m_nBinsIntercept
Definition: EtaHoughTransformAlg.h:112
MuonR4::HoughEventData_impl::HoughSetupForBucket
Hough transform configuration for one bucket of the search space.
Definition: HoughEventData.h:40
MuonR4::SegmentFit::ParamDefs::y0
@ y0
ActsTrk::DetectorType::Mdt
@ Mdt
MuonSpectrometer.
MuonValR4::IPatternVisualizationTool::PrimitiveVec
std::vector< PrimitivePtr > PrimitiveVec
Definition: IPatternVisualizationTool.h:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MuonR4::EtaHoughTransformAlg::EtaHoughTransformAlg
EtaHoughTransformAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: EtaHoughTransformAlg.cxx:16
WriteCaloSwCorrections.cfg
cfg
Definition: WriteCaloSwCorrections.py:23
MuonR4::EtaHoughTransformAlg::m_peakFractionCutOff
DoubleProperty m_peakFractionCutOff
Definition: EtaHoughTransformAlg.h:105
MuonR4::EtaHoughTransformAlg::m_maxima
SG::WriteHandleKey< EtaHoughMaxContainer > m_maxima
Definition: EtaHoughTransformAlg.h:121
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::SpacePointBucket::chamberLocations
const std::vector< chamberLocation > & chamberLocations() const
returns the list of all tracking chambers in the bucket for fast navigation
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:84
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
MuonR4::EtaHoughTransformAlg::preProcess
void preProcess(const EventContext &ctx, const ActsGeometryContext &gctx, const SpacePointContainer &spacePoints, HoughEventData &data) const
pre-processing method called once per event.
Definition: EtaHoughTransformAlg.cxx:82
a
TList * a
Definition: liststreamerinfos.cxx:10
MuonR4::HoughMaximum
Data class to represent an eta maximum in hough space.
Definition: HoughMaximum.h:14
MuonR4::EtaHoughTransformAlg::extendWithPhiHits
void extendWithPhiHits(std::vector< HoughHitType > &hitList, HoughSetupForBucket &bucket) const
extend a maximum with all compatible (pure) phi hits.
Definition: EtaHoughTransformAlg.cxx:396
MuonR4::EtaHoughTransformAlg::m_targetResoTanTheta
DoubleProperty m_targetResoTanTheta
Definition: EtaHoughTransformAlg.h:89
y
#define y
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
MuonR4::SpacePoint::measuresEta
bool measuresEta() const
: Does the space point contain an eta measurement
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:137
MuonR4::EtaHoughTransformAlg::m_spacePointKey
SG::ReadHandleKey< SpacePointContainer > m_spacePointKey
Definition: EtaHoughTransformAlg.h:119
MuonR4::HoughEventData_impl::HoughSetupForBucket::searchWindowTanAngle
std::pair< double, double > searchWindowTanAngle
Definition: HoughEventData.h:48
MuonR4::EtaHoughTransformAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: EtaHoughTransformAlg.h:116
MuonR4::EtaHoughTransformAlg::isPrecisionHit
static bool isPrecisionHit(const HoughHitType &hit)
Returns whether the hit is a precision hit or not.
Definition: EtaHoughTransformAlg.cxx:125
MuonR4::SegmentSeed
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
Definition: SegmentSeed.h:14
MuonR4::EtaHoughTransformAlg::m_nBinsTanTheta
IntegerProperty m_nBinsTanTheta
Definition: EtaHoughTransformAlg.h:110
xAOD::MdtDriftCircle_v1::status
MdtDriftCircleStatus status() const
Returns the status of the measurement.
MuonR4::EtaHoughTransformAlg::prepareHoughPlane
void prepareHoughPlane(HoughEventData &data) const
prepare the accumulator and the peak finder once per event
Definition: EtaHoughTransformAlg.cxx:142
MuonR4::EtaHoughTransformAlg::retrieveContainer
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< ContainerType > &key, const ContainerType *&contToPush) const
Helper method to fetch data from StoreGate.
Definition: EtaHoughTransformAlg.cxx:30
MuonGMR4::SpectrometerSector::chamberLocation::yRight
double yRight
Definition: SpectrometerSector.h:50
MuonR4::HoughHelpers::Eta::houghParamMdtRight
double houghParamMdtRight(double tanTheta, const MuonR4::HoughHitType &dc)
right-side straight line parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:13
xAOD::MdtDriftCircle_v1::tubeLayer
uint8_t tubeLayer() const
Returns the layer number of the measurement (1-4)
MuonGMR4::SpectrometerSector::chamberLocation::zBottom
double zBottom
Definition: SpectrometerSector.h:51
MuonR4::HoughHelpers::Eta::houghParamStrip
double houghParamStrip(double tanTheta, const MuonR4::HoughHitType &strip)
straight line parametrisation for strip detector measurements
Definition: HoughHelperFunctions.cxx:17
xAOD::MdtDriftCircle_v1
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
Definition: MdtDriftCircle_v1.h:21
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
MuonGMR4::SpectrometerSector::chamberLocation
: Helper struct for fast approximate navigation.
Definition: SpectrometerSector.h:48
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
ymax
double ymax
Definition: listroot.cxx:64
MuonR4::HoughEventData_impl
Templated event data class for the phase-2 muon hough transform.
Definition: HoughEventData.h:22
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MuonR4::EtaHoughTransformAlg::fillFromSpacePoint
void fillFromSpacePoint(HoughEventData &data, const MuonR4::HoughHitType &SP) const
fill the accumulator from a given space point.
Definition: EtaHoughTransformAlg.cxx:368
MuonR4::EtaHoughTransformAlg::m_minSigmasSearchIntercept
DoubleProperty m_minSigmasSearchIntercept
Definition: EtaHoughTransformAlg.h:97