BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
CbmL1ParticlesFinder.cxx
Go to the documentation of this file.
1
/*
2
*=====================================================
3
*
4
* CBM Level 1 Reconstruction
5
*
6
* Authors: M.Zyzak
7
*
8
* e-mail :
9
*
10
*=====================================================
11
*
12
* Finds Particles: Lambdas, K0
13
*
14
*/
15
16
#include "
CbmL1ParticlesFinder.h
"
17
18
#include "
CbmKFParticleInterface.h
"
19
#include "
CbmL1Def.h
"
20
#include "
CbmL1Track.h
"
21
#include "
TStopwatch.h
"
22
23
#include <iostream>
24
CbmL1ParticlesFinder::CbmL1ParticlesFinder
()
25
:
fPVFinder
()
26
,
fPrimVtx
()
27
,
fParticles
()
28
{}
29
30
CbmL1ParticlesFinder::~CbmL1ParticlesFinder
() {}
31
32
void
CbmL1ParticlesFinder::FindPV
(vector<CbmL1Track>& vRTracks)
33
{
34
fPVFinder
.Clear();
35
for
(
unsigned
short
iTr = 0; iTr < vRTracks.size(); iTr++) {
36
if
(vRTracks[iTr].GetNOfHits() < 4)
37
continue
;
38
if
(vRTracks[iTr].GetRefChi2() < 0. || vRTracks[iTr].GetRefChi2() > 3.5 * 3.5 * vRTracks[iTr].GetRefNDF())
39
continue
;
40
if
(!finite(vRTracks[iTr].GetTrack()[0]) || !finite(vRTracks[iTr].GetCovMatrix()[0]))
41
continue
;
42
fPVFinder
.AddTrack(&vRTracks[iTr]);
43
}
44
fPVFinder
.Fit(
fPrimVtx
);
45
// std::cout << "!!!!!!!!!!!!!!!!!!!!!!! Tracks " << fPrimVtx.GetRefNTracks() << std::endl;
46
}
47
48
void
CbmL1ParticlesFinder::FindParticles
(vector<CbmL1Track>& vRTracks)
49
{
50
TStopwatch
timerSelect, timerAll, timerPV;
51
52
fParticles
.clear();
53
54
timerAll.
Start
();
55
timerPV.
Start
();
56
57
FindPV
(vRTracks);
58
59
timerPV.
Stop
();
60
timerSelect.
Start
();
61
62
vector<int> vTrackPDG(vRTracks.size(), 211);
63
// CbmKFParticleInterface::FindParticles(vRTracks, fParticles, fPrimVtx, vTrackPDG);
64
65
timerSelect.
Stop
();
66
timerAll.
Stop
();
67
68
static
int
NEv = 0;
69
NEv++;
70
static
double
timeSelectCPU = 0., timeAllCPU = 0., timePVCPU = 0.;
71
static
double
timeSelectReal = 0., timeAllReal = 0., timePVReal = 0.;
72
73
timePVCPU += timerPV.
CpuTime
();
74
timeSelectCPU += timerSelect.
CpuTime
();
75
timeAllCPU += timerAll.
CpuTime
();
76
77
timePVReal += timerPV.
RealTime
();
78
timeSelectReal += timerSelect.
RealTime
();
79
timeAllReal += timerAll.
RealTime
();
80
81
std::cout <<
"Particle Finder Times:"
<< std::endl;
82
std::cout <<
" PVFinder: "
<<
" Real - "
<< timePVReal / NEv <<
" CPU - "
<< timePVCPU / NEv << std::endl;
83
std::cout <<
" Particle finding"
<<
" Real - "
<< timeSelectReal / NEv <<
" CPU - "
<< timeSelectCPU / NEv
84
<< std::endl;
85
std::cout <<
" Total "
<<
" Real - "
<< timeAllReal / NEv <<
" CPU - "
<< timeAllCPU / NEv
86
<< std::endl;
87
}
CbmKFParticleInterface.h
CbmL1Def.h
TStopwatch.h
CbmL1ParticlesFinder::CbmL1ParticlesFinder
CbmL1ParticlesFinder()
Definition
CbmL1ParticlesFinder.cxx:24
CbmL1ParticlesFinder::fPVFinder
CbmKFPrimaryVertexFinder fPVFinder
Definition
CbmL1ParticlesFinder.h:42
CbmL1ParticlesFinder::fParticles
vector< CbmKFParticle > fParticles
Definition
CbmL1ParticlesFinder.h:45
CbmL1ParticlesFinder::fPrimVtx
CbmKFVertex fPrimVtx
Definition
CbmL1ParticlesFinder.h:43
CbmL1ParticlesFinder::FindPV
void FindPV(vector< CbmL1Track > &vRTracks)
Definition
CbmL1ParticlesFinder.cxx:32
CbmL1ParticlesFinder::FindParticles
void FindParticles(vector< CbmL1Track > &vRTracks)
Definition
CbmL1ParticlesFinder.cxx:48
CbmL1ParticlesFinder::~CbmL1ParticlesFinder
~CbmL1ParticlesFinder()
Definition
CbmL1ParticlesFinder.cxx:30
TStopwatch
TStopwatch::RealTime
Double_t RealTime()
TStopwatch::Start
void Start(Bool_t reset=kTRUE)
TStopwatch::CpuTime
Double_t CpuTime()
TStopwatch::Stop
void Stop()
CbmL1ParticlesFinder.h
CbmL1Track.h
reconstruction
cat
CbmL1ParticlesFinder.cxx
Generated on
for BmnRoot by
1.17.0