R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandCosmicTracker.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 R3BNEULANDCOSMICTRACKER_H
15#define R3BNEULANDCOSMICTRACKER_H
16
17#include <array>
18#include <vector>
19
20#include "TF1.h"
21#include "TGraphErrors.h"
22#include "TVector3.h"
23
24#include "R3BNeulandCommon.h"
26
27namespace R3B::Neuland // NOLINT
28{
29 namespace Calibration
30 {
32 {
33 using DPair = std::array<Double_t, 2>;
34
35 public:
37
38 void SetDistances(const std::vector<Double_t>& distances) { fDistances = distances; }
39 void AddPoint(const Int_t barID, const Double_t pos = NaN);
40 auto GetBarIDs() -> const auto& { return fBarIDs; }
42 void Reset();
43
44 private:
45 void filter(TGraphErrors& graph) const;
46 DPair fit(TGraphErrors& graph);
47 DPair linearRegression(const Double_t* x, const Double_t* y, const Int_t points) const;
48 void fillInteractions(R3BNeulandCosmicTrack& track) const;
49 Double_t getCrossPointTime(const TVector3& point,
50 const TVector3& direction,
51 const TVector3& invDirection,
52 const DPair& xBounds,
53 const DPair& yBounds,
54 const DPair& zBounds) const;
55
56 std::vector<Double_t> fDistances;
57 std::vector<Int_t> fBarIDs;
58
60
61 TF1 fFit;
62 TGraphErrors fXZ; // i.e. Vertical Bars
63 TGraphErrors fYZ; // i.e. Horizontal Bars
64 };
65 } // namespace Calibration
66} // namespace R3B::Neuland
67#endif
void SetDistances(const std::vector< Double_t > &distances)
void AddPoint(const Int_t barID, const Double_t pos=NaN)
std::array< Double_t, 2 > DPair
Simulation of NeuLAND Bar/Paddle.
constexpr auto NaN