ATLAS Offline Software
ActsMuonTrackingGeometryTest.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 
9 #include "GaudiKernel/EventContext.h"
10 #include "GaudiKernel/ISvcLocator.h"
15 
18 #include "xAODTruth/TruthVertex.h"
19 #include "xAODTruth/TruthVertex.h"
22 
23 
24 
25 //ACTS
26 #include "Acts/Definitions/Units.hpp"
27 #include "Acts/EventData/ParticleHypothesis.hpp"
28 #include "Acts/Propagator/ActorList.hpp"
29 #include "Acts/Propagator/Propagator.hpp"
30 #include "Acts/Propagator/MaterialInteractor.hpp"
31 #include "Acts/Propagator/EigenStepper.hpp"
32 #include "Acts/Propagator/Navigator.hpp"
33 #include "Acts/Propagator/detail/SteppingLogger.hpp"
34 #include "Acts/Surfaces/StrawSurface.hpp"
35 #include "Acts/Utilities/AngleHelpers.hpp"
36 
37 namespace {
38 using SegLink_t = std::vector<ElementLink<xAOD::MuonSegmentContainer>>;
39 static const SG::ConstAccessor<SegLink_t> segAcc{"truthSegmentLinks"};
40 static const Amg::Vector3D dummyVec{100.*Gaudi::Units::m, 100.*Gaudi::Units::m, 100.*Gaudi::Units::m};
41 
42 struct PropagatorRecorder{
44  Amg::Vector3D actsPropPos{dummyVec};
46  Amg::Vector3D actsGlobalPos{dummyVec};
48  Amg::Vector3D actsPropDir{Amg::Vector3D::Zero()};
50  Identifier id{};
52  double actsPropabsMomentum{0.};
54  double actsStepSize{0.};
56  double actsHitWireDist{-1.};
57 };
58 
59 }
60 
61 
62 namespace ActsTrk {
63 
64 
66  const MuonGMR4::MuonReadoutElement* reElement = m_r4DetMgr->getReadoutElement(hitId);
67  const IdentifierHash trfHash = reElement->detectorType() == ActsTrk::DetectorType::Mdt ?
68  reElement->measurementHash(hitId) : reElement->layerHash(hitId);
69  return reElement->globalToLocalTrans(gctx, trfHash);
70  }
71 
74  const IdentifierHash trfHash = reElement->detectorType() == ActsTrk::DetectorType::Mdt ?
75  reElement->measurementHash(hitId) : reElement->layerHash(hitId);
76  return reElement->localToGlobalTrans(gctx, trfHash);
77  }
78 
79 
81  return m_r4DetMgr->getReadoutElement(id)->layerHash(id);
82  }
83 
84 
87  ATH_CHECK(m_idHelperSvc.retrieve());
90  ATH_CHECK(m_rndmGenSvc.retrieve());
96 
97  ATH_CHECK(m_tree.init(this));
98  ATH_MSG_INFO("ActsMuonTrackingGeometryTest successfully initialized");
99  return StatusCode::SUCCESS;
100  }
101 
104  return StatusCode::SUCCESS;
105  }
106 
108 
109  const EventContext& ctx = Gaudi::Hive::currentContext();
110 
111  const ActsTrk::GeometryContext* gctx{nullptr};
112  const AtlasFieldCacheCondObj* fieldCondObj{nullptr};
113  const MuonGM::MuonDetectorManager* detMgr{nullptr};
114  const xAOD::TruthParticleContainer* truthParticles{nullptr};
115 
116  ATH_CHECK(SG::get(fieldCondObj, m_fieldCacheCondObjInputKey, ctx));
117  ATH_CHECK(SG::get(detMgr, m_detMgrKey, ctx));
118  ATH_CHECK(SG::get(truthParticles, m_truthParticleKey, ctx));
119  ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
120 
121 
122  const Acts::MagneticFieldContext mfContext = Acts::MagneticFieldContext(fieldCondObj);
123 
124  auto anygctx = gctx->context();
125 
126  //Get the tracking geometry
127  auto trackingGeometry = m_trackingGeometryTool->trackingGeometry();
128 
129  if (!trackingGeometry) {
130  ATH_MSG_ERROR("Failed to retrieve the tracking geometry");
131  return StatusCode::FAILURE;
132  }
133 
134  //Configure the ACTS propagator with the navigator and the stepper
135  using Stepper = Acts::EigenStepper<>;
136  using Navigator = Acts::Navigator;
137  using Propagator = Acts::Propagator<Stepper,Navigator>;
138  using ActorList = Acts::ActorList<Acts::detail::SteppingLogger, Acts::MaterialInteractor, Acts::EndOfWorldReached>;
139  using PropagatorOptions = Propagator::Options<ActorList>;
140 
141  Navigator::Config navCfg;
142  navCfg.trackingGeometry = trackingGeometry;
143  navCfg.resolveSensitive = true;
144  navCfg.resolveMaterial= false;
145  navCfg.resolvePassive = true;
146 
147  Navigator navigator(navCfg, Acts::getDefaultLogger("Navigator", ActsTrk::actsLevelVector(msgLevel())));
148 
149  auto bField = std::make_shared<ATLASMagneticFieldWrapper>();
150  auto bfieldCache = bField->makeCache(mfContext);
151 
152  auto stepper = Stepper(bField);
153 
154  PropagatorOptions options(anygctx, mfContext);
155  options.pathLimit = m_pathLimit;
156  options.stepping.maxStepSize = m_maxStepSize;
157  options.stepping.stepTolerance = m_stepTolerance;
158  options.maxSteps = m_maxSteps;
159  options.maxTargetSkipping = m_maxTargetSkipping;
160 
161 
162  //switch off material interactions
163  auto& materialInteractor = options.actorList.get<Acts::MaterialInteractor>();
164  materialInteractor.energyLoss = false;
165  materialInteractor.multipleScattering = false;
166  materialInteractor.recordInteractions = false;
167 
168  Propagator propagator(std::move(stepper), std::move(navigator),
169  Acts::getDefaultLogger("Propagator", ActsTrk::actsLevelVector(msgLevel())));
170 
171  for(const xAOD::TruthParticle* truthParticle : *truthParticles) {
172 
173  ATH_MSG_DEBUG("Processing truth particle with PDG ID: " << truthParticle->pdgId() << " ,pT: "
174  << truthParticle->pt() << " , p: " << truthParticle->p4().P() << ", eta: " << truthParticle->eta() << " , phi: " << truthParticle->phi());
175 
176  //select only muons or geantinos particles
177  if(std::abs(truthParticle->pdgId()) != 13 && std::abs(truthParticle->pdgId()) != 998) {
178  ATH_MSG_VERBOSE("Skipping truth particle with PDG ID: " << truthParticle->pdgId()<<" only muons or charged geantinos are being processed");
179  continue;
180  }
181 
182  Acts::ParticleHypothesis actsParticleHypothesis = truthParticle->pdgId() == 998 ?
183  Acts::ParticleHypothesis::chargedGeantino() : Acts::ParticleHypothesis::muon();
184 
185 
186  //take the truth segments witht he sim hits
187  std::vector<std::pair<const xAOD::MuonSegment*, std::vector<const xAOD::MuonSimHit*>>> muonSegmentWithSimHits;
188  const SegLink_t& segLink = segAcc(*truthParticle);
189  if (segLink.empty()) {
190  ATH_MSG_WARNING("No segment link found for truth particle with PDG ID: " << truthParticle->pdgId());
191  continue;
192  }
193  for(const auto& truthSegLink: segLink) {
194  const xAOD::MuonSegment* seg{*truthSegLink};
195  if(!seg){
196  continue;
197  }
198  auto unordedHits = MuonR4::getMatchingSimHits(*seg);
199  std::vector<const xAOD::MuonSimHit*> muonSimHits{unordedHits.begin(), unordedHits.end()};
200  ATH_MSG_VERBOSE("Segment at : "<<Amg::toString(seg->position())<<" with Sim Hits: "<<unordedHits.size());
201  muonSegmentWithSimHits.emplace_back(seg,muonSimHits);
202 
203  }
204 
205  const auto& particle = truthParticle->p4();
206  m_truthPt = particle.Pt();
207  m_truthP = particle.P();
208 
209  const xAOD::TruthVertex* prodVertex = truthParticle->prodVtx();
210  Amg::Vector3D prodPos = prodVertex ? Amg::Vector3D(prodVertex->x(), prodVertex->y(), prodVertex->z())
212  Amg::Vector3D prodDir{Amg::dirFromAngles(particle.Phi(), particle.Theta())};
213  ATH_MSG_VERBOSE("Truth particle produced at " << Amg::toString(prodPos) << " with direction " << Amg::toString(prodDir));
214 
215  //position, direction and momentum at the start of the propagation
216  Amg::Vector3D startPropPos{prodPos};
217  Amg::Vector3D startPropDir{prodDir};
218  double startPropP{energyToActs(particle.P())};
219 
220  if(m_startFromFirstHit) {
221 
222  if(muonSegmentWithSimHits.empty()) {
223  ATH_MSG_DEBUG("No segments found for truth particle with PDG ID: " << truthParticle->pdgId());
224  continue;
225  }
226  // sort the segments by their radial distance
227  std::ranges::sort(muonSegmentWithSimHits,
228  [](const auto& a, const auto& b) {
229  return a.first->position().perp() < b.first->position().perp();
230  });
231 
232 
233  //sort the sim hits of the first segment to get the starting propagation position as the first one
234  std::vector<const xAOD::MuonSimHit*>& muonSimHits = muonSegmentWithSimHits.front().second;
235  std::ranges::sort(muonSimHits,
236  [this, &gctx](const xAOD::MuonSimHit* hit1, const xAOD::MuonSimHit* hit2){
237  const Amg::Vector3D globalPos1 = toGlobalTrf(*gctx,hit1->identify())*xAOD::toEigen(hit1->localPosition());
238  const Amg::Vector3D globalPos2 = toGlobalTrf(*gctx,hit2->identify())*xAOD::toEigen(hit2->localPosition());
239  return globalPos1.norm()<globalPos2.norm();
240  });
241 
242  ATH_MSG_VERBOSE("After sorting..");
243  for(const auto& simHit: muonSimHits){
244  ATH_MSG_VERBOSE("Sim Hit of first segment at position: "<<Amg::toString(toGlobalTrf(*gctx, simHit->identify())*xAOD::toEigen(simHit->localPosition())));
245 
246  }
247 
248 
249  startPropPos = toGlobalTrf(*gctx, muonSimHits.front()->identify())*xAOD::toEigen(muonSimHits.front()->localPosition());
250  startPropDir = toGlobalTrf(*gctx, muonSimHits.front()->identify()).linear()*xAOD::toEigen(muonSimHits.front()->localDirection());
251  startPropP = energyToActs(muonSimHits.front()->kineticEnergy());
252 
253 
254  ATH_MSG_VERBOSE("Kinetic Energy from the simHit: "<<startPropP / Gaudi::Units::GeV<<" and mass: "<<muonSimHits.front()->mass()<<" and energy deposit: "<<muonSimHits.front()->energyDeposit() / Gaudi::Units::eV);
255 
256 
257  }
258 
259  ATH_MSG_VERBOSE("Starting propagation from"<<Amg::toString(startPropPos)<<" with direction"
260  <<Amg::toString(startPropDir)<<" and momentum "<<startPropP);
261 
262 
263 
264  Acts::BoundTrackParameters start = Acts::BoundTrackParameters::createCurvilinear(
265  Acts::VectorHelpers::makeVector4(startPropPos, 0.), startPropDir,
266  truthParticle->charge() / startPropP,
267  std::nullopt,
268  actsParticleHypothesis);
269 
270  ATH_MSG_DEBUG("start propagating here");
271  auto result = propagator.propagate(start, options);
272  const Acts::detail::SteppingLogger::result_type state = result.value().get<Acts::detail::SteppingLogger::result_type>();
273  const Acts::MaterialInteractor::result_type material = result.value().get<Acts::MaterialInteractor::result_type>();
274 
275  m_propSteps = state.steps.size();
276  ATH_MSG_DEBUG("Number of propagated steps : " << m_propSteps);
277  m_propLength = result.value().pathLength;
278  std::vector<PropagatorRecorder> propagatedHits;
279 
280  for(const auto& step : state.steps) {
281  if(!step.surface) {
282  continue;
283  }
284 
285  const SurfaceCache* sCache = dynamic_cast<const SurfaceCache *>(step.surface->associatedDetectorElement());
286  if(!sCache) {
287  ATH_MSG_VERBOSE("Surface found but it's a portal, continuing..");
288  continue;
289  }
290  const Identifier ID = sCache->identify();
291  const Amg::Transform3D toGap{toLocalTrf(*gctx, ID)};
292  ATH_MSG_VERBOSE("Identify propagated hit " << m_idHelperSvc->toString(ID) << " with hit at local position " << Amg::toString(toGap*step.position)<<" and global direction "<<Amg::toString(step.momentum.unit()));
293 
294 
295  PropagatorRecorder newRecord{};
296  newRecord.id = ID;
297  newRecord.actsPropPos = toGap*step.position;
298  newRecord.actsGlobalPos = step.position;
299  newRecord.actsPropDir = toGap.linear()*step.momentum.unit();
300  newRecord.actsPropabsMomentum = step.momentum.norm();
301  newRecord.actsStepSize = step.stepSize.value();
302  //calculate the distance of the propagated hit to the wire in case of MDTs
303 
304  if(m_idHelperSvc->isMdt(ID)){
305  //get the surface
306  const auto* tubeSurf = dynamic_cast<const Acts::StrawSurface*>(&sCache->surface());
307  if(tubeSurf){
308  Amg::Vector3D wirePos = toGap*tubeSurf->center(anygctx);
309  Amg::Vector3D wireDir = toGap.linear()*tubeSurf->lineDirection(anygctx);
310  Amg::Vector3D localPropHit = newRecord.actsPropPos;
311  Amg::Vector3D dirPropHit = newRecord.actsPropDir;
312  double distToWire = Amg::lineDistance(wirePos, wireDir, localPropHit, dirPropHit);
313  newRecord.actsHitWireDist = distToWire;
314  }
315 
316  }
317 
318  propagatedHits.emplace_back(newRecord);
319 
320  }
321 
322 
323  for (const auto&[segment, simHits] : muonSegmentWithSimHits) {
324  for(const xAOD::MuonSimHit* simHit : simHits){
325 
326  const Identifier ID = simHit->identify();
327 
328  const Amg::Vector3D localPos = xAOD::toEigen(simHit->localPosition());
329 
330  const Amg::Vector3D globalPos = toGlobalTrf(*gctx, simHit->identify())*xAOD::toEigen(simHit->localPosition());
331  const Amg::Vector3D localDir = xAOD::toEigen(simHit->localDirection());
332 
333  if(m_r4DetMgr->getReadoutElement(ID)->detectorType() == ActsTrk::DetectorType::sTgc && localPos.z() != 0.0){
334  continue;
335 
336  }
337 
339  m_techIdx.push_back(toInt(m_idHelperSvc->technologyIndex(ID)));
341 
342  m_truthLoc.push_back(localPos);
343  m_truthDir.push_back(localDir);
344  m_truthGlob.push_back(globalPos);
345  m_startGlob.push_back(startPropPos);
346  ATH_MSG_DEBUG("Truth hit with ID: " << m_idHelperSvc->toString(ID)
347  << " at local position: " << Amg::toString(localPos)
348  << " and global position: " << Amg::toString(globalPos)
349  << " and direction: " << Amg::toString(localDir));
350 
351  //get the matching propagated hits
352  auto it_begin = std::ranges::find_if(propagatedHits,
353  [this, ID](const auto& propagatedHit) {
354  return m_idHelperSvc->detElId(ID) == m_idHelperSvc->detElId(propagatedHit.id) &&
355  layerHash(ID) == layerHash(propagatedHit.id);
356  });
357  m_isPropagated.push_back(it_begin != propagatedHits.end());
358 
359  if(it_begin == propagatedHits.end()){
360  m_actsPropLoc.push_back(dummyVec);
363  m_actsPropGlob.push_back(dummyVec);
367  continue;
368  }
369 
370  //find - if any - propagated hits on the same layer
371  auto it_end = std::find_if(it_begin, propagatedHits.end(),
372  [this, ID](const auto& propagatedHit) {
373  return m_idHelperSvc->detElId(ID) != m_idHelperSvc->detElId(propagatedHit.id) ||
374  layerHash(ID) != layerHash(propagatedHit.id);
375  });
376 
378  auto it = std::min_element(it_begin, it_end,
379  [&localPos](const PropagatorRecorder& a,
380  const PropagatorRecorder& b){
381  return (localPos - a.actsPropPos).mag() < (localPos - b.actsPropPos).mag();
382  });
383 
384  ATH_MSG_DEBUG("Found propagated hit with ID: " << m_idHelperSvc->toString(it->id)
385  << " at local position: " << Amg::toString(it->actsPropPos)
386  << " and global position: " << Amg::toString(it->actsGlobalPos)
387  << " and direction: " << Amg::toString(it->actsPropDir));
388 
389  m_actsPropLoc.push_back(it->actsPropPos);
390  m_actsPropDir.push_back(it->actsPropDir);
391  m_actsPropGlob.push_back(it->actsGlobalPos);
392  m_actsPropabsMomentum.push_back(it->actsPropabsMomentum);
393  m_actsStepSize.push_back(it->actsStepSize);
394  m_actsHitWireDist.push_back(it->actsHitWireDist);
395 
396 
397  }
398  }
399 
400  m_event = ctx.eventID().event_number();
401  m_tree.fill(ctx);
402 
403 
404  }
405 
406 
407  return StatusCode::SUCCESS;
408  }
409 
410 }
411 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ActsTrk::ActsMuonTrackingGeometryTest::m_maxTargetSkipping
UnsignedIntegerProperty m_maxTargetSkipping
Definition: ActsMuonTrackingGeometryTest.h:78
MuonSimHitHelpers.h
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
ActsTrk::ActsMuonTrackingGeometryTest::m_actsPropLoc
MuonVal::ThreeVectorBranch m_actsPropLoc
Definition: ActsMuonTrackingGeometryTest.h:103
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
get_generator_info.result
result
Definition: get_generator_info.py:21
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
ActsTrk::ActsMuonTrackingGeometryTest::execute
StatusCode execute() override
Definition: ActsMuonTrackingGeometryTest.cxx:107
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
MuonVal::MuonTesterTree::init
StatusCode init(OWNER *instance)
Initialize method.
ActsTrk::ActsMuonTrackingGeometryTest::m_startGlob
MuonVal::ThreeVectorBranch m_startGlob
Definition: ActsMuonTrackingGeometryTest.h:101
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
SurfaceCache.h
perp
Scalar perp() const
perp method - perpenticular length
Definition: AmgMatrixBasePlugin.h:44
ActsTrk::ActsMuonTrackingGeometryTest::m_truthLoc
MuonVal::ThreeVectorBranch m_truthLoc
Definition: ActsMuonTrackingGeometryTest.h:96
ActsTrk::ActsMuonTrackingGeometryTest::toGlobalTrf
Amg::Transform3D toGlobalTrf(const ActsTrk::GeometryContext &gctx, const Identifier &hitId) const
Definition: ActsMuonTrackingGeometryTest.cxx:72
ActsTrk::detail::Navigator
Acts::Navigator Navigator
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:31
ActsMuonTrackingGeometryTest.h
ActsTrk::ActsMuonTrackingGeometryTest::m_truthParticleKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleKey
Definition: ActsMuonTrackingGeometryTest.h:66
ActsTrk::ActsMuonTrackingGeometryTest::m_detMgrKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detMgrKey
Definition: ActsMuonTrackingGeometryTest.h:58
initialize
void initialize()
Definition: run_EoverP.cxx:894
ActsTrk::ActsMuonTrackingGeometryTest::m_maxStepSize
DoubleProperty m_maxStepSize
Definition: ActsMuonTrackingGeometryTest.h:74
ActsTrk::ActsMuonTrackingGeometryTest::m_maxSteps
UnsignedIntegerProperty m_maxSteps
Definition: ActsMuonTrackingGeometryTest.h:76
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
ActsTrk::ActsMuonTrackingGeometryTest::m_detId
MuonVal::MuonIdentifierBranch m_detId
Definition: ActsMuonTrackingGeometryTest.h:93
ActsTrk::energyToActs
constexpr double energyToActs(const double athenaE)
Converts an energy scalar from Athena to Acts units.
Definition: UnitConverters.h:21
ActsTrk::ActsMuonTrackingGeometryTest::m_truthPt
MuonVal::ScalarBranch< float > & m_truthPt
Definition: ActsMuonTrackingGeometryTest.h:99
ActsTrk::ActsMuonTrackingGeometryTest::m_rndmGenSvc
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Definition: ActsMuonTrackingGeometryTest.h:54
skel.it
it
Definition: skel.GENtoEVGEN.py:407
ActsTrk::ActsMuonTrackingGeometryTest::finalize
StatusCode finalize() override
Definition: ActsMuonTrackingGeometryTest.cxx:102
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::ActsMuonTrackingGeometryTest::m_propLength
MuonVal::ScalarBranch< float > & m_propLength
Definition: ActsMuonTrackingGeometryTest.h:108
ActsTrk::ActsMuonTrackingGeometryTest::m_startFromFirstHit
Gaudi::Property< bool > m_startFromFirstHit
Definition: ActsMuonTrackingGeometryTest.h:82
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
ActsTrk::ActsMuonTrackingGeometryTest::m_actsPropabsMomentum
MuonVal::VectorBranch< float > & m_actsPropabsMomentum
Definition: ActsMuonTrackingGeometryTest.h:102
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::layerHash
virtual IdentifierHash layerHash(const Identifier &measId) const =0
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ActsTrk::DetectorType::sTgc
@ sTgc
Micromegas (NSW)
ActsTrk::ActsMuonTrackingGeometryTest::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: ActsMuonTrackingGeometryTest.h:52
ActsTrk::ActsMuonTrackingGeometryTest::m_trackingGeometryTool
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Definition: ActsMuonTrackingGeometryTest.h:56
xAOD::TruthVertex_v1::y
float y() const
Vertex y displacement.
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
MuonSegmentContainer.h
ActsTrk::ActsMuonTrackingGeometryTest::m_propSteps
MuonVal::ScalarBranch< unsigned int > & m_propSteps
Definition: ActsMuonTrackingGeometryTest.h:110
ActsTrk::ActsMuonTrackingGeometryTest::m_gasGapId
MuonVal::VectorBranch< unsigned short > & m_gasGapId
Definition: ActsMuonTrackingGeometryTest.h:95
MuonVal::ThreeVectorBranch::push_back
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
Definition: ThreeVectorBranch.cxx:23
ActsTrk::ActsMuonTrackingGeometryTest::layerHash
IdentifierHash layerHash(const Identifier &id) const
Definition: ActsMuonTrackingGeometryTest.cxx:80
ActsTrk::ActsMuonTrackingGeometryTest::toLocalTrf
Amg::Transform3D toLocalTrf(const ActsTrk::GeometryContext &gctx, const Identifier &hitId) const
Definition: ActsMuonTrackingGeometryTest.cxx:65
ActsTrk::ActsMuonTrackingGeometryTest::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: ActsMuonTrackingGeometryTest.h:61
python.SystemOfUnits.eV
float eV
Definition: SystemOfUnits.py:173
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ActsTrk::ActsMuonTrackingGeometryTest::m_truthP
MuonVal::ScalarBranch< float > & m_truthP
Definition: ActsMuonTrackingGeometryTest.h:100
SG::ReadDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
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
UnitConverters.h
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
MuonVal::MuonIdentifierBranch::push_back
virtual void push_back(const Identifier &id)
Definition: IdentifierBranch.cxx:14
ActsTrk::ActsMuonTrackingGeometryTest::m_geoCtxKey
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Definition: ActsMuonTrackingGeometryTest.h:64
MuonGMR4::MuonReadoutElement::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsTrk::GeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:81
ActsTrk::ActsMuonTrackingGeometryTest::m_stepTolerance
DoubleProperty m_stepTolerance
Definition: ActsMuonTrackingGeometryTest.h:80
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:378
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
MuonReadoutElement.h
ActsTrk::SurfaceCache::surface
const Acts::Surface & surface() const override final
Returns the dereferenced pointer cache.
Definition: SurfaceCache.cxx:19
ActsTrk::GeometryContext
Definition: GeometryContext.h:28
MuonR4::SegLink_t
ElementLink< MuonR4::SegmentContainer > SegLink_t
Abrivation of the link to the reco segment container
Definition: xAODSegmentCnvAlg.cxx:19
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
ActsTrk::ActsMuonTrackingGeometryTest::m_truthSegLinkKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_truthSegLinkKey
Definition: ActsMuonTrackingGeometryTest.h:68
MuonVal::VectorBranch::push_back
void push_back(const T &value)
Adds a new element at the end of the vector.
TruthVertex.h
ActsTrk::ActsMuonTrackingGeometryTest::m_techIdx
MuonVal::VectorBranch< unsigned short > & m_techIdx
Definition: ActsMuonTrackingGeometryTest.h:94
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
ActsTrk::DetectorType::Mdt
@ Mdt
MuonSpectrometer.
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:76
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::lineDistance
double lineDistance(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
: Calculates the shortest distance between two lines
Definition: GeoPrimitivesHelpers.h:308
xAOD::ParticleHypothesis
ParticleHypothesis
Definition: TrackingPrimitives.h:193
ActsTrk::ActsMuonTrackingGeometryTest::m_truthGlob
MuonVal::ThreeVectorBranch m_truthGlob
Definition: ActsMuonTrackingGeometryTest.h:97
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
RNGWrapper.h
Amg::dirFromAngles
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
Definition: GeoPrimitivesHelpers.h:299
ActsTrk::ActsMuonTrackingGeometryTest::m_actsHitWireDist
MuonVal::VectorBranch< float > & m_actsHitWireDist
Definition: ActsMuonTrackingGeometryTest.h:106
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
ActsTrk::ActsMuonTrackingGeometryTest::m_pathLimit
DoubleProperty m_pathLimit
Definition: ActsMuonTrackingGeometryTest.h:72
ActsTrk::ActsMuonTrackingGeometryTest::m_r4DetMgr
const MuonGMR4::MuonDetectorManager * m_r4DetMgr
Definition: ActsMuonTrackingGeometryTest.h:50
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:51
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
GeoPrimitivesHelpers.h
ActsTrk::ActsMuonTrackingGeometryTest::m_isPropagated
MuonVal::VectorBranch< unsigned short > & m_isPropagated
Definition: ActsMuonTrackingGeometryTest.h:109
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
ActsTrk::ActsMuonTrackingGeometryTest::initialize
StatusCode initialize() override
Definition: ActsMuonTrackingGeometryTest.cxx:85
MuonVal::MuonTesterTree::fill
bool fill(const EventContext &ctx)
Fills the tree per call.
Definition: MuonTesterTree.cxx:89
MuonVal::MuonTesterTree::write
StatusCode write()
Finally write the TTree objects.
Definition: MuonTesterTree.cxx:178
ActsTrk::ActsMuonTrackingGeometryTest::m_actsPropGlob
MuonVal::ThreeVectorBranch m_actsPropGlob
Definition: ActsMuonTrackingGeometryTest.h:104
LArCellBinning.step
step
Definition: LArCellBinning.py:158
LoggerUtils.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MdtCalibInput.h:31
ActsTrk::ActsMuonTrackingGeometryTest::m_tree
MuonVal::MuonTesterTree m_tree
Definition: ActsMuonTrackingGeometryTest.h:92
ActsTrk::ActsMuonTrackingGeometryTest::m_event
MuonVal::ScalarBranch< unsigned int > & m_event
Definition: ActsMuonTrackingGeometryTest.h:111
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
ActsTrk::ActsMuonTrackingGeometryTest::m_actsStepSize
MuonVal::VectorBranch< float > & m_actsStepSize
Definition: ActsMuonTrackingGeometryTest.h:107
MuonGMR4::MuonReadoutElement::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsTrk::GeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:78
zero
void zero(TH2 *h)
zero the contents of a 2d histogram
Definition: comparitor.cxx:438
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:38
ActsTrk::ActsMuonTrackingGeometryTest::m_truthDir
MuonVal::ThreeVectorBranch m_truthDir
Definition: ActsMuonTrackingGeometryTest.h:98
HepMCHelpers.h
ActsTrk::ActsMuonTrackingGeometryTest::m_actsPropDir
MuonVal::ThreeVectorBranch m_actsPropDir
Definition: ActsMuonTrackingGeometryTest.h:105
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Muon::MuonStationIndex::toInt
constexpr int toInt(const EnumType enumVal)
Definition: MuonStationIndex.h:61
IAthRNGSvc.h
MuonGMR4::MuonDetectorManager::getReadoutElement
const MuonReadoutElement * getReadoutElement(const Identifier &id) const
Returns a generic Muon readout element.
Identifier
Definition: IdentifierFieldParser.cxx:14