PandaRoot
PndSciTPoint.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // ----- PndSciTpoint header file -----
3 // ----- created by A. Sanchez -----
4 // ----- modified by D. Steinschaden -----
5 // ----- last update 04.2015 -----
6 // --------------------------------------------------------------------------
7 
8 #ifndef PNDSCITPOINT_H
9 #define PNDSCITPOINT_H
10 
11 #include "TObject.h"
12 #include "TVector3.h"
13 #include "TLorentzVector.h"
14 #include "FairMCPoint.h"
15 #include "TString.h"
16 
17 class PndSciTPoint : public FairMCPoint {
18 
19  public:
20  //** Default constructor **/
21  PndSciTPoint();
22 
23  PndSciTPoint(Int_t eventID, Int_t trackID, Int_t detectorID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof, Double_t length,
24  Double_t eLoss);
25 
26  //** Copy constructor **/
27  PndSciTPoint(const PndSciTPoint &point)
28  : FairMCPoint(point), fDetName(point.fDetName), fXout(point.fXout), fYout(point.fYout), fZout(point.fZout), fPxout(point.fPxout), fPyout(point.fPyout), fPzout(point.fPzout)
29  {
30  *this = point;
31  };
32 
33  //** Destructor **/
34  virtual ~PndSciTPoint();
35 
36  //** Accessors **/
37 
38  TString GetDetName() const { return fDetName; };
39 
40  Double_t GetXout() const { return fXout; };
41  Double_t GetYout() const { return fYout; };
42  Double_t GetZout() const { return fZout; };
43  Double_t GetPxout() const { return fPxout; };
44  Double_t GetPyout() const { return fPyout; };
45  Double_t GetPzout() const { return fPzout; };
46 
47  void PositionOut(TVector3 &pos) { pos.SetXYZ(fXout, fYout, fZout); };
48  void MomentumOut(TVector3 &mom) { mom.SetXYZ(fPxout, fPyout, fPzout); };
49 
52  void SetPositionOut(const TVector3 &pos);
53  void SetMomentumOut(const TVector3 &mom);
54 
56  virtual void Print(const Option_t *opt) const;
57 
58  protected:
59  TString fDetName;
60 
61  Double_t fXout, fYout, fZout;
62  Double_t fPxout, fPyout, fPzout;
63 
64  ClassDef(PndSciTPoint, 4)
65 };
66 
67 inline void PndSciTPoint::SetPositionOut(const TVector3 &pos)
68 {
69  fXout = pos.X();
70  fYout = pos.Y();
71  fZout = pos.Z();
72 }
73 
74 inline void PndSciTPoint::SetMomentumOut(const TVector3 &mom)
75 {
76  fPxout = mom.Px();
77  fPyout = mom.Py();
78  fPzout = mom.Pz();
79 }
80 
81 #endif
Double_t GetPxout() const
Definition: PndSciTPoint.h:43
Double_t fPxout
Definition: PndSciTPoint.h:62
Double_t fXout
Definition: PndSciTPoint.h:61
void MomentumOut(TVector3 &mom)
Definition: PndSciTPoint.h:48
TString fDetName
Definition: PndSciTPoint.h:59
Double_t fPzout
Definition: PndSciTPoint.h:62
TString GetDetName() const
Definition: PndSciTPoint.h:38
virtual ~PndSciTPoint()
Double_t GetZout() const
Definition: PndSciTPoint.h:42
void SetPositionOut(const TVector3 &pos)
Definition: PndSciTPoint.h:67
Double_t GetPzout() const
Definition: PndSciTPoint.h:45
Double_t fPyout
Definition: PndSciTPoint.h:62
Double_t GetYout() const
Definition: PndSciTPoint.h:41
Double_t fZout
Definition: PndSciTPoint.h:61
void SetMomentumOut(const TVector3 &mom)
Definition: PndSciTPoint.h:74
void PositionOut(TVector3 &pos)
Definition: PndSciTPoint.h:47
Double_t GetXout() const
Definition: PndSciTPoint.h:40
virtual void Print(const Option_t *opt) const
Double_t GetPyout() const
Definition: PndSciTPoint.h:44
Double_t fYout
Definition: PndSciTPoint.h:61
PndSciTPoint(const PndSciTPoint &point)
Definition: PndSciTPoint.h:27