CMS 3D CMS Logo

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

TSiPixelRecHit Class Reference

#include <TSiPixelRecHit.h>

Inheritance diagram for TSiPixelRecHit:
TransientTrackingRecHit TrackingRecHit ReferenceCountedPoolAllocated BlockWipedPoolAllocated

List of all members.

Public Types

typedef SiPixelRecHit::ClusterRef clusterRef

Public Member Functions

virtual bool canImproveWithTrack () const
virtual RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
virtual float clusterProbability () const
 Probability of the compatibility of the track with the pixel cluster shape.
const
PixelClusterParameterEstimator
cpe () const
virtual const GeomDetUnitdetUnit () const
virtual int dimension () const
virtual void getKfComponents (KfComponentsHolder &holder) const
virtual const TrackingRecHithit () const
virtual LocalPoint localPosition () const
virtual LocalError localPositionError () const
virtual AlgebraicVector parameters () const
virtual AlgebraicSymMatrix parametersError () const
virtual AlgebraicMatrix projectionMatrix () const
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any)
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any)
const SiPixelRecHitspecificHit () const
virtual ~TSiPixelRecHit ()

Static Public Member Functions

static RecHitPointer build (const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
static RecHitPointer build (const LocalPoint &pos, const LocalError &err, const GeomDet *det, clusterRef cluster, const PixelClusterParameterEstimator *cpe, float weight=1., float annealing=1.)

Private Member Functions

virtual TSiPixelRecHitclone () const
 TSiPixelRecHit (const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
 TSiPixelRecHit (const LocalPoint &pos, const LocalError &err, const GeomDet *det, clusterRef clust, const PixelClusterParameterEstimator *cpe, float weight, float annealing)

Private Attributes

unsigned int theClusterProbComputationFlag
const
PixelClusterParameterEstimator
theCPE
SiPixelRecHit theHitData

Detailed Description

Definition at line 14 of file TSiPixelRecHit.h.


Member Typedef Documentation

Definition at line 17 of file TSiPixelRecHit.h.


Constructor & Destructor Documentation

virtual TSiPixelRecHit::~TSiPixelRecHit ( ) [inline, virtual]

Definition at line 20 of file TSiPixelRecHit.h.

{}
TSiPixelRecHit::TSiPixelRecHit ( const GeomDet geom,
const SiPixelRecHit rh,
const PixelClusterParameterEstimator cpe,
float  weight,
float  annealing,
bool  computeCoarseLocalPosition 
) [private]

This private constructor copies the TrackingRecHit. It should be used when the TrackingRecHit exist already in some collection.

Definition at line 29 of file TSiPixelRecHit.cc.

References SiPixelRecHit::cluster(), PixelCPEBase::clusterProbComputationFlag(), cpe(), GeomDet::geographicalId(), relativeConstraints::geom, BaseSiTrackerRecHit2DLocalPos::hasPositionAndError(), ClusterParameterEstimator< T >::localParameters(), LogDebug, PixelCPEBase::rawQualityWord(), SiPixelRecHit::setRawQualityWord(), theClusterProbComputationFlag, theCPE, and theHitData.

Referenced by build(), and clone().

                                                                : 
  TransientTrackingRecHit(geom, *rh, weight, annealing), theCPE(cpe) 
{
  if (rh->hasPositionAndError() || !computeCoarseLocalPosition)
    theHitData = SiPixelRecHit(*rh);
  else{
    const GeomDetUnit* gdu = dynamic_cast<const GeomDetUnit*>(geom);
    if (gdu){
      PixelClusterParameterEstimator::LocalValues lval= theCPE->localParameters(*rh->cluster(), *gdu);
      LogDebug("TSiPixelRecHit")<<"calculating coarse position/error.";
      theHitData = SiPixelRecHit(lval.first, lval.second,geom->geographicalId(),rh->cluster());
    }else{
      edm::LogError("TSiPixelRecHit") << " geomdet does not cast into geomdet unit. cannot create pixel local parameters.";
      theHitData = SiPixelRecHit(*rh);
    }
  }

  // Additionally, fill the SiPixeRecHitQuality from the PixelCPE.
  const PixelCPEBase * cpeB = dynamic_cast< const PixelCPEBase* >( cpe );
  if (cpeB) {
    theHitData.setRawQualityWord( cpeB->rawQualityWord() );
    theClusterProbComputationFlag = cpeB->clusterProbComputationFlag(); 
  }
  // else {
    //  Huh?  We are using the obsolete CPEFromDetPosition???
    //  &&& Possibly complain in here.

    //  &&& In fact, a better long-term option is to simply move this interface
    //  &&&   into the ClusterParameterEstimator and make it a real interface
    //  &&&   class.
  //  }

}
TSiPixelRecHit::TSiPixelRecHit ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
clusterRef  clust,
const PixelClusterParameterEstimator cpe,
float  weight,
float  annealing 
) [private]

Another private constructor. It creates the TrackingRecHit internally, avoiding redundent cloning.

Definition at line 70 of file TSiPixelRecHit.cc.

References PixelCPEBase::clusterProbComputationFlag(), cpe(), PixelCPEBase::rawQualityWord(), SiPixelRecHit::setRawQualityWord(), theClusterProbComputationFlag, and theHitData.

                                                               :
  TransientTrackingRecHit(det,weight, annealing), 
  theHitData( pos, err, det->geographicalId(), clust),
  theCPE(cpe)
{
  // Additionally, fill the SiPixeRecHitQuality from the PixelCPE.
  const PixelCPEBase * cpeB = dynamic_cast< const PixelCPEBase* >( cpe );
  if (cpeB) {
    theHitData.setRawQualityWord( cpeB->rawQualityWord() );
    theClusterProbComputationFlag = cpeB->clusterProbComputationFlag(); 
  }
  // else {
    //  Huh?  We are using the obsolete CPEFromDetPosition???
    //  &&& Possibly complain in here.

    //  &&& In fact, a better long-term option is to simply move this interface
    //  &&&   into the ClusterParameterEstimator and make it a real interface
    //  &&&   class.
  //  }
}

Member Function Documentation

static RecHitPointer TSiPixelRecHit::build ( const GeomDet geom,
const SiPixelRecHit rh,
const PixelClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1.,
bool  computeCoarseLocalPosition = false 
) [inline, static]

Definition at line 60 of file TSiPixelRecHit.h.

References TSiPixelRecHit(), and TransientTrackingRecHit::weight().

Referenced by TkTransientTrackingRecHitBuilder::build(), clone(), and TkTransientTrackingRecHitBuilder::oldbuild().

                                                                     {
    return RecHitPointer( new TSiPixelRecHit( geom, rh, cpe,weight, annealing, computeCoarseLocalPosition));
  }
static RecHitPointer TSiPixelRecHit::build ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
clusterRef  cluster,
const PixelClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1. 
) [inline, static]

