 |
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include <GaudiKernel/PhysicalConstants.h>
12 #include "Acts/Surfaces/PlaneSurface.hpp"
13 #include "Acts/Definitions/Units.hpp"
19 using namespace Acts::UnitLiterals;
22 constexpr
double straightQoverP = 1. / 20._TeV;
28 return v.y() / ( std::abs(
v.z()) > eps ?
v.z() : eps);
32 return v.x() / ( std::abs(
v.z()) > eps ?
v.z() : eps);
34 namespace SegmentFit {
38 pars[toUnderlying(y0)],0.),
45 for (std::size_t
p =0 ;
p < segPars.size(); ++
p) {
46 segPars[
p] =
acc(seg)[
p];
56 pars[toUnderlying(ParamDefs::x0)] = locPos.x();
57 pars[toUnderlying(ParamDefs::y0)] = locPos.y();
65 std::stringstream sstr{};
66 sstr<<
std::format(
"x_{{0}}={:.2f}",
pars[toUnderlying(ParamDefs::x0)])<<
", ";
67 sstr<<
std::format(
"y_{{0}}={:.2f}",
pars[toUnderlying(ParamDefs::y0)])<<
", ";
74 std::stringstream sstr{};
87 std::optional<Acts::BoundMatrix>
cov,
93 const Acts::Surface& surface = msSector->
surface();
100 Acts::BoundVector boundPars{};
101 boundPars[Acts::eBoundLoc0] = locSegPars[toUnderlying(ParamDefs::x0)];
102 boundPars[Acts::eBoundLoc1] = locSegPars[toUnderlying(ParamDefs::y0)];
103 boundPars[Acts::eBoundPhi] = globDir.phi();
104 boundPars[Acts::eBoundTheta] = globDir.theta();
105 boundPars[Acts::eBoundQOverP] = straightQoverP;
109 return Acts::BoundTrackParameters{surface.getSharedPtr(), std::move(boundPars),
119 Acts::BoundVector boundPars{};
120 boundPars[Acts::eBoundLoc0] = locPos.x();
121 boundPars[Acts::eBoundLoc1] = locPos.y();
122 boundPars[Acts::eBoundPhi] = segment.
direction().phi();
123 boundPars[Acts::eBoundTheta] = segment.
direction().theta();
124 boundPars[Acts::eBoundQOverP] = straightQoverP;
127 Acts::BoundMatrix
cov{Acts::BoundMatrix::Identity()};
129 return Acts::BoundTrackParameters{surface.getSharedPtr(), std::move(boundPars),
Scalar phi() const
phi method
Amg::Vector3D direction() const
Returns the direction as Amg::Vector.
Helper class to provide type-safe access to aux data.
Scalar theta() const
theta method
Placeholder for what will later be the muon segment EDM representation.
std::vector< ALFA_RawData_p1 > t0
Acts::BoundTrackParameters boundSegmentPars(const MuonGMR4::MuonDetectorManager &detMgr, const xAOD::MuonSegment &segment, std::optional< Acts::BoundMatrix > cov=std::nullopt, Acts::ParticleHypothesis hypot=Acts::ParticleHypothesis::muon())
Returns the segment parameters as boundTrackParameters.
Class describing a MuonSegment.
SeedingAux::FitParIndex ParamDefs
Use the same parameter indices as used by the CompSpacePointAuxiliaries.
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
const Amg::Vector3D & position() const
Returns the global segment position.
double houghTanBeta(const Amg::Vector3D &v)
Returns the hough tanBeta [y] / [z].
constexpr double timeToActs(const double athenaT)
Converts a time unit from Athena to Acts units.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
const Amg::Vector3D & direction() const
Returns the global segment direction.
Eigen::Affine3d Transform3D
Acts::Experimental::CompositeSpacePointLineFitter::ParamVec_t Parameters
const Acts::PlaneSurface & surface() const
Returns the associated surface.
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated MS sector.
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Amg::Transform3D globalToLocalTrans(const ActsTrk::GeometryContext &gctx) const
Returns the global -> local transformation from the ATLAS global.
Amg::Vector3D position() const
Returns the position as Amg::Vector.
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
This header ties the generic definitions in this package.
int etaIndex() const
Returns the eta index, which corresponds to stationEta in the offline identifiers (and the ).
std::string makeLabel(const Parameters &pars)
Dumps the parameters into a string in the form of TLatex.
Parameters localSegmentPars(const xAOD::MuonSegment &seg)
Returns the localSegPars decoration from a xAODMuon::Segment.
ParamDefs
This file defines the parameter enums in the Trk namespace.
double houghTanAlpha(const Amg::Vector3D &v)
: Returns the hough tanAlpha [x] / [z]
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
double segementT0() const
Returns the fitted segment time, if there's any.
const SpectrometerSector * getSectorEnvelope(const Identifier &channelId) const
Retrieves the spectrometer envelope enclosing the channel's readout element.
Acts::GeometryContext context() const