#include <ProjectedRecHit2D.h>
Public Member Functions | |
RecHitPointer | clone (const TrajectoryStateOnSurface &ts) const |
const GeomDetUnit * | detUnit () const |
virtual void | getKfComponents (KfComponentsHolder &holder) const |
const GeomDet * | originalDet () const |
const SiStripRecHit2D & | originalHit () const |
virtual AlgebraicSymMatrix | parametersError () const |
virtual ConstRecHitContainer | transientHits () const |
Composite interface: returns the component hits, if any. | |
Static Public Member Functions | |
static RecHitPointer | build (const GeomDet *geom, const GeomDet *originaldet, const ProjectedSiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition=false) |
static RecHitPointer | build (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const GeomDet *originaldet, const TransientTrackingRecHit &originalHit) |
Private Member Functions | |
virtual ProjectedRecHit2D * | clone () const |
ProjectedRecHit2D (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const GeomDet *originaldet, const TransientTrackingRecHit &originalHit) | |
ProjectedRecHit2D (const GeomDet *geom, const GeomDet *originaldet, const ProjectedSiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition) | |
Private Attributes | |
const StripClusterParameterEstimator * | theCPE |
const GeomDet * | theOriginalDet |
Definition at line 11 of file ProjectedRecHit2D.h.
ProjectedRecHit2D::ProjectedRecHit2D | ( | const LocalPoint & | pos, |
const LocalError & | err, | ||
const GeomDet * | det, | ||
const GeomDet * | originaldet, | ||
const TransientTrackingRecHit & | originalHit | ||
) | [private] |
Definition at line 7 of file ProjectedRecHit2D.cc.
References TSiStripRecHit2DLocalPos::cpe(), originalDet(), theCPE, and theOriginalDet.
Referenced by build(), and clone().
: GenericTransientTrackingRecHit( det, new ProjectedSiStripRecHit2D( pos, err, det->geographicalId(), static_cast<const SiStripRecHit2D*>(originalTransientHit.hit()) ) ) { const TSiStripRecHit2DLocalPos* specificOriginalTransientHit = static_cast<const TSiStripRecHit2DLocalPos*>(&originalTransientHit); theCPE = specificOriginalTransientHit->cpe(); theOriginalDet = originalDet; }
ProjectedRecHit2D::ProjectedRecHit2D | ( | const GeomDet * | geom, |
const GeomDet * | originaldet, | ||
const ProjectedSiStripRecHit2D * | rh, | ||
const StripClusterParameterEstimator * | cpe, | ||
bool | computeCoarseLocalPosition | ||
) | [private] |
Definition at line 67 of file ProjectedRecHit2D.cc.
References build(), SiStripRecHit2D::cluster(), TrackerSingleRecHit::cluster_regional(), TransientTrackingRecHit::det(), detUnit(), ClusterParameterEstimator< T >::localParameters(), originalHit(), trackerHitRTTI::proj, TrackingRecHitProjector< ResultingHit >::project(), theCPE, theOriginalDet, and GenericTransientTrackingRecHit::trackingRecHit_.
: GenericTransientTrackingRecHit( geom, *rh), theCPE(cpe), theOriginalDet(originaldet) { if (computeCoarseLocalPosition){ if (theCPE != 0) { TrackingRecHitProjector<ProjectedRecHit2D> proj; if(!originalHit().cluster().isNull()){ const SiStripCluster& clust = *(originalHit().cluster()); StripClusterParameterEstimator::LocalValues lv = theCPE->localParameters( clust, *detUnit()); RecHitPointer updatedOriginalHit = TSiStripRecHit2DLocalPos::build( lv.first, lv.second, theOriginalDet, originalHit().cluster(), theCPE); RecHitPointer hit = proj.project( *updatedOriginalHit, *det()); trackingRecHit_ = hit->hit()->clone(); }else{ const SiStripCluster& clust = *(originalHit().cluster_regional()); StripClusterParameterEstimator::LocalValues lv = theCPE->localParameters( clust, *detUnit()); RecHitPointer updatedOriginalHit = TSiStripRecHit2DLocalPos::build( lv.first, lv.second, theOriginalDet, originalHit().cluster_regional(), theCPE); RecHitPointer hit = proj.project( *updatedOriginalHit, *det()); trackingRecHit_ = hit->hit()->clone(); } } } }
static RecHitPointer ProjectedRecHit2D::build | ( | const GeomDet * | geom, |
const GeomDet * | originaldet, | ||
const ProjectedSiStripRecHit2D * | rh, | ||
const StripClusterParameterEstimator * | cpe, | ||
bool | computeCoarseLocalPosition = false |
||
) | [inline, static] |
Definition at line 26 of file ProjectedRecHit2D.h.
References ProjectedRecHit2D().
Referenced by clone(), and ProjectedRecHit2D().
{ return RecHitPointer( new ProjectedRecHit2D( geom, originaldet, rh, cpe, computeCoarseLocalPosition)); }
static RecHitPointer ProjectedRecHit2D::build | ( | const LocalPoint & | pos, |
const LocalError & | err, | ||
const GeomDet * | det, | ||
const GeomDet * | originaldet, | ||
const TransientTrackingRecHit & | originalHit | ||
) | [inline, static] |
Definition at line 34 of file ProjectedRecHit2D.h.
References ProjectedRecHit2D().
{ return RecHitPointer( new ProjectedRecHit2D( pos, err, det, originaldet, originalHit)); }
virtual ProjectedRecHit2D* ProjectedRecHit2D::clone | ( | void | ) | const [inline, private, virtual] |
Reimplemented from GenericTransientTrackingRecHit.
Definition at line 59 of file ProjectedRecHit2D.h.
References ProjectedRecHit2D().
Referenced by clone().
{ return new ProjectedRecHit2D(*this); }
ProjectedRecHit2D::RecHitPointer ProjectedRecHit2D::clone | ( | const TrajectoryStateOnSurface & | ts | ) | const [virtual] |
Returns a copy of the hit with parameters and errors computed with respect to the TrajectoryStateOnSurface given as argument. For concrete hits not capable to improve their parameters and errors this method returns an exact copy, and is equivalent to clone() without arguments.
FIXME: should report the problem somehow
Reimplemented from TransientTrackingRecHit.
Definition at line 19 of file ProjectedRecHit2D.cc.
References build(), clone(), SiStripRecHit2D::cluster(), TrackerSingleRecHit::cluster_regional(), TransientTrackingRecHit::det(), GenericTransientTrackingRecHit::hit(), ClusterParameterEstimator< T >::localParameters(), originalHit(), trackerHitRTTI::proj, TrackingRecHitProjector< ResultingHit >::project(), theCPE, and theOriginalDet.
{ if (theCPE != 0) { TrackingRecHitProjector<ProjectedRecHit2D> proj; if(!originalHit().cluster().isNull()){ const SiStripCluster& clust = *(originalHit().cluster()); const GeomDetUnit * gdu = reinterpret_cast<const GeomDetUnit *>(theOriginalDet); //if (!gdu) std::cout<<"no luck dude"<<std::endl; StripClusterParameterEstimator::LocalValues lv = theCPE->localParameters( clust, *gdu, ts); RecHitPointer updatedOriginalHit = TSiStripRecHit2DLocalPos::build( lv.first, lv.second, theOriginalDet, originalHit().cluster(), theCPE); RecHitPointer hit = proj.project( *updatedOriginalHit, *det(), ts); return hit; }else{ const SiStripCluster& clust = *(originalHit().cluster_regional()); const GeomDetUnit * gdu = reinterpret_cast<const GeomDetUnit *>(theOriginalDet); StripClusterParameterEstimator::LocalValues lv = theCPE->localParameters( clust, *gdu, ts); RecHitPointer updatedOriginalHit = TSiStripRecHit2DLocalPos::build( lv.first, lv.second, theOriginalDet, originalHit().cluster_regional(), theCPE); RecHitPointer hit = proj.project( *updatedOriginalHit, *det(), ts); return hit; } } else return clone(); }
const GeomDetUnit* ProjectedRecHit2D::detUnit | ( | ) | const [inline, virtual] |
CAUTION: the GeomDetUnit* is zero for composite hits (matched hits in the tracker, segments in the muon). Always check this pointer before using it!
Reimplemented from TransientTrackingRecHit.
Definition at line 23 of file ProjectedRecHit2D.h.
Referenced by ProjectedRecHit2D().
{return 0;}
virtual void ProjectedRecHit2D::getKfComponents | ( | KfComponentsHolder & | holder | ) | const [inline, virtual] |
Reimplemented from TrackingRecHit.
Definition at line 14 of file ProjectedRecHit2D.h.
References TransientTrackingRecHit::det(), HelpertRecHit2DLocalPos::getKfComponents(), and GenericTransientTrackingRecHit::hit().
{ HelpertRecHit2DLocalPos().getKfComponents(holder, *hit(), *det()); }
const GeomDet* ProjectedRecHit2D::originalDet | ( | ) | const [inline] |
Definition at line 24 of file ProjectedRecHit2D.h.
References theOriginalDet.
Referenced by ProjectedRecHit2D().
{return theOriginalDet;}
const SiStripRecHit2D& ProjectedRecHit2D::originalHit | ( | ) | const [inline] |
Definition at line 42 of file ProjectedRecHit2D.h.
References GenericTransientTrackingRecHit::hit(), and originalHit().
Referenced by clone(), originalHit(), ProjectedRecHit2D(), and transientHits().
{ return static_cast<const ProjectedSiStripRecHit2D*>( hit() )->originalHit();}
virtual AlgebraicSymMatrix ProjectedRecHit2D::parametersError | ( | ) | const [inline, virtual] |
Reimplemented from GenericTransientTrackingRecHit.
Definition at line 19 of file ProjectedRecHit2D.h.
References TransientTrackingRecHit::det(), GenericTransientTrackingRecHit::localPositionError(), and HelpertRecHit2DLocalPos::parError().
{ return HelpertRecHit2DLocalPos().parError( localPositionError(), *det()); }
TransientTrackingRecHit::ConstRecHitContainer ProjectedRecHit2D::transientHits | ( | ) | const [virtual] |
Composite interface: returns the component hits, if any.
Reimplemented from TransientTrackingRecHit.
Definition at line 60 of file ProjectedRecHit2D.cc.
References TSiStripRecHit2DLocalPos::build(), originalHit(), query::result, theCPE, and theOriginalDet.
{ ConstRecHitContainer result; result.push_back(TSiStripRecHit2DLocalPos::build( theOriginalDet,&originalHit(),theCPE)); return result; }
const StripClusterParameterEstimator* ProjectedRecHit2D::theCPE [private] |
Definition at line 47 of file ProjectedRecHit2D.h.
Referenced by clone(), ProjectedRecHit2D(), and transientHits().
const GeomDet* ProjectedRecHit2D::theOriginalDet [private] |
Definition at line 48 of file ProjectedRecHit2D.h.
Referenced by clone(), originalDet(), ProjectedRecHit2D(), and transientHits().