ATLAS Offline Software
Namespaces | Classes | Typedefs | Enumerations | Functions
ActsTrk::detail Namespace Reference

Athena definition of the Eigen plugin. More...

Namespaces

 FitterHelperFunctions
 
 HitCategory
 
 MakeDerivedVariant
 

Classes

struct  accepted_decoration_types
 
class  AnalogueClusteringToolImpl
 
class  AtlasMeasurementContainerList
 
struct  CKF_config
 
struct  Decoration
 
class  DuplicateSeedDetector
 
struct  ExpectedLayerPatternHelper
 Helper functions to encode the expected layer patterns in separate columns. More...
 
class  GenMeasurementRangeList
 
class  GenMeasurementRangeListFlat
 
class  GenUncalibSourceLinkAccessor
 Accessor for the above source link container. More...
 
class  HitSummaryData
 Helper class to gather hit summary information for e.g. More...
 
class  MeasurementCalibratorBase
 Base class providing the boiler code to fill the Acts multi trajectory track states. More...
 
class  MeasurementIndex
 
struct  MeasurementRange
 
class  OnTrackCalibrator
 Inner detector / ITk calibrator implementation used in the KalmanFilterTool. More...
 
class  RefittingCalibrator
 
class  SharedHitCounter
 
class  StripCalibratorImpl
 
class  SumOfValues
 Helper class to gather statistics and compute the biased variance. More...
 
class  TrackFindingMeasurements
 
class  TrkMeasSurfaceAccessor
 Helper class to access the Acts::Surface for a given Acts::SourceLink which is poiniting to a Trk::MeasurementBase. More...
 
class  TrkMeasurementCalibrator
 Calibrator class that links the legacy Trk::MeasurementBase objects with the Acts MultiTrajectory track state proxies without applying any further calibrating the measurement
More...
 
class  TrkPrepRawDataCalibrator
 Class to calibrate the Acts track states with uncalibrated Trk::PrepRaw data objects. More...
 
class  TrkPrepRawDataSurfaceAcc
 Helper class to access the Acts::surface associated with a Trk::PrepRawData measurement. More...
 
class  xAODUncalibMeasCalibrator
 Source link calibrator implementation for xAOD::Uncalibrated measurements. More...
 
class  xAODUncalibMeasSurfAcc
 Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement. More...
 

Typedefs

using SetterType = std::function< std::any(SG::IAuxStore *, ActsTrk::IndexType, SG::auxid_t)>
 
using GetterType = std::function< const std::any(const SG::IConstAuxStore *, ActsTrk::IndexType, SG::auxid_t)>
 
using CopierType = std::function< void(SG::IAuxStore *, ActsTrk::IndexType, SG::auxid_t, const std::any &)>
 
using MeasurementRangeList = GenMeasurementRangeList< AtlasMeasurementContainerList >
 
using MeasurementRangeListFlat = GenMeasurementRangeListFlat< AtlasMeasurementContainerList >
 
using UncalibSourceLinkAccessor = GenUncalibSourceLinkAccessor< MeasurementRangeList >
 
using RecoTrackContainer = Acts::TrackContainer< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory >
 
using RecoTrackContainerProxy = RecoTrackContainer::TrackProxy
 
using RecoTrackStateContainer = Acts::VectorMultiTrajectory
 
using RecoTrackStateContainerProxy = RecoTrackStateContainer::TrackStateProxy
 
using RecoConstTrackStateContainerProxy = RecoTrackStateContainer::ConstTrackStateProxy
 
using Stepper = Acts::SympyStepper
 Adapted from Acts Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithmFunction.cpp. More...
 
using Navigator = Acts::Navigator
 
using Propagator = Acts::Propagator< Stepper, Navigator >
 
using CKF = Acts::CombinatorialKalmanFilter< Propagator, RecoTrackContainer >
 
using Extrapolator = Propagator
 

Enumerations

enum  SourceLinkType { SourceLinkType::TrkMeasurement, SourceLinkType::TrkPrepRawData, SourceLinkType::xAODUnCalibMeas, SourceLinkType::nTypes }
 Enumeration to distinguish between the ATLAS EDM -> Acts::SourceLink variants. More...
 

Functions

template<typename T >
const std::any constDecorationGetter (const SG::IConstAuxStore *container, ActsTrk::IndexType idx, SG::auxid_t decorationId)
 
template<typename T >
const std::any decorationGetter (const SG::IAuxStore *container, ActsTrk::IndexType idx, SG::auxid_t decorationId)
 
template<typename T >
std::any decorationSetter (SG::IAuxStore *container, ActsTrk::IndexType idx, SG::auxid_t decorationId)
 
template<typename T >
void decorationCopier (SG::IAuxStore *dst, ActsTrk::IndexType dst_idx, SG::auxid_t decorationId, const std::any &src_ptr)
 
std::vector< DecorationrestoreDecorations (const SG::IConstAuxStore *container, const std::set< std::string > &staticVariables)
 
template<typename T >
bool build (const std::type_info *typeInfo, const std::string &name, std::vector< Decoration > &decorations)
 
