CbmRoot
Loading...
Searching...
No Matches
CbmMvdPoint.h
Go to the documentation of this file.
1/* Copyright (C) 2006-2020 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
21#ifndef CBMMVDPOINT_H
22#define CBMMVDPOINT_H 1
23
24#include "CbmMvdDetectorId.h" // for CbmMvdDetectorId
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, CbmMvdDetectorId {
35
36public:
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
57
59 // CbmMvdPoint(const CbmMvdPoint& point) { *this = point; };
60
61
63 virtual ~CbmMvdPoint();
64
65
67 double GetXOut() const { return fX_out; }
68 double GetYOut() const { return fY_out; }
69 double GetZOut() const { return fZ_out; }
70 double GetPxOut() const { return fPx_out; }
71 double GetPyOut() const { return fPy_out; }
72 double GetPzOut() const { return fPz_out; }
73 int32_t GetPdgCode() const { return fPdgCode; }
74 int32_t GetSystemId() const { return SystemId(fDetectorID); }
75 int32_t GetStationNr() const { return StationNr(fDetectorID); }
76 int32_t GetPointId() const
77 {
78 return fPointId;
79 } // Returns index of this object in its TClonesArray.
80 // By default not filled. Used internally in the MvdDigitizer.
81 void PositionOut(TVector3& pos) { pos.SetXYZ(fX_out, fY_out, fZ_out); }
82 void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out, fPy_out, fPz_out); }
83 int32_t GetFrame() const { return fFrame; }
84 int32_t GetAbsTime();
85
87 void SetPositionOut(TVector3 pos);
88 void SetMomentumOut(TVector3 mom);
89 void SetPdgCode(int32_t pdg) { fPdgCode = pdg; }
90 void SetPointId(int32_t myId) { fPointId = myId; }
91 void SetFrameNr(int32_t frame) { fFrame = frame; }
92
93
95 virtual void Print(const Option_t* opt) const;
96
97
98protected:
99 Double32_t fX_out, fY_out, fZ_out;
100 Double32_t fPx_out, fPy_out, fPz_out;
101 int32_t fPdgCode; // index of the object in its TClonesArray. By default not filled => -1.
102 int32_t fPointId; // index of the object in its TClonesArray. By default not filled => -1.
103 int32_t fFrame;
105
107};
108
109
110inline void CbmMvdPoint::SetPositionOut(TVector3 pos)
111{
112 fX_out = pos.X();
113 fY_out = pos.Y();
114 fZ_out = pos.Z();
115}
116
117
118inline void CbmMvdPoint::SetMomentumOut(TVector3 mom)
119{
120 fPx_out = mom.Px();
121 fPy_out = mom.Py();
122 fPz_out = mom.Pz();
123}
124
125
126#endif
int32_t SystemId(int32_t detectorId) const
ClassDef(CbmMvdDetectorId, 1)
int32_t StationNr(int32_t detectorId) const
void SetPointId(int32_t myId)
Definition CbmMvdPoint.h:90
int32_t GetFrame() const
Definition CbmMvdPoint.h:83
Double32_t fY_out
Definition CbmMvdPoint.h:99
void SetPdgCode(int32_t pdg)
Definition CbmMvdPoint.h:89
int32_t fPointId
double GetXOut() const
Definition CbmMvdPoint.h:67
int32_t GetPointId() const
Definition CbmMvdPoint.h:76
double GetPxOut() const
Definition CbmMvdPoint.h:70
double GetPzOut() const
Definition CbmMvdPoint.h:72
void MomentumOut(TVector3 &mom)
Definition CbmMvdPoint.h:82
Double32_t fPy_out
int32_t GetStationNr() const
Definition CbmMvdPoint.h:75
int32_t GetSystemId() const
Definition CbmMvdPoint.h:74
void SetPositionOut(TVector3 pos)
virtual ~CbmMvdPoint()
virtual void Print(const Option_t *opt) const
Double32_t fPx_out
double GetZOut() const
Definition CbmMvdPoint.h:69
Double32_t fZ_out
Definition CbmMvdPoint.h:99
int32_t GetAbsTime()
double fStartTime
double GetPyOut() const
Definition CbmMvdPoint.h:71
Double32_t fPz_out
int32_t fFrame
void SetFrameNr(int32_t frame)
Definition CbmMvdPoint.h:91
double GetYOut() const
Definition CbmMvdPoint.h:68
int32_t GetPdgCode() const
Definition CbmMvdPoint.h:73
void PositionOut(TVector3 &pos)
Definition CbmMvdPoint.h:81
Double32_t fX_out
Definition CbmMvdPoint.h:99
void SetMomentumOut(TVector3 mom)
int32_t fPdgCode