CbmRoot
Loading...
Searching...
No Matches
KfMeasurementXy.cxx
Go to the documentation of this file.
1/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov, Sergei Zharko [committer] */
4
7
8#include "KfMeasurementXy.h"
9
10#include <iomanip>
11#include <sstream> // for stringstream
12
13namespace cbm::algo::kf
14{
15
16 //----------------------------------------------------------------------------------------------------------------------
17 //
18 template<typename DataT>
19 std::string MeasurementXy<DataT>::ToString(int indentLevel) const
20 {
21 std::stringstream aStream{};
22 // TODO: possibly it is better to place the indentChar into ca::Parameters (S.Zharko)
23 constexpr char indentChar = '\t';
24 std::string indent(indentLevel, indentChar);
25 aStream << indent << "x: " << std::setw(12) << std::setfill(' ') << X() << '\n';
26 aStream << indent << "y: " << std::setw(12) << std::setfill(' ') << Y() << '\n';
27 aStream << indent << "dx2: " << std::setw(12) << std::setfill(' ') << Dx2() << '\n';
28 aStream << indent << "dy2: " << std::setw(12) << std::setfill(' ') << Dy2() << '\n';
29 aStream << indent << "dxy: " << std::setw(12) << std::setfill(' ') << Dxy() << '\n';
30 aStream << indent << "ndfX: " << std::setw(12) << std::setfill(' ') << NdfX() << '\n';
31 aStream << indent << "ndfY: " << std::setw(12) << std::setfill(' ') << NdfY() << '\n';
32 return aStream.str();
33 }
34
37
38 template class MeasurementXy<fvec>;
39 template class MeasurementXy<float>;
40 template class MeasurementXy<double>;
41
42} // namespace cbm::algo::kf
Definition of the KfMeasurementXy class.
The class describes a 2D - measurement (x, y) in XY coordinate system.
std::string ToString(int indentLevel=0) const