std::tuple< std::vector< int >, std::vector< std::vector< int > >, std::vector< std::vector< float > > > getSDOInformation (const std::vector< Identifier > &rdoList, const InDetSimDataCollection &sdoCollection)
 
std::tuple< std::vector< float >, std::vector< float >, std::vector< int >, std::vector< int >, std::vector< float >, std::vector< float >, std::vector< float >, std::vector< float >, std::vector< float >, std::vector< float > > getSiHitInformation (const InDetDD::SiDetectorElement &element, const std::vector< SiHit > &matchingHits)
 
std::unique_ptr< ActsTrk::IMeasurementSelectorgetMeasurementSelector (const ActsTrk::IOnBoundStateCalibratorTool *pixelOnTrackCalibratorTool, const ActsTrk::IOnBoundStateCalibratorTool *stripOnTrackCalibratorTool, const ActsTrk::IOnBoundStateCalibratorTool *hgtdOnTrackCalibratorTool, const ActsTrk::detail::MeasurementRangeList &measurementRanges, const std::vector< float > &etaBinsf, const std::vector< std::pair< float, float > > &chi2CutOffOutlier, const std::vector< size_t > &numMeasurementsCutOff)
 
double computeDtDs (const Acts::ParticleHypothesis &hypothesis, double qop)
 Helper function to compute dt/ds Helper function to compute the derivative of the time as function of the path length. More...
 
Acts::FreeToPathMatrix computeFreeToPathDerivatives (const Acts::Vector3 &direction, double qop, const Acts::Vector3 &bfield, const Acts::ParticleHypothesis &particle_hypothesis)
 Compute the path length derivatives for the free/bound to curvilinear paramter transform. More...
 
std::optional< Acts::BoundMatrix > convertActsBoundCovToCurvilinearParam (const Acts::GeometryContext &tgContext, const Acts::BoundTrackParameters &param, const Acts::Vector3 &magnFieldVect, const Acts::ParticleHypothesis &particle_hypothesis)
 Convert the covariance of the given Acts track parameters into curvilinear parameterisation. More...
 
std::array< unsigned int, 4 > expectedLayerPattern (const EventContext &ctx, const ActsTrk::IExtrapolationTool &extrapolator, const Acts::BoundTrackParameters &perigee_parameters, double pathLimit)
 Extrapolate from the perigee outwards and gather information which detector layers should have hits. More...
 
void addToExpectedLayerPattern (std::array< unsigned int, 4 > &pattern, const ActsDetectorElement &detElement)
 
std::array< unsigned int, 4 > expectedLayerPattern (std::span< const ActsDetectorElement * > detectorElements)
 From a pre-computed set of detector elements, determine what the hit pattern is and which detector layers should have hits. More...
 
void gatherTrackSummaryData (const ActsTrk::TrackContainer &tracksContainer, const typename ActsTrk::TrackContainer::ConstTrackProxy &track, const std::array< const InDetDD::SiDetectorElementCollection *, to_underlying(xAOD::UncalibMeasType::nTypes)> &siDetEleColl, const std::array< unsigned short, to_underlying(xAOD::UncalibMeasType::nTypes)> &measurement_to_summary_type, SumOfValues &chi2_stat_out, HitSummaryData &hit_info_out, std::vector< ActsTrk::TrackStateBackend::ConstTrackStateProxy::IndexType > &param_state_idx_out, std::array< std::array< uint8_t, to_underlying(HitCategory::N)>, to_underlying(xAOD::UncalibMeasType::nTypes)> &special_hit_counts_out)
 Helper to gather track summary information from the track states of the specified track. More...
 
template<typename T_EnumClass >
constexpr std::underlying_type< T_EnumClass >::type to_underlying (T_EnumClass an_enum)
 Helper to convert class enum into an integer. More...
 

Detailed Description

Athena definition of the Eigen plugin.

Typedef Documentation

◆ CKF

using ActsTrk::detail::CKF = typedef Acts::CombinatorialKalmanFilter<Propagator, RecoTrackContainer>

◆ CopierType

using ActsTrk::detail::CopierType = typedef std::function<void(SG::IAuxStore*, ActsTrk::IndexType, SG::auxid_t, const std::any&)>

Definition at line 20 of file Decoration.h.

◆ Extrapolator

◆ GetterType

Definition at line 18 of file Decoration.h.

◆ MeasurementRangeList

Definition at line 252 of file AtlasUncalibSourceLinkAccessor.h.

◆ MeasurementRangeListFlat

Definition at line 253 of file AtlasUncalibSourceLinkAccessor.h.

◆ Navigator

using ActsTrk::detail::Navigator = typedef Acts::Navigator

◆ Propagator

using ActsTrk::detail::Propagator = typedef Acts::Propagator<Stepper, Navigator>

◆ RecoConstTrackStateContainerProxy

using ActsTrk::detail::RecoConstTrackStateContainerProxy = typedef RecoTrackStateContainer::ConstTrackStateProxy

◆ RecoTrackContainer

