BmnRoot
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, TVector3 pos, TVector3 dpos, Int_t index, Int_t flag, Int_t trackIndex, UChar_t dchlayer)
23
:
BmnHit
(detID, pos, dpos, index),
24
fDetectorID(detID),
25
fDchLayer(dchlayer),
26
fTrackID(trackIndex),
27
fFlag(flag),
28
fNofDim(1),
29
fPhi(0.),
30
fUsing(kFALSE)
31
{
32
fMeas
[1] =
fError
[1] = 0.;
33
fDchLayerType
=
""
;
34
fDchIdNumber
= -1;
35
fWireNumber
= -1;
36
fDistanceToWire
= 0.0;
37
}
38
39
BmnDchHit::BmnDchHit
(Int_t detID, TVector3 pos, TVector3 dpos, Int_t index, Int_t flag)
40
:
BmnHit
(detID, pos, dpos, index),
41
fFlag(flag),
42
fNofDim(1),
43
fPhi(0.),
44
fUsing(kFALSE)
45
{
46
fMeas
[1] =
fError
[1] = 0.;
47
fDchLayerType
=
""
;
48
fDchIdNumber
= -1;
49
fWireNumber
= -1;
50
fDistanceToWire
= 0.0;
51
}
52
53
BmnDchHit::BmnDchHit
(Int_t detID, TVector3 pos, TVector3 dpos, Int_t index)
54
:
BmnHit
(detID, pos, dpos, index),
55
fFlag(0),
56
fNofDim(1),
57
fPhi(0.),
58
fUsing(kFALSE)
59
{
60
fMeas
[1] =
fError
[1] = 0.;
61
fDchLayerType
=
""
;
62
fDchIdNumber
= -1;
63
fWireNumber
= -1;
64
fDistanceToWire
= 0.0;
65
}
66
67
BmnDchHit::~BmnDchHit
()
68
{}
69
70
void
BmnDchHit::Print
(
const
Option_t* opt)
const
{
71
cout <<
"-I- BmnDchHit"
<< endl;
72
cout <<
" DetectorID: "
<<
fDetectorID
<< endl;
73
cout <<
" Position: ("
<< fX <<
", "
<< fY <<
", "
<< fZ <<
") cm"
<< endl;
74
cout <<
" Position error: ("
<< fDx <<
", "
<< fDy <<
", "
<< fDz <<
") cm"
<< endl;
75
cout <<
" Flag: "
<<
fFlag
<< endl;
76
}
77
78
/*
79
void BmnDchHit::SetIndex(Int_t indx) {
81
82
Int_t size = fIndex.GetSize();
83
fIndex.Set(size + 1);
84
fIndex[size] = indx;
85
}*/
86
87
Int_t
BmnDchHit::Compare
(
const
TObject* hit)
const
{
89
90
BmnDchHit
*kHit = (
BmnDchHit
*) hit;
91
if
(
GetLayer
() < kHit->
GetLayer
())
return
-1;
92
else
if
(
GetLayer
() > kHit->
GetLayer
())
return
1;
93
else
{
94
if
(TMath::Abs(fZ) < TMath::Abs(kHit->GetZ()))
return
-1;
95
else
if
(TMath::Abs(fZ) > TMath::Abs(kHit->GetZ()))
return
1;
96
else
return
0;
97
}
98
}
BmnDchHit
Definition
BmnDchHit.h:9
BmnDchHit::fWireNumber
Int_t fWireNumber
Definition
BmnDchHit.h:93
BmnDchHit::fError
Double32_t fError[2]
Definition
BmnDchHit.h:100
BmnDchHit::Print
void Print(const Option_t *opt=0) const
Definition
BmnDchHit.cxx:70
BmnDchHit::~BmnDchHit
virtual ~BmnDchHit()
Definition
BmnDchHit.cxx:67
BmnDchHit::BmnDchHit
BmnDchHit()
Definition
BmnDchHit.cxx:6
BmnDchHit::fDetectorID
Int_t fDetectorID
Definition
BmnDchHit.h:89
BmnDchHit::fDchIdNumber
UShort_t fDchIdNumber
Definition
BmnDchHit.h:103
BmnDchHit::fFlag
Int_t fFlag
Definition
BmnDchHit.h:96
BmnDchHit::fDistanceToWire
Double_t fDistanceToWire
Definition
BmnDchHit.h:94
BmnDchHit::Compare
Int_t Compare(const TObject *hit) const
sort in ascending order in abs(Z)
Definition
BmnDchHit.cxx:87
BmnDchHit::GetLayer
UChar_t GetLayer() const
Definition
BmnDchHit.h:29
BmnDchHit::fMeas
Double32_t fMeas[2]
Definition
BmnDchHit.h:99
BmnDchHit::fDchLayerType
TString fDchLayerType
Definition
BmnDchHit.h:92
BmnHit
Definition
BmnHit.h:20
BmnDchHit.h
std
STL namespace.
detectors
dch
BmnDchHit.cxx
Generated on Fri May 15 2026 10:40:51 for BmnRoot by
1.9.8