Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:01

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2021-2023 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 #pragma once
0009 
0010 // Project include(s).
0011 #include "traccc/definitions/primitives.hpp"
0012 #include "traccc/seeding/detail/doublet.hpp"
0013 
0014 // System include(s).
0015 #include <variant>
0016 
0017 namespace traccc {
0018 
0019 /// Item: triplets of middle-bottom-top
0020 struct triplet {
0021   // bottom spacepoint location in internal spacepoint container
0022   sp_location sp1;
0023   // middle spacepoint location in internal spacepoint container
0024   sp_location sp2;
0025   // top spacepoint location in internal spacepoint container
0026   sp_location sp3;
0027   // curvtaure of circle estimated from triplet
0028   scalar curvature;
0029   // weight of triplet
0030   scalar weight;
0031   // z origin of triplet
0032   scalar z_vertex;
0033 };
0034 
0035 inline TRACCC_HOST_DEVICE bool operator==(const triplet& lhs,
0036                                           const triplet& rhs) {
0037   return (
0038       lhs.sp1.bin_idx == rhs.sp1.bin_idx && lhs.sp1.sp_idx == rhs.sp1.sp_idx &&
0039       lhs.sp2.bin_idx == rhs.sp2.bin_idx && lhs.sp2.sp_idx == rhs.sp2.sp_idx &&
0040       lhs.sp3.bin_idx == rhs.sp3.bin_idx && lhs.sp3.sp_idx == rhs.sp3.sp_idx);
0041 }
0042 
0043 inline TRACCC_HOST_DEVICE bool operator!=(const triplet& lhs,
0044                                           const triplet& rhs) {
0045   return !(lhs == rhs);
0046 }
0047 
0048 inline TRACCC_HOST_DEVICE bool operator<(const triplet& lhs,
0049                                          const triplet& rhs) {
0050   return lhs.weight < rhs.weight;
0051 }
0052 
0053 /// Declare all triplet collection types
0054 using triplet_collection_types = collection_types<triplet>;
0055 
0056 /// Declare all triplet container types
0057 using triplet_container_types = container_types<std::monostate, triplet>;
0058 
0059 }  // namespace traccc