1 #include <cuda_runtime.h> 26 template <
typename TrackerTraits>
60 template <
typename TrackerTraits>
62 : onGPU_(iConfig.getParameter<
bool>(
"onGPU")), tokenField_(
esConsumes()), gpuAlgo_(iConfig, consumesCollector()) {
72 template <
typename TrackerTraits>
76 desc.add<
bool>(
"onGPU",
true);
83 template <
typename TrackerTraits>
88 template <
typename TrackerTraits>
93 template <
typename TrackerTraits>
97 auto bf = 1. / es.
getData(tokenField_).inverseBzAtOriginInGeV();
103 auto& hits_d = ctx.get(
hits);
104 ctx.emplace(
iEvent, tokenTrackGPU_, gpuAlgo_.makeTuplesAsync(hits_d, bf, ctx.stream()));
106 auto& hits_h =
iEvent.get(tokenHitCPU_);
107 iEvent.emplace(tokenTrackCPU_, gpuAlgo_.makeTuples(hits_h, bf));
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
void produce(edm::StreamID streamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tokenField_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< HitsOnHost > tokenHitCPU_
TrackingRecHitSoAConstView< TrackerTraits > HitsConstView
CAHitNtupletCUDAT(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
~CAHitNtupletCUDAT() override=default
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
typename TrackingRecHitSoA< TrackerTraits >::template TrackingRecHitSoALayout<>::ConstView TrackingRecHitSoAConstView
edm::EDGetTokenT< cms::cuda::Product< HitsOnDevice > > tokenHitGPU_
edm::EDPutTokenT< cms::cuda::Product< TrackSoADevice > > tokenTrackGPU_
edm::EDPutTokenT< TrackSoAHost > tokenTrackCPU_