PandaRoot
PndGemMCPoint.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 // ----- PndGemPoint header file -----
15 // ----- Created 27/10/08 by R. Kliemt -----
16 // -------------------------------------------------------------------------
17 
26 #ifndef PNDGEMMCPOINT_H
27 #define PNDGEMMCPOINT_H
28 
29 #include "TObject.h"
30 #include "TVector3.h"
31 #include "PndMCPoint.h"
32 #include "TString.h"
33 
34 #include <stdio.h>
35 #include <iostream>
36 
37 using namespace std;
38 
39 class PndGemMCPoint : public PndMCPoint {
40  friend std::ostream &operator<<(std::ostream &out, const PndGemMCPoint &point)
41  {
42  out << "-I- PndGemMCPoint: PndGem Point for track " << point.GetTrackID() << " in detector " << point.GetDetectorID() << " with sensorID " << point.GetSensorId() << std::endl;
43  out << " Position in (" << point.GetX() << ", " << point.GetY() << ", " << point.GetZ() << ") cm" << std::endl;
44  out << " Position out (" << point.GetXOut() << ", " << point.GetYOut() << ", " << point.GetZOut() << ") cm" << std::endl;
45  out << " Momentum (" << point.GetPx() << ", " << point.GetPy() << ", " << point.GetPz() << ") GeV" << std::endl;
46  out << " Time " << point.GetTime() << " ns, Length " << point.GetLength() << " cm, Energy loss " << point.GetEnergyLoss() * 1.0e06 << " keV" << std::endl;
47  return out;
48  }
49 
50  public:
52  PndGemMCPoint();
53 
66  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);
67 
69  PndGemMCPoint(const PndGemMCPoint &point) : PndMCPoint(point) { *this = point; };
70 
72  virtual ~PndGemMCPoint();
73 
75  Int_t GetSensorId() const { return fSensorId; }
76 
78  void SetSensorId(Int_t sensId) { fSensorId = sensId; };
79 
81  virtual void Print(const Option_t *opt = nullptr) const;
82 
83  protected:
84  Int_t fSensorId = 0;
85 
86  ClassDef(PndGemMCPoint, 2);
87 };
88 
89 #endif
Double_t GetZOut() const
Definition: PndMCPoint.h:35
Double_t GetYOut() const
Definition: PndMCPoint.h:34
STL namespace.
Int_t GetSensorId() const
Definition: PndGemMCPoint.h:75
friend std::ostream & operator<<(std::ostream &out, const PndGemMCPoint &point)
Definition: PndGemMCPoint.h:40
void SetSensorId(Int_t sensId)
Definition: PndGemMCPoint.h:78
PndGemMCPoint(const PndGemMCPoint &point)
Definition: PndGemMCPoint.h:69
basic_ostream< char, char_traits< char > > ostream
Double_t GetXOut() const
Definition: PndMCPoint.h:33