using ActsTrk::detail::RecoTrackContainer = typedef Acts::TrackContainer<Acts::VectorTrackContainer, Acts::VectorMultiTrajectory>

◆ RecoTrackContainerProxy

using ActsTrk::detail::RecoTrackContainerProxy = typedef RecoTrackContainer::TrackProxy

◆ RecoTrackStateContainer

using ActsTrk::detail::RecoTrackStateContainer = typedef Acts::VectorMultiTrajectory

◆ RecoTrackStateContainerProxy

using ActsTrk::detail::RecoTrackStateContainerProxy = typedef RecoTrackStateContainer::TrackStateProxy

◆ SetterType

using ActsTrk::detail::SetterType = typedef std::function<std::any(SG::IAuxStore*, ActsTrk::IndexType, SG::auxid_t)>

Definition at line 16 of file Decoration.h.

◆ Stepper

using ActsTrk::detail::Stepper = typedef Acts::SympyStepper

Adapted from Acts Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithmFunction.cpp.

Definition at line 30 of file Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h.

◆ UncalibSourceLinkAccessor

Definition at line 254 of file AtlasUncalibSourceLinkAccessor.h.

Enumeration Type Documentation

◆ SourceLinkType

Enumeration to distinguish between the ATLAS EDM -> Acts::SourceLink variants.

Enumerator
TrkMeasurement 
TrkPrepRawData 

Calibrated Trk::MeasurementBase objects.

xAODUnCalibMeas 

UnCalibrated Trk::PrepRawData objects.

nTypes 

Uncalbirated xAOD::UnCalibratedMEeasurement objects.

Number of source link types

Definition at line 9 of file SourceLinkType.h.

9  {
13  nTypes
14  };

Function Documentation

◆ addToExpectedLayerPattern()

void ActsTrk::detail::addToExpectedLayerPattern ( std::array< unsigned int, 4 > &  pattern,
const ActsDetectorElement detElement 
)

Definition at line 40 of file ExpectedHitUtils.cxx.

40  {
42  detEl = dynamic_cast<const InDetDD::SiDetectorElement *>(detElement.upstreamDetectorElement());
43  if (detEl) {
44  if (detEl->isPixel()) {
46  unsigned int pattern_idx = type==InDetDD::PixelBarrel ? 0 : 1;
47  const PixelID* pixel_id = static_cast<const PixelID *>(detEl->getIdHelper());
48  pattern[pattern_idx] |= (1<< pixel_id->layer_disk(detEl->identify()) );
49  }
50  else if (detEl->isSCT()) {
51  // @TODO SCT/strip layer number should be shifted by total number of pixel layers ...
52  const SCT_ID* sct_id = static_cast<const SCT_ID *>(detEl->getIdHelper());
53  unsigned int pattern_idx = detEl->isBarrel() ? 2 : 3;
54  pattern[pattern_idx] |= (1<< sct_id->layer_disk(detEl->identify()) );
55  }
56  }
57  }

◆ build()

template<typename T >
bool ActsTrk::detail::build ( const std::type_info *  typeInfo,
const std::string &  name,
std::vector< Decoration > &  decorations 
)

Definition at line 11 of file Decoration.cxx.

11  {
12  if (*typeInfo == typeid(T)) {
13  decorations.emplace_back(
14  decoration<T>(name, ActsTrk::detail::constDecorationGetter<T>,
15  ActsTrk::detail::decorationCopier<T>));
16  return true;
17  }
18  return false;
19 }

◆ computeDtDs()

double ActsTrk::detail::computeDtDs ( const Acts::ParticleHypothesis &  hypothesis,
double  qop 
)
inline

Helper function to compute dt/ds Helper function to compute the derivative of the time as function of the path length.

Definition at line 16 of file CurvilinearCovarianceHelper.h.

16  {
17  return std::hypot(1.,hypothesis.mass() / hypothesis.extractMomentum(qop));
18  }

◆ computeFreeToPathDerivatives()

Acts::FreeToPathMatrix ActsTrk::detail::computeFreeToPathDerivatives ( const Acts::Vector3 &  direction,
double  qop,
const Acts::Vector3 &  bfield,
const Acts::ParticleHypothesis &  particle_hypothesis 
)
inline

Compute the path length derivatives for the free/bound to curvilinear paramter transform.

Parameters
directionthe direction of trajectory at the location in question
qopq/p of the particle at the location in question in Acts units
bfieldthe magnetic field at the location in question in Acts units
particle_hypothesisthe particle hypothesis e.g. Acts::ParticleHypothesis::pion()
Returns
path length derivatives ( dr(...)/ds, dt/ds, dr(...)/ds2, d qop/ds [== 0] )

Definition at line 27 of file CurvilinearCovarianceHelper.h.

31  {
32  Acts::FreeToPathMatrix path_length_deriv;
33  static_assert(path_length_deriv.cols() == 8); // ensure that all elements are initialized
34  path_length_deriv.segment<3>(Acts::eFreePos0) = direction;
35  path_length_deriv(0,Acts::eFreeTime) = computeDtDs(particle_hypothesis,qop);
36  path_length_deriv.segment<3>(Acts::eFreeDir0) = (qop * direction.cross(bfield)).transpose();
37  path_length_deriv(0,Acts::eFreeQOverP) = 0.;
38  return path_length_deriv;
39  }

