12 #ifdef VERIFY_PH2_TK_CLUS 40 #ifdef VERIFY_PH2_TK_CLUS 41 std::unique_ptr< Phase2TrackerClusterizerAlgorithm > clusterizer_;
53 #ifdef VERIFY_PH2_TK_CLUS
57 produces< Phase2TrackerCluster1DCollectionNew >();
70 event.getByToken(
token_, digis);
72 #ifdef VERIFY_PH2_TK_CLUS 78 auto outputClustersOld = std::make_unique<Phase2TrackerCluster1DCollectionNew>();
80 auto outputClusters = std::make_unique<Phase2TrackerCluster1DCollectionNew>();
83 for (
auto DSViter : *digis) {
84 DetId detId(DSViter.detId());
88 algo.clusterizeDetUnit(DSViter,
clusters);
91 #ifdef VERIFY_PH2_TK_CLUS 96 if (
cl.column()<
cp)
std::cout <<
"column not in order! " << std::endl;
97 if (
cl.column()==
cp &&
cl.firstStrip()<sp)
std::cout <<
"strip not in order! " << std::endl;
104 #ifdef VERIFY_PH2_TK_CLUS 108 if (!pixDet) assert(0);
114 clusterizer_->setup(pixDet);
118 clusterizer_->clusterizeDetUnit(DSViter, clustersOld);
119 if (clustersOld.empty()) clustersOld.
abort();
121 if (
clusters.size() != clustersOld.size()) {
122 std::cout <<
"SIZEs " <<
int(detId) <<
' ' <<
clusters.size() <<
' ' << clustersOld.size() << std::endl;
123 for (
auto const &
cl :
clusters)
std::cout <<
cl.size() <<
' ' <<
cl.threshold() <<
' ' <<
cl.firstRow() <<
' ' <<
cl.column() << std::endl;
125 for (
auto const &
cl : clustersOld)
std::cout <<
cl.size() <<
' ' <<
cl.threshold() <<
' ' <<
cl.firstRow() <<
' ' <<
cl.column() << std::endl;
131 #ifdef VERIFY_PH2_TK_CLUS 133 assert(outputClusters->dataSize()==outputClustersOld->dataSize());
134 for (
auto i=0
U;
i<outputClusters->dataSize(); ++
i) {
135 assert(outputClusters->data()[
i].size() == outputClustersOld->data()[
i].size());
136 assert(outputClusters->data()[
i].threshold() == outputClustersOld->data()[
i].threshold());
137 assert(outputClusters->data()[
i].firstRow() == outputClustersOld->data()[
i].firstRow());
138 assert(outputClusters->data()[
i].column() == outputClustersOld->data()[
i].column());
143 outputClusters->shrink_to_fit();
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_
Phase2TrackerClusterizer(const edm::ParameterSet &conf)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void produce(edm::Event &event, const edm::EventSetup &eventSetup) override
~Phase2TrackerClusterizer() override