Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::EDM4hepUtil Namespace Reference

Typedefs

using MapParticleIdFrom = std::function< ActsFatras::Barcode(edm4hep::MCParticle particle)>
 
using MapParticleIdTo = std::function< edm4hep::MCParticle(ActsFatras::Barcode particleId)>
 
using MapGeometryIdFrom = std::function< Acts::GeometryIdentifier(std::uint64_t cellId)>
 
using MapGeometryIdTo = std::function< std::uint64_t(Acts::GeometryIdentifier geometryId)>
 

Functions

ActsFatras::Particle readParticle (const edm4hep::MCParticle &from, const MapParticleIdFrom &particleMapper)
 
void writeParticle (const ActsFatras::Particle &from, edm4hep::MutableMCParticle to)
 
ActsFatras::Hit readSimHit (const edm4hep::SimTrackerHit &from, const MapParticleIdFrom &particleMapper, const MapGeometryIdFrom &geometryMapper)
 
void writeSimHit (const ActsFatras::Hit &from, edm4hep::MutableSimTrackerHit to, const MapParticleIdTo &particleMapper, const MapGeometryIdTo &geometryMapper)
 
Measurement readMeasurement (const edm4hep::TrackerHitPlane &from, const edm4hep::TrackerHitCollection *fromClusters, Cluster *toCluster, const MapGeometryIdFrom &geometryMapper)
 
void writeMeasurement (const Measurement &from, edm4hep::MutableTrackerHitPlane to, const Cluster *fromCluster, edm4hep::TrackerHitCollection &toClusters, const MapGeometryIdTo &geometryMapper)
 
void writeTrajectory (const Acts::GeometryContext &gctx, double Bz, const Trajectories &from, edm4hep::MutableTrack to, std::size_t fromIndex, const Acts::ParticleHypothesis &particleHypothesis, const IndexMultimap< ActsFatras::Barcode > &hitParticlesMap)
 

Typedef Documentation

using ActsExamples::EDM4hepUtil::MapGeometryIdFrom = typedef std::function<Acts::GeometryIdentifier(std::uint64_t cellId)>

Definition at line 39 of file EDM4hepUtil.hpp.

View newest version in sPHENIX GitHub at line 39 of file EDM4hepUtil.hpp

using ActsExamples::EDM4hepUtil::MapGeometryIdTo = typedef std::function<std::uint64_t(Acts::GeometryIdentifier geometryId)>

Definition at line 41 of file EDM4hepUtil.hpp.

View newest version in sPHENIX GitHub at line 41 of file EDM4hepUtil.hpp

using ActsExamples::EDM4hepUtil::MapParticleIdFrom = typedef std::function<ActsFatras::Barcode(edm4hep::MCParticle particle)>

Definition at line 34 of file EDM4hepUtil.hpp.

View newest version in sPHENIX GitHub at line 34 of file EDM4hepUtil.hpp

using ActsExamples::EDM4hepUtil::MapParticleIdTo = typedef std::function<edm4hep::MCParticle(ActsFatras::Barcode particleId)>

Definition at line 36 of file EDM4hepUtil.hpp.

View newest version in sPHENIX GitHub at line 36 of file EDM4hepUtil.hpp

Function Documentation

Measurement ActsExamples::EDM4hepUtil::readMeasurement ( const edm4hep::TrackerHitPlane &  from,
const edm4hep::TrackerHitCollection *  fromClusters,
Cluster *  toCluster,
const MapGeometryIdFrom &  geometryMapper 
)

Reads a measurement cluster from EDM4hep.

Inpersistent information:

  • hit index
  • 1D local coords?
  • segment path

Known issues:

  • cluster channels are read from inappropriate fields
  • local 2D coordinates and time are read from position

Definition at line 148 of file EDM4hepUtil.cpp.

View newest version in sPHENIX GitHub at line 148 of file EDM4hepUtil.cpp

References Acts::PhysicalConstants::c, ActsExamples::Cluster::channels, Acts::Test::cov, ActsExamples::createMeasurement(), Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime, ActsExamples::DigitizedParameters::indices, Acts::Test::pos, ActsExamples::DigitizedParameters::values, and ActsExamples::DigitizedParameters::variances.

Referenced by ActsExamples::EDM4hepMeasurementReader::read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ActsFatras::Particle ActsExamples::EDM4hepUtil::readParticle ( const edm4hep::MCParticle &  from,
const MapParticleIdFrom &  particleMapper 
)

Reads a Fatras particle from EDM4hep.

Inpersistent information:

  • particle ID
  • process

Definition at line 27 of file EDM4hepUtil.cpp.

View newest version in sPHENIX GitHub at line 27 of file EDM4hepUtil.cpp

References Acts::UnitConstants::e, Acts::UnitConstants::GeV, Acts::UnitConstants::mm, Acts::UnitConstants::ns, ActsFatras::Particle::setAbsoluteMomentum(), ActsFatras::Particle::setDirection(), and ActsFatras::Particle::setPosition4().

