Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:24:01

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 #pragma once
0010 
0011 // Project include(s)
0012 #include "detray/definitions/detail/qualifiers.hpp"
0013 #include "detray/definitions/indexing.hpp"
0014 #include "detray/definitions/units.hpp"
0015 #include "detray/navigation/accelerators/search_window.hpp"
0016 #include "detray/navigation/intersection/intersection_config.hpp"
0017 
0018 // System include(s)
0019 #include <ostream>
0020 
0021 namespace detray::navigation {
0022 
0023 /// Navigation configuration
0024 struct config {
0025   /// Tolerance on the mask 'is_inside' check:
0026   intersection::config intersection{};
0027   /// Search window size for grid based acceleration structures
0028   /// (0, 0): only look at current bin
0029   detray::search_window<dindex, 2> search_window = {0u, 0u};
0030 
0031   // Actor configuration
0032 
0033   /// Percentage of total track path to assume as accumulated error
0034   float accumulated_error{0.001f};
0035   /// Number of standard deviations to assume to model the scattering noise
0036   int n_scattering_stddev{3};
0037   /// Add adaptive mask tolerance to navigation
0038   bool estimate_scattering_noise{true};
0039 
0040   /// Print the navigation configuration
0041   DETRAY_HOST
0042   friend std::ostream& operator<<(std::ostream& out, const config& cfg) {
0043     out << cfg.intersection
0044         << "  Search window         : " << cfg.search_window[0] << " x "
0045         << cfg.search_window[1] << "\n";
0046 
0047     if (cfg.estimate_scattering_noise) {
0048       out << "Actor configuration:\n"
0049           << "  Accumulated error     : " << cfg.accumulated_error * 100.f
0050           << " %\n"
0051           << "  No. scattering stddev : " << cfg.n_scattering_stddev << "\n";
0052     }
0053 
0054     return out;
0055   }
0056 };
0057 }  // namespace detray::navigation