ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
EDM4hep Plugin

Detailed Description

Classes

struct  Acts::IsReadOnlyMultiTrajectory< ActsPlugins::ConstPodioTrackStateContainer< holder_t > >
struct  Acts::IsReadOnlyMultiTrajectory< ActsPlugins::MutablePodioTrackStateContainer< holder_t > >
struct  Acts::IsReadOnlyTrackContainer< ActsPlugins::ConstPodioTrackContainer< holder_t > >
struct  Acts::IsReadOnlyTrackContainer< ActsPlugins::MutablePodioTrackContainer< holder_t > >
class  ActsPlugins::ConstPodioTrackContainer< holder_t >
 Read-only track container backend using podio for storage. More...
class  ActsPlugins::ConstPodioTrackStateContainer< holder_t >
 Read-only track state container backend using podio for storage. More...
class  ActsPlugins::EDM4hepUtil::SimHitAssociation
 Helper class for associating simulation hits between EDM4hep and internal indices. More...
class  ActsPlugins::MutablePodioTrackContainer< holder_t >
 Mutable Podio-based track container implementation. More...
class  ActsPlugins::MutablePodioTrackStateContainer< holder_t >
 Mutable Podio-based track state container implementation. More...
class  ActsPlugins::PodioTrackContainerBase
 Base class for PODIO track containers. More...
class  ActsPlugins::PodioTrackStateContainerBase
 Base class for PODIO track state containers. More...
class  ActsPlugins::PodioUtil::ConversionHelper
 Helper interface for converting between ACTS and PODIO types. More...

Typedefs

using ActsPlugins::EDM4hepUtil::TrackerHitLookup
 Callback resolving the EDM4hep tracker hit associated with a measurement track state.

Functions

template<template< typename... > class other_holder_t>
requires std::is_constructible_v< holder_t<const ActsPodioEdm::TrackStateCollection>, const ActsPodioEdm::TrackStateCollection&>
 ActsPlugins::ConstPodioTrackStateContainer< holder_t >::ConstPodioTrackStateContainer (const MutablePodioTrackStateContainer< other_holder_t > &other)
 Construct a const track state container from a mutable (copy).
template<template< typename... > class other_holder_t>
requires std::is_same_v<holder_t<const ActsPodioEdm::TrackStateCollection>, other_holder_t<ActsPodioEdm::TrackStateCollection>>
 ActsPlugins::ConstPodioTrackStateContainer< holder_t >::ConstPodioTrackStateContainer (MutablePodioTrackStateContainer< other_holder_t > &&other)
 Construct a const track state container from a mutable (move).
edm4hep::MCParticle ActsPlugins::EDM4hepUtil::getParticle (const edm4hep::SimTrackerHit &hit)
 Get the particle from a SimTrackerHit.
 ActsPlugins::MutablePodioTrackContainer (const PodioUtil::ConversionHelper &, ActsPodioEdm::TrackCollection &) -> MutablePodioTrackContainer< Acts::RefHolder >
 Deduction guide: when passing a collection reference, deduce RefHolder.
 ActsPlugins::MutablePodioTrackStateContainer (PodioUtil::ConversionHelper &, ActsPodioEdm::TrackStateCollection &, ActsPodioEdm::BoundParametersCollection &, ActsPodioEdm::JacobianCollection &, ActsPodioEdm::TrackStateHitLinkCollection *) -> MutablePodioTrackStateContainer< Acts::RefHolder >
 Deduction guide: when passing collection references, deduce RefHolder.
template<Acts::TrackProxyConcept track_proxy_t>
void ActsPlugins::EDM4hepUtil::readTrack (const Acts::GeometryContext &gctx, const Acts::MagneticFieldContext &mctx, const edm4hep::Track &from, track_proxy_t &track, const Acts::MagneticFieldProvider &magneticField, const Acts::Logger &logger=Acts::getDummyLogger())
 Read an EDM4hep track into Acts format, using a magnetic field provider.