◆ constDecorationGetter()

template<typename T >
const std::any ActsTrk::detail::constDecorationGetter ( const SG::IConstAuxStore container,
ActsTrk::IndexType  idx,
SG::auxid_t  decorationId 
)

Definition at line 49 of file Decoration.h.

51  {
52  const void* data = container->getData(decorationId);
53  return &(static_cast<const T*>(data)[idx]);
54 }

◆ convertActsBoundCovToCurvilinearParam()

std::optional<Acts::BoundMatrix> ActsTrk::detail::convertActsBoundCovToCurvilinearParam ( const Acts::GeometryContext &  tgContext,
const Acts::BoundTrackParameters &  param,
const Acts::Vector3 &  magnFieldVect,
const Acts::ParticleHypothesis &  particle_hypothesis 
)
inline

Convert the covariance of the given Acts track parameters into curvilinear parameterisation.

Parameters
tgContextthe current geometry context
paramthe Acts track parameters
magnFieldVectthe vector of the magnetic field at the position of the track parameters in Acts units
particle_hypothesisthe particle hypothesis e.g. Acts::ParticleHypothesis::pion() Usage:
  
     using namespace Acts::UnitLiterals;
     MagField::AtlasFieldCache fieldCache;
     ...
     Amg::Vector3D magnFieldVect;
     fieldCache.getField(param.position(tgContext).data(), magnFieldVect.data());
     magnFieldVect *= 1000_T;
     auto cov = convertActsBoundCovToCurvilinearParam(tgContext, param, magnFieldVect);
     if (cov.has_value()) { ... }
  

Definition at line 61 of file CurvilinearCovarianceHelper.h.

65  {
66  if (param.covariance().has_value()) {
67  Acts::FreeVector freeParams = Acts::transformBoundToFreeParameters(
68  param.referenceSurface(), tgContext, param.parameters());
69  Acts::Vector3 position = freeParams.segment<3>(Acts::eFreePos0);
70  Acts::Vector3 direction = freeParams.segment<3>(Acts::eFreeDir0);
71 
72  Acts::BoundToFreeMatrix boundToFreeJacobian = param.referenceSurface().boundToFreeJacobian(tgContext, position, direction);
73  Acts::FreeMatrix freeTransportJacobian = Acts::FreeMatrix::Identity();
74  Acts::FreeToBoundMatrix freeToBoundJacobian;
75  Acts::FreeVector freeToPathDerivatives = computeFreeToPathDerivatives(direction,
76  param.parameters()[Acts::eBoundQOverP],
77  magnFieldVect,
78  particle_hypothesis);
79  Acts::BoundMatrix fullTransportJacobian;
80  Acts::detail::boundToCurvilinearTransportJacobian(direction,
81  boundToFreeJacobian,
82  freeTransportJacobian,
83  freeToBoundJacobian,
84  freeToPathDerivatives,
85  fullTransportJacobian);
86 
87  return fullTransportJacobian * param.covariance().value() * fullTransportJacobian.transpose();
88  }
89  else {
90  return {};
91  }
92  }

◆ decorationCopier()

template<typename T >
void ActsTrk::detail::decorationCopier ( SG::IAuxStore dst,
ActsTrk::IndexType  dst_idx,
SG::auxid_t  decorationId,
const std::any &  src_ptr 
)

Definition at line 76 of file Decoration.h.

77  {
78  *std::any_cast<T*>(decorationSetter<T>(dst, dst_idx, decorationId)) =
79  *std::any_cast<const T*>(src_ptr);
80 }

◆ decorationGetter()

template<typename T >
const std::any ActsTrk::detail::decorationGetter ( const SG::IAuxStore container,
ActsTrk::IndexType  idx,
SG::auxid_t  decorationId 
)

Definition at line 57 of file Decoration.h.

59  {
60  const void* data = container->getData(decorationId);
61  return &(static_cast<T*>(data)[idx]);
62 }

◆ decorationSetter()

template<typename T >
std::any ActsTrk::detail::decorationSetter ( SG::IAuxStore container,
ActsTrk::IndexType  idx,
SG::auxid_t  decorationId 
)

Definition at line 67 of file Decoration.h.

68  {
69  assert (idx < container->size());
70  // The size requested for the decoration must match the size of the container.
71  void* data = container->getData(decorationId, container->size(), container->size());
72  return &(static_cast<T*>(data)[idx]);
73 }

◆ expectedLayerPattern() [1/2]

std::array< unsigned int, 4 > ActsTrk::detail::expectedLayerPattern ( const EventContext &  ctx,
const ActsTrk::IExtrapolationTool extrapolator,
const Acts::BoundTrackParameters &  perigee_parameters,
double  pathLimit 
)

Extrapolate from the perigee outwards and gather information which detector layers should have hits.

