CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

ProjectedRecHit2D Class Reference

#include <ProjectedRecHit2D.h>

Inheritance diagram for ProjectedRecHit2D:
GenericTransientTrackingRecHit TransientTrackingRecHit TrackingRecHit ReferenceCountedPoolAllocated BlockWipedPoolAllocated

List of all members.

Public Member Functions

RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
const GeomDetUnitdetUnit () const
virtual void getKfComponents (KfComponentsHolder &holder) const
const GeomDetoriginalDet () const
const SiStripRecHit2DoriginalHit () 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 ProjectedRecHit2Dclone () 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 GeomDettheOriginalDet

Detailed Description

Definition at line 11 of file ProjectedRecHit2D.h.


Constructor & Destructor Documentation

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]

Member Function Documentation

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]
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]
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.


Member Data Documentation

Definition at line 47 of file ProjectedRecHit2D.h.

Referenced by clone(), ProjectedRecHit2D(), and transientHits().

Definition at line 48 of file ProjectedRecHit2D.h.

Referenced by clone(), originalDet(), ProjectedRecHit2D(), and transientHits().