template<Acts::TrackProxyConcept track_proxy_t>
void ActsPlugins::EDM4hepUtil::readTrack (const Acts::GeometryContext &gctx, const edm4hep::Track &from, track_proxy_t &track, double Bz, const Acts::Logger &logger=Acts::getDummyLogger())
 Read an EDM4hep track into Acts format, using a uniform magnetic field.
void ActsPlugins::EDM4hepUtil::setParticle (edm4hep::MutableSimTrackerHit &hit, const edm4hep::MCParticle &particle)
 Set the particle for a MutableSimTrackerHit.
template<Acts::TrackProxyConcept track_proxy_t>
void ActsPlugins::EDM4hepUtil::writeTrack (const Acts::GeometryContext &gctx, const Acts::MagneticFieldContext &mctx, track_proxy_t track, edm4hep::MutableTrack to, const Acts::MagneticFieldProvider &magneticField, const TrackerHitLookup &hitLookup={}, const Acts::Logger &logger=Acts::getDummyLogger())
 Write an Acts track to EDM4hep format, using a magnetic field provider.
template<Acts::TrackProxyConcept track_proxy_t>
void ActsPlugins::EDM4hepUtil::writeTrack (const Acts::GeometryContext &gctx, track_proxy_t track, edm4hep::MutableTrack to, double Bz, const TrackerHitLookup &hitLookup={}, const Acts::Logger &logger=Acts::getDummyLogger())
 Write an Acts track to EDM4hep format, using a uniform magnetic field.
edm4hep::TrackState ActsPlugins::EDM4hepUtil::writeTrackState (const Acts::GeometryContext &gctx, const Acts::MagneticFieldContext &mctx, std::int32_t location, const Acts::BoundTrackParameters &params, const Acts::MagneticFieldProvider &magneticField, const Acts::Logger &logger=Acts::getDummyLogger())
 Convert a single set of bound track parameters into an EDM4hep track state.
edm4hep::TrackState ActsPlugins::EDM4hepUtil::writeTrackState (const Acts::GeometryContext &gctx, std::int32_t location, const Acts::BoundTrackParameters &params, const Acts::MagneticFieldProvider &magneticField, Acts::MagneticFieldProvider::Cache &fieldCache, const Acts::Logger &logger=Acts::getDummyLogger())
 Convert a single set of bound track parameters into an EDM4hep track state.

Typedef Documentation

◆ TrackerHitLookup

