ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk Namespace Reference

The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout geometry to cache the final transformations of the sensor surfaces associated to one particular detector technology (Pixel, Sct, etc.). More...

Namespaces

namespace  detail
 Athena definition of the Eigen plugin.
namespace  Cache
namespace  ParticleHypothesis
namespace  details
namespace  traits
namespace  ScoreBasedSolverCutsImpl

Classes

class  MuonBlueprintNodeBuilder
 Helper class to build a Blueprint node of the muon system. More...
class  ActsMuonTrackingGeometryTest
 Extrapolation test for the ActsMuonTrackingGeometry for gen3. More...
class  AlignStoreProviderAlg
class  DetectorAlignCondAlg
class  GeometryContextAlg
class  TrackContainerReader
class  PixelClusterDataPreparationAlg
class  PixelClusterCacheDataPreparationAlg
class  StripClusterDataPreparationAlg
class  StripClusterCacheDataPreparationAlg
class  HgtdClusterDataPreparationAlg
class  SpacePointDataPreparationAlg
class  SpacePointCacheDataPreparationAlg
class  ClusterizationAlg
class  DataPreparationAlg
class  PixelSpacePointFormationAlgBase
class  StripSpacePointFormationAlgBase
 This version of StripSpacePointFormationAlgBase uses xAOD strip clusters to find space points in the ITk strip detectors. More...
class  HgtdClusteringTool
class  HgtdClusterizationAlg
class  HgtdTimedClusteringTool
class  PixelClusteringTool
class  PixelClusterizationAlg
class  PixelCacheClusterizationAlg
class  PixelSpacePointFormationAlg
 This version of PixelSpacePointFormationAlg uses xAOD pixel clusters to find space points in the ITk pixeldetectors. More...
class  PixelCacheSpacePointFormationAlg
class  PixelSpacePointFormationTool
 Tool to produce pixel space points. More...
class  StripClusteringTool
class  StripClusterizationAlg
class  StripCacheClusterizationAlg
class  StripInformationHelper
class  StripSpacePointFormationAlg
class  StripCacheSpacePointFormationAlg
class  StripSpacePointFormationTool
class  AuxiliaryMeasurementHandler
 Utility class to handle the creation of the Auxiliary measurement used in an Acts track fit This class declares the additionally written xAOD::AuxiliaryMeasurementContainers to the AvalancheScheduler. More...
class  MeasurementToTruthParticleAssociation
class  MutableMultiTrajectory
 Athena implementation of ACTS::MultiTrajectory (ReadWrite version) The data is stored in 4 external backends. More...
class  MultiTrajectory
 Read only version of MTJ The implementation is separate as the details are significantly different and in addition only const methods are ever needed. More...
struct  DataLinkHolder
class  PersistentTrackContainer
struct  MutablePersistentTrackContainer
class  PrepRawDataAssociation
struct  ProtoTrack
struct  SpacePointRange
struct  Seed
struct  SeedContainer
class  TrackContainer
class  IndexingPolicy
class  MutableTrackContainerHandlesHelper
class  ConstTrackContainerHandlesHelper
class  TrackSummaryContainer
class  MutableTrackSummaryContainer
class  HitCounterArray
class  HitCountsPerTrack
 Container for hit counts per track Contains hit counts per associated truth particle and the total hit counts As last element in the container. More...
class  TrackToTruthParticleAssociation
class  ActsToTrkConverterTool
class  ActsToTrkConvertorAlg
class  SeedToTrackCnvAlg
class  TrkToActsConvertorAlg
 Algorithm convert Trk::Track to ACTS multistate objects. More...
class  ActsVolumeIdToDetectorElementCollectionMap
struct  DetectorElementToActsGeometryIdMap
class  ExtrapolationTool
class  ActsVolumeIdToDetectorElementCollectionMappingAlg
class  CaloBlueprintNodeBuilder
 Builds the Calo Blueprint Node. More...
class  ItkBlueprintNodeBuilder
 Helper class to build the ItkBlueprint node It adds the system as a node to the Blueprint. More...
class  ITkMaterialDecoratorTool
 Mutable tracking geometry visitor to load the material on the tracking surfaces inside the ITk. More...
class  TrackingGeoAlignVisitor
class  DetectorAlignStore
class  GeometryContext
class  IBlueprintNodeBuilder
 Interface for the Blueprint node builder This interface is used to build a Blueprint node for the Acts tracking geometry. More...
class  IDetectorElementBase
 base class interface providing the bare minimal interface extension. More...
class  IDetectorElement
 Base class interface for the actual readout elements. More...
class  IExtrapolationTool
 Tool to extrapolate bound track parameters. More...
class  IRefineTrackingGeoTool
 Interface to pass mutable TrackingGeometry visitors to the built tracking geometry before the geometry is becoming a const object. More...
class  ITrackingGeometrySvc
class  ITrackingGeometryTool
 Geometry helper tool extending the Tracking geometry service by the data dependency to fetch the geometry context from StoreGate. More...
class  IVolumePlacement
 ATLAS extension of the VolumePlacementBase interface. More...
class  TransformCacheDetEle
class  SurfaceCache
 : Helper class to connect the aligned transformations of each active sensor(layer) with the Acts::Surfaces. More...
class  TransformCacheBase
class  TransformCache
 Implementation used for the Detector elements. More...
class  VolumePlacement
 Implementation to make a (tracking) volume alignable. More...
class  IMaterialWriterTool
 Interface definition for material writing. More...
class  MaterialMapping
 Reads the MaterialTracks and produces the material maps for the Tracking Geometry. More...
class  MaterialTrackReader
 Writes out RecordedMaterialTrackCollection to a root file. More...
class  MaterialTrackRecorder
 Collects the G4 steps and writes out RecordedMaterialTrackCollection to a store gate. More...
class  MaterialTrackRecorderTool
class  MaterialTrackWriter
 Writes out RecordedMaterialTrackCollection to a root file. More...
class  MaterialValidation
 Reads the MaterialTracks and produces the material maps for the Tracking Geometry. More...
class  RootMaterialWriterTool
 Material decorator from Root format. More...
class  ActsInspectTruthContentAlg
class  EstimatedTrackParamsAnalysisAlg
class  HgtdClusterAnalysisAlg
class  HgtdClusterValidationPlots
class  ITkAlignMonResidualsAlg
class  PhysValTool
class  PixelClusterAnalysisAlg
class  PixelClusterValidationPlots
class  PixelSpacePointValidationPlots
class  ReadoutGeoDumpAlg
 Algorithm that scans the tracking geometry and dumps the transforms and surface bounds of the individual readout elements into a tree It's used in the context of the validtion of the SQLite workflow applied on data. More...
class  SeedAnalysisAlg
class  SeedsToTrackParamsAlg
class  SeedToTrackAnalysisAlg
class  SpacePointAnalysisAlg
class  StripClusterAnalysisAlg
class  StripClusterValidationPlots
class  StripSpacePointValidationPlots
class  TrackAnalysisAlg
class  TrackParticleAnalysisAlg
class  ActsTrackStateOnSurfaceDecoratorAlg
class  MeasurementToTrackParticleDecorationAlg
class  PixelClusterSiHitDecoratorAlg
class  PixelClusterTruthDecoratorAlg
class  StripClusterSiHitDecoratorAlg
class  StripClusterTruthDecoratorAlg
class  GbtsSeedingTool
class  GenericSeedingAlg
class  GridTripletSeedingTool
class  TrackParamsEstimationTool
class  PrdAssociationAlg
class  CaloBasedRoICreatorTool
class  FullScanRoICreatorTool
class  RegionsOfInterestCreatorAlg
class  TestRoICreatorTool
class  IActsToTrkConverterTool
 Conversion tool interface to translate surfaces & track parameters between the Acts & Trk realm. More...
class  IFitterTool
 Generic interface class to fit xAOD::Uncalibrated measurements to (multi)-trajectories. More...
class  IHGTDClusteringTool
class  IHGTDOnBoundStateCalibratorTool
class  IHGTDOnTrackCalibratorTool
class  ClusterCalibratorBase
class  OnBoundStateCalibratorBase
 Base class of a InDet calibrator object. More...
class  IOnBoundStateCalibratorTool
 interface of a tool to create a calibrator for a certain cluster type. More...
class  OnTrackCalibratorBase
class  IOnTrackCalibratorTool
class  IPixelClusteringTool
class  IPixelOnBoundStateCalibratorTool
class  IPixelOnTrackCalibratorTool
class  IPixelSpacePointFormationTool
 Base class for pixel space point formation tool. More...
class  IProtoTrackCreatorTool
class  IRoICreatorTool
class  ISeedingTool
class  IStripClusteringTool
class  IStripOnBoundStateCalibratorTool
class  IStripOnTrackCalibratorTool
struct  StripSP
class  IStripSpacePointFormationTool
class  ITrackParamsEstimationTool
class  ITrackToTrackParticleCnvTool
 Interface for a tool that converts a single Acts track proxy into an xAOD::TrackParticle. More...
class  ActsToXAODTrackConverterAlg
class  AmbiguityResolutionAlg
struct  MeasurementParameterMap
struct  MeasurementCalibrator
class  GaussianSumFitterTool
class  GlobalChiSquareFitterTool
class  HGTDTrackExtensionAlg
class  HGTDTruthTrackDecorationAlg
class  IMeasurementSelector
class  ITkAnalogueClusteringTool
class  ITkStripCalibrationTool
class  KalmanFitterTool
class  ProtoTrackCreationAndFitAlg
class  ProtoTrackReportingAlg
 Very lightweight algorithm to print out the results of the EF track finding. More...
class  RandomProtoTrackCreatorTool
class  ReFitterAlg
class  ScoreBasedAmbiguityResolutionAlg
class  TrackExtensionAlg
class  TrackFindingAlg
class  TrackFindingBaseAlg
class  TrackStatePrinterTool
class  TrackToTrackParticleCnvAlg
class  TrackToTrackParticleCnvTool
class  TruthGuidedProtoTrackCreatorTool
class  PixelClusterToTruthAssociationAlg
class  StripClusterToTruthAssociationAlg
class  HgtdClusterToTruthAssociationAlg
class  DummyRDOList
struct  has_rdoList
struct  has_rdoList< Object, std::void_t< rdoListFunc_t< Object > > >
class  MeasurementToTruthAssociationAlg
 Algorithm template to associate measurements of a certain type to a xAOD truth particles using a sim data collection where the sim data collection contains associates RDOs to truth particles and there energy/charge disposition. More...
class  TrackFindingValidationAlg
class  TrackParticleTruthDecorationAlg
class  TrackToTruthAssociationAlg
class  TrackTruthMatchingBaseAlg
class  TruthParticleHitCountAlg
class  HoughVtxFinderTool
class  AdaptiveMultiPriVtxFinderTool
class  IterativePriVtxFinderTool

Typedefs

