CMS 3D CMS Logo

TkPixelMeasurementDet Class Reference

#include <RecoTracker/MeasurementDet/interface/TkPixelMeasurementDet.h>

Inheritance diagram for TkPixelMeasurementDet:

MeasurementDet

List of all members.

Public Types

typedef detset::const_iterator const_iterator
typedef edmNew::DetSet
< SiPixelCluster
detset
typedef
PixelClusterParameterEstimator::LocalValues 
LocalValues
typedef edm::Ref
< edmNew::DetSetVector
< SiPixelCluster >,
SiPixelCluster
SiPixelClusterRef

Public Member Functions

TransientTrackingRecHit::RecHitPointer buildRecHit (const SiPixelClusterRef &cluster, const LocalTrajectoryParameters &ltp) const
virtual std::vector
< TrajectoryMeasurement
fastMeasurements (const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &startingState, const Propagator &, const MeasurementEstimator &) const
 faster version in case the TrajectoryState on the surface of the Det is already available.
bool isActive () const
 Is this module active in reconstruction?
virtual RecHitContainer recHits (const TrajectoryStateOnSurface &) const
void setActive (bool active)
 Turn on/off the module for reconstruction (using info from DB, usually).
void setEmpty ()
const PixelGeomDetUnitspecificGeomDet () const
 TkPixelMeasurementDet (const GeomDet *gdet, const PixelClusterParameterEstimator *cpe)
void update (const detset &detSet, const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > h, unsigned int id)
virtual ~TkPixelMeasurementDet ()

Private Attributes

bool active_
detset detSet_
bool empty
edm::Handle
< edmNew::DetSetVector
< SiPixelCluster > > 
handle_
unsigned int id_
const
PixelClusterParameterEstimator
theCPE
const PixelGeomDetUnitthePixelGDU


Detailed Description

Definition at line 15 of file TkPixelMeasurementDet.h.


Member Typedef Documentation

typedef detset::const_iterator TkPixelMeasurementDet::const_iterator

Definition at line 21 of file TkPixelMeasurementDet.h.

typedef edmNew::DetSet<SiPixelCluster> TkPixelMeasurementDet::detset

Definition at line 20 of file TkPixelMeasurementDet.h.

typedef PixelClusterParameterEstimator::LocalValues TkPixelMeasurementDet::LocalValues

Definition at line 22 of file TkPixelMeasurementDet.h.

typedef edm::Ref<edmNew::DetSetVector<SiPixelCluster>, SiPixelCluster> TkPixelMeasurementDet::SiPixelClusterRef

Definition at line 18 of file TkPixelMeasurementDet.h.


Constructor & Destructor Documentation

TkPixelMeasurementDet::TkPixelMeasurementDet ( const GeomDet gdet,
const PixelClusterParameterEstimator cpe 
)

Definition at line 11 of file TkPixelMeasurementDet.cc.

References thePixelGDU.

00012                                                                                          : 
00013     MeasurementDet (gdet),
00014     theCPE(cpe),
00015     empty(true),
00016     active_(true)
00017   {
00018     thePixelGDU = dynamic_cast<const PixelGeomDetUnit*>(gdet);
00019     if (thePixelGDU == 0) {
00020       throw MeasurementDetException( "TkPixelMeasurementDet constructed with a GeomDet which is not a PixelGeomDetUnit");
00021     }
00022   }

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

Definition at line 37 of file TkPixelMeasurementDet.h.

00037 { }


Member Function Documentation

TransientTrackingRecHit::RecHitPointer TkPixelMeasurementDet::buildRecHit ( const SiPixelClusterRef cluster,
const LocalTrajectoryParameters ltp 
) const

Definition at line 64 of file TkPixelMeasurementDet.cc.

References TSiPixelRecHit::build(), MeasurementDet::geomDet(), ClusterParameterEstimator< T >::localParameters(), lv, specificGeomDet(), and theCPE.

Referenced by recHits().

00066 {
00067   const GeomDetUnit& gdu( specificGeomDet());
00068   LocalValues lv = theCPE->localParameters( * cluster, gdu, ltp );
00069   return TSiPixelRecHit::build( lv.first, lv.second, &geomDet(), cluster, theCPE);
00070 }

std::vector< TrajectoryMeasurement > TkPixelMeasurementDet::fastMeasurements ( const TrajectoryStateOnSurface stateOnThisDet,
const TrajectoryStateOnSurface startingState,
const Propagator ,
const MeasurementEstimator  
) const [virtual]

faster version in case the TrajectoryState on the surface of the Det is already available.

The first TrajectoryStateOnSurface is on the surface of this Det, and the second TrajectoryStateOnSurface is the statrting state, usually not on the surface of this Det. The stateOnThisDet should the result of
prop.propagate( startingState, this->surface())

Implements MeasurementDet.

Definition at line 25 of file TkPixelMeasurementDet.cc.

References active_, InvalidTransientRecHit::build(), MeasurementEstimator::estimate(), MeasurementDet::geomDet(), TrackingRecHit::inactive, recHits(), HLT_VtxMuL3::result, and python::multivaluedict::sort().

