26 reKeyPixel(reinterpret_cast<SiPixelRecHit *>(hit)->omniCluster());
29 const std::type_info &
type =
typeid(*hit);
30 if (type ==
typeid(SiStripRecHit2D)) {
31 reKeyStrip(reinterpret_cast<SiStripRecHit2D *>(hit)->omniCluster());
32 }
else if (type ==
typeid(SiStripRecHit1D)) {
33 reKeyStrip(reinterpret_cast<SiStripRecHit1D *>(hit)->omniCluster());
34 }
else if (type ==
typeid(SiStripMatchedRecHit2D)) {
35 SiStripMatchedRecHit2D *mhit =
reinterpret_cast<SiStripMatchedRecHit2D *
>(hit);
38 }
else if (type ==
typeid(ProjectedSiStripRecHit2D)) {
39 ProjectedSiStripRecHit2D *phit =
reinterpret_cast<ProjectedSiStripRecHit2D *
>(hit);
41 }
else throw cms::Exception(
"Unknown RecHit Type") <<
"RecHit of type " << type.name() <<
" not supported. (use c++filt to demangle the name)";
52 throw cms::Exception(
"Inconsistent Data") <<
"ClusterRemovalRefSetter: " <<
53 "Existing pixel cluster refers to product ID " << newRef.
id() <<
54 " while the ClusterRemovalInfo expects as *new* cluster collection the ID " <<
cri_->
pixelNewRefProd().
id() <<
"\n";
56 size_t newIndex = newRef.
key();
57 assert(newIndex < indices.size());
58 size_t oldIndex = indices[newIndex];
70 throw cms::Exception(
"Inconsistent Data") <<
"ClusterRemovalRefSetter: " <<
71 "Existing strip cluster refers to product ID " << newRef.
id() <<
72 " while the ClusterRemovalInfo expects as *new* cluster collection the ID " <<
cri_->
stripNewRefProd().
id() <<
"\n";
75 size_t newIndex = newRef.
key();
76 assert(newIndex < indices.size());
77 size_t oldIndex = indices[newIndex];
const SiPixelClusterRefProd & pixelRefProd() const
const SiStripClusterRefProd & stripRefProd() const
bool getByToken(EDGetToken token, Handle< PROD > &result) 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_