File indexing completed on 2024-04-11 23:28:11
0001 #ifndef RecoParticleFlow_PFClusterProducer_PFClusterProducerAlpakaKernel_h
0002 #define RecoParticleFlow_PFClusterProducer_PFClusterProducerAlpakaKernel_h
0003
0004 #include "DataFormats/ParticleFlowReco/interface/alpaka/PFRecHitDeviceCollection.h"
0005 #include "DataFormats/ParticleFlowReco/interface/PFRecHitHostCollection.h"
0006 #include "DataFormats/ParticleFlowReco/interface/alpaka/PFClusterDeviceCollection.h"
0007 #include "DataFormats/ParticleFlowReco/interface/alpaka/PFRecHitFractionDeviceCollection.h"
0008 #include "RecoParticleFlow/PFClusterProducer/interface/alpaka/PFClusterParamsDeviceCollection.h"
0009 #include "RecoParticleFlow/PFClusterProducer/interface/alpaka/PFClusteringVarsDeviceCollection.h"
0010 #include "RecoParticleFlow/PFClusterProducer/interface/alpaka/PFClusteringEdgeVarsDeviceCollection.h"
0011 #include "RecoParticleFlow/PFRecHitProducer/interface/alpaka/PFRecHitTopologyDeviceCollection.h"
0012 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0013
0014 namespace ALPAKA_ACCELERATOR_NAMESPACE {
0015
0016 namespace reco::pfClustering {
0017 struct Position4 {
0018 float x;
0019 float y;
0020 float z;
0021 float w;
0022 };
0023
0024 struct Position3 {
0025 float x;
0026 float y;
0027 float z;
0028 };
0029
0030 struct Neighbours4 {
0031 int x;
0032 int y;
0033 int z;
0034 int w;
0035 };
0036 }
0037
0038 class PFClusterProducerKernel {
0039 public:
0040 PFClusterProducerKernel(Queue& queue, const reco::PFRecHitHostCollection& pfRecHits);
0041
0042 void execute(Queue& queue,
0043 const reco::PFClusterParamsDeviceCollection& params,
0044 const reco::PFRecHitHCALTopologyDeviceCollection& topology,
0045 reco::PFClusteringVarsDeviceCollection& pfClusteringVars,
0046 reco::PFClusteringEdgeVarsDeviceCollection& pfClusteringEdgeVars,
0047 const reco::PFRecHitHostCollection& pfRecHits,
0048 reco::PFClusterDeviceCollection& pfClusters,
0049 reco::PFRecHitFractionDeviceCollection& pfrhFractions);
0050
0051 private:
0052 cms::alpakatools::device_buffer<Device, uint32_t> nSeeds;
0053 cms::alpakatools::device_buffer<Device, reco::pfClustering::Position4[]> globalClusterPos;
0054 cms::alpakatools::device_buffer<Device, reco::pfClustering::Position4[]> globalPrevClusterPos;
0055 cms::alpakatools::device_buffer<Device, float[]> globalClusterEnergy;
0056 cms::alpakatools::device_buffer<Device, float[]> globalRhFracSum;
0057 cms::alpakatools::device_buffer<Device, int[]> globalSeeds;
0058 cms::alpakatools::device_buffer<Device, int[]> globalRechits;
0059 };
0060
0061 }
0062
0063 #endif