00029 {
00030   std::vector<TrajectoryMeasurement> result;
00031 
00032   if (active_ == false) {
00033     result.push_back( TrajectoryMeasurement( stateOnThisDet, 
00034                 InvalidTransientRecHit::build(&geomDet(), TrackingRecHit::inactive), 
00035                 0.F));
00036     return result;
00037   }
00038  
00039   MeasurementDet::RecHitContainer allHits = recHits( stateOnThisDet);
00040   for (RecHitContainer::const_iterator ihit=allHits.begin();
00041        ihit != allHits.end(); ihit++) {
00042     std::pair<bool,double> diffEst = est.estimate( stateOnThisDet, **ihit);
00043     if ( diffEst.first) {
00044       result.push_back( TrajectoryMeasurement( stateOnThisDet, *ihit, 
00045                                                diffEst.second));
00046     }
00047     //RC else delete *ihit; // we own allHits and have to delete the ones we don't return
00048   }
00049   if ( result.empty()) {
00050     // create a TrajectoryMeasurement with an invalid RecHit and zero estimate
00051     result.push_back( TrajectoryMeasurement( stateOnThisDet, 
00052                                              InvalidTransientRecHit::build(&geomDet()), 0.F)); 
00053   }
00054   else {
00055     // sort results according to estimator value
00056     if ( result.size() > 1) {
00057       sort( result.begin(), result.end(), TrajMeasLessEstim());
00058     }
00059   }
00060   return result;
00061 }

bool TkPixelMeasurementDet::isActive (  )  const [inline]

Is this module active in reconstruction?

Definition at line 56 of file TkPixelMeasurementDet.h.

References active_.

00056 { return active_; }

TkPixelMeasurementDet::RecHitContainer TkPixelMeasurementDet::recHits ( const TrajectoryStateOnSurface ts  )  const [virtual]

Implements MeasurementDet.

Definition at line 73 of file TkPixelMeasurementDet.cc.

References active_, edmNew::DetSet< T >::begin(), buildRecHit(), detSet_, empty, edmNew::DetSet< T >::end(), handle_, TrajectoryStateOnSurface::localParameters(), edmNew::makeRefTo(), and HLT_VtxMuL3::result.

Referenced by fastMeasurements().

00074 {
00075   RecHitContainer result;
00076   if (empty == true ) return result;
00077   if (active_ == false) return result; 
00078   for ( const_iterator ci = detSet_.begin(); ci != detSet_.end(); ++ ci ) {
00079     SiPixelClusterRef cluster = edmNew::makeRefTo( handle_, ci ); 
00080     result.push_back( buildRecHit( cluster, ts.localParameters() ) );
00081   }
00082   return result;
00083 }

void TkPixelMeasurementDet::setActive ( bool  active  )  [inline]

Turn on/off the module for reconstruction (using info from DB, usually).

Definition at line 54 of file TkPixelMeasurementDet.h.

References active_, and empty.

00054 { active_ = active; if (!active) empty = true; }

void TkPixelMeasurementDet::setEmpty (  )  [inline]

Definition at line 35 of file TkPixelMeasurementDet.h.

References empty.

00035 {empty = true;}

const PixelGeomDetUnit& TkPixelMeasurementDet::specificGeomDet (  )  const [inline]

Definition at line 47 of file TkPixelMeasurementDet.h.

References thePixelGDU.

Referenced by buildRecHit().

00047 {return *thePixelGDU;}

void TkPixelMeasurementDet::update ( const detset detSet,
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > >  h,
unsigned int  id 
) [inline]

Definition at line 27 of file TkPixelMeasurementDet.h.

References detSet_, empty, h, handle_, and id_.

00029                                  { 
00030     detSet_ = detSet; 
00031     handle_ = h;
00032     id_ = id;
00033     empty = false;
00034   }


Member Data Documentation

bool TkPixelMeasurementDet::active_ [private]

Definition at line 66 of file TkPixelMeasurementDet.h.

Referenced by fastMeasurements(), isActive(), recHits(), and setActive().

detset TkPixelMeasurementDet::detSet_ [private]

Definition at line 62 of file TkPixelMeasurementDet.h.

Referenced by recHits(), and update().

bool TkPixelMeasurementDet::empty [private]

Definition at line 65 of file TkPixelMeasurementDet.h.

Referenced by recHits(), setActive(), setEmpty(), and update().

edm::Handle<edmNew::DetSetVector<SiPixelCluster> > TkPixelMeasurementDet::handle_ [private]

Definition at line 63 of file TkPixelMeasurementDet.h.

Referenced by recHits(), and update().

unsigned int TkPixelMeasurementDet::id_ [private]

Definition at line 64 of file TkPixelMeasurementDet.h.

Referenced by update().

const PixelClusterParameterEstimator* TkPixelMeasurementDet::theCPE [private]

Definition at line 61 of file TkPixelMeasurementDet.h.

Referenced by buildRecHit().

const PixelGeomDetUnit* TkPixelMeasurementDet::thePixelGDU [private]

Definition at line 60 of file TkPixelMeasurementDet.h.

Referenced by specificGeomDet(), and TkPixelMeasurementDet().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:33:38 2009 for CMSSW by  doxygen 1.5.4