Definition at line 67 of file TSiPixelRecHit.h.

References TSiPixelRecHit(), and TransientTrackingRecHit::weight().

                                                                   {
    return RecHitPointer( new TSiPixelRecHit( pos, err, det, cluster, cpe,weight, annealing));
  }
virtual bool TSiPixelRecHit::canImproveWithTrack ( ) const [inline, virtual]

Returns true if the clone( const TrajectoryStateOnSurface&) method returns an improved hit, false if it returns an identical copy. In order to avoid redundent copies one should call canImproveWithTrack() before calling clone( const TrajectoryStateOnSurface&).

Reimplemented from TransientTrackingRecHit.

Definition at line 48 of file TSiPixelRecHit.h.

{return true;}
virtual TSiPixelRecHit* TSiPixelRecHit::clone ( void  ) const [inline, private, virtual]

Implements TransientTrackingRecHit.

Definition at line 114 of file TSiPixelRecHit.h.

References TSiPixelRecHit().

                                         {
    return new TSiPixelRecHit(*this);
  }
TSiPixelRecHit::RecHitPointer TSiPixelRecHit::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.

Reimplemented from TransientTrackingRecHit.

Definition at line 8 of file TSiPixelRecHit.cc.

References build(), SiPixelRecHit::cluster(), TransientTrackingRecHit::det(), detUnit(), TransientTrackingRecHit::getAnnealingFactor(), ClusterParameterEstimator< T >::localParameters(), specificHit(), theCPE, theHitData, TSiPixelRecHit(), and TransientTrackingRecHit::weight().

