PandaRoot
PndGemMCPoint.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndGemPoint header file -----
3 // ----- Created 27/10/08 by R. Kliemt -----
4 // -------------------------------------------------------------------------
5 
14 #ifndef PNDGEMMCPOINT_H
15 #define PNDGEMMCPOINT_H
16 
17 #include "TObject.h"
18 #include "TVector3.h"
19 #include "PndMCPoint.h"
20 #include "TString.h"
21 
22 #include <stdio.h>
23 #include <iostream>
24 
25 using namespace std;
26 
27 class PndGemMCPoint : public PndMCPoint {
28  friend std::ostream &operator<<(std::ostream &out, const PndGemMCPoint &point)
29  {
30  out << "-I- PndGemMCPoint: PndGem Point for track " << point.GetTrackID() << " in detector " << point.GetDetectorID() << " with sensorID " << point.GetSensorId() << std::endl;
31  out << " Position in (" << point.GetX() << ", " << point.GetY() << ", " << point.GetZ() << ") cm" << std::endl;
32  out << " Position out (" << point.GetXOut() << ", " << point.GetYOut() << ", " << point.GetZOut() << ") cm" << std::endl;
33  out << " Momentum (" << point.GetPx() << ", " << point.GetPy() << ", " << point.GetPz() << ") GeV" << std::endl;
34  out << " Time " << point.GetTime() << " ns, Length " << point.GetLength() << " cm, Energy loss " << point.GetEnergyLoss() * 1.0e06 << " keV" << std::endl;
35  return out;
36  }
37 
38  public:
40  PndGemMCPoint();
41 
54  PndGemMCPoint(Int_t trackID, Int_t detID, Int_t sensID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss);
55 
57  PndGemMCPoint(const PndGemMCPoint &point) : PndMCPoint(point) { *this = point; };
58 
60  virtual ~PndGemMCPoint();
61 
63  Int_t GetSensorId() const { return fSensorId; }
64 
66  void SetSensorId(Int_t sensId) { fSensorId = sensId; };
67 
69  virtual void Print(const Option_t *opt = nullptr) const;
70 
71  protected:
72  Int_t fSensorId = 0;
73 
74  ClassDef(PndGemMCPoint, 2);
75 };
76 
77 #endif
Double_t GetZOut() const
Definition: PndMCPoint.h:23
Double_t GetYOut() const
Definition: PndMCPoint.h:22
STL namespace.
Int_t GetSensorId() const
Definition: PndGemMCPoint.h:63
friend std::ostream & operator<<(std::ostream &out, const PndGemMCPoint &point)
Definition: PndGemMCPoint.h:28
void SetSensorId(Int_t sensId)
Definition: PndGemMCPoint.h:66
PndGemMCPoint(const PndGemMCPoint &point)
Definition: PndGemMCPoint.h:57
basic_ostream< char, char_traits< char > > ostream
Double_t GetXOut() const
Definition: PndMCPoint.h:21