ATLAS Offline Software
MuonDetectorNavTest.cxx
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MuonDetectorNavTest.h"
6 
9 
10 #include "Acts/Definitions/Units.hpp"
11 #include "Acts/Propagator/ActorList.hpp"
12 #include "Acts/Propagator/Propagator.hpp"
13 #include "Acts/Propagator/MaterialInteractor.hpp"
14 #include "Acts/Propagator/EigenStepper.hpp"
15 #include "Acts/Propagator/AtlasStepper.hpp"
16 #include "Acts/Utilities/VectorHelpers.hpp"
17 #include "Acts/Visualization/ObjVisualization3D.hpp"
18 #include "Acts/Visualization/GeometryView3D.hpp"
19 #include "Acts/EventData/ParticleHypothesis.hpp"
20 #include "Acts/Propagator/detail/SteppingLogger.hpp"
21 
23 #include "xAODTruth/TruthVertex.h"
29 #include <fstream>
30 #include <format>
31 
32 using namespace Acts::UnitLiterals;
33 
34 namespace {
35 
36 using SegLink_t = std::vector<ElementLink<xAOD::MuonSegmentContainer>>;
37 static const SG::ConstAccessor<SegLink_t> segAcc{"truthSegmentLinks"};
38 static const Amg::Vector3D dummyPos{100.*Gaudi::Units::m, 100.*Gaudi::Units::m, 100.*Gaudi::Units::m};
39 struct PropagatorRecorder{
41  Amg::Vector3D actsPropPos{dummyPos};
43  Amg::Vector3D actsGlobalPos{dummyPos};
45  Amg::Vector3D actsPropDir{Amg::Vector3D::Zero()};
47  Amg::Vector3D atlasPropPos{dummyPos};
49  Amg::Vector3D atlasGlobalPos{dummyPos};
51  Amg::Vector3D atlasPropDir{Amg::Vector3D::Zero()};
53  Identifier id{};
55  double atlasPropabsMomentum{0.};
57  double actsPropabsMomentum{0.};
59  double actsStepSize{0.};
60 };
61 }
62 
63 
64 namespace ActsTrk {
65 
66 Amg::Transform3D MuonDetectorNavTest::toGlobalTrf(const ActsGeometryContext& gctx, const Identifier& hitId) const {
67  const MuonGMR4::MuonReadoutElement* reElement = m_r4DetMgr->getReadoutElement(hitId);
68  const IdentifierHash trfHash = reElement->detectorType() == ActsTrk::DetectorType::Mdt ?
69  reElement->measurementHash(hitId) : reElement->layerHash(hitId);
70  return reElement->localToGlobalTrans(gctx, trfHash);
71 }
72 //get the transformation to the readout element's local frame - first measurement plane
73 Amg::Transform3D MuonDetectorNavTest::toLocalTrf(const ActsGeometryContext& gctx, const Identifier& hitId) const {
74  const MuonGMR4::MuonReadoutElement* reElement = m_r4DetMgr->getReadoutElement(hitId);
75  return reElement->globalToLocalTrans(gctx, reElement->layerHash(hitId));
76 }
77 
78 
79 IdentifierHash MuonDetectorNavTest::layerHash(const Identifier& id) const {
80  return m_r4DetMgr->getReadoutElement(id)->layerHash(id);
81 }
82 
84  ATH_CHECK(m_idHelperSvc.retrieve());
85  ATH_CHECK(m_geoCtxKey.initialize());
86  ATH_CHECK(m_fieldCacheCondObjInputKey.initialize());
87  ATH_CHECK(m_truthParticleKey.initialize());
88  ATH_CHECK(m_truthSegLinkKey.initialize());
89  ATH_CHECK(m_detVolSvc.retrieve());
90  ATH_CHECK(m_extrapolator.retrieve());
91  ATH_CHECK(m_detMgrKey.initialize());
92  ATH_CHECK(m_truthSegLinkKey.initialize());
93  ATH_CHECK(detStore()->retrieve(m_r4DetMgr));
94  ATH_CHECK(m_tree.init(this));
95 
96  ATH_MSG_VERBOSE("Successfully initialized MuonDetectorNavTest");
97  return StatusCode::SUCCESS;
98 }
99 
101  ATH_MSG_VERBOSE("Finalizing MuonDetectorNavTest");
102  ATH_CHECK(m_tree.write());
103  return StatusCode::SUCCESS;
104 }
105 
107  const EventContext& ctx{Gaudi::Hive::currentContext()};
108  ATH_MSG_DEBUG("Execute in event "<<ctx.eventID().event_number());
109  m_event = ctx.eventID().event_number();
110  SG::ReadHandle<ActsGeometryContext> gctx{m_geoCtxKey, ctx};
111  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticles{m_truthParticleKey, ctx};
112  SG::ReadCondHandle<AtlasFieldCacheCondObj> magFieldHandle{m_fieldCacheCondObjInputKey, ctx};
113  if (!gctx.isValid() or !truthParticles.isValid() or !magFieldHandle.isValid()) {
114  ATH_MSG_FATAL("Failed to retrieve either the geometry context, truth particles or magnetic field");
115  return StatusCode::FAILURE;
116  }
117  SG::ReadCondHandle detMgr{m_detMgrKey, ctx};
118 
119 
120  const Acts::GeometryContext geoContext = gctx->context();
121  const AtlasFieldCacheCondObj* fieldCondObj{*magFieldHandle};
122  Acts::MagneticFieldContext mfContext = Acts::MagneticFieldContext(fieldCondObj);
123 
124 
125  using Stepper = Acts::EigenStepper<>;
126  //using Stepper = Acts::AtlasStepper;
127  using Navigator = Acts::Experimental::DetectorNavigator;
128  using Propagator = Acts::Propagator<Stepper,Navigator>;
129  using ActorList = Acts::ActorList<Acts::detail::SteppingLogger, Acts::MaterialInteractor, Acts::EndOfWorldReached>;
130  using PropagatorOptions = Propagator::Options<ActorList>;
131 
132 
133  PropagatorOptions options(geoContext, mfContext);
134 
135  options.pathLimit = m_pathLimit;
136  options.stepping.maxStepSize = m_maxStepSize;
137  options.stepping.stepTolerance = m_stepTolerance;
138  options.maxSteps = m_maxSteps;
139  options.maxTargetSkipping = m_maxTargetSkipping;
140 
141  //Configure the material collector
142  auto& materialInteractor = options.actorList.get<Acts::MaterialInteractor>();
143  materialInteractor.energyLoss = false;
144  materialInteractor.multipleScattering = false;
145  materialInteractor.recordInteractions = false;
146 
147  const Acts::Experimental::Detector* detector = m_detVolSvc->detector().get();
148 
149  Acts::Experimental::DetectorNavigator::Config navCfg;
150  navCfg.detector = detector;
151  navCfg.resolvePassive = true;
152 
153  auto bField = std::make_shared<ATLASMagneticFieldWrapper>();
154  auto bfieldCache = bField->makeCache(mfContext);
155  auto stepper = Stepper(bField);
156 
157 
158  Acts::Experimental::DetectorNavigator navigator(navCfg, Acts::getDefaultLogger("DetectorNavigator", ActsTrk::actsLevelVector(msgLevel())));
159  Acts::Propagator<Stepper, Acts::Experimental::DetectorNavigator> propagator(
160  std::move(stepper), std::move(navigator),
161  Acts::getDefaultLogger("Propagator", ActsTrk::actsLevelVector(msgLevel())));
162 
163 
164  for(const xAOD::TruthParticle* truthParticle : *truthParticles){
165 
166  ATH_MSG_DEBUG("Consider truth particle "<<truthParticle->pt()<<", "<<truthParticle->p4().P()<<", "<<truthParticle->eta()<<", "<<truthParticle->phi()
167  <<", pdgId: "<<truthParticle->pdgId()<<", status: "<<truthParticle->status()
168  <<", unique id:"<<truthParticle->id());
169 
170  //propagated and truth hits expressed in the local frame of the measurement layer
171  std::vector<PropagatorRecorder> propagatedHits;
172  std::vector<std::pair<Identifier, Amg::Vector3D>> truthHits;
173 
174  //the particle hypothesis
175  Acts::ParticleHypothesis particleHypothesis(static_cast<Acts::PdgParticle>(truthParticle->absPdgId()),
176  truthParticle->m(),
177  Acts::AnyCharge(truthParticle->charge()));
178 
179 
180  std::vector<std::pair<const xAOD::MuonSegment*, std::vector<const xAOD::MuonSimHit*>>> muonSegmentWithSimHits;
181  for (const auto& truthSegLink : segAcc(*truthParticle)){
182  const xAOD::MuonSegment* seg{*truthSegLink};
183  auto unordedHits = MuonR4::getMatchingSimHits(*seg);
184  std::vector<const xAOD::MuonSimHit*> muonSimHits{unordedHits.begin(), unordedHits.end()};
185  ATH_MSG_VERBOSE("Segment at : "<<Amg::toString(seg->position())<<" with Sim Hits: "<<unordedHits.size());
186  muonSegmentWithSimHits.emplace_back(seg,muonSimHits);
187  }
188  const auto& particle = truthParticle->p4();
189  m_truthPt = particle.Pt();
190  m_truthP = particle.P();
191 
192  const xAOD::TruthVertex* prodVertex = truthParticle->prodVtx();
193  Amg::Vector3D prodPos = prodVertex ? Amg::Vector3D(prodVertex->x(), prodVertex->y(), prodVertex->z())
195  Amg::Vector3D prodDir{Amg::dirFromAngles(particle.Phi(), particle.Theta())};
196 
197  //position, direction and momentum at the start of the propagation
198  Amg::Vector3D startPropPos{prodPos};
199  Amg::Vector3D startPropDir{prodDir};
200  double startPropP{particle.P()};
201  ATH_MSG_VERBOSE("Magnetic field at the production vertex: "<<Amg::toString(bField->getField(prodPos, bfieldCache).value())<<"at position "<<Amg::toString(prodPos));
202  for (double r =0; r<=2.*Gaudi::Units::m; r+=10.*Gaudi::Units::cm) {
203  Amg::Vector3D magFieldPos{startPropPos.x()+r, startPropPos.y()+r, startPropPos.z()};
204  ATH_MSG_VERBOSE("Magnetic Field in the ID is: "<<Amg::toString(bField->getField(magFieldPos, bfieldCache).value()));
205 
206  }
207 
208 
209 
210 
211  ATH_MSG_VERBOSE("Production vertex at "<<Amg::toString(prodPos)<<" with direction "<<Amg::toString(prodDir)<<" and momentum "<<startPropP);
212 
213 
214  if(m_startFromFirstHit){
215  if (muonSegmentWithSimHits.empty()) {
216  continue;
217  }
218  //sort the segments by the radial distance
219  std::ranges::sort(muonSegmentWithSimHits,
220  [](const auto& a, const auto& b) {
221  return a.first->position().perp() < b.first->position().perp();
222  });
223 
224  //get the simHits from the first segment - from sorted segments
225  std::vector<const xAOD::MuonSimHit*>& muonSimHits = muonSegmentWithSimHits.front().second;
226  if (msgLvl(MSG::VERBOSE)){
227  for(const auto& simHit: muonSimHits){
228  ATH_MSG_VERBOSE("Sim Hit of first segment at global position: "<<Amg::toString(toGlobalTrf(*gctx, simHit->identify())*xAOD::toEigen(simHit->localPosition())));
229  }
230  }
231 
232  //sort the simhits to define starting propagation position
233  std::ranges::sort(muonSimHits,
234  [this, &gctx](const xAOD::MuonSimHit* hit1, const xAOD::MuonSimHit* hit2){
235  const Amg::Vector3D globalPos1 = toGlobalTrf(*gctx,hit1->identify())*xAOD::toEigen(hit1->localPosition());
236  const Amg::Vector3D globalPos2 = toGlobalTrf(*gctx,hit2->identify())*xAOD::toEigen(hit2->localPosition());
237  return globalPos1.norm()<globalPos2.norm();
238  });
239  if (msgLvl(MSG::VERBOSE)){
240  ATH_MSG_VERBOSE("After sorting..");
241  for(const auto& simHit: muonSimHits){
242  ATH_MSG_VERBOSE("Sim Hit of first segment at position: "<<Amg::toString(toGlobalTrf(*gctx, simHit->identify())*xAOD::toEigen(simHit->localPosition())));
243 
244  }
245  }
246 
247  startPropPos = toGlobalTrf(*gctx, muonSimHits.front()->identify())*xAOD::toEigen(muonSimHits.front()->localPosition());
248  startPropDir = toGlobalTrf(*gctx, muonSimHits.front()->identify()).linear()*xAOD::toEigen(muonSimHits.front()->localDirection());
249  startPropP = muonSimHits.front()->kineticEnergy();
250  ATH_MSG_VERBOSE("Kinetic Energy from the simHit: "<<muonSimHits.front()->kineticEnergy() / Gaudi::Units::GeV<<" and mass: "<<muonSimHits.front()->mass()<<" and energy deposit: "<<muonSimHits.front()->energyDeposit() / Gaudi::Units::eV);
251  }
252 
253  ATH_MSG_VERBOSE("Starting propagation from"<<Amg::toString(startPropPos)<<" with direction"
254  <<Amg::toString(startPropDir)<<" and momentum "<<startPropP);
255 
256 
257  Acts::BoundTrackParameters start = Acts::BoundTrackParameters::createCurvilinear(
258  Acts::VectorHelpers::makeVector4(startPropPos, 0.), startPropDir,
259  truthParticle->charge() / startPropP,
260  std::nullopt,
261  particleHypothesis);
262 
263 
264  Trk::CurvilinearParameters atlasStart(startPropPos, startPropP*startPropDir, truthParticle->charge());
265 
266  ATH_MSG_DEBUG("start propagating here");
267  auto result = propagator.propagate(start, options);
268  const Acts::detail::SteppingLogger::result_type state = result.value().get<Acts::detail::SteppingLogger::result_type>();
269  const Acts::MaterialInteractor::result_type material = result.value().get<Acts::MaterialInteractor::result_type>();
270  ATH_MSG_DEBUG("Material interactions: " << material.materialInteractions.size());
271  ATH_MSG_DEBUG("material in x0: " << material.materialInX0);
272  ATH_MSG_DEBUG("material in L0: " << material.materialInL0);
273  std::vector<Acts::MaterialInteraction> interactions = material.materialInteractions;
274  for(const Acts::MaterialInteraction& interaction : interactions){
275  ATH_MSG_DEBUG("Path Correction: " << interaction.pathCorrection);
276  ATH_MSG_DEBUG("Momentum change: " << interaction.deltaP);
277  }
278  // loop through the states drawing each surface or portal
279  if(m_drawEvent){
280  Acts::ObjVisualization3D helper{};
281  for (const auto& s : state.steps) {
282  if(s.surface) Acts::GeometryView3D::drawSurface(helper, *s.surface, geoContext);
283  }
284  helper.write(std::format("event_{:}_{:}_Hits.obj", ctx.eventID().event_number(), truthParticle->index()));
285  }
286 
287  ATH_MSG_VERBOSE("Number of propagated steps : " << state.steps.size());
288  m_propSteps = state.steps.size();
289  m_propLength = result.value().pathLength;
290  for(const auto& state: state.steps){
291  if(!state.surface){
292  continue;
293  }
294  const SurfaceCache* sCache = dynamic_cast<const SurfaceCache *>(state.surface->associatedDetectorElement());
295  if(!sCache){
296  ATH_MSG_VERBOSE("Surface found but it's a portal, continuing..");
297  continue;
298  }
299  const Identifier ID = sCache->identify();
300  const Amg::Transform3D toGap{toLocalTrf(*gctx, ID)};
301  ATH_MSG_VERBOSE("Identify propagated hit " << m_idHelperSvc->toString(ID) << " with hit at local position " << Amg::toString(toGap*state.position)<<" and global direction "<<Amg::toString(state.momentum.unit()));
302  ATH_MSG_VERBOSE("Magnetic field "<<Amg::toString(bField->getField(state.position, bfieldCache).value())<<"at position "<<Amg::toString(state.position));
303  PropagatorRecorder newRecord{};
304  newRecord.id = ID;
305  newRecord.actsPropPos = toGap*state.position;
306  newRecord.actsGlobalPos = state.position;
307  newRecord.actsPropDir = toGap.linear()*state.momentum.unit();
308  newRecord.actsPropabsMomentum = state.momentum.norm();
309  newRecord.actsStepSize = state.stepSize.value();
310 
311  //define the surface to propagate
312  const Trk::Surface& surface = detMgr->getReadoutElement(ID)->surface(ID);
313 
315  if(truthParticle->isMuon()){
317  }
318 
319 
320  std::unique_ptr<Trk::TrackParameters> atlasPars{m_extrapolator->extrapolate(ctx, atlasStart,
321  surface, Trk::alongMomentum,false,
323 
324 
325  if (atlasPars) {
326  newRecord.atlasPropPos = toGap* atlasPars->position();
327  newRecord.atlasPropDir = toGap.linear()*atlasPars->momentum().unit();
328  newRecord.atlasPropabsMomentum = atlasPars->momentum().mag();
329  newRecord.atlasGlobalPos = atlasPars->position();
330  }
331  propagatedHits.emplace_back(newRecord);
332  }
333 
334  std::size_t propHitsSize = propagatedHits.size();
335 
336  //fill with the truthHits- id and local position on the measurement layer's frame and look in the propagated hits
337  unsigned int nMatchedTruth = 0, nMatchedProp = 0, nTruth{0};
338  for (const auto&[segment, simHits] : muonSegmentWithSimHits) {
339  for(const xAOD::MuonSimHit* simHit : simHits){
340  const Identifier ID = simHit->identify();
341  ++nTruth;
342  //express the truth hits in the 1st measurement of readout element's local frame - same as the propagated hits
343  const Amg::Transform3D localTrf{toLocalTrf(*gctx, simHit->identify())*
344  toGlobalTrf(*gctx,simHit->identify())};
345  const Amg::Vector3D localPos = localTrf*xAOD::toEigen(simHit->localPosition());
346  const Amg::Vector3D globalPos = toGlobalTrf(*gctx, simHit->identify())*xAOD::toEigen(simHit->localPosition());
347  const Amg::Vector3D localDir = localTrf.linear()*xAOD::toEigen(simHit->localDirection());
348  m_detId.push_back(ID);
349  m_techIdx.push_back(m_idHelperSvc->technologyIndex(ID));
350  m_gasGapId.push_back(layerHash(ID));
351 
352  m_truthLoc.push_back(localPos);
353  m_truthDir.push_back(localDir);
354  m_truthGlob.push_back(globalPos);
355  m_startGlob.push_back(startPropPos);
356  ATH_MSG_VERBOSE("Identify truth hit at local position in 1st measurement plane" << Amg::toString(localPos));
357 
358  auto it_begin = std::ranges::find_if(propagatedHits,
359  [this, ID](const auto& propagatedHit) {
360  return m_idHelperSvc->detElId(ID) == m_idHelperSvc->detElId(propagatedHit.id) &&
361  layerHash(ID) == layerHash(propagatedHit.id);
362  });
363  m_isPropagated.push_back(it_begin != propagatedHits.end());
364 
365  if (it_begin == propagatedHits.end()) {
366  m_actsPropLoc.push_back(dummyPos);
367  m_actsPropDir.push_back(dummyPos);
368  m_atlasPropLoc.push_back(dummyPos);
369  m_atlasPropDir.push_back(dummyPos);
370  m_actsPropGlob.push_back(dummyPos);
371  m_atlasPropGlob.push_back(dummyPos);
372  m_actsPropMomentum.push_back(0.);
373  m_atlasPropMomentum.push_back(0.);
374  m_actsStepSize.push_back(0.);
375  continue;
376  }
377  auto it_end = std::find_if(it_begin, propagatedHits.end(),
378  [this, ID](const auto& propagatedHit) {
379  return m_idHelperSvc->detElId(ID) != m_idHelperSvc->detElId(propagatedHit.id) ||
380  layerHash(ID) != layerHash(propagatedHit.id);
381  });
383  auto it = std::min_element(it_begin, it_end,
384  [&localPos](const PropagatorRecorder& a,
385  const PropagatorRecorder& b){
386  return (localPos - a.actsPropPos).mag() < (localPos - b.actsPropPos).mag();
387  });
388 
389 
390  ATH_MSG_DEBUG("Truth hit found in propagated hits: " << m_idHelperSvc->toString(ID));
391  m_actsPropLoc.push_back(it->actsPropPos);
392  m_actsPropDir.push_back(it->actsPropDir);
393  m_actsPropGlob.push_back(it->actsGlobalPos);
394  m_atlasPropLoc.push_back(it->atlasPropPos);
395  m_atlasPropDir.push_back(it->atlasPropDir);
396  m_atlasPropGlob.push_back(it->atlasGlobalPos);
397  m_actsPropMomentum.push_back(it->actsPropabsMomentum);
398  m_atlasPropMomentum.push_back(it->atlasPropabsMomentum);
399  m_actsStepSize.push_back(it->actsStepSize);
400  ++nMatchedTruth;
401  }
402  }
403  m_matchedTruthFraction = 1.f*nMatchedTruth / nTruth;
404  m_matchedPropFraction = 1.f*nMatchedProp / propHitsSize;
405 
406  m_tree.fill(ctx);
407 
408  }
409 
410  return StatusCode::SUCCESS;
411 }
412 } // namespace ActsTrk`
413 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
beamspotman.r
def r
Definition: beamspotman.py:676
MuonDetectorNavTest.h
MuonSimHitHelpers.h
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
ActsTrk::SurfaceCache::identify
Identifier identify() const override final
Returns the identifier of the Surface.
Definition: SurfaceCache.cxx:31
xAOD::MuonSimHit_v1::identify
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
Definition: xAODMuonSimHit_V1.cxx:42
vtune_athena.format
format
Definition: vtune_athena.py:14
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
SurfaceCache.h
perp
Scalar perp() const
perp method - perpenticular length
Definition: AmgMatrixBasePlugin.h:44
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
ActsTrk::detail::Navigator
Acts::Navigator Navigator
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:31
TRTCalib_cfilter.detector
detector
Definition: TRTCalib_cfilter.py:241
initialize
void initialize()
Definition: run_EoverP.cxx:894
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
skel.it
it
Definition: skel.GENtoEVGEN.py:407
MuonGMR4::MuonReadoutElement
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:38
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
ActsTrk::SurfaceCache
: Helper class to connect the aligned transformations of each active sensor(layer) with the Acts::Sur...
Definition: Tracking/Acts/ActsGeoUtils/ActsGeoUtils/SurfaceCache.h:23
ActsTrk::actsLevelVector
Acts::Logging::Level actsLevelVector(MSG::Level lvl)
Definition: LoggerUtils.cxx:9
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
ActsTrk::IDetectorElementBase::detectorType
virtual DetectorType detectorType() const =0
Returns the detector element type.
MuonGMR4::MuonReadoutElement::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:78
MuonGMR4::MuonReadoutElement::layerHash
virtual IdentifierHash layerHash(const Identifier &measId) const =0
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
particleType
Definition: particleType.h:29
xAOD::TruthVertex_v1::y
float y() const
Vertex y displacement.
ReadCondHandle.h
MuonSegmentContainer.h
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
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
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::geantino
@ geantino
Definition: ParticleHypothesis.h:26
jet::CompCategory::Detector
@ Detector
Definition: UncertaintyEnum.h:19
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
MuonReadoutElement.h
MuonR4::SegLink_t
ElementLink< MuonR4::SegmentContainer > SegLink_t
Definition: xAODSegmentCnvAlg.cxx:18
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
TruthVertex.h
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
ActsTrk::DetectorType::Mdt
@ Mdt
MuonSpectrometer.
python.SystemOfUnits.eV
int eV
Definition: SystemOfUnits.py:155
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
xAOD::ParticleHypothesis
ParticleHypothesis
Definition: TrackingPrimitives.h:193
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ActsTrk::detail::Stepper
Acts::SympyStepper Stepper
Adapted from Acts Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithmFunction....
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:30
Amg::dirFromAngles
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
Definition: GeoPrimitivesHelpers.h:299
xAOD::TruthVertex_v1::x
float x() const
Vertex x displacement.
a
TList * a
Definition: liststreamerinfos.cxx:10
ActsTrk::detail::Propagator
Acts::Propagator< Stepper, Navigator > Propagator
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:32
xAOD::TruthVertex_v1::z
float z() const
Vertex longitudinal distance along the beam line form the origin.
MuonGMR4::MuonReadoutElement::measurementHash
virtual IdentifierHash measurementHash(const Identifier &measId) const =0
Constructs the identifier hash from the full measurement Identifier.
xAOD::MuonSimHit_v1::localPosition
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:60
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
LoggerUtils.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:55
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::removeNoise
@ removeNoise
Definition: MaterialUpdateMode.h:20
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
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Identifier
Definition: IdentifierFieldParser.cxx:14