{
  if (theCPE == 0){
    return new TSiPixelRecHit( det(), &theHitData, 0, weight(), getAnnealingFactor(),false);
  }else{
    const SiPixelCluster& clust = *specificHit()->cluster();  
    PixelClusterParameterEstimator::LocalValues lv = 
      theCPE->localParameters( clust, *detUnit(), ts);
    return TSiPixelRecHit::build( lv.first, lv.second, det(), specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
  }
}
virtual float TSiPixelRecHit::clusterProbability ( ) const [inline, virtual]

Probability of the compatibility of the track with the pixel cluster shape.

Reimplemented from TransientTrackingRecHit.

Definition at line 77 of file TSiPixelRecHit.h.

References SiPixelRecHit::clusterProbability(), theClusterProbComputationFlag, and theHitData.

const PixelClusterParameterEstimator* TSiPixelRecHit::cpe ( ) const [inline]

Definition at line 58 of file TSiPixelRecHit.h.

References theCPE.

Referenced by TSiPixelRecHit().

{return theCPE;}
const GeomDetUnit * TSiPixelRecHit::detUnit ( ) const [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 20 of file TSiPixelRecHit.cc.

References TransientTrackingRecHit::det().

Referenced by clone().

{
  return static_cast<const GeomDetUnit*>(det());
}
virtual int TSiPixelRecHit::dimension ( ) const [inline, virtual]

Implements TrackingRecHit.

Definition at line 30 of file TSiPixelRecHit.h.

References RecHit2DLocalPos::dimension(), and theHitData.

{return theHitData.dimension();}
virtual void TSiPixelRecHit::getKfComponents ( KfComponentsHolder holder) const [inline, virtual]
virtual const TrackingRecHit* TSiPixelRecHit::hit ( void  ) const [inline, virtual]

Implements TransientTrackingRecHit.

Definition at line 39 of file TSiPixelRecHit.h.

References theHitData.

Referenced by recHits().

{return &theHitData;};
virtual LocalPoint TSiPixelRecHit::localPosition ( ) const [inline, virtual]
virtual LocalError TSiPixelRecHit::localPositionError ( ) const [inline, virtual]
virtual AlgebraicVector TSiPixelRecHit::parameters ( void  ) const [inline, virtual]

Implements TrackingRecHit.

Definition at line 22 of file TSiPixelRecHit.h.

References RecHit2DLocalPos::parameters(), and theHitData.

{return theHitData.parameters();}
virtual AlgebraicSymMatrix TSiPixelRecHit::parametersError ( ) const [inline, virtual]
virtual AlgebraicMatrix TSiPixelRecHit::projectionMatrix ( ) const [inline, virtual]

Implements TrackingRecHit.

Definition at line 29 of file TSiPixelRecHit.h.

References RecHit2DLocalPos::projectionMatrix(), and theHitData.

virtual std::vector<TrackingRecHit*> TSiPixelRecHit::recHits ( ) [inline, virtual]

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 44 of file TSiPixelRecHit.h.

References RecHit2DLocalPos::recHits(), and theHitData.

                                               {
    return theHitData.recHits();
  }
virtual std::vector<const TrackingRecHit*> TSiPixelRecHit::recHits ( ) const [inline, virtual]

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 41 of file TSiPixelRecHit.h.

References hit(), and TrackingRecHit::recHits().

                                                           {
    return hit()->recHits();
  }
const SiPixelRecHit* TSiPixelRecHit::specificHit ( ) const [inline]

Definition at line 57 of file TSiPixelRecHit.h.

References theHitData.

Referenced by clone(), and TkAlCaOverlapTagger::produce().

{return &theHitData;};

Member Data Documentation

Definition at line 87 of file TSiPixelRecHit.h.

Referenced by clusterProbability(), and TSiPixelRecHit().

Definition at line 86 of file TSiPixelRecHit.h.

Referenced by clone(), cpe(), and TSiPixelRecHit().