CbmRoot
Loading...
Searching...
No Matches
CbmFsdPoint.cxx
Go to the documentation of this file.
1/* Copyright (C) 2023 Physikalisches Institut, Eberhard Karls Universitaet Tuebingen, Tuebingen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese, Florian Uhlig, Lukas Chlad [committer] */
4
5#include "CbmFsdPoint.h"
6
7#include <FairMCPoint.h> // for FairMCPoint
8#include <Logger.h> // for Logger, LOG
9
10#include <sstream> // for stringstream
11
12// ----- Default constructor -------------------------------------------
13CbmFsdPoint::CbmFsdPoint() : FairMCPoint() {}
14// -------------------------------------------------------------------------
15
16
17// ----- Standard constructor ------------------------------------------
18CbmFsdPoint::CbmFsdPoint(int32_t trackID, int32_t detID, TVector3 pos, TVector3 mom, double tof, double length,
19 double eLoss)
20 : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss)
21{
22}
23// -------------------------------------------------------------------------
24
25
26// ----- Destructor ----------------------------------------------------
28// -------------------------------------------------------------------------
29
30
31// ----- Public method Print -------------------------------------------
32void CbmFsdPoint::Print(const Option_t* /*opt*/) const { LOG(info) << ToString(); }
33
34std::string CbmFsdPoint::ToString() const
35{
36 std::stringstream ss;
37 ss << "Fsd point for track " << fTrackID << " in detector " << fDetectorID << "\n"
38 << " Position (" << fX << ", " << fY << ", " << fZ << ") cm\n"
39 << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV\n"
40 << " Time " << fTime << " ns, Length " << fLength << " cm, Energy loss " << fELoss * 1.0e06 << " keV";
41 return ss.str();
42}
43// -------------------------------------------------------------------------
44
ClassImp(CbmConverterManager)
Interception of MC track with the plane representing the FSD.
Definition CbmFsdPoint.h:23
std::string ToString() const
virtual ~CbmFsdPoint()
virtual void Print(const Option_t *opt) const