R3BROOT
R3B analysis software
Toggle main menu visibility
Loading...
Searching...
No Matches
R3BMCTrack.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 R3BMCTRACK_H
15
#define R3BMCTRACK_H
16
17
#include "Math/Vector4D.h"
18
#include "
R3BDetectorList.h
"
19
#include "TLorentzVector.h"
20
#include "TObject.h"
21
#include "TParticle.h"
22
#include "TVector3.h"
23
#include <array>
24
25
class
R3BMCTrack
:
public
TObject
26
{
27
public
:
29
R3BMCTrack
();
30
32
R3BMCTrack
(
int
pdgCode,
33
int
motherID,
34
ROOT::Math::XYZTVector xyzt,
35
ROOT::Math::PxPyPzMVector pm,
36
std::array<int, kLAST + 1> nPoints);
37
39
R3BMCTrack
(TParticle* particle, std::array<int, kLAST + 1> nPoints,
int
fMC);
40
42
~R3BMCTrack
()
override
=
default
;
43
45
void
Print
(Option_t* option =
""
)
const override
;
46
48
int
GetPdgCode
()
const
{
return
fPdgCode
; }
49
int
GetMotherId
()
const
{
return
fMotherId
; }
50
51
double
GetStartX
()
const
{
return
fStartVertex
.X(); }
52
double
GetStartY
()
const
{
return
fStartVertex
.Y(); }
53
double
GetStartZ
()
const
{
return
fStartVertex
.Z(); }
54
double
GetStartT
()
const
{
return
fStartVertex
.T(); }
55
ROOT::Math::XYZTVector
GetStartVertex
()
const
{
return
fStartVertex
; }
56
57
double
GetPx
()
const
{
return
fMomentumMass
.Px(); }
58
double
GetPy
()
const
{
return
fMomentumMass
.Py(); }
59
double
GetPz
()
const
{
return
fMomentumMass
.Pz(); }
60
double
GetMass
()
const
{
return
fMomentumMass
.M(); }
61
ROOT::Math::PxPyPzMVector
GetMomentumMass
()
const
{
return
fMomentumMass
; };
62
ROOT::Math::PxPyPzEVector
GetFourMomentum
()
const
{
return
ROOT::Math::PxPyPzEVector(
fMomentumMass
); };
63
double
GetEnergy
()
const
{
return
fMomentumMass
.E(); }
64
double
GetPt
()
const
{
return
fMomentumMass
.Pt(); }
65
double
GetP
()
const
{
return
fMomentumMass
.P(); }
66
double
GetRapidity
()
const
{
return
fMomentumMass
.Rapidity(); };
67
69
int
GetNPoints
(
DetectorId
detId)
const
;
70
72
void
SetMotherId
(
int
id
) {
fMotherId
= id; }
// Used by R3BMCStack UpdateTrackIndex. Needed? -> Could make const!
73
74
private
:
76
const
int
fPdgCode
;
77
79
int
fMotherId
;
80
82
const
ROOT::Math::XYZTVector
fStartVertex
;
83
85
const
ROOT::Math::PxPyPzMVector
fMomentumMass
;
86
88
const
std::array<int, kLAST + 1>
fNPoints
;
89
90
ClassDefOverride
(
R3BMCTrack
, 3);
91
};
92
93
#endif
R3BDetectorList.h
DetectorId
DetectorId
Unique identifier for all R3B detector systems.
Definition
R3BDetectorList.h:25
R3BMCTrack::fPdgCode
const int fPdgCode
PDG particle code.
Definition
R3BMCTrack.h:76
R3BMCTrack::fNPoints
const std::array< int, kLAST+1 > fNPoints
Array representing the number of MCPoints for this track in each subdetector.
Definition
R3BMCTrack.h:88
R3BMCTrack::fMotherId
int fMotherId
Index of mother track.
Definition
R3BMCTrack.h:79
R3BMCTrack::GetPdgCode
int GetPdgCode() const
Accessors.
Definition
R3BMCTrack.h:48
R3BMCTrack::GetStartX
double GetStartX() const
Definition
R3BMCTrack.h:51
R3BMCTrack::GetStartY
double GetStartY() const
Definition
R3BMCTrack.h:52
R3BMCTrack::GetEnergy
double GetEnergy() const
Definition
R3BMCTrack.h:63
R3BMCTrack::GetRapidity
double GetRapidity() const
Definition
R3BMCTrack.h:66
R3BMCTrack::GetPt
double GetPt() const
Definition
R3BMCTrack.h:64
R3BMCTrack::GetStartVertex
ROOT::Math::XYZTVector GetStartVertex() const
Definition
R3BMCTrack.h:55
R3BMCTrack::GetPz
double GetPz() const
Definition
R3BMCTrack.h:59
R3BMCTrack::GetFourMomentum
ROOT::Math::PxPyPzEVector GetFourMomentum() const
Definition
R3BMCTrack.h:62
R3BMCTrack::GetNPoints
int GetNPoints(DetectorId detId) const
Accessors to the number of MCPoints in the detectors.
Definition
R3BMCTrack.cxx:73
R3BMCTrack::GetStartZ
double GetStartZ() const
Definition
R3BMCTrack.h:53
R3BMCTrack::ClassDefOverride
ClassDefOverride(R3BMCTrack, 3)
R3BMCTrack::GetStartT
double GetStartT() const
Definition
R3BMCTrack.h:54
R3BMCTrack::GetMomentumMass
ROOT::Math::PxPyPzMVector GetMomentumMass() const
Definition
R3BMCTrack.h:61
R3BMCTrack::fMomentumMass
const ROOT::Math::PxPyPzMVector fMomentumMass
Momentum and mass at start vertex [GeV].
Definition
R3BMCTrack.h:85
R3BMCTrack::GetP
double GetP() const
Definition
R3BMCTrack.h:65
R3BMCTrack::GetPy
double GetPy() const
Definition
R3BMCTrack.h:58
R3BMCTrack::GetMass
double GetMass() const
Definition
R3BMCTrack.h:60
R3BMCTrack::Print
void Print(Option_t *option="") const override
Output to screen.
Definition
R3BMCTrack.cxx:50
R3BMCTrack::R3BMCTrack
R3BMCTrack()
Default constructor.
Definition
R3BMCTrack.cxx:19
R3BMCTrack::GetPx
double GetPx() const
Definition
R3BMCTrack.h:57
R3BMCTrack::~R3BMCTrack
~R3BMCTrack() override=default
Destructor.
R3BMCTrack::fStartVertex
const ROOT::Math::XYZTVector fStartVertex
Coordinates of start vertex [cm, ns].
Definition
R3BMCTrack.h:82
R3BMCTrack::SetMotherId
void SetMotherId(int id)
Modifiers.
Definition
R3BMCTrack.h:72
R3BMCTrack::GetMotherId
int GetMotherId() const
Definition
R3BMCTrack.h:49
r3bdata
R3BMCTrack.h
Generated by
1.18.0