Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:46

0001 #ifndef CUDADataFormats_Vertex_ZVertexSoA_h
0002 #define CUDADataFormats_Vertex_ZVertexSoA_h
0003 
0004 #include <cstdint>
0005 #include "HeterogeneousCore/CUDAUtilities/interface/cudaCompat.h"
0006 
0007 // SOA for vertices
0008 // These vertices are clusterized and fitted only along the beam line (z)
0009 // to obtain their global coordinate the beam spot position shall be added (eventually correcting for the beam angle as well)
0010 struct ZVertexSoA {
0011   static constexpr uint32_t MAXTRACKS = 128 * 1024;
0012   static constexpr uint32_t MAXVTX = 1024;
0013 
0014   int16_t idv[MAXTRACKS];    // vertex index for each associated (original) track  (-1 == not associate)
0015   float zv[MAXVTX];          // output z-posistion of found vertices
0016   float wv[MAXVTX];          // output weight (1/error^2) on the above
0017   float chi2[MAXVTX];        // vertices chi2
0018   float ptv2[MAXVTX];        // vertices pt^2
0019   int32_t ndof[MAXTRACKS];   // vertices number of dof (reused as workspace for the number of nearest neighbours FIXME)
0020   uint16_t sortInd[MAXVTX];  // sorted index (by pt2)  ascending
0021   uint32_t nvFinal;          // the number of vertices
0022 
0023   __host__ __device__ void init() { nvFinal = 0; }
0024 };
0025 
0026 #endif  // CUDADataFormats_Vertex_ZVertexSoA_h