CbmRoot
Loading...
Searching...
No Matches
CbmMustPoint.h
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 header file -----
7// ----- Created 2024-11-26 by R. Karabowicz -----
8// -------------------------------------------------------------------------
9
10#ifndef CBMMUSTPOINT_H
11#define CBMMUSTPOINT_H
12
13#include "CbmMustAddress.h"
14
15#include <FairMCPoint.h> // for FairMCPoint
16
17#include <Rtypes.h> // for ClassDef
18#include <RtypesCore.h> // for Double_t, Int_t, Option_t
19#include <TVector3.h> // for TVector3
20
21#include <cstdint> // for uint32_t
22class TBuffer;
23class TClass;
24
25class CbmMustPoint : public FairMCPoint {
26
27 public:
30
42 CbmMustPoint(Int_t trackID, uint32_t address, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut,
43 Double_t tof, Double_t length, Double_t eLoss);
44
46 CbmMustPoint(const CbmMustPoint& point);
47
49 virtual ~CbmMustPoint();
50
51 void PositionOut(TVector3& pos) { pos.SetXYZ(fX_out, fY_out, fZ_out); }
52 void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out, fPy_out, fPz_out); }
53
55 void SetPositionOut(TVector3 pos);
56 void SetMomentumOut(TVector3 mom);
57
58 Int_t GetStationId() const { return CbmMustAddress::GetStationIndex(GetDetectorID()); }
59 Int_t GetLayerId() const { return CbmMustAddress::GetLayerIndex(GetDetectorID()); }
60 Int_t GetModuleId() const { return CbmMustAddress::GetModuleIndex(GetDetectorID()); }
61 Int_t GetTubeId() const { return CbmMustAddress::GetTubeIndex(GetDetectorID()); }
62
64 virtual void Print(const Option_t* opt) const;
65
66 protected:
67 // exit coordinates in tube frame
68 Double_t fX_out{0.};
69 Double_t fY_out{0.};
70 Double_t fZ_out{0.};
71
72 Double_t fPx_out{0.};
73 Double_t fPy_out{0.};
74 Double_t fPz_out{0.};
75
76 ClassDef(CbmMustPoint, 1)
77};
78
79inline void CbmMustPoint::SetPositionOut(TVector3 pos)
80{
81 fX_out = pos.X();
82 fY_out = pos.Y();
83 fZ_out = pos.Z();
84}
85
86inline void CbmMustPoint::SetMomentumOut(TVector3 mom)
87{
88 fPx_out = mom.Px();
89 fPy_out = mom.Py();
90 fPz_out = mom.Pz();
91}
92
93#endif
int Int_t
static int32_t GetTubeIndex(int32_t address)
static int32_t GetStationIndex(int32_t address)
static int32_t GetLayerIndex(int32_t address)
static int32_t GetModuleIndex(int32_t address)
Int_t GetTubeId() const
Double_t fZ_out
Double_t fPz_out
Double_t fY_out
Int_t GetModuleId() const
void MomentumOut(TVector3 &mom)
Double_t fPx_out
Int_t GetLayerId() const
virtual void Print(const Option_t *opt) const
void SetPositionOut(TVector3 pos)
virtual ~CbmMustPoint()
void PositionOut(TVector3 &pos)
Double_t fPy_out
Int_t GetStationId() const
void SetMomentumOut(TVector3 mom)
Double_t fX_out