CbmRoot
Loading...
Searching...
No Matches
KfSetup.cxx
Go to the documentation of this file.
1/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#include "KfSetup.h"
11
12#include <sstream>
13#include <typeinfo>
14
16
17// ---------------------------------------------------------------------------------------------------------------------
18//
19template<typename T>
20std::string Setup<T>::ToString(int verbosity, int indentLevel) const
21{
22 std::stringstream msg;
23 if (verbosity > 0) {
24 constexpr char indentCh = '\t';
25 std::string indent(indentLevel, indentCh);
26 msg << indent << "\nFloating-point type: " << typeid(T).name();
27 msg << indent << "\nTARGET:\n" << fTarget.ToString(indentLevel + 1, verbosity);
28 msg << indent << "\nMODULE INDEXING SCHEME:\n" << fModuleIndexMap.ToString(indentLevel + 1);
29 msg << indent << "\nMATERIAL LAYERS:\n";
30 for (const auto& material : fvMaterialLayers) {
31 msg << material.ToString(indentLevel + 1, verbosity) << '\n';
32 }
33 msg << indent << "\nACTIVE LAYERS:\n";
34 for (const auto& activeLayer : fvActiveLayers) {
35 msg << activeLayer.ToString(indentLevel + 1) << '\n';
36 }
37 msg << indent << "\nMAGNETIC FIELD:\n" << fField.ToString(indentLevel + 1, verbosity);
38 }
39 return msg.str();
40}
41
42// ---------------------------------------------------------------------------------------------------------------------
43//
44template<typename T>
46{
47 // TODO: implement
48 return true;
49}
50
51namespace cbm::algo::kf
52{
53 template class Setup<float>;
54 template class Setup<double>;
55 template class Setup<fvec>;
56} // namespace cbm::algo::kf
Setup representation for the Kalman-filter framework (header)
KF-framework representation of the detector setup.
Definition KfSetup.h:37
Target< F > fTarget
Target layer.
Definition KfSetup.h:175
bool Validate() const
Validates setup as a system of magnetic field, target and field.
Definition KfSetup.cxx:45
std::string ToString(int verbosity=1, int indentLevel=0) const
String representation of the class contents.
Definition KfSetup.cxx:20
Field< F > fField
Magnetic field.
Definition KfSetup.h:174
std::vector< ActiveLayer< F > > fvActiveLayers
Container for active layers.
Definition KfSetup.h:173
ModuleIndexMap fModuleIndexMap
Index map (internal->external)
Definition KfSetup.h:171
std::vector< MaterialMap > fvMaterialLayers
Container for material maps.
Definition KfSetup.h:172