ATLAS Offline Software
CombinatorialNSWSeedFinderAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
10 
11 
14 
17 
19 
20 #include "Acts/Seeding/CombinatorialSeedSolver.hpp"
21 
22 #include <ranges>
23 #include <format>
24 
25 using namespace Acts::Experimental::CombinatorialSeedSolver;
26 namespace {
27  inline const MuonGMR4::StripDesign& getDesign(const MuonR4::SpacePoint& sp) {
29  const auto* prd = static_cast<const xAOD::MMCluster*>(sp.primaryMeasurement());
30  return prd->readoutElement()->stripLayer(prd->measurementHash()).design();
31  } else if (sp.type() == xAOD::UncalibMeasType::sTgcStripType) {
32  const auto* prd = static_cast<const xAOD::sTgcMeasurement*>(sp.primaryMeasurement());
33  const auto* re = prd->readoutElement();
34  switch(prd->channelType()) {
36  return re->stripDesign(prd->measurementHash());
37  case sTgcIdHelper::Wire:
38  return re->wireDesign(prd->measurementHash());
39  case sTgcIdHelper::Pad:
40  return re->padDesign(prd->measurementHash());
41  }
42  }
43  THROW_EXCEPTION("Invalid space point for design retrival "<<sp.msSector()->idHelperSvc()->toString(sp.identify()));
44  }
45  inline double stripHalfLength(const MuonR4::SpacePoint& sp) {
46  const auto& design = getDesign(sp);
48  const auto* prd = static_cast<const xAOD::MMCluster*>(sp.primaryMeasurement());
49  return 0.5* design.stripLength(prd->channelNumber());
50  }
51  return 0.;
52  }
53 }
54 
55 namespace MuonR4 {
56 
57 using namespace SegmentFit;
58 constexpr unsigned int minLayers{4};
59 
61  ATH_CHECK(m_geoCtxKey.initialize());
62  ATH_CHECK(m_etaKey.initialize());
63  ATH_CHECK(m_writeKey.initialize());
64  ATH_CHECK(m_idHelperSvc.retrieve());
65  ATH_CHECK(m_visionTool.retrieve(DisableTool{m_visionTool.empty()}));
66 
67  if (!(m_idHelperSvc->hasMM() || m_idHelperSvc->hasSTGC())) {
68  ATH_MSG_ERROR("MM or STGC not part of initialized detector layout");
69  return StatusCode::FAILURE;
70  }
71 
72  return StatusCode::SUCCESS;
73 }
74 
76  CombinatorialNSWSeedFinderAlg::emptyBookKeeper(const HitLayVec& sortedSp) const{
77  UsedHitMarker_t emptyKeeper(sortedSp.size());
78  for (std::size_t l = 0; l < sortedSp.size(); ++l) {
79  emptyKeeper[l].resize(sortedSp[l].size(), 0);
80  }
81  return emptyKeeper;
82 }
83 
85  CombinatorialNSWSeedFinderAlg::classifyStrip(const SpacePoint& sp) const{
86 
88  const auto& design = getDesign(sp);
89  if (!design.hasStereoAngle()) {
90  return StripOrient::X;
91  }
92  return design.stereoAngle() > 0. ? StripOrient::U : StripOrient::V;
93  } else if (sp.type() == xAOD::UncalibMeasType::sTgcStripType) {
94  const auto* prd = static_cast<const xAOD::sTgcMeasurement*>(sp.primaryMeasurement());
95  if (sp.dimension() == 2) {
96  return StripOrient::C;
97  }
98  return prd->channelType() == sTgcIdHelper::Strip ? StripOrient::X : StripOrient::P;
99 
100  }
101  ATH_MSG_WARNING("Cannot classify orientation of "<<m_idHelperSvc->toString(sp.identify()));
102  return StripOrient::Unknown;
103 }
105  CombinatorialNSWSeedFinderAlg::hitFromIPCorridor(const SpacePoint& testHit,
106  const Amg::Vector3D& beamSpotPos,
107  const Amg::Vector3D& dirEstUp,
108  const Amg::Vector3D& dirEstDn) const{
109 
110  const Amg::Vector3D estPlaneArrivalUp = SeedingAux::extrapolateToPlane(beamSpotPos, dirEstUp, testHit);
111  const Amg::Vector3D estPlaneArrivalDn = SeedingAux::extrapolateToPlane(beamSpotPos, dirEstDn, testHit);
112 
113  bool below{true}, above{true};
114  switch (classifyStrip(testHit)) {
115  using enum StripOrient;
116  case U:
117  case V:{
118  const double halfLength = 0.5* stripHalfLength(testHit);
120  const Amg::Vector3D leftEdge = testHit.localPosition() - halfLength * testHit.sensorDirection();
121  const Amg::Vector3D rightEdge = testHit.localPosition() + halfLength * testHit.sensorDirection();
122 
124  below = estPlaneArrivalDn.y() > std::max(leftEdge.y(), rightEdge.y());
126  above = estPlaneArrivalUp.y() < std::min(leftEdge.y(), rightEdge.y());
127  break;
128  } case X:
129  case C: {
131  const double hY = testHit.localPosition().y();
132  below = estPlaneArrivalDn.y() > hY;
134  above = estPlaneArrivalUp.y() < hY;
135  break;
136  }
137  case P:{
138  break;
139  }
140  case Unknown:{
141  break;
142  }
143 
144  }
145  ATH_MSG_VERBOSE("Hit " << m_idHelperSvc->toString(testHit.identify())
146  << (below || above ? " is outside the window" : " is inside the window"));
147  if(below) {
148  return HitWindow::tooLow;
149  }
150  if(above) {
151  return HitWindow::tooHigh;
152  }
153  return HitWindow::inside;
154 };
155 
157 #define TEST_HIT_CORRIDOR(LAYER, HIT_ITER, START_LAYER) \
158 { \
159  const SpacePoint* testMe = combinatoricLayers[LAYER].get()[HIT_ITER]; \
160  if (usedHits[LAYER].get()[HIT_ITER]) { \
161  ATH_MSG_VERBOSE(__func__<<":"<<__LINE__<<" - " \
162  <<m_idHelperSvc->toString(testMe->identify()) \
163  <<" already used in good seed." ); \
164  continue; \
165  } \
166  const HitWindow inWindow = hitFromIPCorridor(*testMe, beamSpot, dirEstUp, dirEstDn); \
167  if(inWindow == HitWindow::tooHigh) { \
168  ATH_MSG_VERBOSE(__func__<<":"<<__LINE__<<" - Hit " \
169  <<m_idHelperSvc->toString(testMe->identify()) \
170  <<" is beyond the corridor. Break loop"); \
171  break; \
172  } else if (inWindow == HitWindow::tooLow) { \
173  START_LAYER = HIT_ITER + 1; \
174  ATH_MSG_VERBOSE(__func__<<":"<<__LINE__<<" - Hit " \
175  <<m_idHelperSvc->toString(testMe->identify()) \
176  <<" is still below the corridor. Update start to " \
177  <<START_LAYER); \
178  continue; \
179  } \
180 }
181 
182 void CombinatorialNSWSeedFinderAlg::constructPrelimnarySeeds(const Amg::Vector3D& beamSpot,
183  const HitLaySpan_t& combinatoricLayers,
184  const UsedHitSpan_t& usedHits,
185  InitialSeedVec_t& seedHitsFromLayers) const {
187  seedHitsFromLayers.clear();
188  std::size_t maxSize{1};
189  for (const HitVec& hitVec : combinatoricLayers) {
190  maxSize = maxSize * hitVec.size();
191  }
192  seedHitsFromLayers.reserve(maxSize);
193 
194 
195  unsigned int iterLay0{0}, iterLay1{0}, iterLay2{0}, iterLay3{0};
196  unsigned int startLay1{0}, startLay2{0}, startLay3{0};
197 
198  for( ; iterLay0 < combinatoricLayers[0].get().size() ; ++iterLay0){
200  if (usedHits[0].get()[iterLay0]) {
201  continue;
202  }
203  const SpacePoint* hit0 = combinatoricLayers[0].get()[iterLay0];
205  const Amg::Vector3D initSeedDir{(beamSpot - hit0->localPosition()).unit()};
206  const Amg::Vector3D dirEstUp = Amg::dirFromAngles(initSeedDir.phi(), initSeedDir.theta() - m_windowTheta);
207  const Amg::Vector3D dirEstDn = Amg::dirFromAngles(initSeedDir.phi(), initSeedDir.theta() + m_windowTheta);
208 
209  ATH_MSG_VERBOSE("Reference hit: "<<m_idHelperSvc->toString(hit0->identify())
210  <<", position: "<<Amg::toString(hit0->localPosition())
211  <<", seed dir: "<<Amg::toString(initSeedDir)
212  <<", seed plane: "<<Amg::toString(SeedingAux::extrapolateToPlane(beamSpot, initSeedDir, *hit0)));
214  for( iterLay1 = startLay1; iterLay1 < combinatoricLayers[1].get().size() ; ++iterLay1){
215  TEST_HIT_CORRIDOR(1, iterLay1, startLay1);
216  for( iterLay2 = startLay2; iterLay2 < combinatoricLayers[2].get().size() ; ++iterLay2){
217  TEST_HIT_CORRIDOR(2, iterLay2, startLay2);
218  for( iterLay3 = startLay3; iterLay3 < combinatoricLayers[3].get().size(); ++iterLay3){
219  TEST_HIT_CORRIDOR(3, iterLay3, startLay3);
220  seedHitsFromLayers.emplace_back(std::array{hit0, combinatoricLayers[1].get()[iterLay1],
221  combinatoricLayers[2].get()[iterLay2],
222  combinatoricLayers[3].get()[iterLay3]});
223  }
224  }
225  }
226  }
227 }
228 #undef TEST_HIT_CORRIDOR
229 
231  CombinatorialNSWSeedFinderAlg::extendHits(const Amg::Vector3D& startPos,
232  const Amg::Vector3D& direction,
233  const HitLaySpan_t& extensionLayers,
234  const UsedHitSpan_t& usedHits) const {
235 
236  //the hits we need to return to extend the segment seed
237  HitVec combinatoricHits;
238 
239  //the stripHitsLayers are already the unused ones - only use for the extension
240  for (std::size_t i = 0; i < extensionLayers.size(); ++i) {
241  const HitVec& layer{extensionLayers[i].get()};
242  const Amg::Vector3D extrapPos = SeedingAux::extrapolateToPlane(startPos, direction, *layer.front());
243 
244  unsigned int indexOfHit = layer.size() + 1;
245  unsigned int triedHit{0};
246  double minPull{std::numeric_limits<double>::max()};
247 
248  // loop over the hits on the same layer
249  for (unsigned int j = 0; j < layer.size(); ++j) {
250  if (usedHits[i].get().at(j)) {
251  continue;
252  }
253  auto hit = layer.at(j);
254  const double pull = std::sqrt(SeedingAux::chi2Term(extrapPos, direction, *hit));
255  ATH_MSG_VERBOSE("Trying extension with hit " << m_idHelperSvc->toString(hit->identify()));
256 
257  //find the hit with the minimum pull (check at least one hit after we have increasing pulls)
258  if (pull > minPull) {
259  triedHit+=1;
260  continue;
261  }
262 
263  if(triedHit>1){
264  break;
265  }
266 
267  indexOfHit = j;
268  minPull = pull;
269  }
270 
271  // complete the seed with the extended hits
272  if (minPull < m_minPullThreshold) {
273  const auto* bestCand = layer.at(indexOfHit);
274  ATH_MSG_VERBOSE("Extension successfull - hit" << m_idHelperSvc->toString(bestCand->identify())
275  <<", pos: "<<Amg::toString(bestCand->localPosition())
276  <<", dir: "<<Amg::toString(bestCand->sensorDirection())<<" found with pull "<<minPull);
277  combinatoricHits.push_back(bestCand);
278  }
279  }
280  return combinatoricHits;
281 }
282 
283 std::unique_ptr<SegmentSeed>
284  CombinatorialNSWSeedFinderAlg::buildSegmentSeed(const InitialSeed_t& initialSeed,
285  const AmgSymMatrix(2)& bMatrix,
286  const HoughMaximum& max,
287  const HitLaySpan_t& extensionLayers,
288  const UsedHitSpan_t& usedHits) const {
289 
290  std::array<double, 4> params = defineParameters(bMatrix, initialSeed);
291 
292  const auto [segPos, direction] = seedSolution(initialSeed, params);
293 
294  // check the consistency of the parameters - expected to lay in the strip's
295  // length
296  for (std::size_t i = 0; i < 4; ++i) {
297  const double halfLength = stripHalfLength(*initialSeed[i]);
298 
299  if (std::abs(params[i]) > halfLength) {
300  ATH_MSG_VERBOSE("Seed Rejection: Invalid seed - outside of the strip's length");
301  return nullptr;
302  }
303  }
304  double tanPhi = houghTanPhi(direction);
305  double tanTheta = houghTanTheta(direction);
306 
307  double interceptX = segPos.x();
308  double interceptY = segPos.y();
309 
310 
311  // extend the seed to the segment -- include hits from the other layers too
312  auto extendedHits = extendHits(segPos, direction, extensionLayers, usedHits);
313  HitVec hits{initialSeed.begin(),initialSeed.end()};
314  hits.insert(hits.end(), extendedHits.begin(), extendedHits.end());
315  return std::make_unique<SegmentSeed>(tanTheta, interceptY, tanPhi,
316  interceptX, hits.size(),
317  std::move(hits), max.parentBucket());
318 }
319 
320 
321 std::vector<std::unique_ptr<SegmentSeed>>
322 CombinatorialNSWSeedFinderAlg::findSeedsFromMaximum(const HoughMaximum &max, const ActsGeometryContext &gctx) const {
323  // first sort the hits per layer from the maximum
324  SpacePointPerLayerSplitter hitLayers{max.getHitsInMax()};
325 
326  const HitLayVec& stripHitsLayers{hitLayers.stripHits()};
327  const std::size_t layerSize = stripHitsLayers.size();
328 
329  std::vector<std::unique_ptr<SegmentSeed>> seeds{};
330 
331 
332  if (layerSize < minLayers) {
333  ATH_MSG_VERBOSE("Not enough layers to build a seed");
334  return seeds;
335  }
336 
337 
338  if (m_visionTool.isEnabled()) {
340  const auto truthHits = getMatchingSimHits(max.getHitsInMax());
341  constexpr double legX{0.2};
342  double legY{0.8};
343  for (const SpacePoint* sp : max.getHitsInMax()) {
344  const auto* mmClust = static_cast<const xAOD::MMCluster*>(sp->primaryMeasurement());
345  const xAOD::MuonSimHit* simHit = getTruthMatchedHit(*mmClust);
346  if (!simHit || !MC::isMuon(simHit)) continue;
347  const MuonGMR4::MmReadoutElement* reEle = mmClust->readoutElement();
348  const MuonGMR4::StripDesign& design = reEle->stripLayer(mmClust->measurementHash()).design();
349  const Amg::Transform3D toChamb = reEle->msSector()->globalToLocalTrans(gctx) *
350  reEle->localToGlobalTrans(gctx, simHit->identify());
351  const Amg::Vector3D hitPos = toChamb * xAOD::toEigen(simHit->localPosition());
352  const Amg::Vector3D hitDir = toChamb.linear() * xAOD::toEigen(simHit->localDirection());
353  const double pull = std::sqrt(SeedingAux::chi2Term(hitPos, hitDir, *sp));
354  const double pull2 = (mmClust->localPosition<1>().x() - simHit->localPosition().x()) / std::sqrt(mmClust->localCovariance<1>().x());
355  primitives.push_back(MuonValR4::drawLabel(std::format("ml: {:1d}, gap: {:1d}, {:}, pull: {:.2f} / {:.2f}", reEle->multilayer(), mmClust->gasGap(),
356  !design.hasStereoAngle() ? "X" : design.stereoAngle() >0 ? "U": "V",pull, pull2),legX,legY,14));
357  legY-=0.05;
358  }
359  m_visionTool->visualizeBucket(Gaudi::Hive::currentContext(), *max.parentBucket(),
360  "truth", std::move(primitives));
361  }
362 
363  UsedHitMarker_t allUsedHits = emptyBookKeeper(stripHitsLayers);
364  const Amg::Transform3D globToLocal = max.msSector()->globalToLocalTrans(gctx);
365  std::array<const SpacePoint*, 4> seedHits{};
366 
367  InitialSeedVec_t preLimSeeds{};
368 
369  for (std::size_t i = 0; i < layerSize - 3; ++i) {
370  seedHits[0] = stripHitsLayers[i].front();
371  for (std::size_t j = i + 1; j < layerSize - 2; ++j) {
372  seedHits[1] = stripHitsLayers[j].front();
373  for (std::size_t k = j + 1; k < layerSize - 1; ++k) {
374  seedHits[2] = stripHitsLayers[k].front();
375  for (std::size_t l = k + 1; l < layerSize; ++l) {
376  seedHits[3] = stripHitsLayers[l].front();
377  AmgSymMatrix(2) bMatrix = betaMatrix(seedHits);
378  if (std::abs(bMatrix.determinant()) < 1.e-6) {
379  continue;
380  }
381 
382  const HitLaySpan_t layers{stripHitsLayers[i], stripHitsLayers[j], stripHitsLayers[k], stripHitsLayers[l]};
383  UsedHitSpan_t usedHits{allUsedHits[i], allUsedHits[j], allUsedHits[k], allUsedHits[l]};
384  // each layer may have more than one hit - take the hit combinations
385  constructPrelimnarySeeds(globToLocal.translation(), layers, usedHits, preLimSeeds);
386 
387  //the layers not participated in the seed build - gonna be used for the extension
388  HitLaySpan_t extensionLayers{};
389  UsedHitSpan_t usedExtensionHits{};
390  usedExtensionHits.reserve(stripHitsLayers.size());
391  extensionLayers.reserve(stripHitsLayers.size());
392  for (std::size_t e = 0 ; e < stripHitsLayers.size(); ++e) {
393  if (!(e == i || e == j || e == k || e == l)){
394  extensionLayers.emplace_back(stripHitsLayers[e]);
395  usedExtensionHits.emplace_back(allUsedHits[e]);
396  }
397  }
398  // we have made sure to have hits from all the four layers -
399  // start by 4 hits for the seed and try to build the seed for the combinatorics found
400  for (auto &combinatoricHits : preLimSeeds) {
401  auto seed = buildSegmentSeed(combinatoricHits, bMatrix, max, extensionLayers, usedExtensionHits);
402  if (seed) {
403  markHitsAsUsed(*seed,stripHitsLayers, allUsedHits);
404  seeds.push_back(std::move(seed));
405  }
406  }
407  }
408  }
409  }
410  }
411 
412  return seeds;
413 }
414 void CombinatorialNSWSeedFinderAlg::markHitsAsUsed(const SegmentSeed& seed,
415  const HitLayVec& allSortHits,
416  UsedHitMarker_t& usedHitMarker) const {
418  for (const auto* sp : seed.getHitsInMax()) {
419  bool found{false};
420  for (std::size_t lIdx = 0; !found && lIdx < allSortHits.size(); ++lIdx) {
421  const HitVec& hVec{allSortHits[lIdx]};
422  for (std::size_t hIdx = 0 ; hIdx < hVec.size(); ++hIdx) {
423  if (hVec[hIdx] == sp) {
424  usedHitMarker[lIdx][hIdx] = true;
425  found = true;
426  break;
427  }
428  }
429  }
430  }
431 }
432 StatusCode CombinatorialNSWSeedFinderAlg::execute(const EventContext &ctx) const {
433  // read the inputs
434  const EtaHoughMaxContainer *maxima{nullptr};
435  ATH_CHECK(SG::get( maxima, m_etaKey, ctx));
436 
437  const ActsGeometryContext *gctx{nullptr};
438  ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
439 
440  // prepare our output collection
441  SG::WriteHandle writeMaxima{m_writeKey, ctx};
442  ATH_CHECK(writeMaxima.record(std::make_unique<SegmentSeedContainer>()));
443 
444  // we use the information from the previous eta-hough transform
445  // to get the combined hits that belong in the same maxima
446  for (const HoughMaximum *max : *maxima) {
447  std::vector<std::unique_ptr<SegmentSeed>> seeds = findSeedsFromMaximum(*max, *gctx);
448  if (msgLvl(MSG::VERBOSE)) {
449  for(const auto& hitMax : max->getHitsInMax()){
450  ATH_MSG_VERBOSE("Hit "<<m_idHelperSvc->toString(hitMax->identify())<<", "
451  <<Amg::toString(hitMax->localPosition())<<", dir: "
452  <<Amg::toString(hitMax->sensorDirection()));
453  }
454  }
455  for (auto &seed : seeds) {
456  if (msgLvl(MSG::VERBOSE)){
457  std::stringstream sstr{};
458  sstr<<"Seed tanTheta = "<<seed->tanTheta()<<", y0 = "<<seed->interceptY()
459  <<", tanPhi = "<<seed->tanPhi()<<", x0 = "<<seed->interceptX()<<", hits in the seed "
460  <<seed->getHitsInMax().size()<<std::endl;
461 
462  for(const auto& hit : seed->getHitsInMax()){
463  sstr<<" *** Hit "<<m_idHelperSvc->toString(hit->identify())<<", "
464  << Amg::toString(hit->localPosition())<<", dir: "<<Amg::toString(hit->sensorDirection())<<std::endl;
465  }
466  ATH_MSG_VERBOSE(sstr.str());
467  }
468  if (m_visionTool.isEnabled()) {
469  m_visionTool->visualizeSeed(ctx, *seed, "#phi-combinatorialSeed");
470  }
471  writeMaxima->push_back(std::move(seed));
472  }
473  }
474  return StatusCode::SUCCESS;
475 }
476 
477 } // namespace MuonR4
MuonR4::minLayers
constexpr unsigned int minLayers
Definition: CombinatorialNSWSeedFinderAlg.cxx:58
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
MuonSimHitHelpers.h
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
MuonR4::SpacePoint::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:84
MuonGMR4::StripDesign::stereoAngle
double stereoAngle() const
Returns the value of the stereo angle.
MuonGMR4::MmReadoutElement
Definition: MmReadoutElement.h:18
MuonGMR4::StripDesign
Definition: StripDesign.h:30
MuonR4::SpacePoint::type
xAOD::UncalibMeasType type() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:88
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonGMR4::MuonReadoutElement::msSector
const SpectrometerSector * msSector() const
Returns the pointer to the envelope volume enclosing all chambers in the sector.
MuonR4::SpacePointPerLayerSplitter
The SpacePointPerLayerSplitter takes a set of spacepoints already sorted by layer Identifier (see Muo...
Definition: SpacePointPerLayerSplitter.h:16
xAOD::MuonSimHit_v1::identify
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
Definition: xAODMuonSimHit_V1.cxx:42
MuonR4::CombinatorialNSWSeedFinderAlg::HitWindow
HitWindow
To fastly check whether a hit is roughly compatible with a muon trajectory a narrow corridor is opene...
Definition: CombinatorialNSWSeedFinderAlg.h:71
vtune_athena.format
format
Definition: vtune_athena.py:14
xAOD::MMCluster_v1
Definition: MMCluster_v1.h:20
VisualizationHelpers.h
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
DMTest::P
P_v1 P
Definition: P.h:23
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
initialize
void initialize()
Definition: run_EoverP.cxx:894
DMTest::C
C_v1 C
Definition: C.h:26
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:113
xAOD::MMCluster_v1::readoutElement
const MuonGMR4::MmReadoutElement * readoutElement() const
Retrieve the associated MmReadoutElement.
sTgcIdHelper::Strip
@ Strip
Definition: sTgcIdHelper.h:190
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
x
#define x
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:32
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
MuonR4::SpacePoint::primaryMeasurement
const xAOD::UncalibratedMeasurement * primaryMeasurement() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:75
MuonR4::houghTanPhi
double houghTanPhi(const Amg::Vector3D &v)
: Returns the hough tanPhi [x] / [z]
Definition: SegmentFitterEventData.cxx:19
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MuonR4::CombinatorialNSWSeedFinderAlg::InitialSeedVec_t
std::vector< InitialSeed_t > InitialSeedVec_t
Vector of initial seeds.
Definition: CombinatorialNSWSeedFinderAlg.h:62
SpacePointPerLayerSplitter.h
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGMR4::MmReadoutElement::multilayer
int multilayer() const
Returns the multi layer of the element [1-2].
MuonR4::CombinatorialNSWSeedFinderAlg::HitLayVec
SpacePointPerLayerSplitter::HitLayVec HitLayVec
Definition: CombinatorialNSWSeedFinderAlg.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
sTgcIdHelper::Wire
@ Wire
Definition: sTgcIdHelper.h:190
SegmentFitHelperFunctions.h
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonGMR4::SpectrometerSector::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &gctx) const
Returns the global -> local transformation from the ATLAS global.
Definition: SpectrometerSector.cxx:78
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
TEST_HIT_CORRIDOR
#define TEST_HIT_CORRIDOR(LAYER, HIT_ITER, START_LAYER)
Macro to check whether a hit is compatible with the hit corridor.
Definition: CombinatorialNSWSeedFinderAlg.cxx:157
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:309
xAOD::MuonSimHit_v1::localDirection
ConstVectorMap< 3 > localDirection() const
Returns the local direction of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:66
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonR4::CombinatorialNSWSeedFinderAlg::InitialSeed_t
std::array< const SpacePoint *, 4 > InitialSeed_t
Abbrivation of the
Definition: CombinatorialNSWSeedFinderAlg.h:60
MuonR4::CombinatorialNSWSeedFinderAlg::UsedHitMarker_t
std::vector< std::vector< char > > UsedHitMarker_t
Abbrivation of the container book keeping whether a hit is used or not.
Definition: CombinatorialNSWSeedFinderAlg.h:56
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonGMR4::StripLayer::design
const StripDesign & design(bool phiView=false) const
Returns the underlying strip design.
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:24
lumiFormat.array
array
Definition: lumiFormat.py:91
MuonGMR4::MmReadoutElement::stripLayer
const StripLayer & stripLayer(const Identifier &measId) const
MuonR4::CombinatorialNSWSeedFinderAlg::UsedHitSpan_t
std::vector< std::reference_wrapper< std::vector< char > >> UsedHitSpan_t
Abbrivation of the container to pass a subset of markers wtihout copy.
Definition: CombinatorialNSWSeedFinderAlg.h:58
MuonValR4::IPatternVisualizationTool::PrimitiveVec
std::vector< PrimitivePtr > PrimitiveVec
Definition: IPatternVisualizationTool.h:31
MuonGMR4::SpectrometerSector::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the IdHelpeSvc.
Definition: SpectrometerSector.cxx:61
CombinatorialNSWSeedFinderAlg.h
sTgcMeasurement.h
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
MuonR4::CombinatorialNSWSeedFinderAlg::StripOrient
StripOrient
Enumeration to classify the orientation of a NSW strip
Definition: CombinatorialNSWSeedFinderAlg.h:39
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
Trk::inside
@ inside
Definition: PropDirection.h:29
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
MuonR4::SpacePoint::localPosition
const Amg::Vector3D & localPosition() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:50
MuonR4::HoughMaximum
Data class to represent an eta maximum in hough space.
Definition: HoughMaximum.h:14
SegmentFitterEventData.h
Muon::IMuonIdHelperSvc::toString
virtual std::string toString(const Identifier &id) const =0
print all fields to string
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
sTgcIdHelper::Pad
@ Pad
Definition: sTgcIdHelper.h:190
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
MuonR4::SpacePoint::dimension
unsigned dimension() const
Is the space point a 1D or combined 2D measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:107
re
const boost::regex re(r_e)
MuonR4::CombinatorialNSWSeedFinderAlg::HitVec
SpacePointPerLayerSplitter::HitVec HitVec
Definition: CombinatorialNSWSeedFinderAlg.h:50
MuonR4::SegmentSeed
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
Definition: SegmentSeed.h:14
xAOD::MuonSimHit_v1::localPosition
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:60
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
MuonGMR4::MuonReadoutElement::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:81
MuonR4::getTruthMatchedHit
const xAOD::MuonSimHit * getTruthMatchedHit(const xAOD::UncalibratedMeasurement &prdHit)
Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.
Definition: MuonSimHitHelpers.cxx:16
MMCluster.h
python.BuildSignatureFlags.beamSpot
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:475
MuonGMR4::StripDesign::hasStereoAngle
bool hasStereoAngle() const
Returns whether a stereo angle is defined.
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
MuonR4::CombinatorialNSWSeedFinderAlg::HitLaySpan_t
std::vector< std::reference_wrapper< const HitVec > > HitLaySpan_t
Abbrivation of the space comprising multiple hit vectors without copy.
Definition: CombinatorialNSWSeedFinderAlg.h:54
MuonR4::houghTanTheta
double houghTanTheta(const Amg::Vector3D &v)
Returns the hough tanTheta [y] / [z].
Definition: SegmentFitterEventData.cxx:15
MuonR4::getMatchingSimHits
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits(const xAOD::MuonSegment &segment)
: Returns all sim hits matched to a xAOD::MuonSegment
Definition: MuonSimHitHelpers.cxx:27
HepMCHelpers.h
MuonR4::SpacePoint::identify
const Identifier & identify() const
: Identifier of the primary measurement
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:97
fitman.k
k
Definition: fitman.py:528
xAOD::sTgcMeasurement_v1
Definition: sTgcMeasurement_v1.h:21
MuonR4::SpacePoint::sensorDirection
const Amg::Vector3D & sensorDirection() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:51
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:202