19 reKeyPixel(reinterpret_cast<SiPixelRecHit *>(hit)->omniCluster());
22 const std::type_info &
type =
typeid(*hit);
23 if (type ==
typeid(SiStripRecHit2D)) {
24 reKeyStrip(reinterpret_cast<SiStripRecHit2D *>(hit)->omniCluster());
25 }
else if (type ==
typeid(SiStripRecHit1D)) {
26 reKeyStrip(reinterpret_cast<SiStripRecHit1D *>(hit)->omniCluster());
27 }
else if (type ==
typeid(SiStripMatchedRecHit2D)) {
28 SiStripMatchedRecHit2D *mhit =
reinterpret_cast<SiStripMatchedRecHit2D *
>(hit);
34 }
else throw cms::Exception(
"Unknown RecHit Type") <<
"RecHit of type " << type.name() <<
" not supported. (use c++filt to demangle the name)";
45 throw cms::Exception(
"Inconsistent Data") <<
"ClusterRemovalRefSetter: " <<
46 "Existing pixel cluster refers to product ID " << newRef.
id() <<
47 " while the ClusterRemovalInfo expects as *new* cluster collection the ID " <<
cri_->
pixelNewRefProd().
id() <<
"\n";
49 size_t newIndex = newRef.
key();
50 assert(newIndex < indices.size());
51 size_t oldIndex = indices[newIndex];
63 throw cms::Exception(
"Inconsistent Data") <<
"ClusterRemovalRefSetter: " <<
64 "Existing strip cluster refers to product ID " << newRef.
id() <<
65 " while the ClusterRemovalInfo expects as *new* cluster collection the ID " <<
cri_->
stripNewRefProd().
id() <<
"\n";
68 size_t newIndex = newRef.
key();
69 assert(newIndex < indices.size());
70 size_t oldIndex = indices[newIndex];
const SiPixelClusterRefProd & pixelRefProd() const
const SiStripClusterRefProd & stripRefProd() const
void reKey(TrackingRecHit *hit) const
void reKeyPixel(OmniClusterRef &clusRef) const
const SiPixelClusterRefProd & pixelNewRefProd() const
ClusterRemovalRefSetter(const edm::Event &iEvent, const edm::InputTag &tag)
void reKeyStrip(OmniClusterRef &clusRef) const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const SiStripClusterRefProd & stripNewRefProd() const
edm::ProductID id() const
ProductID id() const
Accessor for product ID.
DetId geographicalId() const
const reco::ClusterRemovalInfo * cri_
const SiStripRecHit2D & originalHit() const