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
TrackFindingAlgorithmExaTrkX.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackFindingAlgorithmExaTrkX.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2022 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/Plugins/ExaTrkX/ExaTrkXPipeline.hpp
"
13
#include "
Acts/Plugins/ExaTrkX/Stages.hpp
"
14
#include "
ActsExamples/EventData/Cluster.hpp
"
15
#include "
ActsExamples/EventData/ProtoTrack.hpp
"
16
#include "
ActsExamples/EventData/SimHit.hpp
"
17
#include "
ActsExamples/EventData/SimParticle.hpp
"
18
#include "
ActsExamples/EventData/SimSpacePoint.hpp
"
19
#include "
ActsExamples/Framework/DataHandle.hpp
"
20
#include "
ActsExamples/Framework/IAlgorithm.hpp
"
21
22
#include <mutex>
23
#include <string>
24
#include <vector>
25
26
#include <boost/accumulators/accumulators.hpp>
27
#include <boost/accumulators/statistics.hpp>
28
29
namespace
ActsExamples {
30
31
class
TrackFindingAlgorithmExaTrkX
final :
public
IAlgorithm
{
32
public
:
33
struct
Config
{
35
std::string
inputSpacePoints
;
36
43
std::string
inputClusters
;
44
46
std::string
inputSimHits
;
48
std::string
inputParticles
;
50
std::string
inputMeasurementSimhitsMap
;
51
53
std::string
outputProtoTracks
;
54
55
std::shared_ptr<Acts::GraphConstructionBase>
graphConstructor
;
56
57
std::vector<std::shared_ptr<Acts::EdgeClassificationBase>>
edgeClassifiers
;
58
59
std::shared_ptr<Acts::TrackBuildingBase>
trackBuilder
;
60
62
float
rScale
= 1.f;
63
float
phiScale
= 1.f;
64
float
zScale
= 1.f;
65
float
cellCountScale
= 1.f;
66
float
cellSumScale
= 1.f;
67
float
clusterXScale
= 1.f;
68
float
clusterYScale
= 1.f;
69
71
std::size_t
targetMinHits
= 3;
72
double
targetMinPT
= 500 *
Acts::UnitConstants::MeV
;
73
};
74
79
TrackFindingAlgorithmExaTrkX
(
Config
cfg
,
Acts::Logging::Level
lvl);
80
81
~TrackFindingAlgorithmExaTrkX
()
override
=
default
;
82
87
ActsExamples::ProcessCode
execute
(
88
const
ActsExamples::AlgorithmContext
& ctx)
const
final
;
89
91
ActsExamples::ProcessCode
finalize
() final;
92
93
const
Config
&
config
()
const
{
return
m_cfg
; }
94
95
private
:
96
Config
m_cfg
;
97
98
Acts::ExaTrkXPipeline
m_pipeline
;
99
mutable
std::mutex
m_mutex
;
100
101
using
Accumulator
= boost::accumulators::accumulator_set<
102
float, boost::accumulators::features<
boost::accumulators::tag::mean
,
103
boost::accumulators::tag::variance>>;
104
105
mutable
struct
{
106
Accumulator
graphBuildingTime
;
107
std::vector<Accumulator>
classifierTimes
;
108
Accumulator
trackBuildingTime
;
109
}
m_timing
;
110
111
ReadDataHandle<SimSpacePointContainer>
m_inputSpacePoints
{
this
,
112
"InputSpacePoints"
};
113
ReadDataHandle<ClusterContainer>
m_inputClusters
{
this
,
"InputClusters"
};
114
115
WriteDataHandle<ProtoTrackContainer>
m_outputProtoTracks
{
this
,
116
"OutputProtoTracks"
};
117
118
// for truth graph
119
ReadDataHandle<SimHitContainer>
m_inputSimHits
{
this
,
"InputSimHits"
};
120
ReadDataHandle<SimParticleContainer>
m_inputParticles
{
this
,
"InputParticles"
};
121
ReadDataHandle<IndexMultimap<Index>
>
m_inputMeasurementMap
{
122
this
,
"InputMeasurementMap"
};
123
};
124
125
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
TrackFindingExaTrkX
include
ActsExamples
TrackFindingExaTrkX
TrackFindingAlgorithmExaTrkX.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:37
using
1.8.2 with
sPHENIX GitHub integration