Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-12 07:52:35

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/Plugins/Python/Utilities.hpp"
0010 #include "ActsExamples/EventData/Cluster.hpp"
0011 #include "ActsExamples/Framework/BufferedReader.hpp"
0012 #include "ActsExamples/Io/Csv/CsvExaTrkXGraphReader.hpp"
0013 #include "ActsExamples/Io/Csv/CsvMeasurementReader.hpp"
0014 #include "ActsExamples/Io/Csv/CsvMuonSegmentReader.hpp"
0015 #include "ActsExamples/Io/Csv/CsvMuonSpacePointReader.hpp"
0016 #include "ActsExamples/Io/Csv/CsvParticleReader.hpp"
0017 #include "ActsExamples/Io/Csv/CsvSimHitReader.hpp"
0018 #include "ActsExamples/Io/Csv/CsvSpacePointReader.hpp"
0019 #include "ActsExamples/Io/Csv/CsvTrackParameterReader.hpp"
0020 #include "ActsExamples/TrackFinding/ITrackParamsLookupReader.hpp"
0021 
0022 #include <pybind11/pybind11.h>
0023 #include <pybind11/stl.h>
0024 
0025 namespace py = pybind11;
0026 using namespace pybind11::literals;
0027 
0028 using namespace ActsExamples;
0029 
0030 namespace Acts::Python {
0031 
0032 void addInput(Context& ctx) {
0033   auto mex = ctx.get("examples");
0034 
0035   // Buffered reader
0036   ACTS_PYTHON_DECLARE_READER(ActsExamples::BufferedReader, mex,
0037                              "BufferedReader", upstreamReader, selectionSeed,
0038                              bufferSize);
0039 
0040   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvParticleReader, mex,
0041                              "CsvParticleReader", inputDir, inputStem,
0042                              outputParticles);
0043 
0044   ACTS_PYTHON_DECLARE_READER(
0045       ActsExamples::CsvMeasurementReader, mex, "CsvMeasurementReader", inputDir,
0046       outputMeasurements, outputMeasurementSimHitsMap, outputClusters,
0047       outputMeasurementParticlesMap, inputSimHits);
0048 
0049   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvSimHitReader, mex,
0050                              "CsvSimHitReader", inputDir, inputStem,
0051                              outputSimHits);
0052   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvMuonSegmentReader, mex,
0053                              "CsvMuonSegmentReader", inputDir, inputStem,
0054                              outputSegments);
0055   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvMuonSpacePointReader, mex,
0056                              "CsvMuonSpacePointReader", inputDir, inputStem,
0057                              outputSpacePoints);
0058 
0059   ACTS_PYTHON_DECLARE_READER(
0060       ActsExamples::CsvSpacePointReader, mex, "CsvSpacePointReader", inputDir,
0061       inputStem, inputCollection, outputSpacePoints, extendCollection);
0062 
0063   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvTrackParameterReader, mex,
0064                              "CsvTrackParameterReader", inputDir, inputStem,
0065                              outputTrackParameters, beamspot);
0066 
0067   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvExaTrkXGraphReader, mex,
0068                              "CsvExaTrkXGraphReader", inputDir, inputStem,
0069                              outputGraph);
0070 
0071   py::class_<ActsExamples::ITrackParamsLookupReader,
0072              std::shared_ptr<ActsExamples::ITrackParamsLookupReader>>(
0073       mex, "ITrackParamsLookupReader");
0074 }
0075 
0076 }  // namespace Acts::Python