61 digiPutToken_(produces()),
62 clusterPutToken_(produces()),
63 includeErrors_(iConfig.getParameter<
bool>(
"IncludeErrors")),
64 clusterThresholds_{iConfig.
getParameter<int32_t>(
"clusterThreshold_layer1"),
65 iConfig.
getParameter<int32_t>(
"clusterThreshold_otherLayers"),
66 static_cast<float>(iConfig.
getParameter<
double>(
"ElectronPerADCGain")),
67 static_cast<int8_t
>(iConfig.
getParameter<
int>(
"Phase2ReadoutMode")),
68 static_cast<uint16_t
>(iConfig.
getParameter<uint32_t>(
"Phase2DigiBaseline")),
69 static_cast<uint8_t
>(iConfig.
getParameter<uint32_t>(
"Phase2KinkADC"))} {
71 digiErrorPutToken_ = produces();
78 desc.add<
bool>(
"IncludeErrors",
true);
79 desc.add<int32_t>(
"clusterThreshold_layer1",
82 desc.add<
double>(
"ElectronPerADCGain", 1500.);
83 desc.add<int32_t>(
"Phase2ReadoutMode", 3);
84 desc.add<uint32_t>(
"Phase2DigiBaseline", 1000);
85 desc.add<uint32_t>(
"Phase2KinkADC", 8);
97 for (
const auto& det :
input) {
108 for (
const auto& det :
input) {
109 unsigned int detid = det.detId();
110 DetId detIdObject(detid);
112 auto const gind = genericDet->
index();
113 for (
auto const&
px : det) {
114 digis_h.view()[nDigis].moduleId() = uint16_t(gind);
116 digis_h.view()[nDigis].xx() = uint16_t(
px.row());
117 digis_h.view()[nDigis].yy() = uint16_t(
px.column());
118 digis_h.view()[nDigis].adc() = uint16_t(
px.adc());
120 digis_h.view()[nDigis].pdigi() = uint32_t(
px.packedData());
122 digis_h.view()[nDigis].rawIdArr() = uint32_t(detid);
129 alpaka::memcpy(
iEvent.queue(),
digis_d.buffer(), digis_h.buffer());
device::EDPutToken< SiPixelDigisSoACollection > digiPutToken_
const bool includeErrors_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
SiPixelDigisSoACollection digis_d
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
device::EDPutToken< SiPixelDigiErrorsSoACollection > digiErrorPutToken_
~SiPixelPhase2DigiToCluster() override=default
constexpr uint16_t clusterThresholdPhase2LayerOne
SiPixelClustersSoACollection getClusters()
void makePhase2ClustersAsync(Queue &queue, const SiPixelClusterThresholds clusterThresholds, SiPixelDigisSoAView &digis_view, const uint32_t numDigis)
static std::string const input
std::conditional_t< std::is_same_v< Device, alpaka::DevCpu >, SiPixelDigisHost, SiPixelDigisDevice< Device > > SiPixelDigisSoACollection
void acquire(device::Event const &iEvent, device::EventSetup const &iSetup) override
device::EDPutToken< SiPixelClustersSoACollection > clusterPutToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
T const & getData(edm::ESGetToken< T, R > const &iToken) const
void produce(device::Event &iEvent, device::EventSetup const &iSetup) override
constexpr uint16_t clusterThresholdPhase2OtherLayers
#define DEFINE_FWK_ALPAKA_MODULE(name)
const SiPixelClusterThresholds clusterThresholds_
SiPixelPhase2DigiToCluster(const edm::ParameterSet &iConfig)
std::conditional_t< std::is_same_v< Device, alpaka::DevCpu >, SiPixelDigiErrorsHost, SiPixelDigiErrorsDevice< Device > > SiPixelDigiErrorsSoACollection
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > pixelDigiToken_
SiPixelDigiErrorsSoACollection getErrors()
std::conditional_t< std::is_same_v< Device, alpaka::DevCpu >, SiPixelClustersHost, SiPixelClustersDevice< Device > > SiPixelClustersSoACollection
static constexpr uint16_t numberOfModules
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)