PandaRoot
PndSdsMCPoint.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 
21 #ifndef PNDSDSMCPOINT_H
22 #define PNDSDSMCPOINT_H
23 
24 #include "TObject.h"
25 #include "TVector3.h"
26 #include "PndMCPoint.h"
27 #include "TString.h"
28 #include "PndDetectorList.h"
29 
30 #include <stdio.h>
31 #include <iostream>
32 
33 using namespace std;
34 
35 class PndSdsMCPoint : public PndMCPoint {
36  friend std::ostream &operator<<(std::ostream &out, const PndSdsMCPoint &point)
37  {
38  out << "-I- PndSdsMCPoint: PndSds Point for track " << point.GetTrackID() << " in detector " << point.GetDetectorID() << " with sensor " << point.GetSensorID() << std::endl;
39  out << " Position in (" << point.GetX() << ", " << point.GetY() << ", " << point.GetZ() << ") cm" << std::endl;
40  out << " Position out (" << point.GetXOut() << ", " << point.GetYOut() << ", " << point.GetZOut() << ") cm" << std::endl;
41  out << " Momentum (" << point.GetPx() << ", " << point.GetPy() << ", " << point.GetPz() << ") GeV" << std::endl;
42  out << " Time " << point.GetTime() << " ns, Length " << point.GetLength() << " cm, Energy loss " << point.GetEnergyLoss() * 1.0e06 << " keV" << std::endl;
43  return out;
44  }
45 
46  public:
48  PndSdsMCPoint();
49 
62  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);
63 
65  PndSdsMCPoint(const PndSdsMCPoint &point) : PndMCPoint(point), fSensorID(point.fSensorID) { *this = point; };
66 
68  virtual ~PndSdsMCPoint();
69 
71  Int_t GetSensorID() const { return fSensorID; }
72 
75  void SetSensorID(Int_t sensorID) { fSensorID = sensorID; }
76  virtual void SetTrackID(Int_t id) { FairMCPoint::SetTrackID(id); };
77 
79  virtual void Print(const Option_t *opt = nullptr) const;
80 
81  protected:
82  Int_t fSensorID;
83 
84  ClassDef(PndSdsMCPoint, 7);
85 };
86 
87 #endif
PndSdsMCPoint(const PndSdsMCPoint &point)
Definition: PndSdsMCPoint.h:65
virtual void SetTrackID(Int_t id)
Definition: PndSdsMCPoint.h:76
Double_t GetZOut() const
Definition: PndMCPoint.h:35
Double_t GetYOut() const
Definition: PndMCPoint.h:34
STL namespace.
Int_t GetSensorID() const
Definition: PndSdsMCPoint.h:71
friend std::ostream & operator<<(std::ostream &out, const PndSdsMCPoint &point)
Definition: PndSdsMCPoint.h:36
basic_ostream< char, char_traits< char > > ostream
void SetSensorID(Int_t sensorID)
Definition: PndSdsMCPoint.h:75
Double_t GetXOut() const
Definition: PndMCPoint.h:33