CbmRoot
Loading...
Searching...
No Matches
CbmTofHit.cxx
Go to the documentation of this file.
1/* Copyright (C) 2006-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: E. Cordier, Florian Uhlig, Andrey Lebedev, Denis Bertini [committer], Pierre-Alain Loizeau */
4
10#include "CbmTofHit.h"
11
12#include <TString.h> // for Form
13#include <TVector3.h> // for TVector3
14
15#include <sstream> // for operator<<, basic_ostream, stringstream
16
17using std::endl;
18using std::string;
19using std::stringstream;
20
21CbmTofHit::CbmTofHit() : CbmPixelHit(), fFlag(1), fChannel(0)
22{
24 SetTime(0.);
25}
26
27CbmTofHit::CbmTofHit(int32_t address, TVector3 pos, TVector3 dpos, int32_t index, double time, double dtime,
28 int32_t flag, int32_t channel)
29 : CbmPixelHit(address, pos, dpos, 0., index, time, dtime)
30 , fFlag(flag)
31 , fChannel(channel)
32{
34}
35
36CbmTofHit::CbmTofHit(int32_t address, TVector3 pos, TVector3 dpos, int32_t index, double time, int32_t flag,
37 int32_t channel)
38 : CbmPixelHit(address, pos, dpos, 0., index)
39 , fFlag(flag)
40 , fChannel(channel)
41{
43 SetTime(time);
44}
45
46CbmTofHit::CbmTofHit(int32_t address, TVector3 pos, TVector3 dpos, int32_t index, double time, int32_t flag)
47 : CbmPixelHit(address, pos, dpos, 0., index)
48 , fFlag(flag)
49 , fChannel(0)
50{
52 SetTime(time);
53}
54
55CbmTofHit::CbmTofHit(int32_t address, TVector3 pos, TVector3 dpos, int32_t index, double time)
56 : CbmPixelHit(address, pos, dpos, 0., index)
57 , fFlag(1)
58 , fChannel(0)
59{
61 SetTime(time);
62}
63
65
66string CbmTofHit::ToString() const
67{
68 stringstream ss;
69 ss << "CbmTofHit: address=" << GetAddress() << " pos=(" << GetX() << "," << GetY() << "," << GetZ() << ") err=("
70 << GetDx() << "," << GetDy() << "," << GetDz() << ") dxy=" << GetDxy() //<< " refId=" << GetRefId()
71 << Form(" time=%8.2f", GetTime()) << " flag=" << GetFlag();
72 // << " channel=" << GetCh(); // << endl;
73 return ss.str();
74}
75
ClassImp(CbmConverterManager)
@ kTOFHIT
Definition CbmHit.h:31
TVector3 dpos
double GetDz() const
Definition CbmHit.h:72
double GetTime() const
Definition CbmHit.h:76
void SetType(HitType type)
Sets hit type.
Definition CbmHit.h:112
int32_t GetAddress() const
Definition CbmHit.h:74
double GetZ() const
Definition CbmHit.h:71
void SetTime(double time)
Definition CbmHit.h:85
double GetDy() const
Definition CbmPixelHit.h:76
double GetDx() const
Definition CbmPixelHit.h:75
double GetY() const
Definition CbmPixelHit.h:74
double GetX() const
Definition CbmPixelHit.h:73
double GetDxy() const
Definition CbmPixelHit.h:77
virtual std::string ToString() const
Inherited from CbmBaseHit.
Definition CbmTofHit.cxx:66
int32_t GetFlag() const
Definition CbmTofHit.h:75
CbmTofHit()
Default constructor.
Definition CbmTofHit.cxx:21
virtual ~CbmTofHit()
Destructor.
Definition CbmTofHit.cxx:64