Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CKFPerformanceWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CKFPerformanceWriter.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
Acts/Definitions/Units.hpp
"
12
#include "
Acts/EventData/TrackParameters.hpp
"
13
#include "
Acts/Utilities/Logger.hpp
"
14
#include "
ActsExamples/EventData/Index.hpp
"
15
#include "
ActsExamples/EventData/SimParticle.hpp
"
16
#include "
ActsExamples/EventData/Trajectories.hpp
"
17
#include "
ActsExamples/Framework/DataHandle.hpp
"
18
#include "
ActsExamples/Framework/ProcessCode.hpp
"
19
#include "
ActsExamples/Framework/WriterT.hpp
"
20
#include "
ActsExamples/Validation/DuplicationPlotTool.hpp
"
21
#include "
ActsExamples/Validation/EffPlotTool.hpp
"
22
#include "
ActsExamples/Validation/FakeRatePlotTool.hpp
"
23
#include "
ActsExamples/Validation/TrackSummaryPlotTool.hpp
"
24
25
#include <cstddef>
26
#include <functional>
27
#include <mutex>
28
#include <string>
29
#include <vector>
30
31
class
TFile;
32
class
TTree;
33
namespace
ActsFatras {
34
class
Barcode;
35
}
// namespace ActsFatras
36
37
namespace
ActsExamples {
38
struct
AlgorithmContext;
39
48
class
CKFPerformanceWriter
final :
public
WriterT
<TrajectoriesContainer> {
49
public
:
50
using
HitParticlesMap
=
IndexMultimap<ActsFatras::Barcode>
;
51
52
struct
Config
{
54
std::string
inputTrajectories
;
56
std::string
inputParticles
;
58
std::string
inputMeasurementParticlesMap
;
60
std::string
filePath
=
"performance_ckf.root"
;
62
std::string
fileMode
=
"RECREATE"
;
64
EffPlotTool::Config
effPlotToolConfig
;
65
FakeRatePlotTool::Config
fakeRatePlotToolConfig
;
66
DuplicationPlotTool::Config
duplicationPlotToolConfig
;
67
TrackSummaryPlotTool::Config
trackSummaryPlotToolConfig
;
68
70
bool
doubleMatching
=
false
;
71
73
double
truthMatchProbMin
= 0.5;
74
76
std::function<bool(std::vector<float>&)>
duplicatedPredictor
=
nullptr
;
77
};
78
80
CKFPerformanceWriter
(
Config
cfg
,
Acts::Logging::Level
lvl);
81
~CKFPerformanceWriter
()
override
;
82
84
ProcessCode
finalize
()
override
;
85
87
const
Config
&
config
()
const
{
return
m_cfg
; }
88
89
private
:
90
ProcessCode
writeT
(
const
AlgorithmContext
& ctx,
91
const
TrajectoriesContainer
& trajectories)
override
;
92
93
Config
m_cfg
;
95
std::mutex
m_writeMutex
;
96
TFile*
m_outputFile
{
nullptr
};
98
EffPlotTool
m_effPlotTool
;
99
EffPlotTool::EffPlotCache
m_effPlotCache
;
101
FakeRatePlotTool
m_fakeRatePlotTool
;
102
FakeRatePlotTool::FakeRatePlotCache
m_fakeRatePlotCache
{};
104
DuplicationPlotTool
m_duplicationPlotTool
;
105
DuplicationPlotTool::DuplicationPlotCache
m_duplicationPlotCache
{};
107
TrackSummaryPlotTool
m_trackSummaryPlotTool
;
108
TrackSummaryPlotTool::TrackSummaryPlotCache
m_trackSummaryPlotCache
{};
109
110
// Adding numbers for efficiency, fake, duplicate calculations
111
size_t
m_nTotalTracks
= 0;
112
size_t
m_nTotalMatchedTracks
= 0;
113
size_t
m_nTotalFakeTracks
= 0;
114
size_t
m_nTotalDuplicateTracks
= 0;
115
size_t
m_nTotalParticles
= 0;
116
size_t
m_nTotalMatchedParticles
= 0;
117
size_t
m_nTotalDuplicateParticles
= 0;
118
size_t
m_nTotalFakeParticles
= 0;
119
120
ReadDataHandle<SimParticleContainer>
m_inputParticles
{
this
,
"InputParticles"
};
121
ReadDataHandle<HitParticlesMap>
m_inputMeasurementParticlesMap
{
122
this
,
"InputMeasurementParticlesMap"
};
123
};
124
125
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
Performance
ActsExamples
Io
Performance
CKFPerformanceWriter.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration