R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandCosmicEngine.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2023 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13
14#pragma once
15
16#include <R3BDataMonitor.h>
17#include <R3BNeulandCalData2.h>
19#include <R3BShared.h>
20
21namespace R3B::Neuland
22{
23 class Cal2HitParTask;
24}
25
27{
29 {
30 public:
32 virtual ~CosmicEngineInterface() = default;
33
38
39 void SetModuleSize(int module_size) { module_size_ = module_size; }
40 void SetTask(Cal2HitParTask* task) { mother_task_ = task; };
41 [[nodiscard]] auto GetModuleSize() const -> auto { return module_size_; }
42 auto GetTask() -> Cal2HitParTask* { return mother_task_; }
43
44 virtual void Init() {}
45 virtual auto SignalFilter(const std::vector<BarCalData>& /*signals*/) -> bool { return true; }
46 virtual void AddSignals(const std::vector<BarCalData>& signal) = 0;
47 virtual void Calibrate(Cal2HitPar& hit_par) = 0;
48 virtual void SetMinStat(int min) {}
49 virtual void BeginOfEvent(unsigned int event_num) {};
50 virtual void EndOfEvent(unsigned int event_num) {};
51 virtual void EventReset() {};
52 virtual void EndOfTask() {};
53 virtual void HistInit(DataMonitor& histograms) {};
54 virtual void SetErrorScale(float scale) {}
55
56 private:
57 int module_size_ = 0;
58 Cal2HitParTask* mother_task_ = nullptr;
59 };
60
61} // namespace R3B::Neuland::Calibration
virtual void EndOfEvent(unsigned int event_num)
auto operator=(const CosmicEngineInterface &) -> CosmicEngineInterface &=default
auto operator=(CosmicEngineInterface &&) -> CosmicEngineInterface &=delete
CosmicEngineInterface(CosmicEngineInterface &&)=delete
virtual void BeginOfEvent(unsigned int event_num)
virtual void HistInit(DataMonitor &histograms)
virtual void AddSignals(const std::vector< BarCalData > &signal)=0
virtual void Calibrate(Cal2HitPar &hit_par)=0
virtual auto SignalFilter(const std::vector< BarCalData > &) -> bool
CosmicEngineInterface(const CosmicEngineInterface &)=default
Simulation of NeuLAND Bar/Paddle.