CbmRoot
Loading...
Searching...
No Matches
CbmStsPoint.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: Denis Bertini [committer], Volker Friese */
4
5// -------------------------------------------------------------------------
6// ----- CbmStsPoint header file -----
7// ----- Created 26/07/04 by V. Friese -----
8// -------------------------------------------------------------------------
9
10
20#ifndef CBMSTSPOINT_H
21#define CBMSTSPOINT_H
22
23#include <FairMCPoint.h> // for FairMCPoint
24
25#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
26#include <RtypesCore.h> // for Double32_t
27#include <TVector3.h> // for TVector3
28
29#include <cstdint>
30#include <string> // for string
31
32class CbmStsPoint : public FairMCPoint {
33
34public:
37
38
54 CbmStsPoint(int32_t trackID, int32_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut,
55 double tof, double length, double eLoss, int32_t pid = 0, int32_t eventId = 0, int32_t index = 0,
56 int16_t flag = 3);
57
58
65 CbmStsPoint(const CbmStsPoint& point, int32_t eventId = -1, double eventTime = 0., double epochTime = 0.);
66
67
69 virtual ~CbmStsPoint();
70
71
73 double GetXIn() const { return fX; }
74 double GetYIn() const { return fY; }
75 double GetZIn() const { return fZ; }
76 double GetXOut() const { return fX_out; }
77 double GetYOut() const { return fY_out; }
78 double GetZOut() const { return fZ_out; }
79 double GetPxOut() const { return fPx_out; }
80 double GetPyOut() const { return fPy_out; }
81 double GetPzOut() const { return fPz_out; }
82 int32_t GetPid() const { return fPid; }
83 int32_t GetIndex() const { return fIndex; }
84 bool IsEntry() const { return (fFlag == 1 || fFlag == 3); }
85 bool IsExit() const { return (fFlag == 2 || fFlag == 3); }
86
87 void PositionIn(TVector3& pos) { pos.SetXYZ(fX, fY, fZ); }
88 void PositionOut(TVector3& pos) { pos.SetXYZ(fX_out, fY_out, fZ_out); }
89 void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out, fPy_out, fPz_out); }
90
91
93 double GetX(double z) const;
94 double GetY(double z) const;
95
96
98 bool IsUsable() const;
99
100
102 void SetPositionOut(TVector3 pos);
103 void SetMomentumOut(TVector3 mom);
104 virtual void SetTrackID(int32_t id)
105 {
106 //SetLink(kMCTrack, id);
107 FairMCPoint::SetTrackID(id);
108 };
109
110
112 std::string ToString() const;
113
114
115protected:
116 Double32_t fX_out, fY_out, fZ_out;
117 Double32_t fPx_out, fPy_out, fPz_out;
118 int32_t fPid;
119 int32_t fIndex;
120 int16_t fFlag;
121
122
123 ClassDef(CbmStsPoint, 3)
124};
125
126
127inline void CbmStsPoint::SetPositionOut(TVector3 pos)
128{
129 fX_out = pos.X();
130 fY_out = pos.Y();
131 fZ_out = pos.Z();
132}
133
134
135inline void CbmStsPoint::SetMomentumOut(TVector3 mom)
136{
137 fPx_out = mom.Px();
138 fPy_out = mom.Py();
139 fPz_out = mom.Pz();
140}
141
142
143#endif
double GetPxOut() const
Definition CbmStsPoint.h:79
Double32_t fPy_out
int32_t GetPid() const
Definition CbmStsPoint.h:82
bool IsUsable() const
int32_t fIndex
void SetPositionOut(TVector3 pos)
void PositionOut(TVector3 &pos)
Definition CbmStsPoint.h:88
Double32_t fPz_out
bool IsEntry() const
Definition CbmStsPoint.h:84
double GetZOut() const
Definition CbmStsPoint.h:78
int32_t fPid
double GetPzOut() const
Definition CbmStsPoint.h:81
int16_t fFlag
double GetX(double z) const
double GetXOut() const
Definition CbmStsPoint.h:76
virtual ~CbmStsPoint()
double GetYIn() const
Definition CbmStsPoint.h:74
Double32_t fX_out
double GetY(double z) const
std::string ToString() const
void MomentumOut(TVector3 &mom)
Definition CbmStsPoint.h:89
void PositionIn(TVector3 &pos)
Definition CbmStsPoint.h:87
Double32_t fZ_out
Double32_t fY_out
Double32_t fPx_out
double GetXIn() const
Definition CbmStsPoint.h:73
virtual void SetTrackID(int32_t id)
double GetPyOut() const
Definition CbmStsPoint.h:80
void SetMomentumOut(TVector3 mom)
int32_t GetIndex() const
Definition CbmStsPoint.h:83
bool IsExit() const
Definition CbmStsPoint.h:85
double GetZIn() const
Definition CbmStsPoint.h:75
double GetYOut() const
Definition CbmStsPoint.h:77