1 #include <cuda_runtime.h> 28 #undef PIXVERTEX_DEBUG_PRODUCE 30 template <
typename TrackerTraits>
61 template <
typename TrackerTraits>
63 : onGPU_(conf.getParameter<
bool>(
"onGPU")),
64 gpuAlgo_(conf.getParameter<
bool>(
"oneKernel"),
65 conf.getParameter<
bool>(
"useDensity"),
66 conf.getParameter<
bool>(
"useDBSCAN"),
67 conf.getParameter<
bool>(
"useIterative"),
68 conf.getParameter<
bool>(
"doSplitting"),
69 conf.getParameter<
int>(
"minT"),
70 conf.getParameter<double>(
"eps"),
71 conf.getParameter<double>(
"errmax"),
72 conf.getParameter<double>(
"chi2max")),
73 ptMin_(conf.getParameter<double>(
"PtMin")),
74 ptMax_(conf.getParameter<double>(
"PtMax"))
85 template <
typename TrackerTraits>
91 desc.add<
bool>(
"onGPU",
true);
92 desc.add<
bool>(
"oneKernel",
true);
93 desc.add<
bool>(
"useDensity",
true);
94 desc.add<
bool>(
"useDBSCAN",
false);
95 desc.add<
bool>(
"useIterative",
false);
96 desc.add<
bool>(
"doSplitting",
true);
98 desc.add<
int>(
"minT", 2);
99 desc.add<
double>(
"eps", 0.07);
100 desc.add<
double>(
"errmax", 0.01);
101 desc.add<
double>(
"chi2max", 9.);
103 desc.add<
double>(
"PtMin", 0.5);
104 desc.add<
double>(
"PtMax", 75.);
110 template <
typename TrackerTraits>
115 auto hTracks =
iEvent.getHandle(tokenGPUTrack_);
118 auto&
tracks = ctx.get(*hTracks);
120 ctx.emplace(
iEvent, tokenGPUVertex_, gpuAlgo_.makeAsync(ctx.stream(),
tracks.view(), ptMin_, ptMax_));
123 template <
typename TrackerTraits>
129 #ifdef PIXVERTEX_DEBUG_PRODUCE 130 auto const& tsoa = *
tracks;
142 std::cout <<
"found " <<
nt <<
" tracks in cpu SoA for Vertexing at " <<
tracks << std::endl;
143 #endif // PIXVERTEX_DEBUG_PRODUCE 145 iEvent.emplace(tokenCPUVertex_, gpuAlgo_.make(
tracks.view(), ptMin_, ptMax_));
148 template <
typename TrackerTraits>
153 produceOnGPU(streamID,
iEvent, iSetup);
155 produceOnCPU(streamID,
iEvent, iSetup);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
edm::EDGetTokenT< TracksSoAHost > tokenCPUTrack_
void produceOnGPU(edm::StreamID streamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const
~PixelVertexProducerCUDAT() override=default
edm::EDPutTokenT< cms::cuda::Product< ZVertexSoADevice > > tokenGPUVertex_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDPutTokenT< ZVertexSoAHost > tokenCPUVertex_
#define DEFINE_FWK_MODULE(type)
void produceOnCPU(edm::StreamID streamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const
edm::EDGetTokenT< cms::cuda::Product< TracksSoADevice > > tokenGPUTrack_
static constexpr __host__ __device__ int nHits(const TrackSoAConstView &tracks, int i)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
PixelVertexProducerCUDAT(const edm::ParameterSet &iConfig)
void produce(edm::StreamID streamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits