Back to home page

EIC code displayed by LXR

 
 

    


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

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/units.hpp"
0014 
0015 // System include(s)
0016 #include <ostream>
0017 
0018 namespace detray::intersection {
0019 
0020 /// Intersector configuration
0021 struct config {
0022   /// Tolerance on the mask 'is_inside' check:
0023   /// @{
0024   /// Minimal tolerance: ~ position uncertainty on surface
0025   float min_mask_tolerance{1e-5f * unit<float>::mm};
0026   /// Maximal tolerance: loose tolerance when still far away from surface
0027   float max_mask_tolerance{3.f * unit<float>::mm};
0028   /// Scale factor on the path used for the mask tolerance calculation
0029   float mask_tolerance_scalor{5e-2f};
0030   /// @}
0031   /// Maximal absolute path distance for a track to be considered 'on surface'
0032   float path_tolerance{1.f * unit<float>::um};
0033   /// How far behind the track position to look for candidates
0034   float overstep_tolerance{-1000.f * unit<float>::um};
0035 
0036   /// Print the intersector configuration
0037   DETRAY_HOST
0038   friend std::ostream& operator<<(std::ostream& out, const config& cfg) {
0039     out << "  Min. mask tolerance   : "
0040         << cfg.min_mask_tolerance / detray::unit<float>::mm << " [mm]\n"
0041         << "  Max. mask tolerance   : "
0042         << cfg.max_mask_tolerance / detray::unit<float>::mm << " [mm]\n"
0043         << "  Mask tolerance scalor : " << cfg.mask_tolerance_scalor << "\n"
0044         << "  Path tolerance        : "
0045         << cfg.path_tolerance / detray::unit<float>::um << " [um]\n"
0046         << "  Overstep tolerance    : "
0047         << cfg.overstep_tolerance / detray::unit<float>::um << " [um]\n";
0048 
0049     return out;
0050   }
0051 };
0052 
0053 }  // namespace detray::intersection