Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-30 07:51:53

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 #include "Acts/EventData/SpacePointMutableData.hpp"
0012 #include "Acts/Seeding/SeedFinderConfig.hpp"
0013 
0014 namespace Acts {
0015 
0016 /// @brief A partial description of a circle in u-v space.
0017 struct LinCircle {
0018   LinCircle() = default;
0019   LinCircle(float ct, float idr, float er, float u, float v, float X, float Y)
0020       : cotTheta(ct), iDeltaR(idr), Er(er), U(u), V(v), x(X), y(Y) {}
0021 
0022   float cotTheta{0.};
0023   float iDeltaR{0.};
0024   float Er{0.};
0025   float U{0.};
0026   float V{0.};
0027   float x{0.};
0028   float y{0.};
0029 };
0030 
0031 template <typename external_spacepoint_t, typename callable_t>
0032 LinCircle transformCoordinates(Acts::SpacePointMutableData& mutableData,
0033                                const external_spacepoint_t& sp,
0034                                const external_spacepoint_t& spM, bool bottom,
0035                                callable_t&& extractFunction);
0036 
0037 /// @brief Transform a vector of spacepoints to u-v space circles with respect
0038 /// to a given middle spacepoint.
0039 ///
0040 /// @tparam external_spacepoint_t The external spacepoint type.
0041 ///
0042 /// @param mutableData Container for mutable variables used in the seeding
0043 /// @param[in] vec The list of bottom or top spacepoints
0044 /// @param[in] spM The middle spacepoint.
0045 /// @param[in] bottom Should be true if vec are bottom spacepoints.
0046 /// @param[out] linCircleVec The output vector to write to.
0047 template <typename external_spacepoint_t>
0048 void transformCoordinates(Acts::SpacePointMutableData& mutableData,
0049                           const std::vector<const external_spacepoint_t*>& vec,
0050                           const external_spacepoint_t& spM, bool bottom,
0051                           std::vector<LinCircle>& linCircleVec);
0052 
0053 /// @brief Check the compatibility of spacepoint coordinates in xyz assuming the Bottom-Middle direction with the strip meassument details
0054 ///
0055 /// @tparam external_spacepoint_t The external spacepoint type.
0056 ///
0057 /// @param[in] config SeedFinder config containing the delegates to the strip measurement details.
0058 /// @param[in] sp Input space point used in the check.
0059 /// @param[in] spacepointPosition Spacepoint coordinates in xyz plane.
0060 /// @param[out] outputCoordinates The output vector to write to.
0061 /// @returns Boolean that says if spacepoint is compatible with being inside the detector element.
0062 template <typename external_spacepoint_t>
0063 bool xyzCoordinateCheck(
0064     const Acts::SeedFinderConfig<external_spacepoint_t>& config,
0065     const external_spacepoint_t& sp, const double* spacepointPosition,
0066     double* outputCoordinates);
0067 
0068 }  // namespace Acts
0069 
0070 #include "Acts/Seeding/SeedFinderUtils.ipp"