using IndexType = std::uint32_t
using ParticleVector = boost::container::small_vector<const xAOD::TruthParticle *, NTruthParticlesPerMeasurement>
using StoredSurface = std::variant<const Acts::Surface*, std::shared_ptr<const Acts::Surface>>
using MutablePersistentTrackBackend = ActsTrk::MutableTrackSummaryContainer
using PersistentTrackBackend = ActsTrk::TrackSummaryContainer
using MutablePersistentTrackStateBackend = ActsTrk::MutableMultiTrajectory
using PersistentTrackStateBackend = ActsTrk::MultiTrajectory
using PersistentTrackContainerBase
typedef std::vector< ActsTrk::ProtoTrackProtoTrackCollection
using TrackBackend = Acts::ConstVectorTrackContainer
using MutableTrackBackend = Acts::VectorTrackContainer
using TrackStateBackend = Acts::ConstVectorMultiTrajectory
using MutableTrackStateBackend = Acts::VectorMultiTrajectory
using TrackContainerBase
using MutableTrackContainer
typedef DataVector< Acts::BoundTrackParameters > BoundTrackParametersContainer
using ConstParameters = Acts::TrackStateTraits<3>::Parameters
using ConstCovariance = Acts::TrackStateTraits<3>::Covariance
using Parameters = Acts::TrackStateTraits<3, false>::Parameters
using Covariance = Acts::TrackStateTraits<3, false>::Covariance
using TruthParticleHitCounts = std::unordered_map<const xAOD::TruthParticle *,HitCounterArray>
using ATLASSourceLink = const Trk::MeasurementBase *
using ATLASUncalibSourceLink = const xAOD::UncalibratedMeasurement *
using DetectorElementKey = unsigned int
using RecordedMaterialTrackCollection = std::vector<Acts::RecordedMaterialTrack>
using TicketCounterArr = DetectorAlignStore::TrackingAlignStore::TicketCounterArr
using ReturnedTicketArr = DetectorAlignStore::TrackingAlignStore::ReturnedTicketArr
using ReturnedHintArr = DetectorAlignStore::TrackingAlignStore::ReturnedHintArr
using SurfaceCacheSet = std::set<std::unique_ptr<SurfaceCache>, std::less<>>
using HGTDOnBoundStateCalibratorBase = OnBoundStateCalibratorBase<xAOD::HGTDCluster,3>
template<typename traj_t>
using HGTDOnTrackCalibratorBase = OnTrackCalibratorBase<xAOD::HGTDCluster,3, traj_t>
using PixelOnBoundStateCalibratorBase = OnBoundStateCalibratorBase<xAOD::PixelCluster,2>
template<typename traj_t>
using PixelOnTrackCalibratorBase = OnTrackCalibratorBase<xAOD::PixelCluster,2, traj_t>
using StripOnBoundStateCalibratorBase = OnBoundStateCalibratorBase<xAOD::StripCluster,1>
template<typename traj_t>
using StripOnTrackCalibratorBase = OnTrackCalibratorBase<xAOD::StripCluster,1, traj_t>
using AtlUncalibSourceLinkAccessor = detail::UncalibSourceLinkAccessor
using DefaultTrackStateCreator = Acts::TrackStateCreator<ActsTrk::detail::UncalibSourceLinkAccessor::Iterator,detail::RecoTrackContainer>
template<typename Object>
using rdoListFunc_t = decltype(std::declval<Object>().rdoList())

Enumerations

enum  NeighbourIndices {
  ThisOne , Opposite , PhiMinus , PhiPlus ,
  EtaMinus , EtaPlus , nNeighbours
}
 Total number of neightbours and indices. More...
enum class  caloRegion { DiscNegativeZ , DiscPositiveZ , Global }
enum class  DetectorType : std::uint8_t {
  Pixel , Sct , Trt , Hgtd ,
  Mdt , Rpc , Tgc , Csc ,
  Mm , sTgc , UnDefined
}
 Simple enum to Identify the Type of the ACTS sub detector. More...

Functions

Acts::CalibrationContext getCalibrationContext (const EventContext &ctx)
 The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLinks during the track State upate.
static int getCellRow (const typename PixelClusteringTool::Cell &cell)
static int getCellColumn (const typename PixelClusteringTool::Cell &cell)
static void clusterReserve (PixelClusteringTool::Cluster &cl, std::size_t n)
static void clusterAddCell (PixelClusteringTool::Cluster &cl, const PixelClusteringTool::Cell &cell)
static int getCellColumn (const StripClusteringTool::Cell &cell)
static void clusterReserve (StripClusteringTool::Cluster &cl, std::size_t n)
static void clusterAddCell (StripClusteringTool::Cluster &cl, const StripClusteringTool::Cell &cell)
static std::pair< Eigen::Matrix< float, 1, 1 >, Eigen::Matrix< float, 3, 1 > > computePosition (const StripClusteringTool::Cluster &cluster, std::size_t size, double lorentzShift, const IStripClusteringTool::IDHelper &stripID, const InDetDD::SiDetectorElement &element, const InDetDD::SiDetectorDesign &design, bool isITk)
static InDetDD::SiLocalPosition computeCentrePosition (const StripClusteringTool::Cluster &cluster, std::size_t size, const IStripClusteringTool::IDHelper &stripID, const InDetDD::SiDetectorDesign &design)
static float computeRotatedLocalCov (float localCov, const InDetDD::SiDetectorElement &element, const InDetDD::SiDetectorDesign &design, const StripClusteringTool::Cluster &cluster, std::size_t size, const IStripClusteringTool::IDHelper &stripID, float localPos)
template<typename IFACE, typename AUX>
std::unique_ptr< IFACE > makeInterfaceContainer (const AUX *aux)
 helper to construct interface container for already filled Aux container TODO maybe should be moved to xAOD area
std::string prefixFromTrackContainerName (const std::string &tracks)
 Parse TrackContainer name to get the prefix for backends The name has to contain XYZTracks, the XYZ is returned.
static void ActsMeasurementCheck (const Acts::GeometryContext &gctx, const Trk::MeasurementBase &measurement, const Acts::Surface &surface, const Acts::BoundVector &loc)
static void ActsTrackParameterCheck (const Acts::BoundTrackParameters &actsParameter, const Acts::GeometryContext &gctx, const Acts::BoundMatrix &covpc, const Acts::BoundVector &targetPars, const Acts::BoundMatrix &targetCov, const Trk::PlaneSurface *planeSurface)
const xAOD::UncalibratedMeasurementgetUncalibratedMeasurement (const ATLASUncalibSourceLink &source_link)
ATLASUncalibSourceLink makeATLASUncalibSourceLink (const xAOD::UncalibratedMeasurementContainer *container, std::size_t index, const EventContext &ctx)
ATLASUncalibSourceLink makeATLASUncalibSourceLink (const xAOD::UncalibratedMeasurementContainer *container, const xAOD::UncalibratedMeasurement *measurement, const EventContext &ctx)
ATLASUncalibSourceLink makeATLASUncalibSourceLink (const xAOD::UncalibratedMeasurementContainer *container, std::size_t index)
ATLASUncalibSourceLink makeATLASUncalibSourceLink (const xAOD::UncalibratedMeasurement *measurement)
float localXFromSourceLink (const ATLASUncalibSourceLink &source_link)
float localYFromSourceLink (const ATLASUncalibSourceLink &source_link)
DetectorElementKey makeDetectorElementKey (xAOD::UncalibMeasType meas_type, unsigned int identifier_hash)
Acts::GeometryIdentifier getSurfaceGeometryIdOfMeasurement (const DetectorElementToActsGeometryIdMap &detector_element_to_geoid, const xAOD::UncalibratedMeasurement &measurement)
std::string to_string (const DetectorType &type)
std::ostream & operator<< (std::ostream &ostr, const DetectorType type)
bool operator< (const std::unique_ptr< SurfaceCache > &a, const std::unique_ptr< SurfaceCache > &b)
 Comparison operators.
bool operator< (const IdentifierHash &a, const std::unique_ptr< SurfaceCache > &b)
bool operator< (const std::unique_ptr< SurfaceCache > &a, const IdentifierHash &b)
void encodeSurface (xAOD::TrackSurfaceAuxContainer *backend, size_t index, const Acts::Surface *surface, const Acts::GeometryContext &geoContext)
 Prepares persistifiable representation of surface into xAOD::TrackSurface object.
void encodeSurface (xAOD::TrackSurface *backend, const Acts::Surface *surface, const Acts::GeometryContext &geoContext)
 As above, but works on xAOD::TrackSurface object.
std::shared_ptr< const Acts::Surface > decodeSurface (const xAOD::TrackSurface *backend)
 Creates transient Acts Surface objects given a surface backend implementation should be exact mirror of encodeSurface.
std::shared_ptr< const Acts::Surface > decodeSurface (const xAOD::TrackSurfaceAuxContainer *backend, size_t i)
 As above, but takes data from Aux container at an index i.
void encodeSurface (xAOD::SurfaceType &surfaceType, std::vector< float > &translation, std::vector< float > &rotation, std::vector< float > &boundValues, const Acts::Surface *surface, const Acts::GeometryContext &geoContext)
std::shared_ptr< const Acts::Surface > decodeSurface (const xAOD::SurfaceType surfaceType, const std::vector< float > &translation, const std::vector< float > &rotation, const std::vector< float > &boundValues)
Acts::Logging::Level actsLevelVector (MSG::Level lvl)
MSG::Level athLevelVector (Acts::Logging::Level lvl)
constexpr double energyToActs (const double athenaE)
 Converts an energy scalar from Athena to Acts units.
constexpr double energyToAthena (const double actsE)
 Converts an energy scalar from Acts to Athena units.
constexpr double lengthToActs (const double athenaL)
 Converts a length scalar from Acts to Athena units.
constexpr double lengthToAthena (const double actsL)
 Converts a length scalar from Acts to Athena units.
constexpr double timeToActs (const double athenaT)
 Converts a time unit from Athena to Acts units.
constexpr double timeToAthena (const double actsT)
 Converts a time unit from Acts to Athena units.
constexpr double velocityToActs (const double athenaV)
 Converts a velocity from Athena to Acts units.
constexpr double accelerationToActs (const double athenaA)
 Converts an acceleration from Athena to Acts units.
Acts::Vector3 convertDirToActs (const Amg::Vector3D &athenaDir)
 Converts a direction vector from athena units into acts units.
Amg::Vector3D convertDirFromActs (const Acts::Vector3 &actsDir)
 Converts a direction vector from acts units into athena units.
Acts::Vector4 convertPosToActs (const Amg::Vector3D &athenaPos, const double athenaTime=0.)
 Converts a position vector & time from Athena units into Acts units.
std::pair< Amg::Vector3D, double > convertPosFromActs (const Acts::Vector4 &actsPos)
 Converts an Acts 4-vector into a pair of an Athena spatial vector and the passed time.
Acts::Vector4 convertMomToActs (const Amg::Vector3D &threeMom, const double mass=0.)
 Converts a three momentum vector from Athena together with the associated particle mass into an Acts four-momentum vector.
std::pair< Amg::Vector3D, double > convertMomFromActs (const Acts::Vector4 &actsMom)
 Converts an Acts four-momentum vector into an pair of an Athena three-momentum and the paritcle's energy.
