CbmRoot
Loading...
Searching...
No Matches
CbmMustPoint.cxx
Go to the documentation of this file.
1
/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Radoslaw Karabowicz [committer] */
4
5
// -------------------------------------------------------------------------
6
// ----- CbmMustPoint source file -----
7
// ----- Created 2024-11-26 by R. Karabowicz -----
8
// -------------------------------------------------------------------------
9
10
#include "
CbmMustPoint.h
"
11
12
#include "
CbmDefs.h
"
// for ToIntegralType, ECbmDataType
13
14
#include <FairLink.h>
// for FairLink
15
#include <FairMCPoint.h>
// for FairMCPoint
16
#include <Logger.h>
// for Logger, LOG
17
18
19
// ----- Default constructor -------------------------------------------
20
CbmMustPoint::CbmMustPoint
() : FairMCPoint() {}
21
// -------------------------------------------------------------------------
22
23
// ----- Standard constructor ------------------------------------------
24
CbmMustPoint::CbmMustPoint
(
Int_t
trackID, uint32_t address, TVector3 posIn, TVector3 posOut, TVector3 momIn,
25
TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss)
26
: FairMCPoint(trackID, address, posIn, momIn, tof, length, eLoss)
27
,
fX_out
(posOut.X())
28
,
fY_out
(posOut.Y())
29
,
fZ_out
(posOut.Z())
30
,
fPx_out
(momOut.Px())
31
,
fPy_out
(momOut.Py())
32
,
fPz_out
(momOut.Pz())
33
{
34
SetLink(FairLink(
ToIntegralType
(
ECbmDataType::kMCTrack
), trackID));
35
}
36
// -------------------------------------------------------------------------
37
38
// ----- Destructor ----------------------------------------------------
39
CbmMustPoint::~CbmMustPoint
() {}
40
// -------------------------------------------------------------------------
41
42
// ----- Copy constructor ------------------------------------------
43
CbmMustPoint::CbmMustPoint
(
const
CbmMustPoint
& point)
44
: FairMCPoint(point.fTrackID, point.fDetectorID, TVector3(point.fX, point.fY, point.fZ),
45
TVector3(point.fPx, point.fPy, point.fPz), point.fTime, point.fLength, point.fELoss, point.fEventId)
46
,
fX_out
(point.
fX_out
)
47
,
fY_out
(point.
fY_out
)
48
,
fZ_out
(point.
fZ_out
)
49
,
fPx_out
(point.
fPx_out
)
50
,
fPy_out
(point.
fPy_out
)
51
,
fPz_out
(point.
fPz_out
)
52
{
53
}
54
// -------------------------------------------------------------------------
55
56
// ----- Public method Print -------------------------------------------
57
void
CbmMustPoint::Print
(
const
Option_t* opt)
const
58
{
59
LOG(info) <<
" CbmMustPoint: MUST Point for track "
<< fTrackID <<
" in det/lay/mod/str "
<< fDetectorID;
60
LOG(info) <<
" Position ("
<< fX <<
", "
<< fY <<
", "
<< fZ <<
") cm"
;
61
LOG(info) <<
" Momentum ("
<< fPx <<
", "
<< fPy <<
", "
<< fPz <<
") GeV"
;
62
LOG(info) <<
" Time "
<< fTime <<
" ns, Length "
<< fLength <<
" cm, Energy loss "
<< fELoss * 1.0e06 <<
" keV"
63
<<
" opt="
<< opt;
64
}
65
// -------------------------------------------------------------------------
CbmDefs.h
ToIntegralType
XPU_D constexpr auto ToIntegralType(T enumerator) -> typename std::underlying_type< T >::type
Converts an element of enum class to its underlying integral type.
Definition
CbmDefs.h:33
ECbmDataType::kMCTrack
@ kMCTrack
Definition
CbmDefs.h:124
CbmMustPoint.h
Int_t
int Int_t
Definition
RootTypesDef.h:16
CbmMustPoint::fZ_out
Double_t fZ_out
Definition
CbmMustPoint.h:70
CbmMustPoint::fPz_out
Double_t fPz_out
Definition
CbmMustPoint.h:74
CbmMustPoint::CbmMustPoint
CbmMustPoint()
Definition
CbmMustPoint.cxx:20
CbmMustPoint::fY_out
Double_t fY_out
Definition
CbmMustPoint.h:69
CbmMustPoint::fPx_out
Double_t fPx_out
Definition
CbmMustPoint.h:72
CbmMustPoint::Print
virtual void Print(const Option_t *opt) const
Definition
CbmMustPoint.cxx:57
CbmMustPoint::~CbmMustPoint
virtual ~CbmMustPoint()
Definition
CbmMustPoint.cxx:39
CbmMustPoint::fPy_out
Double_t fPy_out
Definition
CbmMustPoint.h:73
CbmMustPoint::fX_out
Double_t fX_out
Definition
CbmMustPoint.h:68
core
data
must
CbmMustPoint.cxx
Generated on Fri Jan 30 2026 23:05:22 for CbmRoot by
1.13.2