6#include "GaudiKernel/PhysicalConstants.h"
19#include <GeoModelKernel/throwExcept.h>
24 static constexpr double s_inverseSpeed{1. / Gaudi::Units::c_light};
28 ostr<<
"adc: "<<
adc()<<
", ";
29 ostr<<
"tdc: "<<
tdc()<<
", ";
35 if (
m_ToF.isValid()) {
58 detMgr.getMdtReadoutElement(digit.
identify()), gctx} {}
72 detMgr.getMdtReadoutElement(digit.
identify())} {}
81 m_RE{prd.readoutElement()},
82 m_hash{prd.measurementHash()},
88 m_adc{static_cast<int16_t>(prd.
adc())},
89 m_tdc{static_cast<int16_t>(prd.
tdc())},
90 m_RE{prd.detectorElement()},
98 if (std::holds_alternative<const MuonGM::MdtReadoutElement*>(
m_RE)) {
99 return std::get<const MuonGM::MdtReadoutElement*>(
m_RE);
104 if (std::holds_alternative<const MuonGMR4::MdtReadoutElement*>(
m_RE)) {
105 return std::get<const MuonGMR4::MdtReadoutElement*>(
m_RE);
126 if (!
m_ToF.isValid()) {
129 assert(
m_ToF.ptr() !=
nullptr);
144 const double perpendComp = locTrkDir.block<2,1>(0,0).
dot(locBField.block<2,1>(0,0))
146 const double paralelComp = locBField.z();
152 assert(
re !=
nullptr);
156 const double propDist = std::visit([
this](
const auto&
re) ->
double {
157 using REType = std::decay_t<
decltype(
re)>;
158 if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
159 assert(
m_gctx !=
nullptr);
161 }
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
171 const double tubeLength = std::visit([
this](
const auto&
re) ->
double{
172 using REType = std::decay_t<
decltype(
re)>;
173 if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
175 }
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
182 const double tubeR = std::visit([](
const auto&
re) ->
double {
183 using REType = std::decay_t<
decltype(
re)>;
184 if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
185 return re->innerTubeRadius();
186 }
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
187 return re->innerTubeRadius();
194 const double roSide = std::visit([
this](
const auto&
re) ->
double{
195 using REType = std::decay_t<
decltype(
re)>;
196 if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
197 return re->getParameters().readoutSide;
198 }
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
199 return re->tubeFrame_localROPos(
identify()).z() > 0. ? 1. : -1.;
206 using REType = std::decay_t<
decltype(
re)>;
207 if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
208 assert(
m_gctx !=
nullptr);
210 }
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
const boost::regex re(r_e)
Scalar mag() const
mag method
Readout element to describe the Monitored Drift Tube (Mdt) chambers Mdt chambers usually comrpise out...
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Class to represent measurements from the Monitored Drift Tubes.
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
MdtDriftCircle_v1 MdtDriftCircle