Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not using detector description for partial chain examples #726

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions examples/run/alpaka/seeding_example_alpaka.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,6 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
* Build a geometry
*****************************/

// Construct the detector description object.
traccc::silicon_detector_description::host host_det_descr{host_mr};
traccc::io::read_detector_description(
host_det_descr, detector_opts.detector_file,
detector_opts.digitization_file,
(detector_opts.use_detray_detector ? traccc::data_format::json
: traccc::data_format::csv));

// Construct a Detray detector object, if supported by the configuration.
traccc::default_detector::host host_det{mng_mr};
assert(detector_opts.use_detray_detector == true);
Expand Down Expand Up @@ -181,14 +173,14 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
traccc::performance::timer t("Hit reading (cpu)",
elapsedTimes);
// Read the hits from the relevant event file
traccc::io::read_spacepoints(
spacepoints_per_event, event, input_opts.directory,
&host_det_descr, input_opts.format);
traccc::io::read_spacepoints(spacepoints_per_event, event,
input_opts.directory, nullptr,
input_opts.format);

// Read measurements
traccc::io::read_measurements(
measurements_per_event, event, input_opts.directory,
&host_det_descr, input_opts.format);
traccc::io::read_measurements(measurements_per_event, event,
input_opts.directory, nullptr,
input_opts.format);
} // stop measuring hit reading timer

/*----------------------------
Expand Down
11 changes: 2 additions & 9 deletions examples/run/cpu/seeding_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
const traccc::vector3 B{0, 0, 2 * detray::unit<traccc::scalar>::T};
auto field = detray::bfield::create_const_field(B);

// Construct the detector description object.
traccc::silicon_detector_description::host det_descr{host_mr};
traccc::io::read_detector_description(
det_descr, detector_opts.detector_file, detector_opts.digitization_file,
(detector_opts.use_detray_detector ? traccc::data_format::json
: traccc::data_format::csv));

// Construct a Detray detector object, if supported by the configuration.
traccc::default_detector::host detector{host_mr};
assert(detector_opts.use_detray_detector == true);
Expand Down Expand Up @@ -157,7 +150,7 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
traccc::spacepoint_collection_types::host spacepoints_per_event{
&host_mr};
traccc::io::read_spacepoints(spacepoints_per_event, event,
input_opts.directory, &det_descr,
input_opts.directory, nullptr,
input_opts.format);
n_spacepoints += spacepoints_per_event.size();

Expand All @@ -183,7 +176,7 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
traccc::measurement_collection_types::host measurements_per_event{
&host_mr};
traccc::io::read_measurements(measurements_per_event, event,
input_opts.directory, &det_descr,
input_opts.directory, nullptr,
input_opts.format);
n_measurements += measurements_per_event.size();

Expand Down
9 changes: 1 addition & 8 deletions examples/run/cpu/truth_finding_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ int seq_run(const traccc::opts::track_finding& finding_opts,
const traccc::vector3 B{0, 0, 2 * detray::unit<traccc::scalar>::T};
auto field = detray::bfield::create_const_field(B);

// Construct the detector description object.
traccc::silicon_detector_description::host det_descr{host_mr};
traccc::io::read_detector_description(
det_descr, detector_opts.detector_file, detector_opts.digitization_file,
(detector_opts.use_detray_detector ? traccc::data_format::json
: traccc::data_format::csv));

// Construct a Detray detector object, if supported by the configuration.
traccc::default_detector::host detector{host_mr};
assert(detector_opts.use_detray_detector == true);
Expand Down Expand Up @@ -152,7 +145,7 @@ int seq_run(const traccc::opts::track_finding& finding_opts,
traccc::measurement_collection_types::host measurements_per_event{
&host_mr};
traccc::io::read_measurements(measurements_per_event, event,
input_opts.directory, &det_descr,
input_opts.directory, nullptr,
input_opts.format);

// Run finding
Expand Down
20 changes: 6 additions & 14 deletions examples/run/cuda/seeding_example_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
const traccc::vector3 B{0, 0, 2 * detray::unit<traccc::scalar>::T};
auto field = detray::bfield::create_const_field(B);

// Construct the detector description object.
traccc::silicon_detector_description::host host_det_descr{host_mr};
traccc::io::read_detector_description(
host_det_descr, detector_opts.detector_file,
detector_opts.digitization_file,
(detector_opts.use_detray_detector ? traccc::data_format::json
: traccc::data_format::csv));

// Construct a Detray detector object, if supported by the configuration.
traccc::default_detector::host host_det{mng_mr};
assert(detector_opts.use_detray_detector == true);
Expand Down Expand Up @@ -233,14 +225,14 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
traccc::performance::timer t("Hit reading (cpu)",
elapsedTimes);
// Read the hits from the relevant event file
traccc::io::read_spacepoints(
spacepoints_per_event, event, input_opts.directory,
&host_det_descr, input_opts.format);
traccc::io::read_spacepoints(spacepoints_per_event, event,
input_opts.directory, nullptr,
input_opts.format);

// Read measurements
traccc::io::read_measurements(
measurements_per_event, event, input_opts.directory,
&host_det_descr, input_opts.format);
traccc::io::read_measurements(measurements_per_event, event,
input_opts.directory, nullptr,
input_opts.format);
} // stop measuring hit reading timer

/*----------------------------
Expand Down
9 changes: 1 addition & 8 deletions examples/run/cuda/truth_finding_example_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ int seq_run(const traccc::opts::track_finding& finding_opts,
const traccc::vector3 B{0, 0, 2 * detray::unit<traccc::scalar>::T};
auto field = detray::bfield::create_const_field(B);

// Construct the detector description object.
traccc::silicon_detector_description::host det_descr{mng_mr};
traccc::io::read_detector_description(
det_descr, detector_opts.detector_file, detector_opts.digitization_file,
(detector_opts.use_detray_detector ? traccc::data_format::json
: traccc::data_format::csv));

// Construct a Detray detector object, if supported by the configuration.
traccc::default_detector::host detector{mng_mr};
assert(detector_opts.use_detray_detector == true);
Expand Down Expand Up @@ -205,7 +198,7 @@ int seq_run(const traccc::opts::track_finding& finding_opts,
traccc::measurement_collection_types::host measurements_per_event{
mr.host};
traccc::io::read_measurements(measurements_per_event, event,
input_opts.directory, &det_descr,
input_opts.directory, nullptr,
input_opts.format);

traccc::measurement_collection_types::buffer measurements_cuda_buffer(
Expand Down
22 changes: 5 additions & 17 deletions examples/run/sycl/seeding_example_sycl.sycl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

// options
#include "traccc/options/accelerator.hpp"
#include "traccc/options/detector.hpp"
#include "traccc/options/input_data.hpp"
#include "traccc/options/performance.hpp"
#include "traccc/options/program_options.hpp"
Expand All @@ -53,7 +52,6 @@

int seq_run(const traccc::opts::track_seeding& seeding_opts,
const traccc::opts::input_data& input_opts,
const traccc::opts::detector& detector_opts,
const traccc::opts::performance& performance_opts,
const traccc::opts::accelerator& accelerator_opts) {

Expand Down Expand Up @@ -82,14 +80,6 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
* Build a geometry
*****************************/