Initial value:
std::function<std::optional<edm4hep::TrackerHit>(
AnyTrackStateProxy< true > AnyConstTrackStateProxy
Type alias for a const track state proxy.
Definition AnyTrackStateProxy.hpp:950

Callback resolving the EDM4hep tracker hit associated with a measurement track state.

It is invoked by writeTrack once per measurement track state and should return the associated edm4hep::TrackerHit (any of the interfaced hit types) or std::nullopt if there is none. The track state is passed type-erased, so this is a plain callable independent of the trajectory backend. An empty callback means no tracker hits are written.

Function Documentation

◆ ConstPodioTrackStateContainer() [1/2]

template<template< typename... > class holder_t>
requires std::is_constructible_v< holder_t<const ActsPodioEdm::TrackStateCollection>, const ActsPodioEdm::TrackStateCollection&>
template<template< typename... > class other_holder_t>
requires std::is_constructible_v< holder_t<const ActsPodioEdm::TrackStateCollection>, const ActsPodioEdm::TrackStateCollection&>
ActsPlugins::ConstPodioTrackStateContainer< holder_t >::ConstPodioTrackStateContainer ( const MutablePodioTrackStateContainer< other_holder_t > & other)
explicit

Construct a const track state container from a mutable (copy).

Parameters
otherThe mutable container to construct from

◆ ConstPodioTrackStateContainer() [2/2]

template<template< typename... > class holder_t>
requires std::is_same_v<holder_t<const ActsPodioEdm::TrackStateCollection>, other_holder_t<ActsPodioEdm::TrackStateCollection>>
template<template< typename... > class other_holder_t>
requires std::is_same_v<holder_t<const ActsPodioEdm::TrackStateCollection>, other_holder_t<ActsPodioEdm::TrackStateCollection>>
ActsPlugins::ConstPodioTrackStateContainer< holder_t >::ConstPodioTrackStateContainer ( MutablePodioTrackStateContainer< other_holder_t > && other)
explicit

Construct a const track state container from a mutable (move).

Parameters
otherThe mutable container to move from

◆ getParticle()

edm4hep::MCParticle ActsPlugins::EDM4hepUtil::getParticle ( const edm4hep::SimTrackerHit & hit)

Get the particle from a SimTrackerHit.

Parameters
hitThe SimTrackerHit
Returns
The associated MCParticle

◆ readTrack() [1/2]

template<Acts::TrackProxyConcept track_proxy_t>
void ActsPlugins::EDM4hepUtil::readTrack ( const Acts::GeometryContext & gctx,
const Acts::MagneticFieldContext & mctx,
const edm4hep::Track & from,
track_proxy_t & track,
const Acts::MagneticFieldProvider & magneticField,
const Acts::Logger & logger = Acts::getDummyLogger() )

Read an EDM4hep track into Acts format, using a magnetic field provider.

This is the general form of readTrack, and the inverse of the corresponding writeTrack overload. The perigee conversion of each track state evaluates the local field via magneticField at that state's point of closest approach, which supports spatially varying fields. That is the same position writeTrackState samples the field at, so the two round-trip consistently. Note this is not in general the state's referencePoint: for parameters expressed on a perigee the two differ by d0/z0.

Parameters
gctxThe geometry context
mctxThe magnetic field context
fromThe EDM4hep track to read
trackThe Acts track proxy to fill
magneticFieldThe magnetic field provider, evaluated at each state
loggerThe logger instance

◆ readTrack() [2/2]

template<Acts::TrackProxyConcept track_proxy_t>
void ActsPlugins::EDM4hepUtil::readTrack ( const Acts::GeometryContext & gctx,
const edm4hep::Track & from,
track_proxy_t & track,
double Bz,
const Acts::Logger & logger = Acts::getDummyLogger() )

Read an EDM4hep track into Acts format, using a uniform magnetic field.

Convenience overload of readTrack for the common case of a constant solenoidal field. Delegates to the Acts::MagneticFieldProvider form with an Acts::ConstantBField.

Parameters
gctxThe geometry context
fromThe EDM4hep track to read
trackThe Acts track proxy to fill
BzThe (uniform) magnetic field z-component in Acts native units
loggerThe logger instance

◆ setParticle()

void ActsPlugins::EDM4hepUtil::setParticle ( edm4hep::MutableSimTrackerHit & hit,
const edm4hep::MCParticle & particle )

Set the particle for a MutableSimTrackerHit.

Parameters
hitThe MutableSimTrackerHit
particleThe MCParticle to set

◆ writeTrack() [1/2]

template<Acts::TrackProxyConcept track_proxy_t>
void ActsPlugins::EDM4hepUtil::writeTrack ( const Acts::GeometryContext & gctx,
const Acts::MagneticFieldContext & mctx,
track_proxy_t track,
edm4hep::MutableTrack to,
const Acts::MagneticFieldProvider & magneticField,
const TrackerHitLookup & hitLookup = {},
const Acts::Logger & logger = Acts::getDummyLogger() )

Write an Acts track to EDM4hep format, using a magnetic field provider.

This is the general form of writeTrack. In addition to the track summary quantities (chi2, ndf, number of holes) it writes one EDM4hep track state per measurement plus a dedicated AtIP state. The perigee conversion of each state evaluates the local field via magneticField at the global position of that state, which supports spatially varying fields

Note
Resolving tracker hits requires application-specific source-link/hit-container knowledge, so it is delegated to the optional hitLookup callback. It is invoked exactly once per measurement track state, in the order the states are emitted, i.e. inside-out from AtFirstHit to AtLastHit, so a stateful callback sees the same order as the output. Returned hits are attached via addToTrackerHits.
Parameters
gctxThe geometry context
mctxThe magnetic field context
trackThe Acts track to convert
toThe EDM4hep track to write to
magneticFieldThe magnetic field provider, evaluated at each state
hitLookupOptional callback mapping a measurement track state to its EDM4hep tracker hit (defaults to writing no tracker hits)
loggerThe logger instance

◆ writeTrack() [2/2]

template<Acts::TrackProxyConcept track_proxy_t>
void ActsPlugins::EDM4hepUtil::writeTrack ( const Acts::GeometryContext & gctx,
track_proxy_t track,
edm4hep::MutableTrack to,
double Bz,
const TrackerHitLookup & hitLookup = {},
const Acts::Logger & logger = Acts::getDummyLogger() )

Write an Acts track to EDM4hep format, using a uniform magnetic field.

Convenience overload of writeTrack for the common case of a constant solenoidal field. Delegates to the Acts::MagneticFieldProvider form with an Acts::ConstantBField.

Parameters
gctxThe geometry context
trackThe Acts track to convert
toThe EDM4hep track to write to
BzThe (uniform) magnetic field z-component in Acts native units
hitLookupOptional callback mapping a measurement track state to its EDM4hep tracker hit (defaults to writing no tracker hits)
loggerThe logger instance

◆ writeTrackState() [1/2]

edm4hep::TrackState ActsPlugins::EDM4hepUtil::writeTrackState ( const Acts::GeometryContext & gctx,
const Acts::MagneticFieldContext & mctx,
std::int32_t location,
const Acts::BoundTrackParameters & params,
const Acts::MagneticFieldProvider & magneticField,
const Acts::Logger & logger = Acts::getDummyLogger() )

Convert a single set of bound track parameters into an EDM4hep track state.

Convenience overload of writeTrackState that creates its own field cache from mctx. Prefer the cache-taking overload when converting many states in a row.

Parameters
gctxThe geometry context
mctxThe magnetic field context
locationThe EDM4hep track state location, e.g. edm4hep::TrackState::AtIP
paramsThe bound track parameters to convert
magneticFieldThe magnetic field provider
loggerThe logger instance
Returns
The converted EDM4hep track state

◆ writeTrackState() [2/2]

edm4hep::TrackState ActsPlugins::EDM4hepUtil::writeTrackState ( const Acts::GeometryContext & gctx,
std::int32_t location,
const Acts::BoundTrackParameters & params,
const Acts::MagneticFieldProvider & magneticField,
Acts::MagneticFieldProvider::Cache & fieldCache,
const Acts::Logger & logger = Acts::getDummyLogger() )

Convert a single set of bound track parameters into an EDM4hep track state.

The EDM4hep track state uses a perigee parametrization (D0, Z0, phi, tanLambda, omega, time) defined relative to a reference point. If params are not already expressed on a perigee surface they are re-expressed at an ad-hoc perigee created at their global position, transporting both parameters and covariance, and the state's referencePoint is set to that perigee centre. The curvature omega depends on the local field, which is evaluated at the position of params.

This is the per-state building block used by writeTrack. It is exposed so that track states which do not come from a fitted track - a seed, or an extrapolation to the calorimeter face - can be produced with exactly the same conversion instead of a private reimplementation.

Parameters
gctxThe geometry context
locationThe EDM4hep track state location, e.g. edm4hep::TrackState::AtIP
paramsThe bound track parameters to convert
magneticFieldThe magnetic field provider
fieldCacheField lookup cache, reused across calls
loggerThe logger instance
Returns
The converted EDM4hep track state