58 produces<ClusterRemovalInfo>();
65 iEvent.
getByToken(pixelClustersOld_, pixelClustersOld);
67 iEvent.
getByToken(stripClustersOld_, stripClustersOld);
70 iEvent.
getByToken(pixelClustersNew_, pixelClustersNew);
72 iEvent.
getByToken(stripClustersNew_, stripClustersNew);
74 auto cri = std::make_unique<ClusterRemovalInfo>(pixelClustersOld, stripClustersOld);
77 stripInd.reserve(stripClustersNew->size());
78 pixelInd.reserve(pixelClustersNew->size());
82 itdetNew != stripClustersNew->end();
85 if (oldDSstripNew.
empty())
89 uint16_t firstStripNew = clNew->firstStrip();
90 uint32_t idStripNew = itdetNew->
id();
93 uint32_t keyOld = 99999;
95 const SiStripCluster* firstOffsetStripOld = &stripClustersOld->data().front();
97 if (itdetOld != stripClustersOld->end()) {
99 if (oldDSstripOld.
empty())
103 uint16_t firstStripOld = clOld->firstStrip();
104 uint32_t idStripOld = itdetOld->
id();
105 if (idStripNew == idStripOld && firstStripNew == firstStripOld) {
106 keyOld = ((&*clOld) - firstOffsetStripOld);
114 stripInd.push_back(keyOld);
120 itdetNew != pixelClustersNew->end();
123 if (oldDSpixelNew.
empty())
127 int minPixelRowNew = clNew->minPixelRow();
130 uint32_t keyOld = 99999;
132 const SiPixelCluster* firstOffsetPixelOld = &pixelClustersOld->data().front();
134 if (itdetOld != pixelClustersOld->
end()) {
136 if (oldDSpixelOld.
empty())
140 int minPixelRowOld = clOld->minPixelRow();
141 if (minPixelRowNew == minPixelRowOld) {
142 keyOld = ((&*clOld) - firstOffsetPixelOld);
150 pixelInd.push_back(keyOld);
157 cri->setNewPixelClusters(
159 cri->setNewStripClusters(
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersNew_
const_iterator end(bool update=false) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
data_type const * const_iterator
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClustersOld_
id_type id(size_t cell) const
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClustersNew_
~TopBottomClusterInfoProducer() override
std::vector< uint32_t > Indices
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
T const * product() const
T getParameter(std::string const &) const
Pixel cluster – collection of neighboring pixels above threshold.
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
TopBottomClusterInfoProducer(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersOld_