Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:38:05

0001 #ifndef RecoVertex_PixelVertexFinding_plugins_PixelVertexWorkSpaceUtilities_h
0002 #define RecoVertex_PixelVertexFinding_plugins_PixelVertexWorkSpaceUtilities_h
0003 
0004 #include <cuda_runtime.h>
0005 #include "DataFormats/SoATemplate/interface/SoALayout.h"
0006 
0007 // Intermediate data used in the vertex reco algos
0008 // For internal use only
0009 GENERATE_SOA_LAYOUT(PixelVertexWSSoALayout,
0010                     SOA_COLUMN(uint16_t, itrk),            // index of original track
0011                     SOA_COLUMN(float, zt),                 // input track z at bs
0012                     SOA_COLUMN(float, ezt2),               // input error^2 on the above
0013                     SOA_COLUMN(float, ptt2),               // input pt^2 on the above
0014                     SOA_COLUMN(uint8_t, izt),              // interized z-position of input tracks
0015                     SOA_COLUMN(int32_t, iv),               // vertex index for each associated track
0016                     SOA_SCALAR(uint32_t, ntrks),           // number of "selected tracks"
0017                     SOA_SCALAR(uint32_t, nvIntermediate))  // the number of vertices after splitting pruning etc.
0018 
0019 // Methods that operate on View and ConstView of the WorkSpaceSoALayout.
0020 namespace gpuVertexFinder {
0021   namespace workSpace {
0022     using PixelVertexWorkSpaceSoALayout = PixelVertexWSSoALayout<>;
0023     using PixelVertexWorkSpaceSoAView = PixelVertexWSSoALayout<>::View;
0024     using PixelVertexWorkSpaceSoAConstView = PixelVertexWSSoALayout<>::ConstView;
0025 
0026     namespace utilities {
0027       __host__ __device__ inline void init(PixelVertexWorkSpaceSoAView &workspace_view) {
0028         workspace_view.ntrks() = 0;
0029         workspace_view.nvIntermediate() = 0;
0030       }
0031     }  // namespace utilities
0032   }    // namespace workSpace
0033 }  // namespace gpuVertexFinder
0034 
0035 #endif