Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Acts/Seeding/SeedFinderUtils.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2023 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 http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/EventData/SpacePointData.hpp"
0012 #include "Acts/Seeding/InternalSeed.hpp"
0013 #include "Acts/Seeding/InternalSpacePoint.hpp"
0014 #include "Acts/Seeding/SeedFinderConfig.hpp"
0015 
0016 namespace Acts {
0017 /// @brief A partial description of a circle in u-v space.
0018 struct LinCircle {
0019   LinCircle() = default;
0020   LinCircle(float ct, float idr, float er, float u, float v, float X, float Y)
0021       : cotTheta(ct), iDeltaR(idr), Er(er), U(u), V(v), x(X), y(Y) {}
0022 
0023   float cotTheta{0.};
0024   float iDeltaR{0.};
0025   float Er{0.};
0026   float U{0.};
0027   float V{0.};
0028   float x{0.};
0029   float y{0.};
0030 };
0031 
0032 /// @brief Transform two spacepoints to a u-v space circle.
0033 ///
0034 /// This function is a non-vectorized version of @a transformCoordinates.
0035 ///
0036 /// @tparam external_spacepoint_t The external spacepoint type.
0037 ///
0038 /// @param[in] sp The first spacepoint to use, either a bottom or top.
0039 /// @param[in] spM The middle spacepoint to use.
0040 /// @param[in] bottom Should be true if sp is a bottom SP.
0041 template <typename external_spacepoint_t>
0042 LinCircle transformCoordinates(
0043     const InternalSpacePoint<external_spacepoint_t>& sp,
0044     const InternalSpacePoint<external_spacepoint_t>& spM, bool bottom);
0045 
0046 template <typename external_spacepoint_t, typename callable_t>
0047 LinCircle transformCoordinates(const external_spacepoint_t& sp,
0048                                const external_spacepoint_t& spM, bool bottom,
0049                                callable_t&& extractFunction);
0050 
0051 /// @brief Transform a vector of spacepoints to u-v space circles with respect
0052 /// to a given middle spacepoint.
0053 ///
0054 /// @tparam external_spacepoint_t The external spacepoint type.
0055 ///
0056 /// @param[in] spacePointData Auxiliary variables used by the seeding
0057 /// @param[in] vec The list of bottom or top spacepoints
0058 /// @param[in] spM The middle spacepoint.
0059 /// @param[in] bottom Should be true if vec are bottom spacepoints.
0060 /// @param[out] linCircleVec The output vector to write to.
0061 template <typename external_spacepoint_t>
0062 void transformCoordinates(
0063     Acts::SpacePointData& spacePointData,
0064     const std::vector<InternalSpacePoint<external_spacepoint_t>*>& vec,
0065     const InternalSpacePoint<external_spacepoint_t>& spM, bool bottom,
0066     std::vector<LinCircle>& linCircleVec);
0067 
0068 template <typename external_spacepoint_t, typename callable_t>
0069 void transformCoordinates(Acts::SpacePointData& spacePointData,
0070                           const std::vector<external_spacepoint_t*>& vec,
0071                           const external_spacepoint_t& spM, bool bottom,
0072                           std::vector<LinCircle>& linCircleVec,
0073                           callable_t&& extractFunction);
0074 
0075 /// @brief Check the compatibility of spacepoint coordinates in xyz assuming the Bottom-Middle direction with the strip meassument details
0076 ///
0077 /// @tparam external_spacepoint_t The external spacepoint type.
0078 ///
0079 /// @param[in] spacePointData Auxiliary variables used by the seeding
0080 /// @param[in] config SeedFinder config containing the delegates to the strip measurement details.
0081 /// @param[in] sp Input space point used in the check.
0082 /// @param[in] spacepointPosition Spacepoint coordinates in xyz plane.
0083 /// @param[out] outputCoordinates The output vector to write to.
0084 /// @returns Boolean that says if spacepoint is compatible with being inside the detector element.
0085 template <typename external_spacepoint_t>
0086 bool xyzCoordinateCheck(
0087     Acts::SpacePointData& spacePointData,
0088     const Acts::SeedFinderConfig<external_spacepoint_t>& config,
0089     const Acts::InternalSpacePoint<external_spacepoint_t>& sp,
0090     const double* spacepointPosition, double* outputCoordinates);
0091 
0092 }  // namespace Acts
0093 
0094 #include "Acts/Seeding/SeedFinderUtils.ipp"