template<typename T>
std::underlying_type_t< T > to_underlying (T val)
static std::string atlasSurfaceName (const Acts::Surface *measurement_surface)
static void printHeader (int type, bool extra=false)
static void printVec3 (const Acts::Vector3 &p)
static void printVec3 (const Acts::Vector3 &p, const Acts::Vector3 &cmp, int precision=3)
static void printVec2 (const Acts::Vector2 &p, const char *estimated=nullptr)
static void printVec2 (const Acts::Vector2 &p, const Acts::Vector2 &cmp, const char *estimated=nullptr, int precision=4)
static void printMeasurement (const Acts::GeometryContext &tgContext, const Acts::Surface *surface, const std::tuple< Acts::Vector2, Amg::Vector2D, int, int > &locData, bool compareMeasurementTransforms=false)
static std::tuple< Acts::Vector2, Amg::Vector2D, int, int > localPositionStrip2D (const Acts::GeometryContext &tgContext, const xAOD::UncalibratedMeasurement &measurement, const Acts::Surface *surface, const xAOD::SpacePoint *sp)
template<class T_Cont, class T>
std::vector< SG::WriteDecorHandle< T_Cont, T > > createDecorators (const std::vector< SG::WriteDecorHandleKey< T_Cont > > &keys, const EventContext &ctx)
template<class T_Parent, class T_Cont>
void createDecoratorKeys (T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::WriteDecorHandleKey< T_Cont > > &decor_out)
template<class T>
auto getRDOList (const T &a)
template<class T_TruthEventCollection>
auto makeDepositToTruthParticleMap (const T_TruthEventCollection *truth_particle_links)
template<class T_TruthEventCollection>
const char * getInTruthPropertyName ()
template<class T_SimDataCollection, class T_SimDataIterator>
auto getSimDataDeposits (const T_SimDataCollection &sim_data_collection, T_SimDataIterator sim_data_iter_for_identifier)
template<class T_Deposit>
float getDepositedEnergy (const T_Deposit &)
MsgStream & operator<< (MsgStream &out, const ActsUtils::Stat &stat)

Variables

constexpr double ONE_TWELFTH = 1./12.
constexpr float oneStripSF = 1.1025
constexpr float twoStripSF = 0.0729
constexpr unsigned int NTruthParticlesPerMeasurement = 5
constexpr unsigned int NHitCounter = static_cast< std::underlying_type<xAOD::UncalibMeasType>::type >(xAOD::UncalibMeasType::nTypes)
constexpr unsigned int NTruthParticlesPerTrack = 5
constexpr unsigned int DETELEMENT_TYPE_SHIFT = 28
constexpr unsigned int DETELEMENT_HASH_MASK = ~(1u<<31|1u<<30|1u<<29|1u<<28)
constexpr bool TrackToTruthParticleAssociationDebugHists = false
constexpr bool TrackFindingValidationDebugHists = false
constexpr bool TrackFindingValidationDetailedStat = true
constexpr bool TruthParticleHitCountDebugHists = false

Detailed Description

The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout geometry to cache the final transformations of the sensor surfaces associated to one particular detector technology (Pixel, Sct, etc.).

copied from InDetPhysValMonitoring/src/safeDecorator.h

Put athena Eigen inlcude first.

Header file to manage the common inlcudes.

Includes the GeoPrimitives.

Load ATLAS Eigen library with custom geometry functions.

Include the GeoPrimitives which need to be put first.

Put first the GeoPrimitives.

small non-persistent data class to wrap the output of the EF-tracking development pattern finding placeholder

The DetectorAlignCondAlg loads the rigid alignment corrections and pipes them through the readout geometry to cache the final transformations of the sensor surfaces associated to one particular detector technology (Pixel, Sct, etc.).

The transformations are cached in the DetectorAlignmentStore which is later propagated to the GeometryContext.

The DetectorAlignStore is a cache class to hold the aligned surface local->global transforms and the both volume transforms that are associated with an ATLAS sub detector technology. The cache is written such that it can be lazily populated or fully populated at its creation.

The cache is structured in three components: 1) geoModelAlignment: This store contains all information to apply rigid alignment corrections to the ReadoutElement. All readout elements are assoicated with a GeoVPhysVol objects which are positioned in space via a series of GeoTransforms and GeoAlignableTransforms. The latter represent the alignment fix points from which the alignment corrections are applied. GeoModel then aligns all subvolumes according to the deltas 2) trackingAlignment: GeoModel usally does not keep the fully assembled transforms in memory. The actual caching of them is taken over by the trackingAlignment Clients which want to push a transform onto the cache need to draw a unique ticket from the store at construction. This ticket is valid for a given sub detector and can be used to query the cache whether a transform has been already pushed or to ask for the transform itself 3) internalAlignment: Is an empty sub class which is meant to store conditions data to correct the readout geometry for surface deformations (E.g. muon b-lines, as-built)

If the package is loaded in AthSimulation, the Acts library is not avaialble

ActsGeometry context carries all information related to the aboslute positions of the Readout geometry Per detector technology (e.g. Mdt), it contains an ActsTrk::DetectorAlignmentStore which carries pointers to the rigid alignment transfomrations of each FullPhysical volume representing the detector sensor envelope. Further, it carries the transformations for each tracking layer

Then load the Acts TypeDef definitions for Eigen

In AthSimulation, the Acts core library is not available yet

ATLAS extension of the Acts::SurfacePlacementBase. The extension provides extra methods to identify the element within the ATLAS identifier scheme and also the enum indicating to which tracking subsystem the DetectorElement belongs to. Finally, the detector element provides the interface to optionally precache the aligned transformations in the external AlignmentStore of the geometry context.

In AthSimulation, the Acts core library is not available yet

forward declarations of the classes defined in the package

Typedef Documentation

◆ ATLASSourceLink

◆ ATLASUncalibSourceLink

◆ AtlUncalibSourceLinkAccessor

◆ BoundTrackParametersContainer

◆ ConstCovariance

using ActsTrk::ConstCovariance = Acts::TrackStateTraits<3>::Covariance

◆ ConstParameters

using ActsTrk::ConstParameters = Acts::TrackStateTraits<3>::Parameters

◆ Covariance

using ActsTrk::Covariance = Acts::TrackStateTraits<3, false>::Covariance

◆ DefaultTrackStateCreator

◆ DetectorElementKey

using ActsTrk::DetectorElementKey = unsigned int

Definition at line 19 of file DetectorElementToActsGeometryIdMap.h.

◆ HGTDOnBoundStateCalibratorBase

◆ HGTDOnTrackCalibratorBase

template<typename traj_t>
using ActsTrk::HGTDOnTrackCalibratorBase = OnTrackCalibratorBase<xAOD::HGTDCluster,3, traj_t>

Definition at line 13 of file IHGTDOnTrackCalibratorTool.h.

◆ IndexType

using ActsTrk::IndexType = std::uint32_t

Definition at line 14 of file Decoration.h.

◆ MutablePersistentTrackBackend

◆ MutablePersistentTrackStateBackend

◆ MutableTrackBackend

using ActsTrk::MutableTrackBackend = Acts::VectorTrackContainer

Definition at line 16 of file TrackContainer.h.

◆ MutableTrackContainer

Initial value:
Acts::TrackContainer<MutableTrackBackend,
Acts::detail::ValueHolder>
Acts::VectorMultiTrajectory MutableTrackStateBackend
Acts::VectorTrackContainer MutableTrackBackend

Definition at line 25 of file TrackContainer.h.

◆ MutableTrackStateBackend

using ActsTrk::MutableTrackStateBackend = Acts::VectorMultiTrajectory

Definition at line 18 of file TrackContainer.h.

◆ Parameters

using ActsTrk::Parameters = Acts::TrackStateTraits<3, false>::Parameters

◆ ParticleVector

Definition at line 17 of file MeasurementToTruthParticleAssociation.h.

◆ PersistentTrackBackend

◆ PersistentTrackContainerBase

◆ PersistentTrackStateBackend

◆ PixelOnBoundStateCalibratorBase

◆ PixelOnTrackCalibratorBase

Definition at line 13 of file IPixelOnTrackCalibratorTool.h.

◆ ProtoTrackCollection

Definition at line 12 of file ProtoTrackCollection.h.

◆ rdoListFunc_t

template<typename Object>
using ActsTrk::rdoListFunc_t = decltype(std::declval<Object>().rdoList())

Definition at line 94 of file MeasurementToTruthAssociationAlg.h.

◆ RecordedMaterialTrackCollection

using ActsTrk::RecordedMaterialTrackCollection = std::vector<Acts::RecordedMaterialTrack>

Definition at line 14 of file RecordedMaterialTrackCollection.h.

◆ ReturnedHintArr

◆ ReturnedTicketArr

◆ StoredSurface

using ActsTrk::StoredSurface = std::variant<const Acts::Surface*, std::shared_ptr<const Acts::Surface>>

Definition at line 66 of file MultiTrajectory.h.

◆ StripOnBoundStateCalibratorBase

◆ StripOnTrackCalibratorBase

Definition at line 13 of file IStripOnTrackCalibratorTool.h.

◆ SurfaceCacheSet

using ActsTrk::SurfaceCacheSet = std::set<std::unique_ptr<SurfaceCache>, std::less<>>

◆ TicketCounterArr

◆ TrackBackend

using ActsTrk::TrackBackend = Acts::ConstVectorTrackContainer

Definition at line 15 of file TrackContainer.h.

◆ TrackContainerBase

Initial value:
Acts::TrackContainer<TrackBackend,
Acts::detail::ValueHolder>
Acts::ConstVectorTrackContainer TrackBackend
Acts::ConstVectorMultiTrajectory TrackStateBackend

Definition at line 21 of file TrackContainer.h.

◆ TrackStateBackend

using ActsTrk::TrackStateBackend = Acts::ConstVectorMultiTrajectory

Definition at line 17 of file TrackContainer.h.

◆ TruthParticleHitCounts

Definition at line 19 of file TruthParticleHitCounts.h.

Enumeration Type Documentation

◆ caloRegion

enum class ActsTrk::caloRegion
strong
Enumerator
DiscNegativeZ 
DiscPositiveZ 
Global 

Definition at line 28 of file CaloBlueprintNodeBuilder.h.

◆ DetectorType

enum class ActsTrk::DetectorType : std::uint8_t
strong

Simple enum to Identify the Type of the ACTS sub detector.

Enumerator
Pixel 

Inner detector legacy.

Sct 
Trt 

Maybe the Sct / Pixel for Itk become seperate entries?

Hgtd 
Mdt 

MuonSpectrometer.

Rpc 

Monitored Drift Tubes.

Tgc 

Resitive Plate Chambers.

Csc 

Thin gap champers.

Mm 

Maybe not needed in the migration.

sTgc 

Micromegas (NSW).

UnDefined 

Small Thing Gap chambers (NSW).

Definition at line 19 of file GeometryDefs.h.

19 : std::uint8_t {
21 Pixel,
22 Sct,
24 Trt,
25 Hgtd,
27 Mdt,
28 Rpc,
29 Tgc,
30 Csc,
31 Mm,
32 sTgc,
34 };
@ Mm
Maybe not needed in the migration.
@ Tgc
Resitive Plate Chambers.
@ sTgc
Micromegas (NSW).
@ Rpc
Monitored Drift Tubes.
@ Csc
Thin gap champers.
@ Trt
Maybe the Sct / Pixel for Itk become seperate entries?
@ Mdt
MuonSpectrometer.
@ UnDefined
Small Thing Gap chambers (NSW).
@ Pixel
Definition DetType.h:13

◆ NeighbourIndices

Total number of neightbours and indices.

Enumerator
ThisOne 
Opposite 
PhiMinus 
PhiPlus 
EtaMinus 
EtaPlus 
nNeighbours 

Definition at line 13 of file StripInformationHelper.h.

Function Documentation

◆ accelerationToActs()

double ActsTrk::accelerationToActs ( const double athenaA)
inlineconstexpr

Converts an acceleration from Athena to Acts units.

Parameters
athenaAAcceleration to convert

Definition at line 69 of file UnitConverters.h.

69 {
70 return athenaA / Acts::square(timeToActs(1.));
71 }
constexpr double timeToActs(const double athenaT)
Converts a time unit from Athena to Acts units.

◆ actsLevelVector()

Acts::Logging::Level ActsTrk::actsLevelVector ( MSG::Level lvl)

Definition at line 9 of file LoggerUtils.cxx.

