CbmRoot
Loading...
Searching...
No Matches
KfMeasurementU.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 "KfMeasurementU.h"
9
10#include <iomanip>
11#include <sstream>
12
13namespace cbm::algo::kf
14{
15
16 //----------------------------------------------------------------------------------------------------------------------
17 //
18 template<typename DataT>
19 std::string MeasurementU<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 << "cos(phi): " << std::setw(12) << std::setfill(' ') << CosPhi() << '\n';
26 aStream << indent << "sin(phi): " << std::setw(12) << std::setfill(' ') << SinPhi() << '\n';
27 aStream << indent << "u: " << std::setw(12) << std::setfill(' ') << U() << '\n';
28 aStream << indent << "du2: " << std::setw(12) << std::setfill(' ') << Du2() << '\n';
29 aStream << indent << "ndf: " << std::setw(12) << std::setfill(' ') << Ndf() << '\n';
30 return aStream.str();
31 }
32
35
36 template class MeasurementU<fvec>;
37 template class MeasurementU<float>;
38 template class MeasurementU<double>;
39
40} // namespace cbm::algo::kf
The class describes a 1D - measurement U in XY coordinate system.
std::string ToString(int indentLevel=0) const