PandaRoot
PndHypGePoint.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 
13 // ------------------------------------------------------------------------
14 // ----- CbmHypGepoint header file -----
15 
16 // ------------------------------------------------------------------------
17 
18 #ifndef PNDHYPGEPOINT_H
19 #define PNDHYPGEPOINT_H
20 
21 #include "TObject.h"
22 #include "TVector3.h"
23 #include "TLorentzVector.h"
24 #include "FairMCPoint.h"
25 
26 using namespace std;
27 
28 class PndHypGePoint : public FairMCPoint {
29 
30  public:
32  PndHypGePoint();
33 
46  PndHypGePoint(Int_t trackID, Int_t evtID, Int_t pdgCode, Double_t charge, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t copy);
47 
49  PndHypGePoint(const PndHypGePoint &point) { *this = point; };
50 
52  virtual ~PndHypGePoint();
53 
55  Int_t GetTrackID() const { return fTrackID; };
56  Int_t GetEventID() const { return fEventID; };
57  Int_t GetDetectorID() const { return fnCopy; };
58  Double_t GetX() const { return fX; };
59  Double_t GetY() const { return fY; };
60  Double_t GetZ() const { return fZ; };
61  Double_t GetPx() const { return fPx; };
62  Double_t GetPy() const { return fPy; };
63  Double_t GetPz() const { return fPz; };
64  Double_t GetTime() const { return fTime; };
65  Double_t GetLength() const { return fLength; };
66  Double_t GetEnergyLoss() const { return fELoss; };
67  Double_t GetpdgCode() const { return fpdgCode; };
68  void Position(TVector3 &pos) { pos.SetXYZ(fX, fY, fZ); };
69  void Momentum(TVector3 &mom) { mom.SetXYZ(fPx, fPy, fPz); };
70 
71  // Int_t GetCopy() const { return ();};
73  void SetTrackID(Int_t id) { fTrackID = id; };
74  void SetEventID(Int_t id) { fEventID = id; };
75  void SetDetectorID(Short_t copy) { fnCopy = copy; };
76  void SetTime(Double_t time) { fTime = time; };
77  void SetLength(Double_t length) { fLength = length; };
78  void SetEnergyLoss(Double_t eLoss) { fELoss = eLoss; };
79  void SetpdgCode(Int_t pdgCode) { fpdgCode = pdgCode; };
80  void SetPosition(const TVector3 &pos);
81  void SetMomentum(const TVector3 &mom);
82 
84  virtual void Print(const Option_t *opt) const;
85 
86  protected:
87  Int_t fEventID; // Event ID
88  TLorentzVector fPos; // position
89  TLorentzVector fMom; // momentum
90  Double_t fELoss, fmass, fcharge, fTime;
91  Short_t fnCopy; // Copy number
92  Int_t fpdgCode;
93 
94  ClassDef(PndHypGePoint, 1)
95 };
96 
97 inline void PndHypGePoint::SetPosition(const TVector3 &pos)
98 {
99  fX = pos.X();
100  fY = pos.Y();
101  fZ = pos.Z();
102 }
103 
104 inline void PndHypGePoint::SetMomentum(const TVector3 &mom)
105 {
106  fPx = mom.Px();
107  fPy = mom.Py();
108  fPz = mom.Pz();
109 }
110 
111 #endif
Double_t GetPz() const
Definition: PndHypGePoint.h:63
TLorentzVector fPos
Definition: PndHypGePoint.h:88
Double_t GetY() const
Definition: PndHypGePoint.h:59
Double_t GetLength() const
Definition: PndHypGePoint.h:65
Double_t GetZ() const
Definition: PndHypGePoint.h:60
STL namespace.
Double_t fTime
Definition: PndHypGePoint.h:90
void SetEventID(Int_t id)
Definition: PndHypGePoint.h:74
Double_t GetTime() const
Definition: PndHypGePoint.h:64
PndHypGePoint(const PndHypGePoint &point)
Definition: PndHypGePoint.h:49
void SetLength(Double_t length)
Definition: PndHypGePoint.h:77
Int_t GetTrackID() const
Definition: PndHypGePoint.h:55
void SetpdgCode(Int_t pdgCode)
Definition: PndHypGePoint.h:79
Double_t GetPx() const
Definition: PndHypGePoint.h:61
TLorentzVector fMom
Definition: PndHypGePoint.h:89
Int_t GetDetectorID() const
Definition: PndHypGePoint.h:57
void Momentum(TVector3 &mom)
Definition: PndHypGePoint.h:69
void SetTime(Double_t time)
Definition: PndHypGePoint.h:76
Int_t GetEventID() const
Definition: PndHypGePoint.h:56
void SetMomentum(const TVector3 &mom)
Double_t GetEnergyLoss() const
Definition: PndHypGePoint.h:66
void Position(TVector3 &pos)
Definition: PndHypGePoint.h:68
Double_t GetPy() const
Definition: PndHypGePoint.h:62
Double_t GetX() const
Definition: PndHypGePoint.h:58
void SetEnergyLoss(Double_t eLoss)
Definition: PndHypGePoint.h:78
void SetDetectorID(Short_t copy)
Definition: PndHypGePoint.h:75
void SetTrackID(Int_t id)
Definition: PndHypGePoint.h:73
void SetPosition(const TVector3 &pos)
Definition: PndHypGePoint.h:97
Double_t GetpdgCode() const
Definition: PndHypGePoint.h:67
Short_t fnCopy
Definition: PndHypGePoint.h:91