Referenced by ActsExamples::EDM4hepParticleReader::read(), and ActsExamples::EDM4hepSimHitReader::read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ActsFatras::Hit ActsExamples::EDM4hepUtil::readSimHit ( const edm4hep::SimTrackerHit &  from,
const MapParticleIdFrom &  particleMapper,
const MapGeometryIdFrom &  geometryMapper 
)

Reads a Fatras hit from EDM4hep.

Inpersistent information:

  • after4 momentum
  • hit index
  • digitization channel

Definition at line 69 of file EDM4hepUtil.cpp.

View newest version in sPHENIX GitHub at line 69 of file EDM4hepUtil.cpp

References energy, Acts::UnitConstants::GeV, index, mass, Acts::UnitConstants::mm, momentum, Acts::UnitConstants::ns, and Acts::Test::pos4().

Referenced by ActsExamples::EDM4hepSimHitReader::read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ActsExamples::EDM4hepUtil::writeMeasurement ( const Measurement from,
edm4hep::MutableTrackerHitPlane  to,
const Cluster *  fromCluster,
edm4hep::TrackerHitCollection &  toClusters,
const MapGeometryIdTo &  geometryMapper 
)

Writes a measurement cluster to EDM4hep.

Inpersistent information:

  • hit index
  • 1D local coords?
  • segment path

Known issues:

  • cluster channels are written to inappropriate fields
  • local 2D coordinates and time are written to position

Definition at line 198 of file EDM4hepUtil.cpp.

View newest version in sPHENIX GitHub at line 198 of file EDM4hepUtil.cpp

References Acts::PhysicalConstants::c, ActsExamples::Cluster::channels, covariance(), Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime, Acts::EDM4hepUtil::EDM4HEP_ACTS_POSITION_TYPE, Acts::UnitConstants::m, Acts::UnitConstants::ns, and Dataset::parameters.

Referenced by ActsExamples::EDM4hepMeasurementWriter::writeT().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ActsExamples::EDM4hepUtil::writeParticle ( const ActsFatras::Particle from,
edm4hep::MutableMCParticle  to 
)

Write a Fatras particle into EDM4hep.

Inpersistent information:

  • particle ID
  • process

Definition at line 56 of file EDM4hepUtil.cpp.

View newest version in sPHENIX GitHub at line 56 of file EDM4hepUtil.cpp

References ActsFatras::Particle::charge(), Acts::UnitConstants::e, ActsFatras::Particle::fourMomentum(), Acts::UnitConstants::GeV, ActsFatras::Particle::mass(), ActsFatras::Particle::pdg(), and ActsFatras::Particle::position().

Referenced by ActsExamples::EDM4hepParticleWriter::writeT(), and ActsExamples::EDM4hepSimHitWriter::writeT().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ActsExamples::EDM4hepUtil::writeSimHit ( const ActsFatras::Hit from,
edm4hep::MutableSimTrackerHit  to,
const MapParticleIdTo &  particleMapper,
const MapGeometryIdTo &  geometryMapper 
)

Writes a Fatras hit to EDM4hep.

Inpersistent information:

  • after4 momentum
  • hit index
  • digitization channel

Definition at line 111 of file EDM4hepUtil.cpp.

View newest version in sPHENIX GitHub at line 111 of file EDM4hepUtil.cpp

References Acts::eEnergy, Acts::eMom0, Acts::eMom1, Acts::eMom2, Acts::ePos0, Acts::ePos1, Acts::ePos2, Acts::eTime, ActsFatras::Hit::fourPosition(), ActsFatras::Hit::geometryId(), Acts::UnitConstants::GeV, Acts::UnitConstants::mm, ActsFatras::Hit::momentum4After(), ActsFatras::Hit::momentum4Before(), Acts::UnitConstants::ns, and ActsFatras::Hit::particleId().

Referenced by ActsExamples::EDM4hepSimHitWriter::writeT().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ActsExamples::EDM4hepUtil::writeTrajectory ( const Acts::GeometryContext gctx,
double  Bz,
const Trajectories &  from,
edm4hep::MutableTrack  to,
std::size_t  fromIndex,
const Acts::ParticleHypothesis particleHypothesis,
const IndexMultimap< ActsFatras::Barcode > &  hitParticlesMap 
)

Writes a trajectory to EDM4hep.

Inpersistent information:

  • trajectory state incomplete
  • relation to the particles

Definition at line 253 of file EDM4hepUtil.cpp.

View newest version in sPHENIX GitHub at line 253 of file EDM4hepUtil.cpp

References Acts::PhysicalConstants::c, Acts::MultiTrajectoryHelpers::TrajectoryState::chi2Sum, Acts::EDM4hepUtil::detail::convertTrackParametersToEdm4hep(), Acts::EDM4hepUtil::detail::Parameters::covariance, ActsExamples::identifyContributingParticles(), Acts::MeasurementFlag, ActsExamples::Trajectories::multiTrajectory(), Acts::MultiTrajectoryHelpers::TrajectoryState::NDF, filter::state, Acts::EDM4hepUtil::detail::Parameters::surface, Acts::MultiTrajectoryHelpers::trajectoryState(), and Acts::EDM4hepUtil::detail::Parameters::values.

Referenced by ActsExamples::EDM4hepMultiTrajectoryWriter::writeT().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: