CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TkTransientTrackingRecHitBuilder Class Reference

#include <TkTransientTrackingRecHitBuilder.h>

Inheritance diagram for TkTransientTrackingRecHitBuilder:
TransientTrackingRecHitBuilder

List of all members.

Public Member Functions

TransientTrackingRecHit::RecHitPointer build (const TrackingRecHit *p) const
 build a tracking rechit from an existing rechit
TransientTrackingRecHit::RecHitPointer build (const TrackingRecHit *p, const TrajectoryStateOnSurface &state) const
 build a tracking rechit refiting the rechit position and error according to the state estimate
const
PixelClusterParameterEstimator
pixelClusterParameterEstimator ()
const SiStripRecHitMatchersiStripRecHitMatcher ()
const
StripClusterParameterEstimator
stripClusterParameterEstimator ()
 TkTransientTrackingRecHitBuilder (const TrackingGeometry *trackingGeometry, const PixelClusterParameterEstimator *, const StripClusterParameterEstimator *, const SiStripRecHitMatcher *, bool computeCoarseLocalPositionFromDisk)

Private Member Functions

TransientTrackingRecHit::RecHitPointer oldbuild (const TrackingRecHit *p) const

Private Attributes

const
PixelClusterParameterEstimator
pixelCPE
const
StripClusterParameterEstimator
stripCPE
const TrackingGeometrytGeometry_
bool theComputeCoarseLocalPosition
const SiStripRecHitMatchertheMatcher

Detailed Description

Definition at line 11 of file TkTransientTrackingRecHitBuilder.h.


Constructor & Destructor Documentation

TkTransientTrackingRecHitBuilder::TkTransientTrackingRecHitBuilder ( const TrackingGeometry trackingGeometry,
const PixelClusterParameterEstimator pCPE,
const StripClusterParameterEstimator sCPE,
const SiStripRecHitMatcher matcher,
bool  computeCoarseLocalPositionFromDisk 
)

Definition at line 26 of file TkTransientTrackingRecHitBuilder.cc.

                                                                                                            :  
  tGeometry_(trackingGeometry),
  pixelCPE(pCPE),
  stripCPE(sCPE),
  theMatcher(matcher),
  theComputeCoarseLocalPosition(computeCoarseLocalPositionFromDisk){}

Member Function Documentation

TransientTrackingRecHit::RecHitPointer TkTransientTrackingRecHitBuilder::build ( const TrackingRecHit p) const [virtual]

build a tracking rechit from an existing rechit

Implements TransientTrackingRecHitBuilder.

Definition at line 38 of file TkTransientTrackingRecHitBuilder.cc.

References GenericTransientTrackingRecHit::build(), TrackingRecHit::geographicalId(), TrackingRecHit::getType(), TrackingGeometry::idToDet(), oldbuild(), ProjectedSiStripRecHit2D::originalHit(), AlCaHLTBitMon_ParallelJobs::p, pixelCPE, DetId::rawId(), stripCPE, tGeometry_, theComputeCoarseLocalPosition, and theMatcher.

Referenced by build(), oldbuild(), and RoadSearchSeedFinderAlgorithm::run().

{
  std::type_info const & tp = typeid(*p);
 
  if (tp == typeid(SiPixelRecHit))
    { 
      const SiPixelRecHit* ph = reinterpret_cast<const SiPixelRecHit*>(p); 
      return TSiPixelRecHit::build( tGeometry_->idToDet(p->geographicalId()), ph, pixelCPE, theComputeCoarseLocalPosition);
    } 
  else if (tp == typeid(SiStripRecHit2D))
    {
      const SiStripRecHit2D* sh = reinterpret_cast<const SiStripRecHit2D*>(p);
      return TSiStripRecHit2DLocalPos::build(tGeometry_->idToDet(p->geographicalId()), sh, stripCPE,  theComputeCoarseLocalPosition );
    } 
  else if (tp == typeid(SiStripRecHit1D))
    {
      const SiStripRecHit1D* sh = reinterpret_cast<const SiStripRecHit1D*>(p); 
      return TSiStripRecHit1D::build(tGeometry_->idToDet(p->geographicalId()), sh, stripCPE,  theComputeCoarseLocalPosition );
    }
  else if (tp == typeid(SiStripMatchedRecHit2D))
    {
      const SiStripMatchedRecHit2D* mh = reinterpret_cast<const SiStripMatchedRecHit2D*>(p);
      return TSiStripMatchedRecHit::build(tGeometry_->idToDet(p->geographicalId()), mh, theMatcher, stripCPE,  theComputeCoarseLocalPosition); 
    }
  else if (tp == typeid(InvalidTrackingRecHit))
    {
      return InvalidTransientRecHit::build((p->geographicalId().rawId() == 0 ? 0 : 
                                            tGeometry_->idToDet(p->geographicalId())),
                                           p->getType()
                                           );
    }
  else if (tp == typeid(ProjectedSiStripRecHit2D))
    {
      const ProjectedSiStripRecHit2D* ph = reinterpret_cast<const ProjectedSiStripRecHit2D*>(p);
      return ProjectedRecHit2D::build(tGeometry_->idToDet(p->geographicalId()),
                                      tGeometry_->idToDet(ph->originalHit().geographicalId()),
                                      ph,stripCPE,
                                      theComputeCoarseLocalPosition);
    }
  else if (tp == typeid(SiTrackerGSRecHit2D))
    {
      const SiTrackerGSRecHit2D* gh = reinterpret_cast<const SiTrackerGSRecHit2D*>(p);
      return ( GenericTransientTrackingRecHit::build(tGeometry_->idToDet(p->geographicalId()), gh )); 
    }
  else if (tp == typeid(SiTrackerGSMatchedRecHit2D))
    {
      const SiTrackerGSMatchedRecHit2D* gh = reinterpret_cast<const SiTrackerGSMatchedRecHit2D*>(p);
      return ( GenericTransientTrackingRecHit::build(tGeometry_->idToDet(p->geographicalId()), gh )); 
    } 
  return oldbuild(p);
}
TransientTrackingRecHit::RecHitPointer TkTransientTrackingRecHitBuilder::build ( const TrackingRecHit p,
const TrajectoryStateOnSurface state 
) const [virtual]

