PandaRoot
PndMCPoint.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
21 #ifndef PNDDATA_PNDMCPOINT_H_
22 #define PNDDATA_PNDMCPOINT_H_
23 
24 #include <FairMCPoint.h>
25 
26 class PndMCPoint : public FairMCPoint {
27  public:
28  PndMCPoint();
29  virtual ~PndMCPoint();
30 
31  PndMCPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 posOut, TVector3 mom, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss, UInt_t EventId = 0);
32 
33  Double_t GetXOut() const { return fXOut; };
34  Double_t GetYOut() const { return fYOut; };
35  Double_t GetZOut() const { return fZOut; };
36 
37  Double_t GetPxOut() const { return fPxOut; }
38  Double_t GetPyOut() const { return fPyOut; }
39  Double_t GetPzOut() const { return fPzOut; }
40 
41  TVector3 GetPosition() const { return TVector3(fX, fY, fZ); }
42  TVector3 GetPositionOut() const { return TVector3(fXOut, fYOut, fZOut); }
43  TVector3 GetMeanPosition() const { return TVector3((fX + fXOut) / 2., (fY + fYOut) / 2., (fZ + fZOut) / 2.0); }
44  void PositionOut(TVector3 &pos) const { pos.SetXYZ(fXOut, fYOut, fZOut); };
45 
46  TVector3 GetMomentum() const { return TVector3(fPx, fPy, fPz); }
47  TVector3 GetMomentumOut() const { return TVector3(fPxOut, fPyOut, fPzOut); }
48  void MomentumOut(TVector3 &mom) const { mom.SetXYZ(fPxOut, fPyOut, fPzOut); }
49 
50  void SetPositionOut(TVector3 pos);
51  void SetMomentumOut(TVector3 mom);
52 
53  protected:
54  Double32_t fXOut = 0.;
55  Double32_t fYOut = 0.;
56  Double32_t fZOut = 0.;
57 
58  Double32_t fPxOut = 0.;
59  Double32_t fPyOut = 0.;
60  Double32_t fPzOut = 0.;
61 
62  ClassDef(PndMCPoint, 1);
63 };
64 
65 inline void PndMCPoint::SetPositionOut(TVector3 pos)
66 {
67  fXOut = pos.X();
68  fYOut = pos.Y();
69  fZOut = pos.Z();
70 }
71 
72 inline void PndMCPoint::SetMomentumOut(TVector3 mom)
73 {
74  fPxOut = mom.Px();
75  fPyOut = mom.Py();
76  fPzOut = mom.Pz();
77 }
78 
79 #endif /* PNDDATA_PNDMCPOINT_H_ */
void MomentumOut(TVector3 &mom) const
Definition: PndMCPoint.h:48
Double_t GetPyOut() const
Definition: PndMCPoint.h:38
TVector3 GetMomentumOut() const
Definition: PndMCPoint.h:47
Double_t GetZOut() const
Definition: PndMCPoint.h:35
Double32_t fYOut
Definition: PndMCPoint.h:55
Double_t GetYOut() const
Definition: PndMCPoint.h:34
Double32_t fPyOut
Definition: PndMCPoint.h:59
Double32_t fZOut
Definition: PndMCPoint.h:56
virtual ~PndMCPoint()
Double_t GetPxOut() const
Definition: PndMCPoint.h:37
TVector3 GetMeanPosition() const
Definition: PndMCPoint.h:43
void SetMomentumOut(TVector3 mom)
Definition: PndMCPoint.h:72
TVector3 GetMomentum() const
Definition: PndMCPoint.h:46
Double32_t fPxOut
Definition: PndMCPoint.h:58
void PositionOut(TVector3 &pos) const
Definition: PndMCPoint.h:44
ClassDef(PndMCPoint, 1)
TVector3 GetPositionOut() const
Definition: PndMCPoint.h:42
TVector3 GetPosition() const
Definition: PndMCPoint.h:41
Double_t GetPzOut() const
Definition: PndMCPoint.h:39
Double32_t fPzOut
Definition: PndMCPoint.h:60
void SetPositionOut(TVector3 pos)
Definition: PndMCPoint.h:65
Double_t GetXOut() const
Definition: PndMCPoint.h:33
Double32_t fXOut
Definition: PndMCPoint.h:54