R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandMapToCalPar.cxx
Go to the documentation of this file.
2#include <FairDetParIo.h>
3#include <FairParIo.h>
4#include <R3BException.h>
5#include <R3BLogger.h>
6#include <fmt/core.h>
7
8namespace R3B
9{
10 Map2CalPar::Map2CalPar(std::string_view name, std::string_view title, std::string_view context, bool own)
11 : Neuland::ParSet(name.data(), title.data(), context.data(), own)
12 {
13 }
14
15 void Map2CalPar::AddModuleParam(unsigned int module_num, TCalVFTXModulePar modulePar)
16 {
17 moduleParams_.emplace(module_num, std::move(modulePar));
18 }
19
20 auto TCalVFTXModulePar::GetFineTime(FTType ftType, uint channel_num) const -> ValueError<double>
21 {
22 if (channel_num < finetime_correlation_.at(ftType).value_error.size())
23 {
24 const auto& relation = finetime_correlation_.at(ftType);
25 auto value_error = relation.value_error[channel_num];
26 return value_error;
27 }
28
29 throw R3B::logic_error(fmt::format("channel number {} exceeds the maximal bin number {}!",
30 channel_num,
31 finetime_correlation_.at(ftType).value_error.size()));
32 }
33} // namespace R3B
34
ClassImp(R3B::Map2CalPar)
Map2CalPar(std::string_view name="NeulandMap2CalPar", std::string_view title="Neuland Map2Cal calibration", std::string_view context="TestDefaultContext", bool own=true)
void AddModuleParam(unsigned int module_num, TCalVFTXModulePar modulePar)
ParSet(std::string_view name="parSet", std::string_view title="Neuland parameter", std::string_view context="TestDefaultContext", bool own=true)
auto GetFineTime(FTType ftType, uint channel_Num) const -> ValueError< double >
Simulation of NeuLAND Bar/Paddle.