build a tracking rechit refiting the rechit position and error according to the state estimate

Reimplemented from TransientTrackingRecHitBuilder.

Definition at line 124 of file TkTransientTrackingRecHitBuilder.cc.

References build().

{
  TransientTrackingRecHit::RecHitPointer noRefit = build(p);
  return noRefit->clone(tsos);
}
TransientTrackingRecHit::RecHitPointer TkTransientTrackingRecHitBuilder::oldbuild ( const TrackingRecHit p) const [private]

Definition at line 91 of file TkTransientTrackingRecHitBuilder.cc.

References build(), TSiStripRecHit1D::build(), TSiStripRecHit2DLocalPos::build(), InvalidTransientRecHit::build(), TSiPixelRecHit::build(), GenericTransientTrackingRecHit::build(), TSiStripMatchedRecHit::build(), className(), Exception, TrackingRecHit::geographicalId(), TrackingRecHit::getType(), TrackingGeometry::idToDet(), pixelCPE, DetId::rawId(), stripCPE, tGeometry_, theComputeCoarseLocalPosition, and theMatcher.

Referenced by build().

{
  if ( const SiPixelRecHit* ph = dynamic_cast<const SiPixelRecHit*>(p)) {
    return ( TSiPixelRecHit::build( tGeometry_->idToDet(p->geographicalId()), ph, pixelCPE, theComputeCoarseLocalPosition) ); 
  } else if ( const SiStripRecHit2D* sh = dynamic_cast<const SiStripRecHit2D*>(p)) { 
    return ( TSiStripRecHit2DLocalPos::build(tGeometry_->idToDet(p->geographicalId()), sh, stripCPE,  theComputeCoarseLocalPosition ) ); 
  } else if ( const SiStripRecHit1D* sh = dynamic_cast<const SiStripRecHit1D*>(p)) { 
    return ( TSiStripRecHit1D::build(tGeometry_->idToDet(p->geographicalId()), sh, stripCPE,  theComputeCoarseLocalPosition ) ); 
  } else if ( const SiStripMatchedRecHit2D* mh = dynamic_cast<const SiStripMatchedRecHit2D*>(p)) {
    return ( TSiStripMatchedRecHit::build(tGeometry_->idToDet(p->geographicalId()), mh, theMatcher, stripCPE,  theComputeCoarseLocalPosition)); 
  } else if (dynamic_cast<const InvalidTrackingRecHit*>(p)){
    return ( InvalidTransientRecHit::build((p->geographicalId().rawId() == 0 ? 0 : 
                                            tGeometry_->idToDet(p->geographicalId())),
                                           p->getType()
                                           ) );
    
  }else if (const ProjectedSiStripRecHit2D* ph = dynamic_cast<const ProjectedSiStripRecHit2D*>(p)) {
    return ProjectedRecHit2D::build(tGeometry_->idToDet(p->geographicalId()),
                                    tGeometry_->idToDet(ph->originalHit().geographicalId()),
                                    ph,stripCPE,
                                    theComputeCoarseLocalPosition);
  } else if ( const SiTrackerGSRecHit2D* gh = dynamic_cast<const SiTrackerGSRecHit2D*>(p)) {
    return ( GenericTransientTrackingRecHit::build(tGeometry_->idToDet(p->geographicalId()), gh )); 

  } else if ( const SiTrackerGSMatchedRecHit2D* gh = dynamic_cast<const SiTrackerGSMatchedRecHit2D*>(p)) {
    return ( GenericTransientTrackingRecHit::build(tGeometry_->idToDet(p->geographicalId()), gh )); 
  } 
  
  throw cms::Exception("LogicError") << "TrackingRecHit* cannot be casted to a known concrete type. hit type is: "<< className(*p);
}
const PixelClusterParameterEstimator* TkTransientTrackingRecHitBuilder::pixelClusterParameterEstimator ( ) [inline]

Definition at line 22 of file TkTransientTrackingRecHitBuilder.h.

References pixelCPE.

{return pixelCPE;}
const SiStripRecHitMatcher* TkTransientTrackingRecHitBuilder::siStripRecHitMatcher ( ) [inline]

Definition at line 24 of file TkTransientTrackingRecHitBuilder.h.

References theMatcher.

{return theMatcher;}
const StripClusterParameterEstimator* TkTransientTrackingRecHitBuilder::stripClusterParameterEstimator ( ) [inline]

Definition at line 23 of file TkTransientTrackingRecHitBuilder.h.

References stripCPE.

{return stripCPE;}

Member Data Documentation

Definition at line 32 of file TkTransientTrackingRecHitBuilder.h.

Referenced by build(), and oldbuild().

Definition at line 36 of file TkTransientTrackingRecHitBuilder.h.

Referenced by build(), and oldbuild().

Definition at line 35 of file TkTransientTrackingRecHitBuilder.h.

Referenced by build(), oldbuild(), and siStripRecHitMatcher().