CbmRoot
Loading...
Searching...
No Matches
CbmStripHit.cxx
Go to the documentation of this file.
1/* Copyright (C) 2009-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer], Andrey Lebedev */
4
10#include "CbmStripHit.h"
11
12#include <TVector3.h> // for TVector3
13
14#include <sstream> // for operator<<, basic_ostream, stringstream
15
16using std::endl;
17using std::stringstream;
18
19
20CbmStripHit::CbmStripHit() : CbmStripHit(-1, 0., 0., 0., 0., 0., 0., -1) {}
21
22CbmStripHit::CbmStripHit(int32_t address, const TVector3& pos, const TVector3& err, int32_t refId, double time,
23 double timeError)
24 : CbmStripHit(address, pos.X(), pos.Y(), pos.Z(), err.X(), err.Y(), err.Z(), refId, time, timeError)
25{
26}
27
28
29CbmStripHit::CbmStripHit(int32_t address, double u, double phi, double z, double du, double dphi, double dz,
30 int32_t refId, double time, double timeError)
31 : CbmHit(kSTRIPHIT, z, dz, refId, address, time, timeError)
32 , fU(u)
33 , fDu(du)
34 , fPhi(phi)
35 , fDphi(dphi)
36{
37}
38
40
41std::string CbmStripHit::ToString() const
42{
43 stringstream ss;
44 ss << "CbmStripHit: address=" << GetAddress() << " pos=(" << GetU() << "," << GetPhi() << "," << GetZ() << ") err=("
45 << GetDu() << "," << GetDphi() << "," << GetDz() << ") refId=" << GetRefId() << endl;
46 return ss.str();
47}
48
@ kSTRIPHIT
Definition CbmHit.h:24
ClassImp(CbmStripHit)
double GetDz() const
Definition CbmHit.h:72
int32_t GetAddress() const
Definition CbmHit.h:74
double GetZ() const
Definition CbmHit.h:71
int32_t GetRefId() const
Definition CbmHit.h:73
CbmStripHit()
Default constructor.
double GetPhi() const
Definition CbmStripHit.h:74
double GetDu() const
Definition CbmStripHit.h:75
double GetDphi() const
Definition CbmStripHit.h:76
virtual std::string ToString() const
Inherited from CbmBaseHit.
double GetU() const
Definition CbmStripHit.h:73
virtual ~CbmStripHit()
Destructor.