26 ~ClusterChargeMasker()
override {}
34 float minGoodStripCharge_;
44 : mergeOld_(iConfig.exists(
"oldClusterRemovalInfo")), minGoodStripCharge_(
clusterChargeCut(iConfig)) {
45 produces<edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster>>>();
46 produces<edm::ContainerMask<edmNew::DetSetVector<SiStripCluster>>>();
51 consumes<edmNew::DetSetVector<SiStripCluster>>(iConfig.getParameter<
edm::InputTag>(
"stripClusters"));
54 oldPxlMaskToken_ = consumes<PixelMaskContainer>(iConfig.getParameter<
edm::InputTag>(
"oldClusterRemovalInfo"));
55 oldStrMaskToken_ = consumes<StripMaskContainer>(iConfig.getParameter<
edm::InputTag>(
"oldClusterRemovalInfo"));
61 iEvent.
getByToken(pixelClusters_, pixelClusters);
63 iEvent.
getByToken(stripClusters_, stripClusters);
65 std::vector<bool> collectedStrips;
66 std::vector<bool> collectedPixels;
71 iEvent.
getByToken(oldPxlMaskToken_, oldPxlMask);
72 iEvent.
getByToken(oldStrMaskToken_, oldStrMask);
73 LogDebug(
"ClusterChargeMasker") <<
"to merge in, " << oldStrMask->size() <<
" strp and " << oldPxlMask->size()
75 oldStrMask->copyMaskTo(collectedStrips);
76 oldPxlMask->copyMaskTo(collectedPixels);
77 assert(stripClusters->dataSize() >= collectedStrips.size());
78 collectedStrips.resize(stripClusters->dataSize(),
false);
80 collectedStrips.resize(stripClusters->dataSize(),
false);
81 collectedPixels.resize(pixelClusters->dataSize(),
false);
84 auto const&
clusters = stripClusters->data();
85 for (
auto const&
item : stripClusters->ids()) {
93 if (clusCharge < minGoodStripCharge_)
94 collectedStrips[
i] =
true;
98 LogDebug(
"ClusterChargeMasker") <<
"total strip to skip: " 99 <<
std::count(collectedStrips.begin(), collectedStrips.end(),
true);
105 LogDebug(
"ClusterChargeMasker") <<
"total pxl to skip: " 106 <<
std::count(collectedPixels.begin(), collectedPixels.end(),
true);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
#define DEFINE_FWK_MODULE(type)