// Construct the detector description object.
traccc::silicon_detector_description::host host_det_descr{host_mr};
traccc::io::read_detector_description(
host_det_descr, detector_opts.detector_file,
detector_opts.digitization_file,
(detector_opts.use_detray_detector ? traccc::data_format::json
: traccc::data_format::csv));

// Seeding algorithm
traccc::seeding_algorithm sa(seeding_opts.seedfinder,
{seeding_opts.seedfinder},
Expand Down Expand Up @@ -134,9 +124,9 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
traccc::performance::timer t("Hit reading (cpu)",
elapsedTimes);
// Read the hits from the relevant event file
traccc::io::read_spacepoints(
spacepoints_per_event, event, input_opts.directory,
&host_det_descr, input_opts.format);
traccc::io::read_spacepoints(spacepoints_per_event, event,
input_opts.directory, nullptr,
input_opts.format);

} // stop measuring hit reading timer

Expand Down Expand Up @@ -258,19 +248,17 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts,
int main(int argc, char* argv[]) {

// Program options.
traccc::opts::detector detector_opts;
traccc::opts::input_data input_opts;
traccc::opts::track_seeding seeding_opts;
traccc::opts::performance performance_opts;
traccc::opts::accelerator accelerator_opts;
traccc::opts::program_options program_opts{
"Full Tracking Chain Using SYCL (without clusterization)",
{detector_opts, input_opts, seeding_opts, performance_opts,
accelerator_opts},
{input_opts, seeding_opts, performance_opts, accelerator_opts},
argc,
argv};

// Run the application.
return seq_run(seeding_opts, input_opts, detector_opts, performance_opts,
return seq_run(seeding_opts, input_opts, performance_opts,
accelerator_opts);
}
Loading