CbmRoot
Loading...
Searching...
No Matches
CbmPsdPoint.cxx
Go to the documentation of this file.
1/* Copyright (C) 2004-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer], Florian Uhlig */
4
5// -------------------------------------------------------------------------
6// ----- CbmPsdPoint source file -----
7// ----- Created 28/07/04 by V. Friese -----
8// -------------------------------------------------------------------------
9
10#include "CbmPsdPoint.h"
11
12#include <FairMCPoint.h> // for FairMCPoint
13#include <Logger.h> // for Logger, LOG
14
15#include <sstream> // for stringstream
16
17// ----- Default constructor -------------------------------------------
18CbmPsdPoint::CbmPsdPoint() : FairMCPoint(), fModuleID(0) {}
19// -------------------------------------------------------------------------
20
21
22// ----- Standard constructor ------------------------------------------
23CbmPsdPoint::CbmPsdPoint(int32_t trackID, int32_t detID, TVector3 pos, TVector3 mom, double tof, double length,
24 double eLoss)
25 : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss)
26 , fModuleID(0)
27{
28}
29// -------------------------------------------------------------------------
30
31
32// ----- Destructor ----------------------------------------------------
34// -------------------------------------------------------------------------
35
36
37// ----- Public method Print -------------------------------------------
38void CbmPsdPoint::Print(const Option_t* /*opt*/) const { LOG(info) << ToString(); }
39
40std::string CbmPsdPoint::ToString() const
41{
42 std::stringstream ss;
43 ss << "PSD point for track " << fTrackID << " in detector " << fDetectorID << "\n"
44 << " Position (" << fX << ", " << fY << ", " << fZ << ") cm\n"
45 << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV\n"
46 << " Time " << fTime << " ns, Length " << fLength << " cm, Energy loss " << fELoss * 1.0e06 << " keV";
47 return ss.str();
48}
49// -------------------------------------------------------------------------
50
ClassImp(CbmConverterManager)
virtual ~CbmPsdPoint()
virtual void Print(const Option_t *opt) const
std::string ToString() const