CbmRoot
Loading...
Searching...
No Matches
Calibrate.h
Go to the documentation of this file.
1/* Copyright (C) 2023 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dominik Smith [committer] */
4
5#ifndef TOFCALIBRATE_H
6#define TOFCALIBRATE_H 1
7
8#include "CbmTofDigi.h"
9#include "PartitionedVector.h"
10#include "tof/CalibrateSetup.h"
11#include "tof/Clusterizer.h"
12
13#include <gsl/span>
14#include <optional>
15#include <sstream>
16#include <vector>
17
18#include <xpu/host.h>
19
20namespace cbm::algo::tof
21{
22
29 xpu::timings fTime;
30 size_t fNumDigis = 0;
33
34 std::string print() const
35 {
36 std::stringstream ss;
37 ss << "Calibrate stats: processed digis " << fNumDigis << ", num unknown RPC " << fDigiCalibUnknownRPC
38 << ", num deadtime skips " << fDigiDeadTimeCount << ", time " << fTime.wall() << " ms ( " << fTime.throughput()
39 << " GB/s )" << std::endl;
40 return ss.str();
41 }
42 };
43
50 class Calibrate {
51
52 public:
53 typedef std::pair<std::vector<CbmTofDigi>, CalibrateMonitorData> resultType;
54
61 resultType operator()(gsl::span<const CbmTofDigi> digiIn);
62
64 explicit Calibrate(tof::CalibrateSetup params);
65
66 private: // members
69
71 std::vector<double> mChannelDeadTime;
72
74 std::vector<size_t> smTypeOffset;
75
77 std::vector<size_t> smOffset;
78
80 std::vector<size_t> rpcOffset;
81 };
82} // namespace cbm::algo::tof
83
84#endif /* TOFCALIBRATE_H */
Algo class for calibration.
Definition Calibrate.h:50
resultType operator()(gsl::span< const CbmTofDigi > digiIn)
Algorithm execution.
Definition Calibrate.cxx:38
std::vector< double > mChannelDeadTime
Storage for deadtime check.
Definition Calibrate.h:71
Calibrate(tof::CalibrateSetup params)
Constructor.
Definition Calibrate.cxx:18
std::vector< size_t > smTypeOffset
Offset of super module type.
Definition Calibrate.h:74
std::vector< size_t > smOffset
Offset of super module.
Definition Calibrate.h:77
std::vector< size_t > rpcOffset
Offset of RPC.
Definition Calibrate.h:80
tof::CalibrateSetup fSetup
Parameters for TOF calibrator.
Definition Calibrate.h:68
std::pair< std::vector< CbmTofDigi >, CalibrateMonitorData > resultType
Definition Calibrate.h:53
Monitoring data for calibration.
Definition Calibrate.h:28
TOF calibration setup.