forked from R3BRootGroup/R3BRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathR3BNeulandLSQREngineAdaptor.h
55 lines (47 loc) · 2.12 KB
/
R3BNeulandLSQREngineAdaptor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/******************************************************************************
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
* Copyright (C) 2019-2023 Members of R3B Collaboration *
* *
* This software is distributed under the terms of the *
* GNU General Public Licence (GPL) version 3, *
* copied verbatim in the file "LICENSE". *
* *
* In applying this license GSI does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization *
* or submit itself to any jurisdiction. *
******************************************************************************/
#pragma once
#include "R3BNeulandCosmicEngine.h"
#include <R3BNeulandCalData2.h>
#include <R3BNeulandCalToHitPar.h>
#include <R3BNeulandCosmicTracker.h>
#include <R3BNeulandHitCalibrationEngine.h>
#include <R3BShared.h>
#include <vector>
namespace R3B::Neuland::Calibration
{
class LSQREngineAdaptor : public CosmicEngineInterface
{
public:
LSQREngineAdaptor() = default;
private:
int minimum_signal_size_ = 6;
HitCalibrationEngine hit_cal_engine_;
CosmicTracker cosmic_tracker_;
void Init() override;
void AddSignals(const std::vector<BarCalData>& signals) override;
void Calibrate(Cal2HitPar& hit_par) override;
void EndOfEvent(unsigned int event_num = 0) override;
void EventReset() override
{
hit_cal_engine_.Reset();
cosmic_tracker_.Reset();
}
auto SignalFilter(const std::vector<BarCalData>& signals) -> bool override
{
return signals.size() > minimum_signal_size_;
}
// private non-virtual function
void add_bar_signal(const BarCalData& barSignal, Side side);
};
} // namespace R3B::Neuland::Calibration