9#include "Acts/Geometry/TrackingGeometry.hpp"
15 if (parent() != toolSvc()) {
16 ATH_MSG_ERROR(
"The tool is initialized as a private tool but should be public");
17 return StatusCode::FAILURE;
23 return StatusCode::FAILURE;
25 return StatusCode::SUCCESS;
43 ATH_MSG_ERROR(
"Creating alignment context failed: read cond handle invalid!");
53std::unique_ptr<ActsTrk::DetectorElementToActsGeometryIdMap>
56 auto detector_element_to_geoid = std::make_unique<DetectorElementToActsGeometryIdMap>();
59 unsigned n_sensitive_elements{0};
60 unsigned n_detector_elements{0};
61 unsigned n_wrong_type{0};
64 trackingGeometry()->visitSurfaces([
this, &counter, &detector_element_to_geoid](
const Acts::Surface *surface) {
65 if (!surface || !surface->isSensitive()) {
66 ++counter.n_wrong_type;
69 ++counter.n_sensitive_elements;
79 ++counter.n_detector_elements;
81 switch(detEl->detectorType()) {
106 ++counter.n_detector_elements;
111 counter.n_detector_elements = 0;
115 ATH_MSG_INFO(
"Surfaces without associated detector elements " << (counter.n_sensitive_elements -counter.n_detector_elements)
116 <<
" (with " << counter.n_detector_elements <<
")" );
117 if (counter.n_sensitive_elements > 0 &&
118 counter.n_detector_elements==0) {
119 ATH_MSG_ERROR(
"No surface with associated detector element" );
122 if (counter.n_wrong_type>0) {
123 ATH_MSG_WARNING(
"Surfaces associated to detector elements not of type Trk::TrkDetElementBase :" << counter.n_wrong_type);
125 return detector_element_to_geoid;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
base class interface providing the bare minimal interface extension.
This is a "hash" representation of an Identifier.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
@ Mm
Maybe not needed in the migration.
@ Tgc
Resitive Plate Chambers.
@ Rpc
Monitored Drift Tubes.
@ UnDefined
Small Thing Gap chambers (NSW).
DetectorElementKey makeDetectorElementKey(xAOD::UncalibMeasType meas_type, unsigned int identifier_hash)
SystemEnvelope
Define an enumeration to retrieve the envelope tracking volume from.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
UncalibMeasType
Define the type of the uncalibrated measurement.
static const Acts::GeometryIdentifier & makeValue(const Acts::GeometryIdentifier &geo_id)