9 {
10 // MSG::NIL and MSG::ALWAYS are not available in Acts. Need to protect against these
11 // For MSG::NIL we can return a Acts::Logging::Level::FATAL;
12 // For MSG::ALWAYS we can return a Acts::Logging::Level::VERBOSE
13
14 // Gaudi definitions are +1 w.r.t. Acts definitions
15 static const std::array<Acts::Logging::Level, 8> actsLevelVector{
16 Acts::Logging::Level::FATAL, // MSG::NIL
17 Acts::Logging::Level::VERBOSE,
18 Acts::Logging::Level::DEBUG,
19 Acts::Logging::Level::INFO,
20 Acts::Logging::Level::WARNING,
21 Acts::Logging::Level::ERROR,
22 Acts::Logging::Level::FATAL,
23 Acts::Logging::Level::VERBOSE // MSG::ALWAYS
24 };
25
26 return actsLevelVector[static_cast<int>(lvl)];
27 }
Acts::Logging::Level actsLevelVector(MSG::Level lvl)

◆ ActsMeasurementCheck()

void ActsTrk::ActsMeasurementCheck ( const Acts::GeometryContext & gctx,
const Trk::MeasurementBase & measurement,
const Acts::Surface & surface,
const Acts::BoundVector & loc )
static

Definition at line 579 of file ActsToTrkConverterTool.cxx.

581 {
582 const Trk::Surface &surf = measurement.associatedSurface();
583 // only check Annulus for the moment
584 if (surf.bounds().type() != Trk::SurfaceBounds::Annulus) {
585 return;
586 }
587 const auto *bounds = dynamic_cast<const Trk::AnnulusBounds *>(&surf.bounds());
588 if (bounds == nullptr) {
589 throw std::runtime_error{"Annulus but not XY"};
590 }
591
592 Amg::Vector2D locxy = loc.head<2>();
593
594 Acts::Matrix<2, 2> covxy = measurement.localCovariance();
595
597 Acts::Vector2 locpc;
598 if (auto res = surface.globalToLocal(gctx, global, Acts::Vector3{});
599 res.ok()) {
600 locpc = *res;
601 } else {
602 throw std::runtime_error{"Global position not on target surface"};
603 }
604
605 // use ACTS jacobian math to convert cluster covariance from cartesian to
606 // polar
607 auto planeSurface =
608 Acts::Surface::makeShared<Acts::PlaneSurface>(surf.transform());
609 Acts::BoundVector locxypar;
610 locxypar.head<2>() = locxy;
611 locxypar[2] = 0;
612 locxypar[3] = M_PI_2;
613 locxypar[4] = 1;
614 locxypar[5] = 1;
615 Acts::FreeVector globalxypar = Acts::transformBoundToFreeParameters(
616 *planeSurface, gctx, locxypar);
617 auto boundToFree = planeSurface->boundToFreeJacobian(
618 gctx, globalxypar.segment<3>(Acts::eFreePos0),
619 globalxypar.segment<3>(Acts::eFreeDir0));
620 Acts::SquareMatrix<2> xyToXyzJac = boundToFree.topLeftCorner<2, 2>();
621
622 Acts::BoundVector locpcpar;
623 locpcpar.head<2>() = locpc;
624 locpcpar[2] = 0;
625 locpcpar[3] = M_PI_2;
626 locpcpar[4] = 1;
627 locpcpar[5] = 1;
628 Acts::FreeVector globalpcpar = Acts::transformBoundToFreeParameters(
629 surface, gctx, locpcpar);
630
631 boundToFree = surface.boundToFreeJacobian(
632 gctx, globalpcpar.segment<3>(Acts::eFreePos0),
633 globalpcpar.segment<3>(Acts::eFreeDir0));
634 Acts::SquareMatrix<2> pcToXyzJac = boundToFree.topLeftCorner<2, 2>();
635 Acts::SquareMatrix<2> xyzToPcJac = pcToXyzJac.inverse();
636
637 // convert cluster covariance
638 Acts::SquareMatrix<2> covpc = covxy;
639 covpc = xyToXyzJac * covpc * xyToXyzJac.transpose();
640 covpc = xyzToPcJac * covpc * xyzToPcJac.transpose();
641
642 std::mt19937 gen{42 + surface.geometryId().value()};
643 std::normal_distribution<double> normal{0, 1};
644 std::uniform_real_distribution<double> uniform{-1, 1};
645
646 Acts::SquareMatrix<2> lltxy = covxy.llt().matrixL();
647 Acts::SquareMatrix<2> lltpc = covpc.llt().matrixL();
648
649 for (size_t i = 0; i < 1e4; i++) {
650 std::cout << "ANNULUS COV: ";
651 std::cout << surface.geometryId();
652
653 Amg::Vector2D rnd{normal(gen), normal(gen)};
654
655 // XY
656 {
657 Amg::Vector2D xy = lltxy * rnd + locxy;
659 std::cout << "," << xy.x() << "," << xy.y();
660 std::cout << "," << xyz.x() << "," << xyz.y() << "," << xyz.z();
661 }
662 // PC
663 {
664 // Amg::Vector2D xy = lltpc * rnd + loc.head<2>();
665 Amg::Vector2D rt = lltpc * rnd + locpc;
666 Amg::Vector3D xyz = surface.localToGlobal(gctx, rt, Acts::Vector3{});
667 // Amg::Vector3D xyz = surface.transform(gctx).rotation() *
668 // Acts::Vector3{rt.x(), rt.y(), 0};
669
670 std::cout << "," << rt.x() << "," << rt.y();
671 std::cout << "," << xyz.x() << "," << xyz.y() << "," << xyz.z();
672 }
673
674 std::cout << std::endl;
675 }
676}
std::pair< std::vector< unsigned int >, bool > res
static TRandom * rnd
#define xyz
Bounds for a annulus-like, planar Surface.
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual BoundsType type() const =0
Return the bounds type - for persistency optimization.
Abstract Base Class for tracking surfaces.
Definition Surface.h:79
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
std::array< hsize_t, N > uniform(size_t val)
Definition Writer.h:332

◆ ActsTrackParameterCheck()

void ActsTrk::ActsTrackParameterCheck ( const Acts::BoundTrackParameters & actsParameter,
const Acts::GeometryContext & gctx,
const Acts::BoundMatrix & covpc,
const Acts::BoundVector & targetPars,
const Acts::BoundMatrix & targetCov,
const Trk::PlaneSurface * planeSurface )
static

Definition at line 679 of file ActsToTrkConverterTool.cxx.

683 {
684
685 std::cout << "ANNULUS PAR COV: ";
686 std::cout << actsParameter.referenceSurface().geometryId();
687 for (unsigned int i = 0; i < 5; i++) {
688 for (unsigned int j = 0; j < 5; j++) {
689 std::cout << "," << covpc(i, j);
690 }
691 }
692 for (unsigned int i = 0; i < 5; i++) {
693 for (unsigned int j = 0; j < 5; j++) {
694 std::cout << "," << targetCov(i, j);
695 }
696 }
697 std::cout << std::endl;
698
699 std::mt19937 gen{4242 +
700 actsParameter.referenceSurface().geometryId().value()};
701 std::normal_distribution<double> normal{0, 1};
702
703 Acts::SquareMatrix<2> lltxy =
704 targetCov.topLeftCorner<2, 2>().llt().matrixL();
705 Acts::SquareMatrix<2> lltpc = covpc.topLeftCorner<2, 2>().llt().matrixL();
706
707 for (size_t i = 0; i < 1e4; i++) {
708 std::cout << "ANNULUS PAR: ";
709 std::cout << actsParameter.referenceSurface().geometryId();
710
711 Acts::Vector<2> rnd;
712 rnd << normal(gen), normal(gen);
713
714 // XY
715 {
716 Acts::Vector<2> xy =
717 lltxy.topLeftCorner<2, 2>() * rnd + targetPars.head<2>();
719 planeSurface->localToGlobal(Amg::Vector2D{xy.head<2>()}, Amg::Vector3D{},
720 xyz);
721 for (unsigned int i = 0; i < 2; i++) {
722 std::cout << "," << xy[i];
723 }
724 std::cout << "," << xyz.x() << "," << xyz.y() << "," << xyz.z();
725 }
726 // PC
727 {
728 Acts::Vector<2> rt = lltpc.topLeftCorner<2, 2>() * rnd +
729 actsParameter.parameters().head<2>();
730 Amg::Vector3D xyz = actsParameter.referenceSurface().localToGlobal(
731 gctx, Acts::Vector2{rt.head<2>()}, Acts::Vector3{});
732
733 for (unsigned int i = 0; i < 2; i++) {
734 std::cout << "," << rt[i];
735 }
736 std::cout << "," << xyz.x() << "," << xyz.y() << "," << xyz.z();
737 }
738
739 std::cout << std::endl;
740 }
741}
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ athLevelVector()

MSG::Level ActsTrk::athLevelVector ( Acts::Logging::Level lvl)

Definition at line 29 of file LoggerUtils.cxx.

29 {
30 // All Acts log levels are available in Gaudi, no need for protections
31 static const std::array<MSG::Level, 6> athLevelVector{
32 MSG::VERBOSE,
33 MSG::DEBUG,
34 MSG::INFO,
35 MSG::WARNING,
36 MSG::ERROR,
37 MSG::FATAL
38 };
39 return athLevelVector[static_cast<int>(lvl)];
40 }
MSG::Level athLevelVector(Acts::Logging::Level lvl)

◆ atlasSurfaceName()

std::string ActsTrk::atlasSurfaceName ( const Acts::Surface * measurement_surface)
static

Definition at line 92 of file TrackStatePrinterTool.cxx.

93 {
94 if (measurement_surface) {
96 acts_detector_element = dynamic_cast<const ActsDetectorElement *>(measurement_surface->surfacePlacement());
97 if (acts_detector_element) {
98 const InDetDD::SiDetectorElement *detElem = dynamic_cast< const InDetDD::SiDetectorElement *>(acts_detector_element->upstreamDetectorElement());
99 if (detElem) {
100 if (auto idHelper = detElem->getIdHelper())
101 {
102 auto name = idHelper->show_to_string(detElem->identify());
103 if (name.size() >= 2 && name[0] == '[' && name[name.size() - 1] == ']')
104 {
105 return name.substr(1, name.size() - 2);
106 }
107 else
108 {
109 return name;
110 }
111 }
112 }
113 }
114 }
115 return {};
116 }
const GeoVDetectorElement * upstreamDetectorElement() const
Returns the underllying GeoModel detectorelement that this one is based on.
Class to hold geometrical description of a silicon detector element.
virtual Identifier identify() const override final
identifier of this detector element (inline)
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline).

◆ clusterAddCell() [1/2]

void ActsTrk::clusterAddCell ( PixelClusteringTool::Cluster & cl,
const PixelClusteringTool::Cell & cell )
inlinestatic

Definition at line 32 of file PixelClusteringTool.cxx.

34 {
35 cl.ids.push_back(cell.ID);
36 cl.tots.push_back(cell.TOT);
37 if (cell.LVL1 < cl.lvl1min)
38 cl.lvl1min = cell.LVL1;
39 }

◆ clusterAddCell() [2/2]

void ActsTrk::clusterAddCell ( StripClusteringTool::Cluster & cl,
const StripClusteringTool::Cell & cell )
static

Definition at line 41 of file StripClusteringTool.cxx.

42{
43 cl.ids.push_back(cell.id.get_compact());
44 if (cl.ids.size() < (sizeof(cl.hitsInThirdTimeBin) * 8)) {
45 cl.hitsInThirdTimeBin |= cell.timeBits.test(0) << cl.ids.size();
46 }
47}

