BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnDchHit.cxx
Go to the documentation of this file.
1
#include "
BmnDchHit.h
"
2
3
#include <iostream>
4
using namespace
std
;
5
6
BmnDchHit::BmnDchHit
()
7
:
BmnHit
()
8
,
fID
(0)
9
,
fTrackID
(0)
10
,
fFlag
(0)
11
,
fNofDim
(1)
12
,
fPhi
(0.)
13
,
fUsing
(
kFALSE
)
14
{
15
fMeas
[1] =
fError
[1] = 0.;
16
fDchLayerType
=
""
;
17
fDchIdNumber
= -1;
18
fWireNumber
= -1;
19
fDistanceToWire
= 0.0;
20
}
21
22
BmnDchHit::BmnDchHit
(
Int_t
detID,
23
TVector3
pos,
24
TVector3
dpos,
25
Int_t
index,
26
Int_t
flag,
27
Int_t
trackIndex,
28
UChar_t
dchlayer)
29
:
BmnHit
(detID, pos, dpos, index)
30
,
fDetectorID
(detID)
31
,
fDchLayer
(dchlayer)
32
,
fTrackID
(trackIndex)
33
,
fFlag
(flag)
34
,
fNofDim
(1)
35
,
fPhi
(0.)
36
,
fUsing
(
kFALSE
)
37
{
38
fMeas
[1] =
fError
[1] = 0.;
39
fDchLayerType
=
""
;
40
fDchIdNumber
= -1;
41
fWireNumber
= -1;
42
fDistanceToWire
= 0.0;
43
}
44
45
BmnDchHit::BmnDchHit
(
Int_t
detID,
TVector3
pos,
TVector3
dpos,
Int_t
index,
Int_t
flag)
46
:
BmnHit
(detID, pos, dpos, index)
47
,
fFlag
(flag)
48
,
fNofDim
(1)
49
,
fPhi
(0.)
50
,
fUsing
(
kFALSE
)
51
{
52
fMeas
[1] =
fError
[1] = 0.;
53
fDchLayerType
=
""
;
54
fDchIdNumber
= -1;
55
fWireNumber
= -1;
56
fDistanceToWire
= 0.0;
57
}
58
59
BmnDchHit::BmnDchHit
(
Int_t
detID,
TVector3
pos,
TVector3
dpos,
Int_t
index)
60
:
BmnHit
(detID, pos, dpos, index)
61
,
fFlag
(0)
62
,
fNofDim
(1)
63
,
fPhi
(0.)
64
,
fUsing
(
kFALSE
)
65
{
66
fMeas
[1] =
fError
[1] = 0.;
67
fDchLayerType
=
""
;
68
fDchIdNumber
= -1;
69
fWireNumber
= -1;
70
fDistanceToWire
= 0.0;
71
}
72
73
BmnDchHit::~BmnDchHit
() {}
74
75
void
BmnDchHit::Print
(
const
Option_t
* opt)
const
76
{
77
cout <<
"-I- BmnDchHit"
<< endl;
78
cout <<
" DetectorID: "
<<
fDetectorID
<< endl;
79
cout <<
" Position: ("
<< fX <<
", "
<< fY <<
", "
<< fZ <<
") cm"
<< endl;
80
cout <<
" Position error: ("
<< fDx <<
", "
<< fDy <<
", "
<< fDz <<
") cm"
<< endl;
81
cout <<
" Flag: "
<<
fFlag
<< endl;
82
}
83
84
/*
85
void BmnDchHit::SetIndex(Int_t indx) {
86
/// Add point index
87
88
Int_t size = fIndex.GetSize();
89
fIndex.Set(size + 1);
90
fIndex[size] = indx;
91
}*/
92
93
Int_t
BmnDchHit::Compare
(
const
TObject
* hit)
const
94
{
95
/// "Compare" function to sort in ascending order in abs(Z)
96
97
BmnDchHit
* kHit = (
BmnDchHit
*)hit;
98
if
(
GetLayer
() < kHit->
GetLayer
())
99
return
-1;
100
else
if
(
GetLayer
() > kHit->
GetLayer
())
101
return
1;
102
else
{
103
if
(
TMath::Abs
(fZ) <
TMath::Abs
(kHit->GetZ()))
104
return
-1;
105
else
if
(
TMath::Abs
(fZ) >
TMath::Abs
(kHit->GetZ()))
106
return
1;
107
else
108
return
0;
109
}
110
}
Int_t
int Int_t
UChar_t
unsigned char UChar_t
kFALSE
constexpr Bool_t kFALSE
Option_t
const char Option_t
BmnDchHit::fWireNumber
Int_t fWireNumber
Definition
BmnDchHit.h:90
BmnDchHit::fError
Double32_t fError[2]
Definition
BmnDchHit.h:97
BmnDchHit::fTrackID
Int_t fTrackID
Definition
BmnDchHit.h:92
BmnDchHit::Print
void Print(const Option_t *opt=0) const
Definition
BmnDchHit.cxx:75
BmnDchHit::fUsing
Bool_t fUsing
Definition
BmnDchHit.h:104
BmnDchHit::~BmnDchHit
virtual ~BmnDchHit()
Definition
BmnDchHit.cxx:73
BmnDchHit::BmnDchHit
BmnDchHit()
Definition
BmnDchHit.cxx:6
BmnDchHit::fDetectorID
Int_t fDetectorID
Definition
BmnDchHit.h:86
BmnDchHit::fDchIdNumber
UShort_t fDchIdNumber
Definition
BmnDchHit.h:100
BmnDchHit::fID
Int_t fID
Definition
BmnDchHit.h:85
BmnDchHit::fFlag
Int_t fFlag
Definition
BmnDchHit.h:93
BmnDchHit::fDistanceToWire
Double_t fDistanceToWire
Definition
BmnDchHit.h:91
BmnDchHit::fNofDim
Int_t fNofDim
Definition
BmnDchHit.h:94
BmnDchHit::Compare
Int_t Compare(const TObject *hit) const
sort in ascending order in abs(Z)
Definition
BmnDchHit.cxx:93
BmnDchHit::GetLayer
UChar_t GetLayer() const
Definition
BmnDchHit.h:33
BmnDchHit::fPhi
Double32_t fPhi
Definition
BmnDchHit.h:95
BmnDchHit::fMeas
Double32_t fMeas[2]
Definition
BmnDchHit.h:96
BmnDchHit::fDchLayer
UChar_t fDchLayer
Definition
BmnDchHit.h:87
BmnDchHit::fDchLayerType
TString fDchLayerType
Definition
BmnDchHit.h:89
BmnHit::BmnHit
BmnHit()
Default constructor.
Definition
BmnHit.cxx:12
TObject
TVector3
BmnDchHit.h
TMath::Abs
Double_t Abs(Double_t d)
std
Definition
json.hpp:4446
detectors
dch
BmnDchHit.cxx
Generated on
for BmnRoot by
1.17.0