Skip to content

Commit

Permalink
Make the pixel cluster thresholds configurable in SiPixelDigisCluster…
Browse files Browse the repository at this point in the history
…sFromSoA.cc
  • Loading branch information
czangela committed Mar 22, 2021
1 parent 23fad57 commit 5b26e4a
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,25 @@ class SiPixelDigisClustersFromSoA : public edm::global::EDProducer<> {

edm::EDPutTokenT<edm::DetSetVector<PixelDigi>> digiPutToken_;
edm::EDPutTokenT<SiPixelClusterCollectionNew> clusterPutToken_;

//! Clustering-related quantities:
const int theClusterThreshold; // Cluster threshold in electrons
const int theClusterThreshold_L1; // Cluster threshold in electrons for Layer 1
};

SiPixelDigisClustersFromSoA::SiPixelDigisClustersFromSoA(const edm::ParameterSet& iConfig)
: topoToken_(esConsumes()),
digiGetToken_(consumes<SiPixelDigisSoA>(iConfig.getParameter<edm::InputTag>("src"))),
digiPutToken_(produces<edm::DetSetVector<PixelDigi>>()),
clusterPutToken_(produces<SiPixelClusterCollectionNew>()) {}
clusterPutToken_(produces<SiPixelClusterCollectionNew>()),
theClusterThreshold(iConfig.getParameter<int>("theClusterThreshold")),
theClusterThreshold_L1(iConfig.getParameter<int>("theClusterThreshold_L1")) {}

void SiPixelDigisClustersFromSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("src", edm::InputTag("siPixelDigisSoA"));
desc.add<int>("theClusterThreshold", 4000);
desc.add<int>("theClusterThreshold_L1", 2000);
descriptions.addWithDefaultLabel(desc);
}

Expand Down Expand Up @@ -77,7 +85,7 @@ void SiPixelDigisClustersFromSoA::produce(edm::StreamID, edm::Event& iEvent, con
return; // this in reality should never happen
edmNew::DetSetVector<SiPixelCluster>::FastFiller spc(*outputClusters, detId);
auto layer = (DetId(detId).subdetId() == 1) ? ttopo.pxbLayer(detId) : 0;
auto clusterThreshold = (layer == 1) ? 2000 : 4000;
auto clusterThreshold = (layer == 1) ? theClusterThreshold_L1 : theClusterThreshold;
for (int32_t ic = 0; ic < nclus + 1; ++ic) {
auto const& acluster = aclusters[ic];
// in any case we cannot go out of sync with gpu...
Expand Down

0 comments on commit 5b26e4a

Please sign in to comment.