BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmTofHit.cxx
Go to the documentation of this file.
1/**
2 * \file CbmTofHit.cxx
3 * \author E. Cordier
4 **/
5
6#include "CbmTofHit.h"
7
8#include <sstream>
9using std::endl;
10using std::stringstream;
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
49
50string CbmTofHit::ToString() const
51{
52 stringstream ss;
53 ss << "CbmTofHit: detId=" << GetDetId() << " pos=(" << GetX() << "," << GetY() << "," << GetZ() << ") err=("
54 << GetDx() << "," << GetDy() << "," << GetDz() << " refId=" << GetRefId() << " time=" << GetTime()
55 << " flag=" << GetFlag() << " channel=" << GetCh() << endl;
56 return ss.str();
57}
int Int_t
double Double_t
@ kTOFHIT_o
Definition CbmBaseHit.h:25
Bool_t GetFlag() const
Definition BmnHit.h:31
DetectorId GetDetId() const
Definition BmnHit.h:34
BmnHit()
Default constructor.
Definition BmnHit.cxx:12
void SetFlag(Bool_t fl)
Definition BmnHit.h:48
Int_t fChannel
Channel identifier.
Definition CbmTofHit.h:67
Double32_t fTime
Time since event start [ns].
Definition CbmTofHit.h:66
void SetType(HitType_o type)
Definition CbmTofHit.h:62
virtual string ToString() const
Inherited from CbmBaseHit.
Definition CbmTofHit.cxx:50
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
Accessors.
Definition CbmTofHit.h:57
virtual ~CbmTofHit()
Destructor.
Definition CbmTofHit.cxx:48