Parameters
ctxthe current athena EvetContext @paran extrapolator referece to the Acts extrapolation tool
perigee_parametersthe Acts defining track parameters (parameters at the perigee).
pathLimitthe maximum path length to extrapolate to.
Returns
array of layer pattern words: two pairs for pixel and strips containing the barrel and end caps bit pattern with one bit per detector layer. Will extrapolate from the perigee to the given cylinder volume surface and gather the layers which are crossed and on which hits are expected.

Definition at line 14 of file ExpectedHitUtils.cxx.

17  {
18  std::array<unsigned int,4> expected_layer_pattern {0u,0u,0u,0u};
19  auto result = extrapolator.propagationSteps(ctx,
20  perigee_parameters,
21  Acts::Direction::Forward(),
22  pathLimit);
23  for (const Acts::detail::Step &step : result.first ) {
24  // @TODO boundary check ?, does layer number match layer numbering in athena ?
25  // @TODO filter out dead modules
26  if (step.geoID.sensitive()) {
27  if (step.surface && step.surface->associatedDetectorElement()) {
28  const ActsDetectorElement *
29  actsDetEl = dynamic_cast<const ActsDetectorElement *>(step.surface->associatedDetectorElement());
30  if (actsDetEl) {
31  addToExpectedLayerPattern(expected_layer_pattern, *actsDetEl);
32  }
33  }
34  }
35  }
36 
37  return expected_layer_pattern;
38  }

◆ expectedLayerPattern() [2/2]

std::array<unsigned int,4> ActsTrk::detail::expectedLayerPattern ( std::span< const ActsDetectorElement * >  detectorElements)

From a pre-computed set of detector elements, determine what the hit pattern is and which detector layers should have hits.

Parameters
detectorElementsA set of detector elements to consider

◆ gatherTrackSummaryData()

void ActsTrk::detail::gatherTrackSummaryData ( const ActsTrk::TrackContainer tracksContainer,
const typename ActsTrk::TrackContainer::ConstTrackProxy &  track,
const std::array< const InDetDD::SiDetectorElementCollection *, to_underlying(xAOD::UncalibMeasType::nTypes)> &  siDetEleColl,
const std::array< unsigned short, to_underlying(xAOD::UncalibMeasType::nTypes)> &  measurement_to_summary_type,
SumOfValues chi2_stat_out,
HitSummaryData hit_info_out,
std::vector< ActsTrk::TrackStateBackend::ConstTrackStateProxy::IndexType > &  param_state_idx_out,
std::array< std::array< uint8_t, to_underlying(HitCategory::N)>, to_underlying(xAOD::UncalibMeasType::nTypes)> &  special_hit_counts_out 
)

Helper to gather track summary information from the track states of the specified track.

Parameters
tracksContainerthe Acts track container
tracka track of the given acts track container for which the summary information is to be gathered
siDetEleCollarray of SiDetectorElement collections per measurement type.
measurement_to_summary_typea LUT to map measurement types to the corresponding summary type for the measurement counts
chi2_stat_outoutput of the per track state chi-squared sums and squared sums to compute the per state chi2 variance.
hit_info_outoutput of the gathered measurement statistics per detector region, layer, ... .
param_state_idx_outoutput vector to be filled with the state index of all track states which are not holes.
special_hit_counts_outarrays to count holes (and @TODO dead sensors) per measurement type.

Definition at line 15 of file HitSummaryDataUtils.cxx.

