Loading [MathJax]/jax/input/TeX/config.js
|
ATLAS Offline Software
|
Go to the documentation of this file.
3 #include <fmt/format.h>
15 ISvcLocator* pSvcLocator)
23 return StatusCode::SUCCESS;
27 const EventContext& ctx = getContext();
29 if (!trackCollection.isValid()) {
30 throw std::runtime_error(
"Cannot retrieve track collection");
37 <<
" with timestamp " << eventInfo->
timeStamp());
40 ATH_MSG_INFO(
"Retrieved track collection with " << trackCollection->size()
43 auto getListOfHits = [](
const Trk::Track*
track) -> std::vector<const Trk::RIO_OnTrack*> {
44 std::vector<const Trk::RIO_OnTrack*> ret;
45 for (
const auto *tsos : *(
track->trackStateOnSurfaces())) {
54 unsigned int index = crot->indexOfMaxAssignProb();
55 rot = &(crot->rioOnTrack(
index));
59 ret.emplace_back(rot);
64 auto makeChamberString = [&](
const std::vector<const Trk::RIO_OnTrack*>&
hits) -> std::string {
65 std::set<std::string> chambers;
66 for (
const auto* rot :
hits) {
68 m_idTool->idToFixedLongId(rot->identify());
73 std::string chambers_str;
75 for (
const auto&
str : chambers) {
77 chambers_str.append(
",");
79 chambers_str.append(
str);
89 std::vector<Trk::AlignmentDeviation*> deviations;
92 const auto&
hits =
np->getListOfHits();
93 if (
const auto* tdev =
96 double sigma = tdev->getSigma();
98 fmt::format(
"TranslationNP U = {:14.6f} {:14.6f} {:14.6f}"
99 " sigma = {:8.6f} chambers = {}",
101 }
else if (
const auto* rdev =
105 double sigma = rdev->getSigma();
107 "RotationNP C = {:14.6f} {:14.6f} {:14.6f} "
108 "A = {:14.6f} {:14.6f} {:14.6f} sigma = {:11.9f} chambers = {}",
109 c.x(),
c.y(),
c.z(),
a.x(),
a.y(),
a.z(),
sigma, makeChamberString(
hits)));
111 throw std::runtime_error(
"Deviation type is not implemented");
116 return StatusCode::SUCCESS;
uint64_t eventNumber() const
The current event's event number.
bool isValid() const
check validity of the identifier.
@ u
Enums for curvilinear frames.
uint32_t runNumber() const
The current event's run number.
AlignmentErrorTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
std::string_view stationNameString() const
StatusCode execute() override
ToolHandle< MuonCalib::IIdToFixedIdTool > m_idTool
::StatusCode StatusCode
StatusCode definition for legacy code.
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
An object decorating a track and holding degrees of freedom reflecting alignment accuracy.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode initialize() override
SG::ReadHandleKey<::TrackCollection > m_trackCollection
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Eigen::Matrix< double, 3, 1 > Vector3D
ToolHandle< Trk::ITrkAlignmentDeviationTool > m_alignmentErrorTool
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.