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
SeedingPerformanceWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SeedingPerformanceWriter.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020-2021 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/Utilities/Logger.hpp
"
12
#include "
ActsExamples/EventData/Index.hpp
"
13
#include "
ActsExamples/EventData/SimParticle.hpp
"
14
#include "
ActsExamples/EventData/SimSeed.hpp
"
15
#include "
ActsExamples/Framework/DataHandle.hpp
"
16
#include "
ActsExamples/Framework/ProcessCode.hpp
"
17
#include "
ActsExamples/Framework/WriterT.hpp
"
18
#include "
ActsExamples/Validation/DuplicationPlotTool.hpp
"
19
#include "
ActsExamples/Validation/EffPlotTool.hpp
"
20
21
#include <cstddef>
22
#include <mutex>
23
#include <string>
24
#include <vector>
25
26
class
TFile;
27
class
TTree;
28
namespace
ActsFatras {
29
class
Barcode;
30
}
// namespace ActsFatras
31
32
namespace
ActsExamples {
33
struct
AlgorithmContext;
34
35
class
SeedingPerformanceWriter
final :
public
WriterT
<SimSeedContainer> {
36
public
:
37
using
HitParticlesMap
=
ActsExamples::IndexMultimap<ActsFatras::Barcode>
;
38
39
struct
Config
{
41
std::string
inputSeeds
;
43
std::string
inputMeasurementParticlesMap
;
45
std::string
inputParticles
;
47
std::string
filePath
=
"performance_track_seeding.root"
;
49
std::string
fileMode
=
"RECREATE"
;
51
EffPlotTool::Config
effPlotToolConfig
;
52
DuplicationPlotTool::Config
duplicationPlotToolConfig
;
53
};
54
58
SeedingPerformanceWriter
(
Config
config
,
Acts::Logging::Level
level
);
59
60
~SeedingPerformanceWriter
()
override
;
61
63
ProcessCode
finalize
()
override
;
64
66
const
Config
&
config
()
const
{
return
m_cfg
; }
67
68
private
:
69
ProcessCode
writeT
(
const
AlgorithmContext
& ctx,
70
const
SimSeedContainer
& seeds)
override
;
71
72
Config
m_cfg
;
74
std::mutex
m_writeMutex
;
75
TFile*
m_outputFile
{
nullptr
};
77
EffPlotTool
m_effPlotTool
;
78
EffPlotTool::EffPlotCache
m_effPlotCache
;
80
DuplicationPlotTool
m_duplicationPlotTool
;
81
DuplicationPlotTool::DuplicationPlotCache
m_duplicationPlotCache
{};
82
83
size_t
m_nTotalSeeds
= 0;
84
size_t
m_nTotalMatchedSeeds
= 0;
85
size_t
m_nTotalParticles
= 0;
86
size_t
m_nTotalMatchedParticles
= 0;
87
size_t
m_nTotalDuplicatedParticles
= 0;
88
89
ReadDataHandle<SimParticleContainer>
m_inputParticles
{
this
,
"InputParticles"
};
90
ReadDataHandle<HitParticlesMap>
m_inputMeasurementParticlesMap
{
91
this
,
"InputMeasurementParticlesMaps"
};
92
};
93
94
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
Performance
ActsExamples
Io
Performance
SeedingPerformanceWriter.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration