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
EDM4hep.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EDM4hep.cpp
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
#include "
Acts/Plugins/Python/Utilities.hpp
"
10
#include "
ActsExamples/Io/EDM4hep/EDM4hepMeasurementReader.hpp
"
11
#include "
ActsExamples/Io/EDM4hep/EDM4hepMeasurementWriter.hpp
"
12
#include "
ActsExamples/Io/EDM4hep/EDM4hepMultiTrajectoryWriter.hpp
"
13
#include "
ActsExamples/Io/EDM4hep/EDM4hepParticleReader.hpp
"
14
#include "
ActsExamples/Io/EDM4hep/EDM4hepParticleWriter.hpp
"
15
#include "
ActsExamples/Io/EDM4hep/EDM4hepSimHitReader.hpp
"
16
#include "
ActsExamples/Io/EDM4hep/EDM4hepSimHitWriter.hpp
"
17
#include "
ActsExamples/Io/EDM4hep/EDM4hepTrackReader.hpp
"
18
#include "
ActsExamples/Io/EDM4hep/EDM4hepTrackWriter.hpp
"
19
20
#include <memory>
21
22
#include <pybind11/pybind11.h>
23
#include <pybind11/stl.h>
24
25
namespace
py = pybind11;
26
using namespace
pybind11::literals;
27
28
using namespace
Acts;
29
30
namespace
Acts::Python {
31
32
void
addEDM4hep
(
Context
& ctx) {
33
auto
mex = ctx.
get
(
"examples"
);
34
auto
edm4hep = mex.def_submodule(
"_edm4hep"
);
35
36
ACTS_PYTHON_DECLARE_READER
(
ActsExamples::EDM4hepSimHitReader
, edm4hep,
37
"EDM4hepSimHitReader"
, inputPath,
inputParticles
,
38
outputSimHits
, dd4hepDetector);
39
40
ACTS_PYTHON_DECLARE_WRITER
(
ActsExamples::EDM4hepSimHitWriter
, edm4hep,
41
"EDM4hepSimHitWriter"
, inputSimHits,
42
inputParticles
, outputPath,
outputParticles
,
43
outputSimTrackerHits);
44
45
ACTS_PYTHON_DECLARE_READER
(
ActsExamples::EDM4hepMeasurementReader
, edm4hep,
46
"EDM4hepMeasurementReader"
, inputPath,
47
outputMeasurements, outputMeasurementSimHitsMap,
48
outputSourceLinks, outputClusters);
49
50
ACTS_PYTHON_DECLARE_WRITER
(
ActsExamples::EDM4hepMeasurementWriter
, edm4hep,
51
"EDM4hepMeasurementWriter"
, inputMeasurements,
52
inputClusters, outputPath);
53
54
ACTS_PYTHON_DECLARE_READER
(
ActsExamples::EDM4hepParticleReader
, edm4hep,
55
"EDM4hepParticleReader"
, inputPath,
inputParticles
,
56
outputParticles
);
57
58
ACTS_PYTHON_DECLARE_WRITER
(
ActsExamples::EDM4hepParticleWriter
, edm4hep,
59
"EDM4hepParticleWriter"
,
inputParticles
,
60
outputPath,
outputParticles
);
61
62
ACTS_PYTHON_DECLARE_WRITER
(
ActsExamples::EDM4hepMultiTrajectoryWriter
,
63
edm4hep,
"EDM4hepMultiTrajectoryWriter"
,
64
inputTrajectories
,
inputMeasurementParticlesMap
,
65
outputPath,
Bz
);
66
67
ACTS_PYTHON_DECLARE_WRITER
(
ActsExamples::EDM4hepTrackWriter
, edm4hep,
68
"EDM4hepTrackWriter"
,
inputTracks
, outputPath,
Bz
);
69
70
ACTS_PYTHON_DECLARE_READER
(
ActsExamples::EDM4hepTrackReader
, edm4hep,
71
"EDM4hepTrackReader"
,
inputTracks
,
outputTracks
,
72
inputPath,
Bz
);
73
}
74
75
}
// namespace Acts::Python
acts
blob
sPHENIX
Examples
Python
src
EDM4hep.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:39
using
1.8.2 with
sPHENIX GitHub integration