R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandPoint.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 R3BNEULANDPOINT_H
15#define R3BNEULANDPOINT_H
16
17#include "FairMCPoint.h"
18#include "TVector3.h"
19#include <Math/Vector3Dfwd.h>
20#include <Rtypes.h>
21#include <RtypesCore.h>
22#include <iostream>
23
24// NOLINTBEGIN(misc-include-cleaner)
25#include <Math/Vector3D.h>
26// NOLINTEND(misc-include-cleaner)
27
28class R3BNeulandPoint : public FairMCPoint
29{
30
31 public:
33 : fLightYield{ 0 }
34 , fParticleId{ 0 }
36 {
37 }
38 // NOLINTBEGIN
39 R3BNeulandPoint(const Int_t trackID,
40 const Int_t detID,
41 const TVector3& pos,
42 const TVector3& mom,
43 const Double_t tof,
44 const Double_t length,
45 const Double_t eLoss,
46 const UInt_t EventId,
47 const Double_t lightYield,
48 const int particle_id,
49 const int parent_particle_id) // NOLINTEND
50 : FairMCPoint{ trackID, detID, pos, mom, tof, length, eLoss, EventId }
51 , fLightYield{ lightYield }
52 , fParticleId{ particle_id }
53 , fParentParticleId{ parent_particle_id }
54 {
55 }
56
57 R3BNeulandPoint(const FairMCPoint& point,
58 const Double_t lightYield,
59 const int particle_id,
60 const int parent_particle_id)
61 : FairMCPoint{ point }
62 , fLightYield{ lightYield }
63 , fParticleId{ particle_id }
64 , fParentParticleId{ parent_particle_id }
65 {
66 }
67
68 [[nodiscard]] auto GetMomentum() const -> ROOT::Math::XYZVector
69 {
70 return ROOT::Math::XYZVector{ GetPx(), GetPy(), GetPz() };
71 }
72 [[nodiscard]] auto GetPosition() const -> ROOT::Math::XYZVector
73 {
74 return ROOT::Math::XYZVector{ GetX(), GetY(), GetZ() };
75 }
76 [[nodiscard]] auto GetPaddle() const -> int { return GetDetectorID(); }
77 [[nodiscard]] auto GetLightYield() const -> double { return fLightYield; }
78 [[nodiscard]] auto GetPID() const -> int { return fParticleId; }
79
80 // setters:
81 void SetLightYield(double light_yield) { fLightYield = light_yield; }
82 void SetParticleId(int particle_id) { fParticleId = particle_id; }
83 void SetParentParticleId(int particle_id) { fParentParticleId = particle_id; }
84
85 void Print(const Option_t* /*opt*/) const override;
86
88
89 private:
93};
94
95auto operator<<(std::ostream&, const R3BNeulandPoint&) -> std::ostream&; // Support easy printing
96
97#endif // R3BNEULANDPOINT_H
auto operator<<(std::ostream &, const R3BNeulandPoint &) -> std::ostream &
auto GetPID() const -> int
void SetParticleId(int particle_id)
void Print(const Option_t *) const override
ClassDefOverride(R3BNeulandPoint, 2)
auto GetPosition() const -> ROOT::Math::XYZVector
auto GetPaddle() const -> int
void SetParentParticleId(int particle_id)
auto GetMomentum() const -> ROOT::Math::XYZVector
auto GetLightYield() const -> double
void SetLightYield(double light_yield)
R3BNeulandPoint(const FairMCPoint &point, const Double_t lightYield, const int particle_id, const int parent_particle_id)
R3BNeulandPoint(const Int_t trackID, const Int_t detID, const TVector3 &pos, const TVector3 &mom, const Double_t tof, const Double_t length, const Double_t eLoss, const UInt_t EventId, const Double_t lightYield, const int particle_id, const int parent_particle_id)