PandaRoot
PndHypPoint.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 // ----- CbmHyppoint header file -----
15 // ----- Created by A.Sanchez -----
16 // ------------------------------------------------------------------------
17 
18 #ifndef PNDHYPPOINT_H
19 #define PNDHYPPOINT_H
20 
21 #include "TObject.h"
22 #include "TVector3.h"
23 #include "TLorentzVector.h"
24 #include "FairMCPoint.h"
25 #include "TString.h"
26 
27 using namespace std;
28 
29 class PndHypPoint : public FairMCPoint {
30 
31  public:
33  PndHypPoint();
34 
49  PndHypPoint(Int_t trackID, Int_t evtID, Int_t detID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof, Double_t length,
50  Double_t eLoss, Double_t charge, Double_t mass, Int_t pdgCode, Double_t distance, Double_t PLin, Double_t PLout);
51 
53  PndHypPoint(const PndHypPoint &point)
54  : FairMCPoint(point), fEventID(point.fEventID), fPLin(point.fPLin), fPLout(point.fPLout), fmass(point.fmass), fcharge(point.fcharge), fXin(point.fXin), fYin(point.fYin),
55  fZin(point.fZin), fPxin(point.fPxin), fPyin(point.fPyin), fPzin(point.fPzin), fXout(point.fXout), fYout(point.fYout), fZout(point.fZout), fPxout(point.fPxout),
56  fPyout(point.fPyout), fPzout(point.fPzout), fdist(point.fdist), fDetName(point.fDetName), fVolumeID(point.fVolumeID), fpdgCode(point.fpdgCode)
57  {
58  *this = point;
59  };
60 
62  virtual ~PndHypPoint();
63 
65  // Int_t GetTrackID() const { return fTrackID; };
66  Int_t GetEventID() const { return fEventID; };
67  Int_t GetVolumeID() const { return fVolumeID; };
68  Double_t GetXin() const { return fXin; };
69  Double_t GetYin() const { return fYin; };
70  Double_t GetZin() const { return fZin; };
71  Double_t GetPxin() const { return fPxin; };
72  Double_t GetPyin() const { return fPyin; };
73  Double_t GetPzin() const { return fPzin; };
74 
75  /* Double_t GetXOutLocal() const { return fXout_local; }; */
76  /* Double_t GetYOutLocal() const { return fYout_local; }; */
77  /* Double_t GetZOutLocal() const { return fZout_local; }; */
78 
79  /* Double_t GetXInLocal() const { return fXin_local; }; */
80  /* Double_t GetYInLocal() const { return fYin_local; }; */
81  /* Double_t GetZInLocal() const { return fZin_local; }; */
82 
83  Double_t GetPLin() const { return fPLin; };
84  Double_t GetPLout() const { return fPLout; };
85 
86  Double_t GetXout() const { return fXout; };
87  Double_t GetYout() const { return fYout; };
88  Double_t GetZout() const { return fZout; };
89  Double_t GetPxout() const { return fPxout; };
90  Double_t GetPyout() const { return fPyout; };
91  Double_t GetPzout() const { return fPzout; };
92  Double_t Getdist() const { return fdist; };
93  // Double_t Gettheta() const { return ftheta; };
94 
95  TString GetDetName() const { return fDetName; };
96  Double_t GetMass() const { return fmass; };
97  // Double_t GetTime() const { return fTime; };
98  // Double_t GetLength() const { return fLength; };
99  // Double_t GetEnergyLoss() const { return fELoss; };
100 
101  void PositionIn(TVector3 &pos) { pos.SetXYZ(fXin, fYin, fZin); };
102  void MomentumIn(TVector3 &mom) { mom.SetXYZ(fPxin, fPyin, fPzin); };
103 
104  void PositionOut(TVector3 &pos) { pos.SetXYZ(fXout, fYout, fZout); };
105  void MomentumOut(TVector3 &mom) { mom.SetXYZ(fPxout, fPyout, fPzout); };
106 
107  /* void PositionOutLocal(TVector3& pos) { pos.SetXYZ(fXout_local, */
108  /* fYout_local, */
109  /* fZout_local); }; */
110  /* void PositionInLocal(TVector3& pos) { pos.SetXYZ(fXin_local, */
111  /* fYin_local, */
112  /* fZin_local); }; */
113 
115  // void SetTrackID(Int_t id) { fTrackID = id; } ;
116  void SetEventID(Int_t ev) { fEventID = ev; };
117  // void SetTime(Double_t tof) { fTime = tof; };
118  // void SetLength(Double_t length) { fLength = length; };
119  // void SetEnergyLoss(Double_t eLoss) { fELoss = eLoss; };
120 
121  void SetPositionIn(const TVector3 &pos);
122  void SetMomentumIn(const TVector3 &mom);
123  void SetPositionOut(const TVector3 &pos);
124  void SetMomentumOut(const TVector3 &mom);
125 
126  /* void SetPositionOutLocal(const TVector3& pos); */
127  /* void SetPositionInLocal(const TVector3& pos); */
128 
130  virtual void Print(const Option_t *opt) const;
131 
132  protected:
133  Int_t fEventID; // Event ID
134 
135  Double_t fPLin, fPLout; // momentum
136  // Int_t fTrackID ;
137  Double_t fmass, fcharge;
138 
139  Double_t fXin, fYin, fZin;
140  Double_t fPxin, fPyin, fPzin;
141  Double_t fXout, fYout, fZout;
142  Double_t fPxout, fPyout, fPzout, fdist;
143  /* Double_t fXout_local, fYout_local, fZout_local; */
144  /* Double_t fXin_local, fYin_local, fZin_local; */
145  TString fDetName;
146 
147  Int_t fVolumeID, fpdgCode;
148 
149  ClassDef(PndHypPoint, 7)
150 };
151 
152 inline void PndHypPoint::SetPositionIn(const TVector3 &pos)
153 {
154  fXin = pos.X();
155  fYin = pos.Y();
156  fZin = pos.Z();
157 }
158 
159 inline void PndHypPoint::SetMomentumIn(const TVector3 &mom)
160 {
161  fPxin = mom.X();
162  fPyin = mom.Py();
163  fPzin = mom.Pz();
164 }
165 
166 inline void PndHypPoint::SetPositionOut(const TVector3 &pos)
167 {
168  fXout = pos.X();
169  fYout = pos.Y();
170  fZout = pos.Z();
171 }
172 
173 inline void PndHypPoint::SetMomentumOut(const TVector3 &mom)
174 {
175  fPxout = mom.Px();
176  fPyout = mom.Py();
177  fPzout = mom.Pz();
178 }
179 
180 /* inline void PndHypPoint::SetPositionOutLocal(const TVector3& pos) { */
181 /* fXout_local = pos.X(); */
182 /* fYout_local = pos.Y(); */
183 /* fZout_local = pos.Z(); */
184 /* } */
185 
186 /* inline void PndHypPoint::SetPositionInLocal(const TVector3& pos) { */
187 /* fXin_local = pos.X(); */
188 /* fYin_local = pos.Y(); */
189 /* fZin_local = pos.Z(); */
190 /* } */
191 
192 #endif
Double_t GetPxout() const
Definition: PndHypPoint.h:89
void SetPositionIn(const TVector3 &pos)
Definition: PndHypPoint.h:152
void MomentumIn(TVector3 &mom)
Definition: PndHypPoint.h:102
Double_t GetPxin() const
Definition: PndHypPoint.h:71
TString fDetName
Definition: PndHypPoint.h:145
void SetPositionOut(const TVector3 &pos)
Definition: PndHypPoint.h:166
Double_t GetZin() const
Definition: PndHypPoint.h:70
Double_t fZin
Definition: PndHypPoint.h:139
Int_t GetEventID() const
Definition: PndHypPoint.h:66
Double_t fPLout
Definition: PndHypPoint.h:135
Double_t fZout
Definition: PndHypPoint.h:141
STL namespace.
Double_t GetPzin() const
Definition: PndHypPoint.h:73
Double_t GetPzout() const
Definition: PndHypPoint.h:91
void MomentumOut(TVector3 &mom)
Definition: PndHypPoint.h:105
Double_t GetYout() const
Definition: PndHypPoint.h:87
Double_t GetPLin() const
Definition: PndHypPoint.h:83
Double_t GetPyin() const
Definition: PndHypPoint.h:72
void PositionIn(TVector3 &pos)
Definition: PndHypPoint.h:101
void SetMomentumOut(const TVector3 &mom)
Definition: PndHypPoint.h:173
Double_t GetZout() const
Definition: PndHypPoint.h:88
Double_t fPzin
Definition: PndHypPoint.h:140
TString GetDetName() const
Definition: PndHypPoint.h:95
Double_t GetPLout() const
Definition: PndHypPoint.h:84
Double_t GetMass() const
Definition: PndHypPoint.h:96
void PositionOut(TVector3 &pos)
Definition: PndHypPoint.h:104
Double_t GetXin() const
Definition: PndHypPoint.h:68
Double_t fPzout
Definition: PndHypPoint.h:142
void SetEventID(Int_t ev)
Definition: PndHypPoint.h:116
PndHypPoint(const PndHypPoint &point)
Definition: PndHypPoint.h:53
Double_t fmass
Definition: PndHypPoint.h:137
Int_t GetVolumeID() const
Definition: PndHypPoint.h:67
Double_t GetXout() const
Definition: PndHypPoint.h:86
Double_t GetPyout() const
Definition: PndHypPoint.h:90
void SetMomentumIn(const TVector3 &mom)
Definition: PndHypPoint.h:159
Int_t fVolumeID
Definition: PndHypPoint.h:147
Double_t GetYin() const
Definition: PndHypPoint.h:69
Int_t fEventID
Definition: PndHypPoint.h:133
Double_t Getdist() const
Definition: PndHypPoint.h:92