14#include "GaudiKernel/IInterface.h"
35#include "Acts/Surfaces/StrawSurface.hpp"
36#include "Acts/Surfaces/PerigeeSurface.hpp"
37#include "Acts/Surfaces/PlaneSurface.hpp"
39#include "Acts/Definitions/Units.hpp"
40#include "Acts/EventData/BoundTrackParameters.hpp"
41#include "Acts/EventData/VectorTrackContainer.hpp"
42#include "Acts/EventData/TransformationHelpers.hpp"
43#include "Acts/Geometry/TrackingGeometry.hpp"
44#include "Acts/Propagator/detail/JacobianEngine.hpp"
46#include "Acts/EventData/TrackStatePropMask.hpp"
47#include "Acts/EventData/SourceLink.hpp"
62#pragma GCC diagnostic push
63#pragma GCC diagnostic ignored "-Wunused-function"
65 const Trk::MeasurementBase &measurement,
66 const Acts::Surface &surface,
67 const Acts::BoundVector &loc);
68#pragma GCC diagnostic pop
71 const Acts::BoundTrackParameters &actsParameter,
72 const Acts::GeometryContext &gctx,
const Acts::BoundMatrix &covpc,
73 const Acts::BoundVector &targetPars,
const Acts::BoundMatrix &targetCov,
74 const Trk::PlaneSurface *planeSurface);
89 surface->surfacePlacement());
102 <<
" has two ACTS surfaces: "
103 << it->second->geometryId() <<
" and "
104 << surface->geometryId());
117 ATH_CHECK(detStore()->retrieve(muonMgr));
120 std::vector<std::shared_ptr<Acts::Surface>> reSurfaces = readoutElement->getSurfaces();
121 for (
const auto& surf : reSurfaces) {
128 return StatusCode::SUCCESS;
132 const EventContext& ctx,
133 const Acts::Surface &actsSurface)
const {
135 const auto *detEleBase=
dynamic_cast<const IDetectorElementBase*
>(actsSurface.surfacePlacement());
138 throw std::domain_error(
"ActsToTrkConverterTool() - Surface does not have an associated detector element. ");
140 switch (detEleBase->detectorType()) {
148 return actsElement->atlasSurface();
167 throw std::domain_error(
"ActsToTrkConverterTool() - No ATLAS surface corresponding to the Acts one");
178 ATH_MSG_ERROR(
"No Acts surface corresponding to this ATLAS surface: "<<atlasID);
180 throw std::domain_error(
"No Acts surface corresponding to the ATLAS one");
183std::vector<Acts::SourceLink>
185 std::vector<Acts::SourceLink> sourceLinks{};
186 sourceLinks.reserve(track.measurementsOnTrack()->size() +
187 track.outliersOnTrack()->size());
188 toSourceLinks(track.measurementsOnTrack()->stdcont(), sourceLinks);
189 toSourceLinks(track.outliersOnTrack()->stdcont(), sourceLinks);
195 std::vector<Acts::SourceLink>& sourceLinks)
const{
196 if (sourceLinks.capacity() < sourceLinks.size() + measSet.size()) {
197 sourceLinks.reserve(sourceLinks.size() + measSet.size());
199 std::ranges::transform(measSet, std::back_inserter(sourceLinks), [](
const Trk::MeasurementBase* meas) {
204 std::vector<Acts::SourceLink>& links)
const {
205 if (links.capacity() < links.size() + prdSet.size()) {
206 links.reserve(links.size() + prdSet.size());
208 std::ranges::transform(prdSet, std::back_inserter(links), [](
const Trk::PrepRawData* prd) {
213const Acts::BoundTrackParameters
215 const Acts::GeometryContext & gctx,
218 using namespace Acts::UnitLiterals;
219 std::shared_ptr<const Acts::Surface> actsSurface;
220 Acts::BoundVector params;
227 }
catch (
const std::exception &e) {
228 ATH_MSG_ERROR(
"Could not find ACTS detector surface for this TrackParameter:");
236 "trkTrackParametersToActsParameters:: No associated surface found (owner: "<<atlasParameter.
associatedSurface().
owner()<<
237 "). Creating a free surface. Trk parameters:");
242 actsSurface = Acts::Surface::makeShared<const Acts::PlaneSurface>(trf);
245 actsSurface = Acts::Surface::makeShared<const Acts::PerigeeSurface>(trf);
248 actsSurface = Acts::Surface::makeShared<const Acts::StrawSurface>(trf);
252 std::stringstream surfStr{};
253 atlasParameter.
dump(surfStr);
254 throw std::domain_error(std::format(
"Failed to translate parameters {:}", surfStr.str()));
260 const auto& atlasParam{atlasParameter.parameters()};
261 if (actsSurface->bounds().type() == Acts::SurfaceBounds::BoundsType::eAnnulus) {
265 auto result = actsSurface->globalToLocal(gctx, position, atlasParameter.
momentum());
267 params << (*result)[0], (*result)[1], atlasParam[
Trk::phi0],
272 ATH_MSG_WARNING(
"Unable to convert annulus surface - globalToLocal failed");
280 Acts::BoundMatrix cov = Acts::BoundMatrix::Identity();
281 if (atlasParameter.covariance()) {
282 cov.topLeftCorner(5, 5) = *atlasParameter.covariance();
287 for (
int i = 0; i < cov.rows(); i++) {
288 cov(i, 4) = cov(i, 4) / 1_MeV;
290 for (
int i = 0; i < cov.cols(); i++) {
291 cov(4, i) = cov(4, i) / 1_MeV;
295 return Acts::BoundTrackParameters(actsSurface, params,cov,
299std::unique_ptr<Trk::TrackParameters>
301 const EventContext& ctx,
302 const Acts::BoundTrackParameters &actsParameter,
303 const Acts::GeometryContext &gctx)
const {
305 using namespace Acts::UnitLiterals;
307 if (actsParameter.covariance()) {
308 AmgSymMatrix(5) newcov(actsParameter.covariance()->topLeftCorner<5, 5>());
310 for (
int i = 0; i < newcov.rows(); i++) {
311 newcov(i, 4) = newcov(i, 4) * 1_MeV;
313 for (
int i = 0; i < newcov.cols(); i++) {
314 newcov(4, i) = newcov(4, i) * 1_MeV;
316 cov = std::optional<AmgSymMatrix(5)>(newcov);
319 const Acts::Surface &actsSurface = actsParameter.referenceSurface();
320 switch (actsSurface.type()) {
321 case Acts::Surface::SurfaceType::Cone: {
323 return std::make_unique<Trk::AtaCone>(
324 actsParameter.get<Acts::eBoundLoc0>(),
325 actsParameter.get<Acts::eBoundLoc1>(),
326 actsParameter.get<Acts::eBoundPhi>(),
327 actsParameter.get<Acts::eBoundTheta>(),
328 actsParameter.get<Acts::eBoundQOverP>() * 1_MeV, coneSurface, cov);
329 }
case Acts::Surface::SurfaceType::Cylinder: {
331 return std::make_unique<Trk::AtaCylinder>(
332 actsParameter.get<Acts::eBoundLoc0>(),
333 actsParameter.get<Acts::eBoundLoc1>(),
334 actsParameter.get<Acts::eBoundPhi>(),
335 actsParameter.get<Acts::eBoundTheta>(),
336 actsParameter.get<Acts::eBoundQOverP>() * 1_MeV, cylSurface, cov);
337 }
case Acts::Surface::SurfaceType::Disc: {
341 return std::make_unique<Trk::AtaDisc>(
342 actsParameter.get<Acts::eBoundLoc0>(),
343 actsParameter.get<Acts::eBoundLoc1>(),
344 actsParameter.get<Acts::eBoundPhi>(),
345 actsParameter.get<Acts::eBoundTheta>(),
346 actsParameter.get<Acts::eBoundQOverP>() * 1_MeV, discSurface, cov);
350 auto helperSurface = Acts::Surface::makeShared<Acts::PlaneSurface>(planeSurface.transform());
352 auto covpc = actsParameter.covariance().value();
354 Acts::FreeVector freePars = Acts::transformBoundToFreeParameters(actsSurface, gctx,
355 actsParameter.parameters());
358 Acts::BoundVector targetPars = Acts::transformFreeToBoundParameters(freePars,
359 *helperSurface, gctx).value();
361 Acts::FreeMatrix freeTransportJacobian{Acts::FreeMatrix::Identity()};
363 Acts::FreeVector freeToPathDerivatives{Acts::FreeVector::Zero()};
364 freeToPathDerivatives.head<3>() = freePars.segment<3>(Acts::eFreeDir0);
366 auto boundToFreeJacobian = actsSurface.boundToFreeJacobian(gctx, freePars.segment<3>(Acts::eFreePos0),
367 freePars.segment<3>(Acts::eFreeDir0));
369 Acts::BoundMatrix boundToBoundJac = Acts::detail::boundToBoundTransportJacobian(gctx, freePars,
370 boundToFreeJacobian, freeTransportJacobian, freeToPathDerivatives, *helperSurface);
372 Acts::BoundMatrix targetCov{boundToBoundJac * covpc * boundToBoundJac.transpose()};
374 auto pars = std::make_unique<Trk::AtaPlane>(
375 targetPars[Acts::eBoundLoc0], targetPars[Acts::eBoundLoc1],
376 targetPars[Acts::eBoundPhi], targetPars[Acts::eBoundTheta],
377 targetPars[Acts::eBoundQOverP] * 1_MeV, planeSurface,
378 targetCov.topLeftCorner<5, 5>());
382 targetCov, &planeSurface);
387 throw std::domain_error(
"Acts::DiscSurface is not associated with ATLAS disc or plane surface");
390 }
case Acts::Surface::SurfaceType::Perigee: {
392 return std::make_unique<Trk::Perigee>(
393 actsParameter.get<Acts::eBoundLoc0>(),
394 actsParameter.get<Acts::eBoundLoc1>(),
395 actsParameter.get<Acts::eBoundPhi>(),
396 actsParameter.get<Acts::eBoundTheta>(),
397 actsParameter.get<Acts::eBoundQOverP>() * 1_MeV, perSurface, cov);
398 }
case Acts::Surface::SurfaceType::Plane: {
400 return std::make_unique<Trk::AtaPlane>(
401 actsParameter.get<Acts::eBoundLoc0>(),
402 actsParameter.get<Acts::eBoundLoc1>(),
403 actsParameter.get<Acts::eBoundPhi>(),
404 actsParameter.get<Acts::eBoundTheta>(),
405 actsParameter.get<Acts::eBoundQOverP>() * 1_MeV, plaSurface, cov);
406 }
case Acts::Surface::SurfaceType::Straw: {
408 return std::make_unique<Trk::AtaStraightLine>(
409 actsParameter.get<Acts::eBoundLoc0>(),
410 actsParameter.get<Acts::eBoundLoc1>(),
411 actsParameter.get<Acts::eBoundPhi>(),
412 actsParameter.get<Acts::eBoundTheta>(),
413 actsParameter.get<Acts::eBoundQOverP>() * 1_MeV, lineSurface, cov);
414 }
case Acts::Surface::SurfaceType::Curvilinear: {
415 return std::make_unique<Trk::CurvilinearParameters>(
416 actsParameter.position(gctx), actsParameter.get<Acts::eBoundPhi>(),
417 actsParameter.get<Acts::eBoundTheta>(),
418 actsParameter.get<Acts::eBoundQOverP>() * 1_MeV, cov);
420 }
case Acts::Surface::SurfaceType::Other: {
424 throw std::domain_error(
"Surface type not found");
429 const Acts::GeometryContext & gctx)
const {
431 << trackColl.
size() <<
" tracks.");
432 unsigned int trkCount = 0;
433 std::vector<Identifier> failedIds;
438 auto actsTrack =
tc.getTrack(
tc.addTrack());
439 auto& trackStateContainer =
tc.trackStateContainer();
442 <<
" track states on surfaces.");
444 actsTrack.chi2() = trk->fitQuality()->chiSquared();
445 actsTrack.nDoF() = trk->fitQuality()->numberDoF();
449 bool first_tsos =
true;
450 int measurementsCount = 0;
454 Acts::TrackStatePropMask mask = Acts::TrackStatePropMask::None;
455 if (tsos->measurementOnTrack()) {
456 mask |= Acts::TrackStatePropMask::Calibrated;
458 if (tsos->trackParameters()) {
459 mask |= Acts::TrackStatePropMask::Smoothed;
463 auto index = Acts::kTrackIndexInvalid;
465 index = actsTrack.tipIndex();
467 auto actsTSOS = trackStateContainer.getTrackState(trackStateContainer.addTrackState(mask,
index));
468 ATH_MSG_VERBOSE(
"TipIndex: " << actsTrack.tipIndex() <<
" TSOS index within trajectory: "<< actsTSOS.index());
469 actsTrack.tipIndex() = actsTSOS.index();
471 if (tsos->trackParameters()) {
476 const Acts::BoundTrackParameters parameters =
481 failedIds.push_back(tsos->trackParameters()->associatedSurface().associatedDetectorElementIdentifier());
487 actsTrack.parameters() = parameters.parameters();
488 actsTrack.covariance() = *parameters.covariance();
489 actsTrack.setReferenceSurface(parameters.referenceSurface().getSharedPtr());
492 actsTSOS.setReferenceSurface(parameters.referenceSurface().getSharedPtr());
494 actsTSOS.smoothed() = parameters.parameters();
495 actsTSOS.smoothedCovariance() = *parameters.covariance();
498 if (!(actsTSOS.hasSmoothed() && actsTSOS.hasReferenceSurface())) {
500 << actsTSOS.hasSmoothed()
501 <<
"] or reference surface ["
502 << actsTSOS.hasReferenceSurface() <<
"].");
504 ATH_MSG_VERBOSE(
"TrackState has smoothed state and reference surface.");
507 }
catch (
const std::exception& e){
508 ATH_MSG_ERROR(
"Unable to convert TrackParameter with exception ["<<e.what()<<
"]. Will be missing from ACTS track."
509 <<(*tsos->trackParameters()));
512 if (tsos->measurementOnTrack()) {
513 auto &measurement = *(tsos->measurementOnTrack());
521 int dim = measurement.localParameters().dimension();
522 actsTSOS.allocateCalibrated(dim);
524 actsTSOS.calibrated<1>() = measurement.localParameters();
525 actsTSOS.calibratedCovariance<1>() = measurement.localCovariance();
526 }
else if (dim == 2) {
527 actsTSOS.calibrated<2>() = measurement.localParameters();
528 actsTSOS.calibratedCovariance<2>() = measurement.localCovariance();
530 throw std::domain_error(
"Cannot handle measurement dim>2");
536 actsTrack.nMeasurements() = measurementsCount;
538 <<
" track states on surfaces.");
542 if (!failedIds.empty()){
543 ATH_MSG_WARNING(
"Failed to convert "<<failedIds.size()<<
" track parameters.");
544 for (
auto id : failedIds){
552 const Acts::BoundTrackParameters ¶meters,
554 const Acts::GeometryContext &gctx)
const {
555 auto actsPos = parameters.position(gctx);
562 if ( (actsPos - trkparameters.
position()).mag() > 0.1) {
564 << actsPos <<
" vs Trk \n"
577#pragma GCC diagnostic push
578#pragma GCC diagnostic ignored "-Wunused-function"
581 const Acts::Surface &surface,
const Acts::BoundVector &loc) {
588 if (bounds ==
nullptr) {
589 throw std::runtime_error{
"Annulus but not XY"};
598 if (
auto res = surface.globalToLocal(gctx, global, Acts::Vector3{});
602 throw std::runtime_error{
"Global position not on target surface"};
608 Acts::Surface::makeShared<Acts::PlaneSurface>(surf.
transform());
609 Acts::BoundVector locxypar;
610 locxypar.head<2>() = locxy;
612 locxypar[3] = M_PI_2;
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>();
622 Acts::BoundVector locpcpar;
623 locpcpar.head<2>() = locpc;
625 locpcpar[3] = M_PI_2;
628 Acts::FreeVector globalpcpar = Acts::transformBoundToFreeParameters(
629 surface, gctx, locpcpar);
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();
638 Acts::SquareMatrix<2> covpc = covxy;
639 covpc = xyToXyzJac * covpc * xyToXyzJac.transpose();
640 covpc = xyzToPcJac * covpc * xyzToPcJac.transpose();
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};
646 Acts::SquareMatrix<2> lltxy = covxy.llt().matrixL();
647 Acts::SquareMatrix<2> lltpc = covpc.llt().matrixL();
649 for (
size_t i = 0; i < 1e4; i++) {
650 std::cout <<
"ANNULUS COV: ";
651 std::cout << surface.geometryId();
659 std::cout <<
"," << xy.x() <<
"," << xy.y();
660 std::cout <<
"," <<
xyz.x() <<
"," <<
xyz.y() <<
"," <<
xyz.z();
670 std::cout <<
"," << rt.x() <<
"," << rt.y();
671 std::cout <<
"," <<
xyz.x() <<
"," <<
xyz.y() <<
"," <<
xyz.z();
674 std::cout << std::endl;
677#pragma GCC diagnostic pop
680 const Acts::BoundTrackParameters &actsParameter,
681 const Acts::GeometryContext &gctx,
const Acts::BoundMatrix &covpc,
682 const Acts::BoundVector &targetPars,
const Acts::BoundMatrix &targetCov,
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);
692 for (
unsigned int i = 0; i < 5; i++) {
693 for (
unsigned int j = 0; j < 5; j++) {
694 std::cout <<
"," << targetCov(i, j);
697 std::cout << std::endl;
699 std::mt19937 gen{4242 +
700 actsParameter.referenceSurface().geometryId().value()};
701 std::normal_distribution<double> normal{0, 1};
703 Acts::SquareMatrix<2> lltxy =
704 targetCov.topLeftCorner<2, 2>().llt().matrixL();
705 Acts::SquareMatrix<2> lltpc = covpc.topLeftCorner<2, 2>().llt().matrixL();
707 for (
size_t i = 0; i < 1e4; i++) {
708 std::cout <<
"ANNULUS PAR: ";
709 std::cout << actsParameter.referenceSurface().geometryId();
712 rnd << normal(gen), normal(gen);
717 lltxy.topLeftCorner<2, 2>() *
rnd + targetPars.head<2>();
721 for (
unsigned int i = 0; i < 2; i++) {
722 std::cout <<
"," << xy[i];
724 std::cout <<
"," <<
xyz.x() <<
"," <<
xyz.y() <<
"," <<
xyz.z();
728 Acts::Vector<2> rt = lltpc.topLeftCorner<2, 2>() *
rnd +
729 actsParameter.parameters().head<2>();
731 gctx, Acts::Vector2{rt.head<2>()}, Acts::Vector3{});
733 for (
unsigned int i = 0; i < 2; i++) {
734 std::cout <<
"," << rt[i];
736 std::cout <<
"," <<
xyz.x() <<
"," <<
xyz.y() <<
"," <<
xyz.z();
739 std::cout << std::endl;
745 TrackFitResult_t& fitResult,
751 if (not fitResult.ok()) {
757 Acts::ParticleHypothesis hypothesis{Acts::ParticleHypothesis::pion()};
761 const auto& acts_track = fitResult.value();
763 auto finalTrajectory = std::make_unique<Trk::TrackStates>();
765 unsigned int numberOfDeadPixel{0}, numberOfDeadSCT{0};
771 tracks.trackStateContainer().visitBackwards(acts_track.tipIndex(),
772 [&] (
const auto &state) ->
void {
774 const auto* associatedDetEl = dynamic_cast<const IDetectorElementBase*>(
775 state.referenceSurface().surfacePlacement());
777 if (not associatedDetEl) {
778 ATH_MSG_VERBOSE(
"State is not associated with a measurement sruface");
782 auto flag = state.typeFlags();
785 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
786 std::unique_ptr<Trk::TrackParameters> measPars{};
787 std::unique_ptr<Trk::MeasurementBase> measState{};
791 const Acts::BoundTrackParameters actsParam(state.referenceSurface().getSharedPtr(),
795 measPars = actsTrackParametersToTrkParameters(ctx, actsParam, gctx);
796 if (associatedDetEl->detectorType() == DetectorType::Pixel ||
797 associatedDetEl->detectorType() == DetectorType::Sct) {
798 ATH_MSG_VERBOSE(
"Check if this is a hole, a dead sensors or a state outside the sensor boundary");
799 switch (m_boundaryCheckTool->boundaryCheck(*measPars)) {
800 case Trk::BoundaryCheckResult::DeadElement:
801 numberOfDeadPixel += (associatedDetEl->detectorType() == DetectorType::Pixel);
802 numberOfDeadSCT+= (associatedDetEl->detectorType() == DetectorType::Sct);
804 case Trk::BoundaryCheckResult::Candidate:
813 else if (flag.hasMeasurement()) {
814 Acts::BoundTrackParameters actsParam(state.referenceSurface().getSharedPtr(),
818 typePattern.set(Trk::TrackStateOnSurface::Measurement);
820 using enum detail::SourceLinkType;
822 measState = measCalib.unpack(state.getUncalibratedSourceLink())->uniqueClone();
825 measState = prdCalib.createROT(gctx, cctx, state.getUncalibratedSourceLink(), state);
827 case xAODUnCalibMeas:
828 ATH_MSG_WARNING(
"Uncalibrated measurement is not implemented");
831 ATH_MSG_WARNING(
"Invalid type enumaration parsed");
834 nDoF = state.calibratedSize();
839 std::move(measState),
840 std::move(measPars),
nullptr, typePattern);
842 ATH_MSG_VERBOSE(
"State succesfully creates, adding it to the trajectory");
843 finalTrajectory->insert(finalTrajectory->begin(), std::move(perState));
846 const Acts::BoundTrackParameters actsPer(acts_track.referenceSurface().getSharedPtr(),
847 acts_track.parameters(),
848 acts_track.covariance(),
849 acts_track.particleHypothesis());
850 std::unique_ptr<Trk::TrackParameters> per = actsTrackParametersToTrkParameters(ctx, actsPer, gctx);
851 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
853 auto perState = std::make_unique<Trk::TrackStateOnSurface>(
nullptr, std::move(per),
nullptr, typePattern);
854 finalTrajectory->insert(finalTrajectory->begin(), std::move(perState));
858 auto newtrack = std::make_unique<Trk::Track>(newInfo, std::move(finalTrajectory),
nullptr);
861 if (!newtrack->trackSummary()) {
862 newtrack->setTrackSummary(std::make_unique<Trk::TrackSummary>());
866 m_trkSummaryTool->updateTrackSummary(ctx, *newtrack,
true);
Scalar mag() const
mag method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define AmgSymMatrix(dim)
std::pair< std::vector< unsigned int >, bool > res
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
base class interface providing the bare minimal interface extension.
: Helper class to connect the aligned transformations of each active sensor(layer) with the Acts::Sur...
Identifier identify() const override final
Returns the identifier of the Surface.
Calibrator class that links the legacy Trk::MeasurementBase objects with the Acts MultiTrajectory tra...
static Acts::SourceLink pack(const Trk::MeasurementBase *meas)
Packs the pointer to the track measurement into an Acts::SouceLink.
Class to calibrate the Acts track states with uncalibrated Trk::PrepRaw data objects.
static Acts::SourceLink pack(const SourceLink_t prd)
Pack the PrepRaw data measurement into a source link.
size_type size() const noexcept
Returns the number of elements in the collection.
std::vector< const MuonReadoutElement * > getAllReadoutElements(const ActsTrk::DetectorType type=ActsTrk::DetectorType::UnDefined) const
Returns all readout elements.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const MuonReadoutElement * getReadoutElement(const Identifier &id) const
Get any read out element.
Bounds for a annulus-like, planar Surface.
Class for a conical surface in the ATLAS detector.
Class for a CylinderSurface in the ATLAS detector.
Class for a DiscSurface in the ATLAS detector.
This class is the pure abstract base class for all fittable tracking measurements.
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 MsgStream & dump(MsgStream &out) const
Dumps relevant information about the track parameters into the ostream.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
double charge() const
Returns the charge.
virtual bool hasSurface() const override=0
Test to see if there's a not null surface ptr.
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
Class describing the Line to which the Perigee refers to.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
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.
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
virtual BoundsType type() const =0
Return the bounds type - for persistency optimization.
Abstract Base Class for tracking surfaces.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
virtual constexpr SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
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.
SurfaceOwner owner() const
return ownership
Contains information about the 'fitter' of this track.
TrackFitter
enums to identify who created this track and what propertis does it have.
represents the track state (measurement, material, fit parameters and quality) at a surface.
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
@ Hole
A hole on the track - this is defined in the following way.
virtual const Surface & surface() const =0
Return surface associated with this detector element.
double chi2(TH1 *h0, TH1 *h1)
xAOD::ParticleHypothesis convert(Acts::ParticleHypothesis h)
SourceLinkType
Enumeration to distinguish between the ATLAS EDM -> Acts::SourceLink variants.
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.
@ Trt
Maybe the Sct / Pixel for Itk become seperate entries?
std::string to_string(const DetectorType &type)
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
Acts::CalibrationContext getCalibrationContext(const EventContext &ctx)
The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLink...
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)
static void ActsMeasurementCheck(const Acts::GeometryContext &gctx, const Trk::MeasurementBase &measurement, const Acts::Surface &surface, const Acts::BoundVector &loc)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
ParametersBase< TrackParametersDim, Charged > TrackParameters
@ numberOfSCTDeadSensors
number of TRT hits
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))
#define THROW_EXCEPTION(MESSAGE)