CMS 3D CMS Logo

SiPixelRecHitAlpaka.cc
Go to the documentation of this file.
21 
29 
33 
34 #include "PixelRecHitKernel.h"
35 
37  template <typename TrackerTraits>
39  public:
40  explicit SiPixelRecHitAlpaka(const edm::ParameterSet& iConfig);
41  ~SiPixelRecHitAlpaka() override = default;
42 
43  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
44 
45  private:
46  void produce(edm::StreamID streamID, device::Event& iEvent, const device::EventSetup& iSetup) const override;
47 
53 
55  };
56 
57  template <typename TrackerTraits>
59  : cpeToken_(esConsumes(edm::ESInputTag("", iConfig.getParameter<std::string>("CPE")))),
60  tBeamSpot(consumes(iConfig.getParameter<edm::InputTag>("beamSpot"))),
61  tokenClusters_(consumes(iConfig.getParameter<edm::InputTag>("src"))),
62  tokenDigi_(consumes(iConfig.getParameter<edm::InputTag>("src"))),
63  tokenHit_(produces()) {}
64 
65  template <typename TrackerTraits>
68 
69  desc.add<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpotDevice"));
70  desc.add<edm::InputTag>("src", edm::InputTag("siPixelClustersPreSplittingAlpaka"));
71 
72  std::string cpe = "PixelCPEFastParams";
73  cpe += TrackerTraits::nameModifier;
74  desc.add<std::string>("CPE", cpe);
75 
76  descriptions.addWithDefaultLabel(desc);
77  }
78 
79  template <typename TrackerTraits>
82  const device::EventSetup& es) const {
83  auto& fcpe = es.getData(cpeToken_);
84 
85  auto const& clusters = iEvent.get(tokenClusters_);
86 
87  auto const& digis = iEvent.get(tokenDigi_);
88 
89  auto const& bs = iEvent.get(tBeamSpot);
90 
91  iEvent.emplace(tokenHit_,
92  Algo_.makeHitsAsync(digis, clusters, bs.data(), fcpe.const_buffer().data(), iEvent.queue()));
93  }
96 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
97 
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const device::EDPutToken< TrackingRecHitsSoACollection< TrackerTraits > > tokenHit_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int iEvent
Definition: GenABIO.cc:224
const device::EDGetToken< SiPixelClustersSoACollection > tokenClusters_
SiPixelRecHitAlpaka< pixelTopology::Phase1 > SiPixelRecHitAlpakaPhase1
const device::EDGetToken< SiPixelDigisSoACollection > tokenDigi_
T const & getData(edm::ESGetToken< T, R > const &iToken) const
Definition: EventSetup.h:32
const device::EDGetToken< BeamSpotDevice > tBeamSpot
SiPixelRecHitAlpaka< pixelTopology::Phase2 > SiPixelRecHitAlpakaPhase2
HLT enums.
void produce(edm::StreamID streamID, device::Event &iEvent, const device::EventSetup &iSetup) const override
#define DEFINE_FWK_ALPAKA_MODULE(name)
Definition: MakerMacros.h:16
const device::ESGetToken< PixelCPEFastParams< TrackerTraits >, PixelCPEFastParamsRecord > cpeToken_
const pixelgpudetails::PixelRecHitKernel< TrackerTraits > Algo_
SiPixelRecHitAlpaka(const edm::ParameterSet &iConfig)