◆ clusterReserve() [1/2]

void ActsTrk::clusterReserve ( PixelClusteringTool::Cluster & cl,
std::size_t n )
inlinestatic

Definition at line 26 of file PixelClusteringTool.cxx.

28 {
29 cl.ids.reserve(n);
30 cl.tots.reserve(n);
31 }

◆ clusterReserve() [2/2]

void ActsTrk::clusterReserve ( StripClusteringTool::Cluster & cl,
std::size_t n )
inlinestatic

Definition at line 33 of file StripClusteringTool.cxx.

35{
36 cl.ids.reserve(n);
37}

◆ computeCentrePosition()

InDetDD::SiLocalPosition ActsTrk::computeCentrePosition ( const StripClusteringTool::Cluster & cluster,
std::size_t size,
const IStripClusteringTool::IDHelper & stripID,
const InDetDD::SiDetectorDesign & design )
static

Definition at line 241 of file StripClusteringTool.cxx.

245{ // For Inner Detector SCT, compute the local position of the cluster center using the strip positions.
246 Identifier ids_front(cluster.ids.front());
247 Identifier ids_back(cluster.ids.back());
248 InDetDD::SiCellId frontId = stripID.strip(ids_front);
249 InDetDD::SiLocalPosition pos = design.localPositionOfCell(frontId);
250 if (size > 1) {
251 InDetDD::SiCellId backId = stripID.strip(ids_back);
252 InDetDD::SiLocalPosition backPos = design.localPositionOfCell(backId);
253 pos = 0.5 * (pos + backPos);
254 }
255 return pos;
256}
size_t size() const
Number of registered mappings.
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const =0
readout or diode id -> position.
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: ...
int strip(const Identifier &id) const
Definition SCT_ID.h:717

◆ computePosition()

std::pair< Eigen::Matrix< float, 1, 1 >, Eigen::Matrix< float, 3, 1 > > ActsTrk::computePosition ( const StripClusteringTool::Cluster & cluster,
std::size_t size,
double lorentzShift,
const IStripClusteringTool::IDHelper & stripID,
const InDetDD::SiDetectorElement & element,
const InDetDD::SiDetectorDesign & design,
bool isITk )
static

Definition at line 203 of file StripClusteringTool.cxx.

210{
211
212 Identifier ids_front(cluster.ids.front());
213 Identifier ids_back(cluster.ids.back());
214 InDetDD::SiCellId frontId = stripID.strip(ids_front);
215 InDetDD::SiLocalPosition pos = design.localPositionOfCell(frontId);
216 if (size > 1) {
217 InDetDD::SiCellId backId = stripID.strip(ids_back);
219 design.localPositionOfCell(backId);
220 pos = 0.5 * (pos + backPos);
221 }
222
223 // update the xPhi position
224 pos.xPhi( pos.xPhi() + lorentzShift );
225 Eigen::Matrix<float,3,1> posG(element.surface().localToGlobal(pos).cast<float>());
226
227 if ((not element.isBarrel()) and isITk) {
228 assert(dynamic_cast<const InDetDD::StripStereoAnnulusDesign*>(&design) != nullptr);
229 const InDetDD::StripStereoAnnulusDesign& annulusDesign =
230 static_cast<const InDetDD::StripStereoAnnulusDesign&>
231 (design);
232 pos = annulusDesign.localPositionOfCellPC(element.cellIdOfPosition(pos));
233 }
234
235 return std::make_pair(Eigen::Matrix<float,1,1>(pos.xPhi()),
236 std::move(posG));
237}
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
Trk::Surface & surface()
Element Surface.
SiLocalPosition localPositionOfCellPC(const SiCellId &cellId) const
This is for debugging only.

◆ computeRotatedLocalCov()

float ActsTrk::computeRotatedLocalCov ( float localCov,
const InDetDD::SiDetectorElement & element,
const InDetDD::SiDetectorDesign & design,
const StripClusteringTool::Cluster & cluster,
std::size_t size,
const IStripClusteringTool::IDHelper & stripID,
float localPos )
static

Definition at line 259 of file StripClusteringTool.cxx.

266{ // For Inner Detector SCT, in the case of endcap modules, rotate the local covariance to account for the stereo angle.
267 const bool rotate = (design.shape() == InDetDD::Trapezoid || design.shape() == InDetDD::Annulus);
268 if (!rotate) {
269 return localCov;
270 }
271
272 const auto* sctDesign = dynamic_cast<const InDetDD::SCT_ModuleSideDesign*>(&design);
273 if (sctDesign == nullptr) {
274 return localCov;
275 }
276
277 const InDetDD::SiLocalPosition centrePos = computeCentrePosition(cluster, size, stripID, design);
278 const auto ends = sctDesign->endsOfStrip(centrePos);
279 const double stripL = std::abs(ends.first.xEta() - ends.second.xEta());
280 const double iphipitch = 1. / element.phiPitch();
281 const Amg::Vector2D localPos2D{localPos, 0.0};
282 const double w = element.phiPitch(localPos2D) * iphipitch;
283
284 const double sn = element.sinStereoLocal(localPos2D);
285 const double sn2 = sn * sn;
286 const double cs2 = 1. - sn2;
287 const double v0 = localCov * w * w;
288 const double v1 = stripL * stripL * ONE_TWELFTH;
289
290 const float rotatedCov = cs2 * v0 + sn2 * v1;
291 // copied from InDet::SCT_ClusteringTool, but in ACTS-based tracking, SCT cov is 1-dimensional, just keep the rotatedCov(0,0) for the moment
292 // rotatedCov(0,1) = rotatedCov = sn * sqrt(cs2) * (v0 - v1);
293 // rotatedCov(1,1) = sn2 * v0 + cs2 * v1;
294 return rotatedCov;
295}
void rotate(double angler, GeoTrf::Vector2D &vector)
virtual DetectorShape shape() const
Shape of element.
Base class for the SCT module side design, extended by the Forward and Barrel module design.
double phiPitch() const
Pitch (inline methods).
double sinStereoLocal(const Amg::Vector2D &localPos) const
Angle of strip in local frame with respect to the etaAxis.
constexpr double ONE_TWELFTH
static InDetDD::SiLocalPosition computeCentrePosition(const StripClusteringTool::Cluster &cluster, std::size_t size, const IStripClusteringTool::IDHelper &stripID, const InDetDD::SiDetectorDesign &design)

◆ convertDirFromActs()

Amg::Vector3D ActsTrk::convertDirFromActs ( const Acts::Vector3 & actsDir)
inline

Converts a direction vector from acts units into athena units.

Parameters
actsDirUnit normalized vector to convert

Definition at line 79 of file UnitConverters.h.

79 {
80 return actsDir;
81 }

◆ convertDirToActs()

Acts::Vector3 ActsTrk::convertDirToActs ( const Amg::Vector3D & athenaDir)
inline

Converts a direction vector from athena units into acts units.

Parameters
athenaDirUnit normalized vector to convert

Definition at line 74 of file UnitConverters.h.

74 {
75 return athenaDir;
76 }

◆ convertMomFromActs()

std::pair< Amg::Vector3D, double > ActsTrk::convertMomFromActs ( const Acts::Vector4 & actsMom)
inline

Converts an Acts four-momentum vector into an pair of an Athena three-momentum and the paritcle's energy.

Parameters
actsMomThe four momentum vector from Acts

Definition at line 120 of file UnitConverters.h.

120 {
121 Amg::Vector3D threeMom{Amg::Vector3D::Zero()};
122 threeMom[Amg::x] = energyToAthena(actsMom[Acts::eMom0]);
123 threeMom[Amg::y] = energyToAthena(actsMom[Acts::eMom1]);
124 threeMom[Amg::z] = energyToAthena(actsMom[Acts::eMom2]);
125 return std::make_pair(std::move(threeMom), energyToAthena(actsMom[Acts::eEnergy]));
126 }
constexpr double energyToAthena(const double actsE)
Converts an energy scalar from Acts to Athena units.

◆ convertMomToActs()

Acts::Vector4 ActsTrk::convertMomToActs ( const Amg::Vector3D & threeMom,
const double mass = 0. )
inline

Converts a three momentum vector from Athena together with the associated particle mass into an Acts four-momentum vector.

Parameters
threeMomThree momentum vector in Athena units
massParticle's mass in Athena units

Definition at line 108 of file UnitConverters.h.

108 {
109 using namespace Acts::UnitLiterals;
110 Acts::Vector4 fourMom{Acts::Vector4::Zero()};
111 fourMom[Acts::eEnergy] = energyToActs(std::sqrt(threeMom.dot(threeMom) + mass*mass));
112 fourMom[Acts::eMom0] = energyToActs(threeMom.x());
113 fourMom[Acts::eMom1] = energyToActs(threeMom.y());
114 fourMom[Acts::eMom2] = energyToActs(threeMom.z());
115 return fourMom;
116 }
constexpr double energyToActs(const double athenaE)
Converts an energy scalar from Athena to Acts units.

◆ convertPosFromActs()

std::pair< Amg::Vector3D, double > ActsTrk::convertPosFromActs ( const Acts::Vector4 & actsPos)
inline

Converts an Acts 4-vector into a pair of an Athena spatial vector and the passed time.

Parameters
actsPosPosition from the Acts framework

Definition at line 97 of file UnitConverters.h.

97 {
98 Amg::Vector3D pos{Amg::Vector3D::Zero()};
99 pos[Amg::x] = lengthToAthena(actsPos[Acts::ePos0]);
100 pos[Amg::y] = lengthToAthena(actsPos[Acts::ePos1]);
101 pos[Amg::z] = lengthToAthena(actsPos[Acts::ePos2]);
102 return std::make_pair(std::move(pos), timeToAthena(actsPos[Acts::eTime]));
103 }
constexpr double timeToAthena(const double actsT)
Converts a time unit from Acts to Athena units.
constexpr double lengthToAthena(const double actsL)
Converts a length scalar from Acts to Athena units.

◆ convertPosToActs()

Acts::Vector4 ActsTrk::convertPosToActs ( const Amg::Vector3D & athenaPos,
const double athenaTime = 0. )
inline

Converts a position vector & time from Athena units into Acts units.

Parameters
athenaPos3D-spatial position vector to convert
athenaTimeTime counts to convert

Definition at line 85 of file UnitConverters.h.

86 {
87 Acts::Vector4 pos{Acts::Vector4::Zero()};
88 pos[Acts::eTime] = timeToActs(athenaTime);
89 pos[Acts::ePos0] = lengthToActs(athenaPos.x());
90 pos[Acts::ePos1] = lengthToActs(athenaPos.y());
91 pos[Acts::ePos2] = lengthToActs(athenaPos.z());
92 return pos;
93 }
constexpr double lengthToActs(const double athenaL)
Converts a length scalar from Acts to Athena units.

◆ createDecoratorKeys()

template<class T_Parent, class T_Cont>
void ActsTrk::createDecoratorKeys ( T_Parent & parent,
const SG::ReadHandleKey< T_Cont > & container_key,
const std::string & prefix,
const std::vector< std::string > & decor_names,
std::vector< SG::WriteDecorHandleKey< T_Cont > > & decor_out )

Definition at line 49 of file decoratorUtils.h.

53 {
54 decor_out.clear();
55 decor_out.reserve(decor_names.size());
56 for (const std::string &a_decor_name : decor_names) {
57 assert( !a_decor_name.empty() );
58 decor_out.emplace_back(container_key.key()+"."+prefix+a_decor_name);
59 // need to declare handles, otherwise the scheduler would not pick up the data dependencies
60 // introduced by the decorations
61 parent.declare(decor_out.back());
62 decor_out.back().setOwner(&parent);
63 decor_out.back().initialize().ignore();
64 }
65 }
const std::string & key() const
Return the StoreGate ID for the referenced object.