26  {
27  chi2_stat_out.reset();
28 
29  hit_info_out.reset();
30  param_state_idx_out.clear();
31 
32  const auto lastMeasurementIndex = track.tipIndex();
33  tracksContainer.trackStateContainer().visitBackwards(
34  lastMeasurementIndex,
35  [&siDetEleColl,
36  &measurement_to_summary_type,
37  &chi2_stat_out,
38  &hit_info_out,
39  &param_state_idx_out,
40  &special_hit_counts_out
41  ](const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state) -> void
42  {
43 
44  auto flag = state.typeFlags();
45  if (flag.test(Acts::TrackStateFlag::HoleFlag)) {
46  xAOD::UncalibMeasType det_type = xAOD::UncalibMeasType::Other;
47  if (state.hasReferenceSurface()) {
48  if (state.referenceSurface().associatedDetectorElement()) {
49  const ActsDetectorElement *
50  actsDetEl = dynamic_cast<const ActsDetectorElement *>(state.referenceSurface().associatedDetectorElement());
51  if (actsDetEl) {
52  const InDetDD::SiDetectorElement *
53  detEl = dynamic_cast<const InDetDD::SiDetectorElement *>(actsDetEl->upstreamDetectorElement());
54  if (detEl) {
55  if (detEl->isPixel()) {
56  det_type = xAOD::UncalibMeasType::PixelClusterType;
57  }
58  else if (detEl->isSCT()) {
59  det_type = xAOD::UncalibMeasType::StripClusterType;
60  }
61  }
62  }
63  }
64  }
65 
66  Acts::Vector2 localPos(state.predicted()[Acts::eBoundLoc0],state.predicted()[Acts::eBoundLoc1]);
67  if (state.referenceSurface().insideBounds(localPos)) {
68  // @TODO check whether detector element is dead..
69  // if (dead) {
70  // ++specialHitCounts.at(to_underlying(det_type)).at(HitCategory::DeadSensor);
71  // } else {
72  ++special_hit_counts_out.at(to_underlying(det_type)).at(HitCategory::Hole);
73  }
74 
75  }
76  else if (flag.test(Acts::TrackStateFlag::MeasurementFlag)) {
77  // do not consider material states
78  param_state_idx_out.push_back(state.index());
79  }
80  // @TODO dead elements
81 
82  if (state.hasUncalibratedSourceLink()) {
83  auto sl = state.getUncalibratedSourceLink().template get<ActsTrk::ATLASUncalibSourceLink>();
84  assert( sl != nullptr );
85  const xAOD::UncalibratedMeasurement &uncalibMeas = getUncalibratedMeasurement(sl);
86  if (measurement_to_summary_type.at(to_underlying(uncalibMeas.type())) < xAOD::numberOfTrackSummaryTypes ) {
87  if (static_cast<unsigned int>(to_underlying(uncalibMeas.type())) < siDetEleColl.size()) {
88  HitSummaryData::EHitSelection hit_selection = (flag.test(Acts::TrackStateFlag::OutlierFlag)
89  ? HitSummaryData::Outlier
90  : HitSummaryData::Hit);
91  if (flag.test(Acts::TrackStateFlag::SharedHitFlag)) {
92  hit_selection = HitSummaryData::EHitSelection(hit_selection | HitSummaryData::SharedHit);
93  }
94  hit_info_out.addHit(siDetEleColl[to_underlying(uncalibMeas.type())],
95  uncalibMeas.identifierHash(),
96  hit_selection);
97  }
98  }
99  if (state.calibratedSize()>0 && !flag.test(Acts::TrackStateFlag::OutlierFlag)) {
100  // from Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
101  // processTrackState
102  double chi2add = std::min(state.chi2(),1e5f) / state.calibratedSize();
103  chi2_stat_out.add(chi2add );
104  }
105  }
106 
107  });
108  hit_info_out.computeSummaries();
109  }

◆ getMeasurementSelector()

std::unique_ptr< ActsTrk::IMeasurementSelector > ActsTrk::detail::getMeasurementSelector ( const ActsTrk::IOnBoundStateCalibratorTool pixelOnTrackCalibratorTool,
const ActsTrk::IOnBoundStateCalibratorTool stripOnTrackCalibratorTool,
const ActsTrk::IOnBoundStateCalibratorTool hgtdOnTrackCalibratorTool,
const ActsTrk::detail::MeasurementRangeList measurementRanges,
const std::vector< float > &  etaBinsf,
const std::vector< std::pair< float, float > > &  chi2CutOffOutlier,
const std::vector< size_t > &  numMeasurementsCutOff 
)

Definition at line 404 of file AtlasMeasurementSelector.cxx.

410  {
411 
412  // set calibrators per measurement container type (order does not matter);
413  ActsTrk::MeasurementCalibrator atl_measurement_calibrator(pixelOnTrackCalibratorTool,
414  stripOnTrackCalibratorTool,
415  hgtdOnTrackCalibratorTool);
416  using AtlMeasurementSelectorCuts = AtlasMeasurementSelectorCuts;
417 
418  using AtlMeasurementSelector = AtlasActsMeasurmentSelector<RecoTrackContainer>;
419  using AtlMeasurementSelectorConfig = AtlMeasurementSelector::TheAtlasMeasurementSelector::Config;
420 
421  std::unique_ptr<ActsTrk::IMeasurementSelector>
422  selector(new AtlMeasurementSelector(
423  std::move(atl_measurement_calibrator),
424  measurementRanges,
425  AtlMeasurementSelectorConfig{ {Acts::GeometryIdentifier(),
426  AtlMeasurementSelectorCuts{ etaBinsf,
427  chi2CutOffOutlier,
428  numMeasurementsCutOff} }}));
429  return selector;
430 
431 }

◆ getSDOInformation()

std::tuple< std::vector< int >, std::vector< std::vector< int > >, std::vector< std::vector< float > > > ActsTrk::detail::getSDOInformation ( const std::vector< Identifier > &  rdoList,
const InDetSimDataCollection sdoCollection 
)

Definition at line 13 of file Tracking/Acts/ActsObjectDecoration/src/detail/Utilities.cxx.

