CbmRoot
CbmTofHit.cxx
Go to the documentation of this file.
1 
6 #include "CbmTofHit.h"
7 
8 #include <TString.h> // for Form
9 #include <TVector3.h> // for TVector3
10 
11 #include <sstream> // for operator<<, basic_ostream, stringstream
12 
13 using std::endl;
14 using std::string;
15 using std::stringstream;
16 
17 CbmTofHit::CbmTofHit() : CbmPixelHit(), fFlag(1), fChannel(0) {
19  SetTime(0.);
20 }
21 
22 CbmTofHit::CbmTofHit(Int_t address,
23  TVector3 pos,
24  TVector3 dpos,
25  Int_t index,
26  Double_t time,
27  Double_t dtime,
28  Int_t flag,
29  Int_t channel)
30  : CbmPixelHit(address, pos, dpos, 0., index, time, dtime)
31  , fFlag(flag)
32  , fChannel(channel) {
34 }
35 
36 CbmTofHit::CbmTofHit(Int_t address,
37  TVector3 pos,
38  TVector3 dpos,
39  Int_t index,
40  Double_t time,
41  Int_t flag,
42  Int_t channel)
43  : CbmPixelHit(address, pos, dpos, 0., index), fFlag(flag), fChannel(channel) {
45  SetTime(time);
46 }
47 
48 CbmTofHit::CbmTofHit(Int_t address,
49  TVector3 pos,
50  TVector3 dpos,
51  Int_t index,
52  Double_t time,
53  Int_t flag)
54  : CbmPixelHit(address, pos, dpos, 0., index), fFlag(flag), fChannel(0) {
56  SetTime(time);
57 }
58 
59 CbmTofHit::CbmTofHit(Int_t address,
60  TVector3 pos,
61  TVector3 dpos,
62  Int_t index,
63  Double_t time)
64  : CbmPixelHit(address, pos, dpos, 0., index), fFlag(1), fChannel(0) {
66  SetTime(time);
67 }
68 
70 
71 string CbmTofHit::ToString() const {
72  stringstream ss;
73  ss << "CbmTofHit: address=" << GetAddress() << " pos=(" << GetX() << ","
74  << GetY() << "," << GetZ() << ") err=(" << GetDx() << "," << GetDy() << ","
75  << GetDz() << ") dxy=" << GetDxy() //<< " refId=" << GetRefId()
76  << Form(" time=%8.2f", GetTime()) << " flag=" << GetFlag();
77  // << " channel=" << GetCh(); // << endl;
78  return ss.str();
79 }
80 
CbmHit::GetZ
Double_t GetZ() const
Definition: CbmHit.h:70
CbmPixelHit::GetDxy
Double_t GetDxy() const
Definition: CbmPixelHit.h:87
CbmPixelHit::GetX
Double_t GetX() const
Definition: CbmPixelHit.h:83
CbmPixelHit::GetY
Double_t GetY() const
Definition: CbmPixelHit.h:84
CbmPixelHit::GetDx
Double_t GetDx() const
Definition: CbmPixelHit.h:85
kTOFHIT
@ kTOFHIT
Definition: CbmHit.h:26
CbmTofHit.h
CbmHit::SetType
void SetType(HitType type)
Sets hit type.
Definition: CbmHit.h:112
CbmTofHit::CbmTofHit
CbmTofHit()
Default constructor.
Definition: CbmTofHit.cxx:17
CbmTofHit::ToString
virtual std::string ToString() const
Inherited from CbmBaseHit.
Definition: CbmTofHit.cxx:71
CbmPixelHit::GetDy
Double_t GetDy() const
Definition: CbmPixelHit.h:86
dpos
TVector3 dpos
Definition: CbmMvdSensorDigiToHitTask.cxx:61
CbmTofHit::~CbmTofHit
virtual ~CbmTofHit()
Destructor.
Definition: CbmTofHit.cxx:69
CbmHit::GetTime
Double_t GetTime() const
Definition: CbmHit.h:75
CbmHit::GetAddress
Int_t GetAddress() const
Definition: CbmHit.h:73
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmTofHit::GetFlag
Int_t GetFlag() const
Definition: core/data/tof/CbmTofHit.h:91
CbmHit::SetTime
void SetTime(Double_t time)
Definition: CbmHit.h:84
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmPixelHit
Definition: CbmPixelHit.h:21
CbmTofHit
Definition: core/data/tof/CbmTofHit.h:26
CbmHit::GetDz
Double_t GetDz() const
Definition: CbmHit.h:71