Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-13 22:52:23

0001 #ifndef DataFormats_VertexSoA_interface_ZVertexSoA_h
0002 #define DataFormats_VertexSoA_interface_ZVertexSoA_h
0003 
0004 #include <alpaka/alpaka.hpp>
0005 
0006 #include <Eigen/Core>
0007 
0008 #include "DataFormats/SoATemplate/interface/SoALayout.h"
0009 
0010 namespace reco {
0011 
0012   GENERATE_SOA_LAYOUT(ZVertexLayout,
0013                       SOA_COLUMN(float, zv),          // output z-posistion of found vertices
0014                       SOA_COLUMN(float, wv),          // output weight (1/error^2) on the above
0015                       SOA_COLUMN(float, chi2),        // vertices chi2
0016                       SOA_COLUMN(float, ptv2),        // vertices pt^2
0017                       SOA_COLUMN(uint16_t, sortInd),  // sorted index (by pt2)  ascending
0018                       SOA_SCALAR(uint32_t, nvFinal))  // the number of vertices
0019 
0020   GENERATE_SOA_LAYOUT(ZVertexTracksLayout,
0021                       SOA_COLUMN(int16_t, idv),   // vertex index for each associated (original) track
0022                                                   // (-1 == not associate)
0023                       SOA_COLUMN(int32_t, ndof))  // vertices number of dof
0024                                                   // FIXME: reused as workspace for the number of nearest neighbours
0025 
0026   // Common types for both Host and Device code
0027   using ZVertexSoA = ZVertexLayout<>;
0028   using ZVertexSoAView = ZVertexSoA::View;
0029   using ZVertexSoAConstView = ZVertexSoA::ConstView;
0030 
0031   // Common types for both Host and Device code
0032   using ZVertexTracksSoA = ZVertexTracksLayout<>;
0033   using ZVertexTracksSoAView = ZVertexTracksSoA::View;
0034   using ZVertexTracksSoAConstView = ZVertexTracksSoA::ConstView;
0035 
0036   ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE void init(ZVertexSoAView &vertices) { vertices.nvFinal() = 0; }
0037 
0038 }  // namespace reco
0039 
0040 #endif  // DataFormats_VertexSoA_interface_ZVertexSoA_h