◆ createDecorators()

template<class T_Cont, class T>
std::vector< SG::WriteDecorHandle< T_Cont, T > > ActsTrk::createDecorators ( const std::vector< SG::WriteDecorHandleKey< T_Cont > > & keys,
const EventContext & ctx )

Definition at line 31 of file decoratorUtils.h.

32 {
33 std::vector<SG::WriteDecorHandle<T_Cont,T> > out;
34 out.reserve(keys.size());
35 for( const SG::WriteDecorHandleKey<T_Cont> &a_key : keys) {
36 out.emplace_back(a_key,ctx);
37 if (not out.back().isValid()) {
38 std::stringstream msg;
39 msg << "Failed to create decorator handdle " << a_key.key();
40 throw std::runtime_error( msg.str() );
41 }
42 }
43 return out;
44 }
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
MsgStream & msg
Definition testRead.cxx:32

◆ decodeSurface() [1/3]

std::shared_ptr< const Acts::Surface > ActsTrk::decodeSurface ( const xAOD::SurfaceType surfaceType,
const std::vector< float > & translation,
const std::vector< float > & rotation,
const std::vector< float > & boundValues )

Definition at line 91 of file SurfaceEncoding.cxx.

93 {
94
95 // Translation and rotation
96
97 // create the transformation matrix
98 Amg::Transform3D transform =
99 Amg::getTranslate3D(translation[0], translation[1], translation[2]) *
100 Amg::getRotateZ3D(rotation[0]) *
101 Amg::getRotateY3D(rotation[1]) *
102 Amg::getRotateX3D(rotation[2]);
103
104 switch (surfaceType) {
105 using enum xAOD::SurfaceType;
106 case Cone:
107 return Acts::Surface::makeShared<Acts::ConeSurface>(std::move(transform),
108 boundValues[0], boundValues[1], boundValues[2], boundValues[3]);
109 case Cylinder: {
110 // phi/2 must be slightly < Pi to avoid crashing
111 const float fixedPhi = boundValues[2] > M_PI - 0.001 ? M_PI - 0.001 : boundValues[2];
112 return Acts::Surface::makeShared<Acts::CylinderSurface>(std::move(transform),
113 boundValues[0], boundValues[1], fixedPhi, boundValues[3], boundValues[4]);
114 } case Disc:
115 return Acts::Surface::makeShared<Acts::DiscSurface>(std::move(transform),
116 boundValues[0], boundValues[1], boundValues[2]);
117 case Perigee:
118 return Acts::Surface::makeShared<Acts::PerigeeSurface>(std::move(transform));
119 case Plane: {
120 Acts::Vector2 min(boundValues[0], boundValues[1]),
121 max(boundValues[2], boundValues[3]);
122 auto rBounds = std::make_shared<const Acts::RectangleBounds>(min, max);
123 return Acts::Surface::makeShared<Acts::PlaneSurface>(std::move(transform), rBounds);
124 } case Straw:
125 return Acts::Surface::makeShared<Acts::StrawSurface>(std::move(transform),
126 boundValues[0], boundValues[1]);
127 case Curvilinear:
128 case Other:
129 THROW_EXCEPTION("EncodeSurface this type " <<static_cast<int>(surfaceType)<<
130 " of xAOD::surface cannot be converted into an Acts one");
131 }
132
133 return nullptr;
134}
#define M_PI
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
Amg::Transform3D getRotateX3D(double angle)
get a rotation transformation around X-axis
Amg::Transform3D getTranslate3D(const double X, const double Y, const double Z)
: Returns a shift transformation along an arbitrary axis
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Eigen::Affine3d Transform3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
SurfaceType
This enumerator simplifies the persistency & calculations, by saving a dynamic_cast,...
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10

◆ decodeSurface() [2/3]

std::shared_ptr< const Acts::Surface > ActsTrk::decodeSurface ( const xAOD::TrackSurface * backend)

Creates transient Acts Surface objects given a surface backend implementation should be exact mirror of encodeSurface.

Definition at line 136 of file SurfaceEncoding.cxx.

136 {
137 return decodeSurface(s->surfaceType(), s->translation(), s->rotation(),
138 s->boundValues());
139}
std::shared_ptr< const Acts::Surface > decodeSurface(const xAOD::TrackSurface *backend)
Creates transient Acts Surface objects given a surface backend implementation should be exact mirror ...

◆ decodeSurface() [3/3]

std::shared_ptr< const Acts::Surface > ActsTrk::decodeSurface ( const xAOD::TrackSurfaceAuxContainer * backend,
size_t i )

As above, but takes data from Aux container at an index i.

Definition at line 141 of file SurfaceEncoding.cxx.

142 {
143 return decodeSurface(s->surfaceType[i], s->translation[i], s->rotation[i],
144 s->boundValues[i]);
145}

◆ encodeSurface() [1/3]

void ActsTrk::encodeSurface ( xAOD::SurfaceType & surfaceType,
std::vector< float > & translation,
std::vector< float > & rotation,
std::vector< float > & boundValues,
const Acts::Surface * surface,
const Acts::GeometryContext & geoContext )

Definition at line 20 of file SurfaceEncoding.cxx.

25 {
26 // return if surf is a nullptr
27 if (!surface) {
28 return;
29 }
30 switch (surface->type()){
31 using enum Acts::Surface::SurfaceType;
32 case Cone:
33 surfaceType = xAOD::SurfaceType::Cone;
34 break;
35 case Cylinder:
36 surfaceType = xAOD::SurfaceType::Cylinder;
37 break;
38 case Disc:
39 surfaceType = xAOD::SurfaceType::Disc;
40 break;
41 case Perigee:
42 surfaceType = xAOD::SurfaceType::Perigee;
43 break;
44 case Plane:
45 surfaceType = xAOD::SurfaceType::Plane;
46 break;
47 case Straw:
48 surfaceType = xAOD::SurfaceType::Straw;
49 break;
50 case Curvilinear:
52 break;
53 case Other:
54 surfaceType = xAOD::SurfaceType::Other;
55 break;
56 }
57
58 Acts::RotationMatrix3 lRotation =
59 surface->localToGlobalTransform(geoContext).rotation();
60 Acts::Vector3 eulerAngles = lRotation.eulerAngles(2, 1, 0);
61 Acts::Vector3 lTranslation = surface->center(geoContext);
62
63 for (int i = 0; i < 3; ++i) {
64 rotation.push_back(eulerAngles[i]);
65 translation.push_back(lTranslation[i]);
66 }
67 // copy and transform double->float
68 const std::vector<double>& values = surface->bounds().values();
69 boundValues.insert(boundValues.end(), values.begin(), values.end());
70}

◆ encodeSurface() [2/3]

void ActsTrk::encodeSurface ( xAOD::TrackSurface * backend,
const Acts::Surface * surface,
const Acts::GeometryContext & geoContext )

As above, but works on xAOD::TrackSurface object.

Definition at line 79 of file SurfaceEncoding.cxx.

80 {
81 xAOD::SurfaceType surfaceType;
82 std::vector<float> translation, rotation, bounds;
83 encodeSurface(surfaceType, translation, rotation, bounds, surface, geo);
84
85 s->setSurfaceType(surfaceType);
86 s->setTranslation(translation);
87 s->setRotation(rotation);
88 s->setBoundValues(bounds);
89}
void encodeSurface(xAOD::TrackSurfaceAuxContainer *backend, size_t index, const Acts::Surface *surface, const Acts::GeometryContext &geoContext)
Prepares persistifiable representation of surface into xAOD::TrackSurface object.

◆ encodeSurface() [3/3]

void ActsTrk::encodeSurface ( xAOD::TrackSurfaceAuxContainer * backend,
size_t index,
const Acts::Surface * surface,
const Acts::GeometryContext & geoContext )

Prepares persistifiable representation of surface into xAOD::TrackSurface object.

Warning
supports only few types, unhandled surface type results in a exception
  • backend - container to store surface data
  • index - index under which the data needs to be recorded

Definition at line 72 of file SurfaceEncoding.cxx.

74 {
75 encodeSurface(s->surfaceType[i], s->translation[i], s->rotation[i],
76 s->boundValues[i], surface, geo);
77}

◆ energyToActs()

double ActsTrk::energyToActs ( const double athenaE)
inlineconstexpr

Converts an energy scalar from Athena to Acts units.

Parameters
athenaEEnergy value to convert

Definition at line 22 of file UnitConverters.h.

22 {
23 using namespace Acts::UnitLiterals;
24 constexpr double energyCnv = 1_MeV / Gaudi::Units::MeV;
25 return energyCnv * athenaE;
26 }

◆ energyToAthena()

double ActsTrk::energyToAthena ( const double actsE)
inlineconstexpr

Converts an energy scalar from Acts to Athena units.

Parameters
athenaEEnergy value to convert

Definition at line 29 of file UnitConverters.h.

29 {
30 using namespace Acts::UnitLiterals;
31 constexpr double energyCnv = Gaudi::Units::MeV / 1_MeV;
32 return energyCnv * actsE;
33 }

◆ getCalibrationContext()

Acts::CalibrationContext ActsTrk::getCalibrationContext ( const EventContext & ctx)
inline

The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLinks during the track State upate.

In ATLAS Athena, the EventContext is needed to access the calibration context from the conditions. This function packs the pointer of the current EventContext into a Acts::CalibrationContext

Parameters
ctxEventContext to transform into a Context

Definition at line 15 of file CalibrationContext.h.

15 {
16 return Acts::CalibrationContext{&ctx};
17 }

◆ getCellColumn() [1/2]

int ActsTrk::getCellColumn ( const StripClusteringTool::Cell & cell)
static

Definition at line 27 of file StripClusteringTool.cxx.

28{
29 return cell.index;
30}

◆ getCellColumn() [2/2]

int ActsTrk::getCellColumn ( const typename PixelClusteringTool::Cell & cell)
inlinestatic

Definition at line 25 of file PixelClusteringTool.cxx.

25{ return cell.COL; }

◆ getCellRow()

int ActsTrk::getCellRow ( const typename PixelClusteringTool::Cell & cell)
inlinestatic

Definition at line 24 of file PixelClusteringTool.cxx.

24{ return cell.ROW; }

◆ getDepositedEnergy()

template<class T_Deposit>
float ActsTrk::getDepositedEnergy ( const T_Deposit & )

◆ getInTruthPropertyName()

template<class T_TruthEventCollection>
const char * ActsTrk::getInTruthPropertyName ( )
inline

◆ getRDOList()

template<class T>
auto ActsTrk::getRDOList ( const T & a)

Definition at line 109 of file MeasurementToTruthAssociationAlg.h.

109 {
110 if constexpr(has_rdoList<T>::value) {
111 return a.rdoList();
112 }
113 else {
114 return DummyRDOList(a);
115 }
116 }
static Double_t a

◆ getSimDataDeposits()

template<class T_SimDataCollection, class T_SimDataIterator>
auto ActsTrk::getSimDataDeposits ( const T_SimDataCollection & sim_data_collection,
T_SimDataIterator sim_data_iter_for_identifier )

◆ getSurfaceGeometryIdOfMeasurement()

Acts::GeometryIdentifier ActsTrk::getSurfaceGeometryIdOfMeasurement ( const DetectorElementToActsGeometryIdMap & detector_element_to_geoid,
const xAOD::UncalibratedMeasurement & measurement )
inline