15  {
16  std::vector<int> sdo_word {};
17  std::vector< std::vector< int > > sdo_depositsUniqueID {};
18  std::vector< std::vector< float > > sdo_depositsEnergy {};
19 
20  for (const Identifier hitIdentifier : rdoList) {
21  auto pos = sdoCollection.find(hitIdentifier);
22  if( pos == sdoCollection.end() ) continue;
23 
24  sdo_word.push_back( pos->second.word() ) ;
25 
26  std::vector<int> sdoDepUID(pos->second.getdeposits().size(), HepMC::INVALID_PARTICLE_ID);
27  std::vector<float> sdoDepEnergy(pos->second.getdeposits().size());
28 
29  unsigned int nDepos {0};
30  for (const auto& deposit: pos->second.getdeposits()) {
31  if (deposit.first) sdoDepUID[nDepos] = HepMC::uniqueID(deposit.first);
32  sdoDepEnergy[nDepos] = deposit.second;
33  ++nDepos;
34  }
35 
36  sdo_depositsUniqueID.push_back( std::move(sdoDepUID) );
37  sdo_depositsEnergy.push_back( std::move(sdoDepEnergy) );
38  }
39 
40  return std::make_tuple(std::move(sdo_word),
41  std::move(sdo_depositsUniqueID),
42  std::move(sdo_depositsEnergy));
43  }

◆ getSiHitInformation()

std::tuple< std::vector< float >, std::vector< float >, std::vector< int >, std::vector< int >, std::vector< float >, std::vector< float >, std::vector< float >, std::vector< float >, std::vector< float >, std::vector< float > > ActsTrk::detail::getSiHitInformation ( const InDetDD::SiDetectorElement element,
const std::vector< SiHit > &  matchingHits 
)

Definition at line 57 of file Tracking/Acts/ActsObjectDecoration/src/detail/Utilities.cxx.

59  {
60  int numHits = matchingHits.size();
61 
62  std::vector<float> sihit_energyDeposit(numHits, 0);
63  std::vector<float> sihit_meanTime(numHits, 0);
64  std::vector<int> sihit_uniqueID(numHits, 0);
65  std::vector<int> sihit_pdgid(numHits, 0);
66 
67  std::vector<float> sihit_startPosX(numHits, 0);
68  std::vector<float> sihit_startPosY(numHits, 0);
69  std::vector<float> sihit_startPosZ(numHits, 0);
70 
71  std::vector<float> sihit_endPosX(numHits, 0);
72  std::vector<float> sihit_endPosY(numHits, 0);
73  std::vector<float> sihit_endPosZ(numHits, 0);
74 
75  int hitNumber {0};
76  for ( const SiHit& sihit : matchingHits ) {
77  sihit_energyDeposit[hitNumber] = sihit.energyLoss() ;
78  sihit_meanTime[hitNumber] = sihit.meanTime() ;
79 
80  const HepMcParticleLink& HMPL = sihit.particleLink();
81  sihit_uniqueID[hitNumber] = HepMC::uniqueID(HMPL);
82  if( HMPL.isValid() ){
83  sihit_pdgid[hitNumber] = HMPL->pdg_id();
84  }
85 
86  // Convert Simulation frame into reco frame
87  const HepGeom::Point3D<double>& startPos=sihit.localStartPosition();
88 
89  Amg::Vector2D pos = element.hitLocalToLocal( startPos.z(), startPos.y() );
90  sihit_startPosX[hitNumber] = pos[0];
91  sihit_startPosY[hitNumber] = pos[1];
92  sihit_startPosZ[hitNumber] = startPos.x();
93 
94  const HepGeom::Point3D<double>& endPos=sihit.localEndPosition();
95  pos = element.hitLocalToLocal( endPos.z(), endPos.y() );
96  sihit_endPosX[hitNumber] = pos[0];
97  sihit_endPosY[hitNumber] = pos[1];
98  sihit_endPosZ[hitNumber] = endPos.x();
99  ++hitNumber;
100  }
101 
102  return std::make_tuple(std::move(sihit_energyDeposit), std::move(sihit_meanTime), std::move(sihit_uniqueID), std::move(sihit_pdgid),
103  std::move(sihit_startPosX), std::move(sihit_startPosY), std::move(sihit_startPosZ),
104  std::move(sihit_endPosX), std::move(sihit_endPosY), std::move(sihit_endPosZ));
105  }

◆ restoreDecorations()

std::vector< Decoration > ActsTrk::detail::restoreDecorations ( const SG::IConstAuxStore container,
const std::set< std::string > &  staticVariables 
)
  • container - source container to look for decorations
  • staticVariables - set of names of predefined variables for this container

Definition at line 21 of file Decoration.cxx.

23  {
24  std::vector<Decoration> decorations;
25  for (auto id : container->getAuxIDs()) {
26  const std::string name = SG::AuxTypeRegistry::instance().getName(id);
27  const std::type_info* typeInfo =
29  if (staticVariables.count(name) == 1) {
30  continue;
31  }
32 
33  // try making decoration accessor of matching type
34  // there is a fixed set of supported types (as there is a fixed set
35  // available in MutableMTJ) setters are not needed so replaced by a
36  if ( build<float>(typeInfo, name, decorations) ||
37  build<double>(typeInfo, name, decorations) ||
38  build<short>(typeInfo, name, decorations) ||
39  build<int>(typeInfo, name, decorations) ||
40  build<uint8_t>(typeInfo, name, decorations) ||
41  build<uint16_t>(typeInfo, name, decorations) ||
42  build<uint32_t>(typeInfo, name, decorations) ||
43  build<uint64_t>(typeInfo, name, decorations) ||
44  build<int8_t>(typeInfo, name, decorations) ||
45  build<int16_t>(typeInfo, name, decorations) ||
46  build<int32_t>(typeInfo, name, decorations) ||
47  build<int64_t>(typeInfo, name, decorations)
48  ) {
49  continue;
50  }
51  throw std::runtime_error("Can't restore decoration of " + name +
52  " because it is of an unsupported type");
53  }
54  return decorations;
55 }

