BmnRoot
Loading...
Searching...
No Matches
CbmTofHit.cxx
Go to the documentation of this file.
1
6#include "CbmTofHit.h"
7
8#include <sstream>
9using std::stringstream;
10using std::endl;
11
13 : BmnHit(),
14 fTime(0.),
15 fChannel(0)
16{
17 SetFlag(1);
19}
20
21CbmTofHit::CbmTofHit(Int_t address, TVector3 pos, TVector3 dpos, Int_t index, Double_t time, Int_t flag, Int_t channel)
22 : BmnHit(address, pos, dpos, index),
23 fTime(time),
24 fChannel(channel)
25{
26 SetFlag(flag);
28}
29
30CbmTofHit::CbmTofHit(Int_t address, TVector3 pos, TVector3 dpos, Int_t index, Double_t time, Int_t flag)
31 : BmnHit(address, pos, dpos, index),
32 fTime(time),
33 fChannel(0)
34{
35 SetFlag(flag);
37}
38
39CbmTofHit::CbmTofHit(Int_t address, TVector3 pos, TVector3 dpos, Int_t index, Double_t time)
40 : BmnHit(address, pos, dpos, index),
41 fTime(time),
42 fChannel(0)
43{
44 SetFlag(1);
46}
47
52
53string CbmTofHit::ToString() const
54{
55 stringstream ss;
56 ss << "CbmTofHit: detId=" << GetDetId()
57 << " pos=(" << GetX() << "," << GetY() << "," << GetZ()
58 << ") err=(" << GetDx() << "," << GetDy() << "," << GetDz()
59 << " refId=" << GetRefId()
60 << " time=" << GetTime() << " flag=" << GetFlag()
61 << " channel=" << GetCh() << endl;
62 return ss.str();
63}
@ kTOFHIT_o
Definition CbmBaseHit.h:24
Bool_t GetFlag() const
Definition BmnHit.h:33
DetectorId GetDetId() const
Definition BmnHit.h:41
void SetFlag(Bool_t fl)
Definition BmnHit.h:49
void SetType(HitType_o type)
Definition CbmTofHit.h:62
virtual string ToString() const
Inherited from CbmBaseHit.
Definition CbmTofHit.cxx:53
Int_t GetRefId() const
Definition CbmTofHit.h:54
CbmTofHit()
Default constructor.
Definition CbmTofHit.cxx:12
Int_t GetCh() const
Definition CbmTofHit.h:58
Double_t GetTime() const
Definition CbmTofHit.h:57
virtual ~CbmTofHit()
Destructor.
Definition CbmTofHit.cxx:48