CbmRoot
Loading...
Searching...
No Matches
CbmMvdPoint.h
Go to the documentation of this file.
1/* Copyright (C) 2006-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmMvdPoint header file -----
7// ----- Created 06/11/06 by V. Friese -----
8// -------------------------------------------------------------------------
9
19
20
21#ifndef CBMMVDPOINT_H
22#define CBMMVDPOINT_H 1
23
24#include "CbmMvdAddress.h"
25
26#include <FairMCPoint.h> // for FairMCPoint
27
28#include <Rtypes.h> // for ClassDef
29#include <RtypesCore.h> // for Double32_t
30#include <TVector3.h> // for TVector3
31
32#include <cstdint>
33
34class CbmMvdPoint : public FairMCPoint {
35
36 public:
39
40
54 CbmMvdPoint(int32_t trackId, int32_t pdgCode, int32_t detId, TVector3 posIn, TVector3 posOut, TVector3 momIn,
55 TVector3 momOut, double tof, double length, double eLoss, int32_t frame = 0);
56
58 // CbmMvdPoint(const CbmMvdPoint& point) { *this = point; };
59
61 virtual ~CbmMvdPoint();
62
64 double GetXOut() const { return fX_out; }
65 double GetYOut() const { return fY_out; }
66 double GetZOut() const { return fZ_out; }
67 double GetPxOut() const { return fPx_out; }
68 double GetPyOut() const { return fPy_out; }
69 double GetPzOut() const { return fPz_out; }
70 int32_t GetPdgCode() const { return fPdgCode; }
71 int32_t GetSystemId() const { return CbmMvdAddress::GetSystemIndex(fDetectorID); }
72 int32_t GetSensorNr() const { return CbmMvdAddress::GetSensorNrFromAddress(fDetectorID); }
73 int32_t GetPointId() const
74 {
75 return fPointId;
76 } // Returns index of this object in its TClonesArray.
77 // By default not filled. Used internally in the MvdDigitizer.
78 void PositionOut(TVector3& pos) { pos.SetXYZ(fX_out, fY_out, fZ_out); }
79 void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out, fPy_out, fPz_out); }
80 int32_t GetFrame() const { return fFrame; }
81 int32_t GetAbsTime();
82
84 void SetPositionOut(TVector3 pos);
85 void SetMomentumOut(TVector3 mom);
86 void SetPdgCode(int32_t pdg) { fPdgCode = pdg; }
87 void SetPointId(int32_t myId) { fPointId = myId; }
88 void SetFrameNr(int32_t frame) { fFrame = frame; }
89
91 virtual void Print(const Option_t* opt) const;
92
93protected:
94 Double32_t fX_out, fY_out, fZ_out;
95 Double32_t fPx_out, fPy_out, fPz_out;
96 int32_t fPdgCode; // index of the object in its TClonesArray. By default not filled => -1.
97 int32_t fPointId; // index of the object in its TClonesArray. By default not filled => -1.
98 int32_t fFrame;
99 double fStartTime;
100
101 ClassDef(CbmMvdPoint, 2)
102};
103
104
105inline void CbmMvdPoint::SetPositionOut(TVector3 pos)
106{
107 fX_out = pos.X();
108 fY_out = pos.Y();
109 fZ_out = pos.Z();
110}
111
112inline void CbmMvdPoint::SetMomentumOut(TVector3 mom)
113{
114 fPx_out = mom.Px();
115 fPy_out = mom.Py();
116 fPz_out = mom.Pz();
117}
118
119#endif
static int32_t GetSystemIndex(uint32_t address)
static int32_t GetSensorNrFromAddress(uint32_t address)
int32_t GetSensorNr() const
Definition CbmMvdPoint.h:72
void SetPointId(int32_t myId)
Definition CbmMvdPoint.h:87
int32_t GetFrame() const
Definition CbmMvdPoint.h:80
Double32_t fY_out
Definition CbmMvdPoint.h:94
void SetPdgCode(int32_t pdg)
Definition CbmMvdPoint.h:86
int32_t fPointId
Definition CbmMvdPoint.h:97
double GetXOut() const
Definition CbmMvdPoint.h:64
int32_t GetPointId() const
Definition CbmMvdPoint.h:73
double GetPxOut() const
Definition CbmMvdPoint.h:67
double GetPzOut() const
Definition CbmMvdPoint.h:69
void MomentumOut(TVector3 &mom)
Definition CbmMvdPoint.h:79
Double32_t fPy_out
Definition CbmMvdPoint.h:95
int32_t GetSystemId() const
Definition CbmMvdPoint.h:71
void SetPositionOut(TVector3 pos)
virtual ~CbmMvdPoint()
virtual void Print(const Option_t *opt) const
Double32_t fPx_out
Definition CbmMvdPoint.h:95
double GetZOut() const
Definition CbmMvdPoint.h:66
Double32_t fZ_out
Definition CbmMvdPoint.h:94
int32_t GetAbsTime()
double fStartTime
Definition CbmMvdPoint.h:99
double GetPyOut() const
Definition CbmMvdPoint.h:68
Double32_t fPz_out
Definition CbmMvdPoint.h:95
int32_t fFrame
Definition CbmMvdPoint.h:98
void SetFrameNr(int32_t frame)
Definition CbmMvdPoint.h:88
double GetYOut() const
Definition CbmMvdPoint.h:65
int32_t GetPdgCode() const
Definition CbmMvdPoint.h:70
void PositionOut(TVector3 &pos)
Definition CbmMvdPoint.h:78
Double32_t fX_out
Definition CbmMvdPoint.h:94
void SetMomentumOut(TVector3 mom)
int32_t fPdgCode
Definition CbmMvdPoint.h:96