BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnTrack.cxx
Go to the documentation of this file.
1
#include "
BmnTrack.h
"
2
3
#include <
TClonesArray.h
>
4
5
// ----- Default constructor -------------------------------------------
6
BmnTrack::BmnTrack
()
7
:
TObject
()
8
,
fHits
()
9
,
fParamFirst
()
10
,
fParamLast
()
11
,
fFlag
(-1)
12
,
fChi2
(0.)
13
,
fNDF
(0)
14
,
fB
(0.)
15
,
fLength
(0)
16
,
fNhits
(0)
17
,
fHitMap
()
18
,
fUsing
(
kFALSE
)
19
{}
20
21
//// ----- Destructor ----------------------------------------------------
22
BmnTrack::~BmnTrack
()
23
{
24
fHitMap
.clear();
25
}
26
27
// ----- Public method AddStsHit ---------------------------------------
28
void
BmnTrack::AddHit
(
Int_t
hitIndex,
FairHit
* hit)
29
{
30
fHitMap
[hit->GetZ()] = hitIndex;
31
}
32
33
// ----- Public method Print -------------------------------------------
34
void
BmnTrack::Print
()
35
{
36
cout <<
" Number of attached hits : "
<<
fNhits
<< endl;
37
cout <<
"PARAM FIRST: "
<< endl;
38
fParamFirst
.Print();
39
cout <<
"PARAM LAST: "
<< endl;
40
fParamLast
.Print();
41
cout <<
" Length: "
<<
fLength
<<
" Chi2: "
<<
fChi2
<<
", Quality flag "
<<
fFlag
<< endl;
42
}
43
44
// ----- Public method SortHits ----------------------------------------
45
void
BmnTrack::SortHits
()
46
{
47
48
Int_t
index = 0;
49
map<Float_t, Int_t>::iterator it;
50
51
fHits
.Reset();
52
fHits
.Set(
fHitMap
.size());
53
index = 0;
54
for
(it =
fHitMap
.begin(); it !=
fHitMap
.end(); it++) {
55
fHits
[index] = it->second;
56
index++;
57
}
58
fNhits
=
fHits
.GetSize();
59
}
Int_t
int Int_t
kFALSE
constexpr Bool_t kFALSE
TClonesArray.h
BmnTrack.h
BmnTrack::BmnTrack
BmnTrack()
Default constructor.
Definition
BmnTrack.cxx:6
BmnTrack::Print
void Print()
Public method Print Output to screen.
Definition
BmnTrack.cxx:34
BmnTrack::fParamFirst
FairTrackParam fParamFirst
Track parameters at first and last fitted hit.
Definition
BmnTrack.h:95
BmnTrack::fHits
TArrayI fHits
Array containing the indices of the STS hits attached to the track.
Definition
BmnTrack.h:92
BmnTrack::fNDF
Int_t fNDF
Definition
BmnTrack.h:103
BmnTrack::~BmnTrack
virtual ~BmnTrack()
Destructor.
Definition
BmnTrack.cxx:22
BmnTrack::fB
Float_t fB
Impact parameter of track at target z, in units of its error.
Definition
BmnTrack.h:106
BmnTrack::AddHit
void AddHit(Int_t hitIndex, FairHit *Hit)
Associate a FairHit to the track.
Definition
BmnTrack.cxx:28
BmnTrack::fNhits
Int_t fNhits
Number of hits on track.
Definition
BmnTrack.h:112
BmnTrack::fParamLast
FairTrackParam fParamLast
Definition
BmnTrack.h:96
BmnTrack::fFlag
Int_t fFlag
Quality flag.
Definition
BmnTrack.h:99
BmnTrack::fLength
Float_t fLength
Track length.
Definition
BmnTrack.h:109
BmnTrack::fHitMap
map< Float_t, Int_t > fHitMap
Maps from hit z position to hit index.
Definition
BmnTrack.h:118
BmnTrack::fChi2
Float_t fChi2
Chi square and NDF of track fit.
Definition
BmnTrack.h:102
BmnTrack::fUsing
Bool_t fUsing
Definition
BmnTrack.h:120
BmnTrack::SortHits
void SortHits()
Public method SortHits Sorts the hits in downstream direction and writes the hit indices into the mem...
Definition
BmnTrack.cxx:45
FairHit
TObject::TObject
TObject()
base
data
BmnTrack.cxx
Generated on
for BmnRoot by
1.17.0