R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandTSyncer.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2025 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#ifndef R3BNEULANDTSYNCER_H
15#define R3BNEULANDTSYNCER_H
16
17#include <array>
18#include <vector>
19
20#include "TH1F.h"
21
22#include "R3BNeulandCommon.h"
23
25
26namespace R3B::Neuland // NOLINT
27{
28 namespace Calibration
29 {
30 class TSyncer
31 {
32 public:
34 {
35 Double_t Value;
36 Double_t Error;
37 };
38
39 TSyncer();
40
41 void AddBarData(const Int_t barID, const Double_t time);
42 void ClearBarData(const Int_t barID);
43 void DoEvent();
44
45 std::vector<ValueErrorPair> GetTSync(UInt_t nPlanes = Neuland::MaxNumberOfPlanes);
46
47 private:
48 void calcTSyncs();
49
50 struct Bar
51 {
52 ValueErrorPair TSyncNextBar;
53 std::array<ValueErrorPair, BarsPerPlane> TSyncNextPlane;
54
55 TH1F NextBar;
56 std::array<TH1F, BarsPerPlane> NextPlane;
57
58 std::vector<Double_t> NextBarLog;
59 std::array<std::vector<Double_t>, BarsPerPlane> NextPlaneLog;
60 };
61
62 std::array<ULong64_t, Neuland::MaxNumberOfPlanes> HitMask;
63 std::array<Double_t, Neuland::MaxNumberOfBars> EventData;
64 std::array<Bar, Neuland::MaxNumberOfBars> Data;
65
66 TH1F SamplingHistogram;
67 };
68 } // namespace Calibration
69} // namespace R3B::Neuland
70
71#endif
void AddBarData(const Int_t barID, const Double_t time)
std::vector< ValueErrorPair > GetTSync(UInt_t nPlanes=Neuland::MaxNumberOfPlanes)
Simulation of NeuLAND Bar/Paddle.
constexpr auto BarsPerPlane
constexpr auto MaxNumberOfPlanes
constexpr Int_t nPlanes