Definition at line 13 of file SurfaceOfMeasurementUtil.h.

16 {
17 DetectorElementToActsGeometryIdMap::const_iterator
18 geoid_iter = detector_element_to_geoid.find( makeDetectorElementKey(measurement.type(), measurement.identifierHash()) );
19 return geoid_iter != detector_element_to_geoid.end()
21 : Acts::GeometryIdentifier{};
22 }
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash).
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
DetectorElementKey makeDetectorElementKey(xAOD::UncalibMeasType meas_type, unsigned int identifier_hash)
static const Acts::GeometryIdentifier & getValue(const value_type &element)

◆ getUncalibratedMeasurement()

const xAOD::UncalibratedMeasurement & ActsTrk::getUncalibratedMeasurement ( const ATLASUncalibSourceLink & source_link)
inline

Definition at line 26 of file ATLASSourceLink.h.

26 {
27 assert(source_link);
28 return *source_link;
29 }

◆ lengthToActs()

double ActsTrk::lengthToActs ( const double athenaL)
inlineconstexpr

Converts a length scalar from Acts to Athena units.

Parameters
athenaLLength value to convert

Definition at line 36 of file UnitConverters.h.

36 {
37 using namespace Acts::UnitLiterals;
38 constexpr double lengthCnv = 1_mm / Gaudi::Units::mm;
39 return lengthCnv * athenaL;
40 }

◆ lengthToAthena()

double ActsTrk::lengthToAthena ( const double actsL)
inlineconstexpr

Converts a length scalar from Acts to Athena units.

Parameters
athenaLLength value to convert

Definition at line 43 of file UnitConverters.h.

43 {
44 using namespace Acts::UnitLiterals;
45 constexpr double lengthCnv = Gaudi::Units::mm / 1_mm;
46 return lengthCnv * actsL;
47 }

◆ localPositionStrip2D()

std::tuple< Acts::Vector2, Amg::Vector2D, int, int > ActsTrk::localPositionStrip2D ( const Acts::GeometryContext & tgContext,
const xAOD::UncalibratedMeasurement & measurement,
const Acts::Surface * surface,
const xAOD::SpacePoint * sp )
static

Definition at line 284 of file TrackStatePrinterTool.cxx.

288 {
289 auto *disc = dynamic_cast<const Acts::DiscSurface *>(surface);
290 Acts::Vector2 loc{Acts::Vector2::Zero()};
291 int est = 2; // est = 0 (estimated from SP), 1 (from module center), 2 (globalToLocal(center) failure), -1 (pixel)
292 if (surface)
293 {
294 if (sp)
295 {
296 auto res = surface->globalToLocal(tgContext, sp->globalPosition().cast<double>(), Acts::Vector3::Zero());
297 if (res.ok())
298 {
299 loc = res.value();
300 est = 0;
301 }
302 }
303
304 if (est != 0)
305 {
306 if (auto *annulus = dynamic_cast<const Acts::AnnulusBounds *>(&surface->bounds()))
307 {
308 loc[0] = 0.5 * (annulus->rMin() + annulus->rMax());
309 est = 1;
310 }
311 else
312 {
313 auto res = surface->globalToLocal(tgContext, surface->center(tgContext), Acts::Vector3::Zero());
314 if (res.ok())
315 {
316 loc = res.value();
317 est = 1;
318 }
319 }
320 }
321 }
322
323 const int measInd = disc ? 1 : 0;
324 loc[measInd] = measurement.localPosition<1>()[0];
325 if (disc)
326 {
327 Amg::Vector2D locTrk{disc->localPolarToCartesian(loc).reverse()};
328 locTrk[0] = -locTrk[0];
329 return {loc, locTrk, measInd, est};
330 }
331 else
332 {
333 return {loc, loc, measInd, est};
334 }
335 }
static Double_t sp
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.

◆ localXFromSourceLink()

float ActsTrk::localXFromSourceLink ( const ATLASUncalibSourceLink & source_link)
inline

Definition at line 53 of file ATLASSourceLink.h.

53 {
54 const xAOD::UncalibratedMeasurement &uncalib_meas = getUncalibratedMeasurement(source_link);
55 return uncalib_meas.type() == xAOD::UncalibMeasType::PixelClusterType
56 ? uncalib_meas.localPosition<2>()[Trk::locX]
57 : uncalib_meas.localPosition<1>()[Trk::locX];
58 }
const xAOD::UncalibratedMeasurement & getUncalibratedMeasurement(const ATLASUncalibSourceLink &source_link)
Ensure that the ATLAS eigen extensions are properly loaded.
@ locX
Definition ParamDefs.h:37
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.

◆ localYFromSourceLink()

float ActsTrk::localYFromSourceLink ( const ATLASUncalibSourceLink & source_link)
inline

Definition at line 60 of file ATLASSourceLink.h.

60 {
61 const xAOD::UncalibratedMeasurement &uncalib_meas = getUncalibratedMeasurement(source_link);
62 assert(uncalib_meas.type() == xAOD::UncalibMeasType::PixelClusterType );
63 return uncalib_meas.localPosition<2>()[Trk::locY];
64 }
@ locY
local cartesian
Definition ParamDefs.h:38

◆ makeATLASUncalibSourceLink() [1/4]

ATLASUncalibSourceLink ActsTrk::makeATLASUncalibSourceLink ( const xAOD::UncalibratedMeasurement * measurement)
inline

Definition at line 49 of file ATLASSourceLink.h.

49 {
50 assert(measurement && measurement->container() && measurement->index() < measurement->container()->size_v());
51 return measurement;
52 }

◆ makeATLASUncalibSourceLink() [2/4]

ATLASUncalibSourceLink ActsTrk::makeATLASUncalibSourceLink ( const xAOD::UncalibratedMeasurementContainer * container,
const xAOD::UncalibratedMeasurement * measurement,
const EventContext & ctx )
inline

Definition at line 36 of file ATLASSourceLink.h.

38 {
39 assert( container == measurement->container());
40 assert( container && measurement->index() < container->size() );
41 return measurement;
42 }

◆ makeATLASUncalibSourceLink() [3/4]

ATLASUncalibSourceLink ActsTrk::makeATLASUncalibSourceLink ( const xAOD::UncalibratedMeasurementContainer * container,
std::size_t index )
inline

Definition at line 43 of file ATLASSourceLink.h.

44 {
45 assert(container && index < container->size());
46 return container->at(index);
47 }
Definition index.py:1

◆ makeATLASUncalibSourceLink() [4/4]

ATLASUncalibSourceLink ActsTrk::makeATLASUncalibSourceLink ( const xAOD::UncalibratedMeasurementContainer * container,
std::size_t index,
const EventContext & ctx )
inline

Definition at line 30 of file ATLASSourceLink.h.

32 {
33 assert(container && index < container->size());
34 return container->at(index);
35 }

◆ makeDepositToTruthParticleMap()

template<class T_TruthEventCollection>
auto ActsTrk::makeDepositToTruthParticleMap ( const T_TruthEventCollection * truth_particle_links)

◆ makeDetectorElementKey()

DetectorElementKey ActsTrk::makeDetectorElementKey ( xAOD::UncalibMeasType meas_type,
unsigned int identifier_hash )
inline

Definition at line 23 of file DetectorElementToActsGeometryIdMap.h.

23 {
24 assert( sizeof(xAOD::UncalibMeasType) <= sizeof(std::size_t) );
25 assert( static_cast<std::size_t>( to_underlying(meas_type)&((~DETELEMENT_HASH_MASK)>>DETELEMENT_TYPE_SHIFT)) == static_cast<std::size_t>(meas_type));
26 assert( (identifier_hash & DETELEMENT_HASH_MASK) == identifier_hash);
27 return (to_underlying(meas_type) << DETELEMENT_TYPE_SHIFT) | (identifier_hash & DETELEMENT_HASH_MASK);
28 }
constexpr unsigned int DETELEMENT_HASH_MASK
std::underlying_type_t< T > to_underlying(T val)
constexpr unsigned int DETELEMENT_TYPE_SHIFT
UncalibMeasType
Define the type of the uncalibrated measurement.

◆ makeInterfaceContainer()

template<typename IFACE, typename AUX>
std::unique_ptr< IFACE > ActsTrk::makeInterfaceContainer ( const AUX * aux)

helper to construct interface container for already filled Aux container TODO maybe should be moved to xAOD area

Definition at line 516 of file MultiTrajectory.h.

516 {
517 auto interface = std::make_unique<IFACE>();
518 for ( size_t i = 0, sz = aux->size(); i < sz; ++i) {
519 interface->emplace_back( new std::remove_pointer_t<typename IFACE::value_type>() );
520 }
521 interface->setStore(aux);
522 return interface;
523}
static Double_t sz

◆ operator<() [1/3]

bool ActsTrk::operator< ( const IdentifierHash & a,
const std::unique_ptr< SurfaceCache > & b )
inline

Definition at line 64 of file Tracking/Acts/ActsGeoUtils/ActsGeoUtils/SurfaceCache.h.

64 {
65 return a < b->hash();
66 }

◆ operator<() [2/3]

bool ActsTrk::operator< ( const std::unique_ptr< SurfaceCache > & a,
const IdentifierHash & b )
inline

Definition at line 67 of file Tracking/Acts/ActsGeoUtils/ActsGeoUtils/SurfaceCache.h.

67 {
68 return a->hash() < b;
69 }

◆ operator<() [3/3]

bool ActsTrk::operator< ( const std::unique_ptr< SurfaceCache > & a,
const std::unique_ptr< SurfaceCache > & b )
inline

Comparison operators.

Definition at line 60 of file Tracking/Acts/ActsGeoUtils/ActsGeoUtils/SurfaceCache.h.

61 {
62 return a->hash() < b->hash();
63 }

◆ operator<<() [1/2]

MsgStream & ActsTrk::operator<< ( MsgStream & out,
const ActsUtils::Stat & stat )
inline

Definition at line 25 of file TrackToTruthAssociationAlg.cxx.

25 {
26 ActsUtils::dumpStat(out, stat);
27 return out;
28 }
void dumpStat(T_Stream &out, const Stat &stat)
Dump the given statistics object to the given output stream.
Definition StatUtils.h:63

◆ operator<<() [2/2]

std::ostream & ActsTrk::operator<< ( std::ostream & ostr,
const DetectorType type )
inline

Definition at line 54 of file GeometryDefs.h.

54 {
55 return (ostr<<to_string(type));
56 }
std::string to_string(const DetectorType &type)

◆ prefixFromTrackContainerName()

std::string ActsTrk::prefixFromTrackContainerName ( const std::string & tracks)

Parse TrackContainer name to get the prefix for backends The name has to contain XYZTracks, the XYZ is returned.

Definition at line 20 of file TrackContainerHandlesHelper.cxx.

20 {
21 std::regex word_regex("(.*)Tracks$");
22 std::smatch match_regex;
23
24 if ( not std::regex_search(tracks, match_regex, word_regex) or match_regex.size() < 2) {
25 throw std::runtime_error(
26 std::string("prefixFromTrackContainerName: key does not contain "
27 "Tracks in the name ") + tracks);
28 }
29
30 return match_regex[1].str();
31}

◆ printHeader()

void ActsTrk::printHeader ( int type,
bool extra = false )
static

Definition at line 118 of file TrackStatePrinterTool.cxx.

