12 #ifdef VERIFY_PH2_TK_CLUS
37 #ifdef VERIFY_PH2_TK_CLUS
38 std::unique_ptr<Phase2TrackerClusterizerAlgorithm> clusterizer_;
49 #ifdef VERIFY_PH2_TK_CLUS
51 conf.getParameter<unsigned int>(
"maxNumberClusters"))),
54 produces<Phase2TrackerCluster1DCollectionNew>();
66 event.getByToken(
token_, digis);
68 #ifdef VERIFY_PH2_TK_CLUS
74 auto outputClustersOld = std::make_unique<Phase2TrackerCluster1DCollectionNew>();
76 auto outputClusters = std::make_unique<Phase2TrackerCluster1DCollectionNew>();
79 for (
const auto& DSViter : *digis) {
80 DetId detId(DSViter.detId());
84 algo.clusterizeDetUnit(DSViter,
clusters);
88 #ifdef VERIFY_PH2_TK_CLUS
94 std::cout <<
"column not in order! " << std::endl;
95 if (
cl.column() ==
cp &&
cl.firstStrip() < sp)
96 std::cout <<
"strip not in order! " << std::endl;
103 #ifdef VERIFY_PH2_TK_CLUS
114 clusterizer_->setup(pixDet);
118 clusterizer_->clusterizeDetUnit(DSViter, clustersOld);
119 if (clustersOld.empty())
122 if (
clusters.size() != clustersOld.size()) {
123 std::cout <<
"SIZEs " << int(detId) <<
' ' <<
clusters.size() <<
' ' << clustersOld.size() << std::endl;
125 std::cout <<
cl.size() <<
' ' <<
cl.threshold() <<
' ' <<
cl.firstRow() <<
' ' <<
cl.column() << std::endl;
127 for (
auto const&
cl : clustersOld)
128 std::cout <<
cl.size() <<
' ' <<
cl.threshold() <<
' ' <<
cl.firstRow() <<
' ' <<
cl.column() << std::endl;
133 #ifdef VERIFY_PH2_TK_CLUS
135 assert(outputClusters->dataSize() == outputClustersOld->dataSize());
136 for (
auto i = 0U;
i < outputClusters->dataSize(); ++
i) {
137 assert(outputClusters->data()[
i].size() == outputClustersOld->data()[
i].size());
138 assert(outputClusters->data()[
i].threshold() == outputClustersOld->data()[
i].threshold());
139 assert(outputClusters->data()[
i].firstRow() == outputClustersOld->data()[
i].firstRow());
140 assert(outputClusters->data()[
i].column() == outputClustersOld->data()[
i].column());
145 outputClusters->shrink_to_fit();
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
#define DEFINE_FWK_MODULE(type)
Phase2TrackerClusterizer(const edm::ParameterSet &conf)
void produce(edm::Event &event, const edm::EventSetup &eventSetup) override
~Phase2TrackerClusterizer() override
edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_