CbmRoot
CbmPsdPoint.cxx
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmPsdPoint source file -----
3 // ----- Created 28/07/04 by V. Friese -----
4 // -------------------------------------------------------------------------
5 
6 #include "CbmPsdPoint.h"
7 
8 #include <FairLogger.h> // for Logger, LOG
9 #include <FairMCPoint.h> // for FairMCPoint
10 
11 #include <sstream> // for stringstream
12 
13 // ----- Default constructor -------------------------------------------
14 CbmPsdPoint::CbmPsdPoint() : FairMCPoint(), fModuleID(0) {}
15 // -------------------------------------------------------------------------
16 
17 
18 // ----- Standard constructor ------------------------------------------
20  Int_t detID,
21  TVector3 pos,
22  TVector3 mom,
23  Double_t tof,
24  Double_t length,
25  Double_t eLoss)
26  : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss), fModuleID(0) {}
27 // -------------------------------------------------------------------------
28 
29 
30 // ----- Destructor ----------------------------------------------------
32 // -------------------------------------------------------------------------
33 
34 
35 // ----- Public method Print -------------------------------------------
36 void CbmPsdPoint::Print(const Option_t* /*opt*/) const {
37  LOG(info) << ToString();
38 }
39 
40 std::string CbmPsdPoint::ToString() const {
41  std::stringstream ss;
42  ss << "PSD point for track " << fTrackID << " in detector " << fDetectorID
43  << "\n"
44  << " Position (" << fX << ", " << fY << ", " << fZ << ") cm\n"
45  << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV\n"
46  << " Time " << fTime << " ns, Length " << fLength
47  << " cm, Energy loss " << fELoss * 1.0e06 << " keV";
48  return ss.str();
49 }
50 // -------------------------------------------------------------------------
51 
CbmPsdPoint
Definition: CbmPsdPoint.h:24
CbmPsdPoint::ToString
std::string ToString() const
Definition: CbmPsdPoint.cxx:40
CbmPsdPoint::~CbmPsdPoint
virtual ~CbmPsdPoint()
Definition: CbmPsdPoint.cxx:31
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmPsdPoint::Print
virtual void Print(const Option_t *opt) const
Definition: CbmPsdPoint.cxx:36
CbmPsdPoint::CbmPsdPoint
CbmPsdPoint()
Definition: CbmPsdPoint.cxx:14
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmPsdPoint.h