25 const std::type_info &hit_type =
typeid(newHit);
60 throw cms::Exception(
"UnknownHitType") <<
"helper::ClusterStorer::addCluster: "
61 <<
"Unknown hit type " << hit_type.name() <<
".\n";
78 this->processClusters<SiPixelRecHit, SiPixelCluster>(
pixelClusterRecords_, pixelDsvToFill, refPixelClusters);
86 this->processClusters<SiStripRecHit2D, SiStripCluster>(
stripClusterRecords_, stripDsvToFill, refStripClusters);
91 template <
typename HitType,
typename ClusterType>
95 std::sort(clusterRecords.begin(), clusterRecords.end());
96 typedef typename std::vector<ClusterHitRecord<typename HitType::ClusterRef> >::const_iterator RIT;
97 RIT it = clusterRecords.begin(),
end = clusterRecords.end();
101 uint32_t detid = it->detid();
104 while ((it2 !=
end) && (it2->detid() == detid)) {
111 typename HitType::ClusterRef lastRef, newRef;
112 for (; it != it2; ++it) {
114 if (it->clusterRef() != lastRef) {
115 lastRef = it->clusterRef();
117 filler.push_back(*lastRef);
119 newRef =
typename HitType::ClusterRef(refprod,
clusters++);
121 it->template rekey<HitType>(newRef);
132 template <
typename ClusterRefType>
133 template <
typename RecHitType>
138 hit = dynamic_cast<RecHitType *>(&genericHit);
142 hit->setClusterRef(newRef);
149 template <
typename RecHitType>
154 const std::type_info &hit_type =
typeid(genericHit);
158 cluRef = &static_cast<SiStripRecHit1D &>(genericHit).omniCluster();
160 cluRef = &static_cast<SiStripRecHit2D &>(genericHit).omniCluster();
165 cluRef = &static_cast<ProjectedSiStripRecHit2D &>(genericHit).originalHit().omniCluster();
168 assert(cluRef !=
nullptr);