79 includeErrors_(iConfig.getParameter<
bool>(
"IncludeErrors")),
80 clusterThresholds_{iConfig.
getParameter<int32_t>(
"clusterThreshold_layer1"),
81 iConfig.
getParameter<int32_t>(
"clusterThreshold_otherLayers"),
82 static_cast<float>(iConfig.
getParameter<
double>(
"ElectronPerADCGain")),
83 static_cast<int8_t
>(iConfig.
getParameter<
int>(
"Phase2ReadoutMode")),
84 static_cast<uint16_t
>(iConfig.
getParameter<uint32_t>(
"Phase2DigiBaseline")),
85 static_cast<uint8_t
>(iConfig.
getParameter<uint32_t>(
"Phase2KinkADC"))} {
87 digiErrorPutToken_ = produces<cms::cuda::Product<SiPixelDigiErrorsCUDA>>();
94 desc.add<
bool>(
"IncludeErrors",
true);
95 desc.add<int32_t>(
"clusterThreshold_layer1", 4000);
96 desc.add<int32_t>(
"clusterThreshold_otherLayers", 4000);
97 desc.add<
double>(
"ElectronPerADCGain", 1500.f);
98 desc.add<int32_t>(
"Phase2ReadoutMode", 3);
99 desc.add<uint32_t>(
"Phase2DigiBaseline", 1000);
100 desc.add<uint32_t>(
"Phase2KinkADC", 8);
123 for (
auto DSViter =
input.begin(); DSViter !=
input.end(); DSViter++) {
124 unsigned int detid = DSViter->detId();
125 DetId detIdObject(detid);
127 auto const gind = genericDet->
index();
128 for (
auto const&
px : *DSViter) {
129 moduleIds[nDigis] = uint16_t(gind);
131 xDigis[nDigis] = uint16_t(
px.row());
132 yDigis[nDigis] = uint16_t(
px.column());
133 adcDigis[nDigis] = uint16_t(
px.adc());
135 packedData[nDigis] = uint32_t(
px.packedData());
137 rawIds[nDigis] = uint32_t(detid);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
T getParameter(std::string const &) const
edm::EDPutTokenT< cms::cuda::Product< SiPixelClustersCUDA > > clusterPutToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > pixelDigiToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDPutTokenT< cms::cuda::Product< SiPixelDigiErrorsCUDA > > digiErrorPutToken_
static std::string const input
cms::cuda::ContextState ctxState_
SiPixelDigiErrorsCUDA && getErrors()
void makePhase2ClustersAsync(const SiPixelClusterThresholds clusterThresholds, const uint16_t *moduleIds, const uint16_t *xDigis, const uint16_t *yDigis, const uint16_t *adcDigis, const uint32_t *packedData, const uint32_t *rawIds, const uint32_t numDigis, cudaStream_t stream)
const SiPixelClusterThresholds clusterThresholds_
std::pair< SiPixelDigisCUDA, SiPixelClustersCUDA > getResults()
#define DEFINE_FWK_MODULE(type)
SiPixelPhase2DigiToClusterCUDA(const edm::ParameterSet &iConfig)
Namespace of DDCMS conversion namespace.
edm::EDPutTokenT< cms::cuda::Product< SiPixelDigisCUDA > > digiPutToken_
void acquire(const edm::Event &iEvent, const edm::EventSetup &iSetup, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
const bool includeErrors_
~SiPixelPhase2DigiToClusterCUDA() override=default
constexpr uint32_t maxNumDigis