◆ to_underlying()

template<typename T_EnumClass >
constexpr std::underlying_type<T_EnumClass>::type ActsTrk::detail::to_underlying ( T_EnumClass  an_enum)
constexpr

Helper to convert class enum into an integer.

Definition at line 24 of file HitSummaryDataUtils.h.

24  {
25  return static_cast<typename std::underlying_type<T_EnumClass>::type>(an_enum);
26  }
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:25
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
SG::IConstAuxStore::getData
virtual const void * getData(SG::auxid_t auxid) const =0
Return the data vector for one aux data item.
get_generator_info.result
result
Definition: get_generator_info.py:21
ActsTrk::MeasurementCalibrator
Definition: MeasurementCalibrator.h:101
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:640
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::AuxTypeRegistry::getName
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
Definition: AuxTypeRegistry.cxx:882
ActsTrk::detail::SourceLinkType::TrkPrepRawData
@ TrkPrepRawData
Calibrated Trk::MeasurementBase objects.
ActsTrk::detail::computeFreeToPathDerivatives
Acts::FreeToPathMatrix computeFreeToPathDerivatives(const Acts::Vector3 &direction, double qop, const Acts::Vector3 &bfield, const Acts::ParticleHypothesis &particle_hypothesis)
Compute the path length derivatives for the free/bound to curvilinear paramter transform.
Definition: CurvilinearCovarianceHelper.h:27
HepMC::INVALID_PARTICLE_ID
constexpr int INVALID_PARTICLE_ID
Definition: MagicNumbers.h:57
ActsDetectorElement::upstreamDetectorElement
const GeoVDetectorElement * upstreamDetectorElement() const
Returns the underllying GeoModel detectorelement that this one is based on.
Definition: ActsDetectorElement.cxx:286
ActsTrk::detail::SourceLinkType::xAODUnCalibMeas
@ xAODUnCalibMeas
UnCalibrated Trk::PrepRawData objects.
SG::IConstAuxStore::size
virtual size_t size() const =0
Return the number of elements in the store.
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
InDetDD::SolidStateDetectorElementBase::getIdHelper
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
createLinkingScheme.dst_idx
dst_idx
Definition: createLinkingScheme.py:52
SiHit
Definition: SiHit.h:19
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
SG::AuxTypeRegistry::getType
const std::type_info * getType(SG::auxid_t auxid) const
Return the type of an aux data item.
Definition: AuxTypeRegistry.cxx:909
InDetDD::DetectorType
DetectorType
Definition: DetectorDesign.h:45
AtlasMeasurementSelectorCuts
Definition: MeasurementSelector.h:298
master.flag
bool flag
Definition: master.py:29
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
InDetDD::DetectorDesign::type
virtual DetectorType type() const
Type of element.
Definition: DetectorDesign.cxx:101
ActsDetectorElement
Definition: ActsDetectorElement.h:44
InDetDD::SolidStateDetectorElementBase::hitLocalToLocal
Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const
Simulation/Hit local frame to reconstruction local frame.
Definition: SolidStateDetectorElementBase.cxx:95
InDetDD::SiDetectorElement::isPixel
bool isPixel() const
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:622
xAOD::UncalibMeasType::nTypes
@ nTypes
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
InDetDD::PixelBarrel
@ PixelBarrel
Definition: DetectorDesign.h:46
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
python.Dumpers.typename
def typename(t)
Definition: Dumpers.py:193
ActsTrk::detail::computeDtDs
double computeDtDs(const Acts::ParticleHypothesis &hypothesis, double qop)
Helper function to compute dt/ds Helper function to compute the derivative of the time as function of...
Definition: CurvilinearCovarianceHelper.h:16
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
python.selector.AtlRunQuerySelectorLhcOlc.selector
selector
Definition: AtlRunQuerySelectorLhcOlc.py:610
SCT_ID
Definition: SCT_ID.h:68
SG::IAuxStore::getData
virtual void * getData(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data item.
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
LArCellBinning.step
step
Definition: LArCellBinning.py:158
ActsTrk::detail::SourceLinkType::TrkMeasurement
@ TrkMeasurement
InDetDD::SiDetectorElement::isSCT
bool isSCT() const
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
PixelID
Definition: PixelID.h:67
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
SG::IConstAuxStore::getAuxIDs
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
ActsTrk::detail::addToExpectedLayerPattern
void addToExpectedLayerPattern(std::array< unsigned int, 4 > &pattern, const ActsDetectorElement &detElement)
Definition: ExpectedHitUtils.cxx:40
Identifier
Definition: IdentifierFieldParser.cxx:14