26 TkTransientTrackingRecHitBuilder::TkTransientTrackingRecHitBuilder(
const TrackingGeometry* trackingGeometry,
30 bool computeCoarseLocalPositionFromDisk):
31 tGeometry_(trackingGeometry),
35 theComputeCoarseLocalPosition(computeCoarseLocalPositionFromDisk){}
40 std::type_info
const & tp =
typeid(*p);
47 else if (tp ==
typeid(SiStripRecHit2D))
49 const SiStripRecHit2D* sh =
reinterpret_cast<const SiStripRecHit2D*
>(
p);
52 else if (tp ==
typeid(SiStripRecHit1D))
54 const SiStripRecHit1D* sh =
reinterpret_cast<const SiStripRecHit1D*
>(
p);
57 else if (tp ==
typeid(SiStripMatchedRecHit2D))
59 const SiStripMatchedRecHit2D* mh =
reinterpret_cast<const SiStripMatchedRecHit2D*
>(
p);
62 else if (tp ==
typeid(InvalidTrackingRecHit))
73 tGeometry_->idToDet(ph->
originalHit().geographicalId()),
75 theComputeCoarseLocalPosition);
91 TkTransientTrackingRecHitBuilder::oldbuild (
const TrackingRecHit * p)
const
93 if (
const SiPixelRecHit* ph = dynamic_cast<const SiPixelRecHit*>(p)) {
95 }
else if (
const SiStripRecHit2D* sh = dynamic_cast<const SiStripRecHit2D*>(p)) {
97 }
else if (
const SiStripRecHit1D* sh = dynamic_cast<const SiStripRecHit1D*>(p)) {
99 }
else if (
const SiStripMatchedRecHit2D* mh = dynamic_cast<const SiStripMatchedRecHit2D*>(p)) {
101 }
else if (dynamic_cast<const InvalidTrackingRecHit*>(p)){
109 tGeometry_->idToDet(ph->
originalHit().geographicalId()),
111 theComputeCoarseLocalPosition);
119 throw cms::Exception(
"LogicError") <<
"TrackingRecHit* cannot be casted to a known concrete type. hit type is: "<<
className(*p);
128 return noRefit->clone(tsos);
uint32_t rawId() const
get the raw id
static RecHitPointer build(const GeomDet *geom, const TrackingRecHit *rh)
DetId geographicalId() const
const SiStripRecHit2D & originalHit() const
std::string className(const T &t)