Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:03

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/CsvDriftCircleReader.hpp"
0013 #include "ActsExamples/Io/Csv/CsvExaTrkXGraphReader.hpp"
0014 #include "ActsExamples/Io/Csv/CsvMeasurementReader.hpp"
0015 #include "ActsExamples/Io/Csv/CsvMuonSimHitReader.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/Io/Root/RootAthenaDumpReader.hpp"
0021 #include "ActsExamples/Io/Root/RootAthenaNTupleReader.hpp"
0022 #include "ActsExamples/Io/Root/RootMaterialTrackReader.hpp"
0023 #include "ActsExamples/Io/Root/RootParticleReader.hpp"
0024 #include "ActsExamples/Io/Root/RootSimHitReader.hpp"
0025 #include "ActsExamples/Io/Root/RootTrackSummaryReader.hpp"
0026 #include "ActsExamples/Io/Root/RootVertexReader.hpp"
0027 
0028 #include <memory>
0029 
0030 #include <pybind11/pybind11.h>
0031 #include <pybind11/stl.h>
0032 
0033 namespace py = pybind11;
0034 using namespace pybind11::literals;
0035 
0036 using namespace ActsExamples;
0037 
0038 namespace Acts::Python {
0039 
0040 void addInput(Context& ctx) {
0041   auto mex = ctx.get("examples");
0042 
0043   // Buffered reader
0044   ACTS_PYTHON_DECLARE_READER(ActsExamples::BufferedReader, mex,
0045                              "BufferedReader", upstreamReader, selectionSeed,
0046                              bufferSize);
0047 
0048   // ROOT READERS
0049   ACTS_PYTHON_DECLARE_READER(ActsExamples::RootParticleReader, mex,
0050                              "RootParticleReader", outputParticles, treeName,
0051                              filePath);
0052 
0053   ACTS_PYTHON_DECLARE_READER(ActsExamples::RootVertexReader, mex,
0054                              "RootVertexReader", outputVertices, treeName,
0055                              filePath);
0056 
0057   ACTS_PYTHON_DECLARE_READER(ActsExamples::RootMaterialTrackReader, mex,
0058                              "RootMaterialTrackReader", outputMaterialTracks,
0059                              treeName, fileList, readCachedSurfaceInformation);
0060 
0061   ACTS_PYTHON_DECLARE_READER(ActsExamples::RootTrackSummaryReader, mex,
0062                              "RootTrackSummaryReader", outputTracks,
0063                              outputParticles, treeName, filePath);
0064 
0065   // CSV READERS
0066   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvParticleReader, mex,
0067                              "CsvParticleReader", inputDir, inputStem,
0068                              outputParticles);
0069 
0070   ACTS_PYTHON_DECLARE_READER(
0071       ActsExamples::CsvMeasurementReader, mex, "CsvMeasurementReader", inputDir,
0072       outputMeasurements, outputMeasurementSimHitsMap, outputClusters,
0073       outputMeasurementParticlesMap, inputSimHits);
0074 
0075   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvSimHitReader, mex,
0076                              "CsvSimHitReader", inputDir, inputStem,
0077                              outputSimHits);
0078   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvMuonSimHitReader, mex,
0079                              "CsvMuonSimHitReader", inputDir, inputStem,
0080                              outputSimHits);
0081   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvDriftCircleReader, mex,
0082                              "CsvDriftCircleReader", inputDir, inputStem,
0083                              outputDriftCircles);
0084 
0085   ACTS_PYTHON_DECLARE_READER(
0086       ActsExamples::CsvSpacePointReader, mex, "CsvSpacePointReader", inputDir,
0087       inputStem, inputCollection, outputSpacePoints, extendCollection);
0088 
0089   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvTrackParameterReader, mex,
0090                              "CsvTrackParameterReader", inputDir, inputStem,
0091                              outputTrackParameters, beamspot);
0092 
0093   ACTS_PYTHON_DECLARE_READER(ActsExamples::RootAthenaNTupleReader, mex,
0094                              "RootAthenaNTupleReader", inputTreeName,
0095                              inputFilePath, outputTrackParameters,
0096                              outputTruthVtxParameters, outputRecoVtxParameters,
0097                              outputBeamspotConstraint);
0098 
0099   ACTS_PYTHON_DECLARE_READER(
0100       ActsExamples::RootAthenaDumpReader, mex, "RootAthenaDumpReader", treename,
0101       inputfile, outputMeasurements, outputPixelSpacePoints,
0102       outputStripSpacePoints, outputSpacePoints, outputClusters,
0103       outputMeasurementParticlesMap, outputParticles, onlyPassedParticles,
0104       skipOverlapSPsPhi, skipOverlapSPsEta, geometryIdMap, trackingGeometry,
0105       absBoundaryTolerance);
0106 
0107 #ifdef WITH_GEOMODEL_PLUGIN
0108   ACTS_PYTHON_DECLARE_READER(ActsExamples::RootAthenaDumpGeoIdCollector, mex,
0109                              "RootAthenaDumpGeoIdCollector", treename,
0110                              inputfile, trackingGeometry, geometryIdMap);
0111 #endif
0112 
0113   ACTS_PYTHON_DECLARE_READER(ActsExamples::RootSimHitReader, mex,
0114                              "RootSimHitReader", treeName, filePath,
0115                              outputSimHits);
0116 
0117   ACTS_PYTHON_DECLARE_READER(ActsExamples::CsvExaTrkXGraphReader, mex,
0118                              "CsvExaTrkXGraphReader", inputDir, inputStem,
0119                              outputGraph);
0120 }
0121 
0122 }  // namespace Acts::Python