PandaRoot
PndSdsMCPoint.h
Go to the documentation of this file.
1 
9 #ifndef PNDSDSMCPOINT_H
10 #define PNDSDSMCPOINT_H
11 
12 #include "TObject.h"
13 #include "TVector3.h"
14 #include "PndMCPoint.h"
15 #include "TString.h"
16 #include "PndDetectorList.h"
17 
18 #include <stdio.h>
19 #include <iostream>
20 
21 using namespace std;
22 
23 class PndSdsMCPoint : public PndMCPoint {
24  friend std::ostream &operator<<(std::ostream &out, const PndSdsMCPoint &point)
25  {
26  out << "-I- PndSdsMCPoint: PndSds Point for track " << point.GetTrackID() << " in detector " << point.GetDetectorID() << " with sensor " << point.GetSensorID() << std::endl;
27  out << " Position in (" << point.GetX() << ", " << point.GetY() << ", " << point.GetZ() << ") cm" << std::endl;
28  out << " Position out (" << point.GetXOut() << ", " << point.GetYOut() << ", " << point.GetZOut() << ") cm" << std::endl;
29  out << " Momentum (" << point.GetPx() << ", " << point.GetPy() << ", " << point.GetPz() << ") GeV" << std::endl;
30  out << " Time " << point.GetTime() << " ns, Length " << point.GetLength() << " cm, Energy loss " << point.GetEnergyLoss() * 1.0e06 << " keV" << std::endl;
31  return out;
32  }
33 
34  public:
36  PndSdsMCPoint();
37 
50  PndSdsMCPoint(Int_t trackID, Int_t detID, Int_t sensorID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss);
51 
53  PndSdsMCPoint(const PndSdsMCPoint &point) : PndMCPoint(point), fSensorID(point.fSensorID) { *this = point; };
54 
56  virtual ~PndSdsMCPoint();
57 
59  Int_t GetSensorID() const { return fSensorID; }
60 
63  void SetSensorID(Int_t sensorID) { fSensorID = sensorID; }
64  virtual void SetTrackID(Int_t id) { FairMCPoint::SetTrackID(id); };
65 
67  virtual void Print(const Option_t *opt = nullptr) const;
68 
69  protected:
70  Int_t fSensorID;
71 
72  ClassDef(PndSdsMCPoint, 6);
73 };
74 
75 #endif
PndSdsMCPoint(const PndSdsMCPoint &point)
Definition: PndSdsMCPoint.h:53
virtual void SetTrackID(Int_t id)
Definition: PndSdsMCPoint.h:64
Double_t GetZOut() const
Definition: PndMCPoint.h:23
Double_t GetYOut() const
Definition: PndMCPoint.h:22
STL namespace.
Int_t GetSensorID() const
Definition: PndSdsMCPoint.h:59
friend std::ostream & operator<<(std::ostream &out, const PndSdsMCPoint &point)
Definition: PndSdsMCPoint.h:24
basic_ostream< char, char_traits< char > > ostream
void SetSensorID(Int_t sensorID)
Definition: PndSdsMCPoint.h:63
Double_t GetXOut() const
Definition: PndMCPoint.h:21