119 {
120 std::cout << std::left
121 << std::setw(5) << "Index" << ' '
122 << std::setw(4) << "Type" << ' '
123 << std::setw(21) << "SurfaceBounds" << ' ';
124 if (type == 0)
125 {
126 std::cout << std::setw(22) << "GeometryId" << ' '
127 << std::setw(20) << "ATLAS ID" << ' '
128 << std::right
129 << std::setw(10) << "loc0" << ' '
130 << std::setw(10) << "loc1"
131 << " "
132 << std::setw(9) << "R" << ' '
133 << std::setw(9) << "Pos Z" << ' '
134 << std::setw(9) << "phid" << ' '
135 << std::setw(9) << "eta";
136 if (extra)
137 {
138 std::cout << ' '
139 << std::setw(10) << "Trk loc0" << ' '
140 << std::setw(10) << "loc1"
141 << " "
142 << std::setw(9) << "Trk R" << ' '
143 << std::setw(9) << "phid" << ' '
144 << std::setw(9) << "eta" << ' '
145 << std::setw(10) << "g2l loc0" << ' '
146 << std::setw(10) << "loc1";
147 }
148 std::cout << '\n';
149 static std::atomic<int> kilroy = 0;
150 if (!(kilroy++))
151 {
152 std::cout << "R (mm) and phi (degrees). Estimated local coordinate indicated by \"*\" (from SP), \"o\" (from module center), or \"#\" (globalToLocal(center) failure).";
153 if (extra)
154 std::cout << " Athena/ACTS comparison only shown if different.";
155 std::cout << '\n';
156 }
157 }
158 if (type == 1)
159 {
160 std::cout << std::setw(22) << "GeometryId/meas/stats" << ' '
161 << std::right
162 << std::setw(10) << "loc0" << ' '
163 << std::setw(10) << "loc1" << ' '
164 << std::setw(9) << "Pos R" << ' '
165 << std::setw(9) << "Pos Z" << ' '
166 << std::setw(9) << "phid" << ' '
167 << std::setw(9) << "eta" << ' '
168 << std::setw(9) << "q*pT" << ' '
169 << std::setw(9) << "phid" << ' '
170 << std::setw(9) << "eta" << ' '
171 << std::setw(6) << "TrkLen" << ' '
172 << std::setw(7) << "chi2" << ' '
173 << std::setw(6) << "Flags" << '\n';
174 }
175 }

◆ printMeasurement()

void ActsTrk::printMeasurement ( const Acts::GeometryContext & tgContext,
const Acts::Surface * surface,
const std::tuple< Acts::Vector2, Amg::Vector2D, int, int > & locData,
bool compareMeasurementTransforms = false )
static

Definition at line 226 of file TrackStatePrinterTool.cxx.

230 {
231 auto &[loc, locTrk, measInd, est] = locData;
232 int flag = est < 0 ? est : 2 * est + measInd;
233 int flagTrk = est < 0 ? est : 2 * est;
234 // indicates coordinate that is estimated: *=from SP, o=from module center, #=globalToLocal(center) failure
235 static const std::map<int, const char *> estimated_flags{{-1, " "},
236 {0, " *"},
237 {1, "* "},
238 {2, " o"},
239 {3, "o "},
240 {4, " #"},
241 {5, "# "}};
242 printVec2(loc, estimated_flags.at(flag));
243
244 if (surface)
245 {
246 // momentum direction doesn't seem to be needed for measurement surfaces (only LineSurface?)
247 auto glob = surface->localToGlobal(tgContext, loc, Acts::Vector3::Zero());
248 printVec3(glob);
249
250 if (compareMeasurementTransforms)
251 {
252 const ActsDetectorElement *
253 acts_detector_element = dynamic_cast<const ActsDetectorElement *>(surface->surfacePlacement());
254 if (acts_detector_element) {
255 const InDetDD::SiDetectorElement *detElem = dynamic_cast< const InDetDD::SiDetectorElement *>(acts_detector_element->upstreamDetectorElement());
256
257 // if measInd=1: won't match because comparing x,y and R,phi, but at least not phi,R.
258 // This is still useful for debugging because the next test also fails.
259 printVec2(locTrk, (measInd == 1 ? loc.reverse() : loc), estimated_flags.at(flagTrk));
260
261 if (detElem)
262 {
263 auto globTrk = detElem->surface().localToGlobal(locTrk);
264 printVec3(globTrk, glob);
265
266 auto res = surface->globalToLocal(tgContext, globTrk, Acts::Vector3::Zero());
267 if (!res.ok())
268 {
269 std::cout << " ** " << res.error() << " **";
270 }
271 else
272 {
273 printVec2(res.value(), loc);
274 }
275 }
276 }
277 }
278
279 }
280 std::cout << std::defaultfloat << std::setprecision(-1);
281 }
static void printVec3(const Acts::Vector3 &p)
static void printVec2(const Acts::Vector2 &p, const char *estimated=nullptr)

◆ printVec2() [1/2]

void ActsTrk::printVec2 ( const Acts::Vector2 & p,
const Acts::Vector2 & cmp,
const char * estimated = nullptr,
int precision = 4 )
static

Definition at line 213 of file TrackStatePrinterTool.cxx.

214 {
215 if (((p - cmp).array().abs() >= 0.5 * std::pow(10.0, -precision)).any())
216 {
217 printVec2(p, estimated);
218 }
219 else
220 {
221 std::cout << std::setw(22 + (estimated ? 1 : 0)) << "";
222 }
223 }

◆ printVec2() [2/2]

void ActsTrk::printVec2 ( const Acts::Vector2 & p,
const char * estimated = nullptr )
static

Definition at line 202 of file TrackStatePrinterTool.cxx.

203 {
204 const char e0 = estimated ? estimated[0] : ' ';
205 const char *e1 = estimated ? estimated + 1 : "";
206 std::cout << std::fixed << ' '
207 << std::setw(10) << std::setprecision(4) << p[0] << e0
208 << std::setw(10) << std::setprecision(4) << p[1] << e1
209 << std::defaultfloat << std::setprecision(-1);
210 }

◆ printVec3() [1/2]

void ActsTrk::printVec3 ( const Acts::Vector3 & p)
static

Definition at line 178 of file TrackStatePrinterTool.cxx.

179 {
180 std::cout << std::fixed << ' '
181 << std::setw(9) << std::setprecision(3) << p.head<2>().norm() << ' '
182 << std::setw(9) << std::setprecision(3) << p[2] << ' '
183 << std::setw(9) << std::setprecision(3) << std::atan2(p[1], p[0]) / Acts::UnitConstants::degree << ' '
184 << std::setw(9) << std::setprecision(5) << std::atanh(p[2] / p.norm())
185 << std::defaultfloat << std::setprecision(-1);
186 }

◆ printVec3() [2/2]

void ActsTrk::printVec3 ( const Acts::Vector3 & p,
const Acts::Vector3 & cmp,
int precision = 3 )
static

Definition at line 189 of file TrackStatePrinterTool.cxx.

190 {
191 if (((p - cmp).array().abs() >= 0.5 * std::pow(10.0, -precision)).any())
192 {
193 printVec3(p);
194 }
195 else
196 {
197 std::cout << std::setw(30) << "";
198 }
199 }

◆ timeToActs()

double ActsTrk::timeToActs ( const double athenaT)
inlineconstexpr

Converts a time unit from Athena to Acts units.

Parameters
athenaTTime interval to convert

Definition at line 50 of file UnitConverters.h.

50 {
51 using namespace Acts::UnitLiterals;
52 constexpr double timeCnv = 1_ns / Gaudi::Units::ns;
53 return timeCnv * athenaT;
54 }

◆ timeToAthena()

double ActsTrk::timeToAthena ( const double actsT)
inlineconstexpr

Converts a time unit from Acts to Athena units.

Parameters
actsTTime interval to convert

Definition at line 57 of file UnitConverters.h.

57 {
58 using namespace Acts::UnitLiterals;
59 constexpr double timeCnv = Gaudi::Units::ns/ 1_ns;
60 return timeCnv * actsT;
61 }

◆ to_string()

std::string ActsTrk::to_string ( const DetectorType & type)
inline

Definition at line 36 of file GeometryDefs.h.

36 {
37 switch (type) {
38 using enum DetectorType;
39 case Pixel: return "Pixel";
40 case Sct: return "Sct";
41 case Trt: return "Trt";
42 case Hgtd: return "Hgtd";
43 case Mdt: return "Mdt";
44 case Rpc: return "Rpc";
45 case Tgc: return "Tgc";
46 case Mm: return "Mm";
47 case sTgc: return "sTgc";
48 case Csc: return "Csc";
49 case UnDefined: return "UnDefined";
50 }
51 return "Unknown";
52 }
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.

◆ to_underlying()

template<typename T>
std::underlying_type_t< T > ActsTrk::to_underlying ( T val)

Definition at line 14 of file ActsInspectTruthContentAlg.cxx.

15 { return static_cast< std::underlying_type_t<T> >(val); }

◆ velocityToActs()

double ActsTrk::velocityToActs ( const double athenaV)
inlineconstexpr

Converts a velocity from Athena to Acts units.

Parameters
athenaVVelocity to convert

Definition at line 64 of file UnitConverters.h.

64 {
65 return athenaV / timeToActs(1.);
66 }

Variable Documentation

◆ DETELEMENT_HASH_MASK

unsigned int ActsTrk::DETELEMENT_HASH_MASK = ~(1u<<31|1u<<30|1u<<29|1u<<28)
constexpr

Definition at line 21 of file DetectorElementToActsGeometryIdMap.h.

◆ DETELEMENT_TYPE_SHIFT

unsigned int ActsTrk::DETELEMENT_TYPE_SHIFT = 28
constexpr

Definition at line 20 of file DetectorElementToActsGeometryIdMap.h.

◆ NHitCounter

unsigned int ActsTrk::NHitCounter = static_cast< std::underlying_type<xAOD::UncalibMeasType>::type >(xAOD::UncalibMeasType::nTypes)
constexpr

Definition at line 19 of file TrackToTruthParticleAssociation.h.

◆ NTruthParticlesPerMeasurement

unsigned int ActsTrk::NTruthParticlesPerMeasurement = 5
constexpr

Definition at line 14 of file MeasurementToTruthParticleAssociation.h.

◆ NTruthParticlesPerTrack

unsigned int ActsTrk::NTruthParticlesPerTrack = 5
constexpr

Definition at line 20 of file TrackToTruthParticleAssociation.h.

◆ ONE_TWELFTH

double ActsTrk::ONE_TWELFTH = 1./12.
constexpr

Definition at line 21 of file StripClusteringTool.cxx.

◆ oneStripSF

float ActsTrk::oneStripSF = 1.1025
constexpr

Definition at line 22 of file StripClusteringTool.cxx.

◆ TrackFindingValidationDebugHists

bool ActsTrk::TrackFindingValidationDebugHists = false
constexpr

Definition at line 41 of file TrackTruthMatchingBaseAlg.h.

◆ TrackFindingValidationDetailedStat

bool ActsTrk::TrackFindingValidationDetailedStat = true
constexpr

Definition at line 42 of file TrackTruthMatchingBaseAlg.h.

◆ TrackToTruthParticleAssociationDebugHists

bool ActsTrk::TrackToTruthParticleAssociationDebugHists = false
constexpr

Definition at line 42 of file TrackToTruthAssociationAlg.h.

◆ TruthParticleHitCountDebugHists

bool ActsTrk::TruthParticleHitCountDebugHists = false
constexpr

Definition at line 42 of file TruthParticleHitCountAlg.h.

◆ twoStripSF

float ActsTrk::twoStripSF = 0.0729
constexpr

Definition at line 23 of file StripClusteringTool.cxx.