CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes | Static Private Attributes
TkPixelMeasurementDet Class Reference

#include <TkPixelMeasurementDet.h>

Inheritance diagram for TkPixelMeasurementDet:
MeasurementDet

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 Types inherited from MeasurementDet
typedef
TransientTrackingRecHit::ConstRecHitContainer 
RecHitContainer
 

Public Member Functions

TransientTrackingRecHit::RecHitPointer buildRecHit (const SiPixelClusterRef &cluster, const LocalTrajectoryParameters &ltp) const
 
void clearBadRocPositions ()
 Clear the list of bad ROCs. More...
 
virtual std::vector
< TrajectoryMeasurement
fastMeasurements (const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &startingState, const Propagator &, const MeasurementEstimator &) const
 
bool hasBadComponents (const TrajectoryStateOnSurface &tsos) const
 
bool isActive () const
 Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'. More...
 
virtual RecHitContainer recHits (const TrajectoryStateOnSurface &) const
 
void setActive (bool active)
 Turn on/off the module for reconstruction, for the full run or lumi (using info from DB, usually). This also resets the 'setActiveThisEvent' to true. More...
 
void setActiveThisEvent (bool active)
 Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call to 'update' or 'setEmpty'. More...
 
void setBadRocPositions (std::vector< LocalPoint > &positions)
 Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame. More...
 
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 ()
 
- Public Member Functions inherited from MeasurementDet
virtual const GeomDetgeomDet () const
 
 MeasurementDet (const GeomDet *gdet)
 
const Surface::PositionTypeposition () const
 
const BoundSurfacesurface () const
 

Private Attributes

bool activeThisEvent_
 
bool activeThisPeriod_
 
std::vector< LocalPointbadRocPositions_
 
detset detSet_
 
bool empty
 
edm::Handle
< edmNew::DetSetVector
< SiPixelCluster > > 
handle_
 
unsigned int id_
 
const
PixelClusterParameterEstimator
theCPE
 
const PixelGeomDetUnitthePixelGDU
 

Static Private Attributes

static const float theRocHeight = 8.1
 
static const float theRocWidth = 8.1
 

Detailed Description

Definition at line 15 of file TkPixelMeasurementDet.h.

Member Typedef Documentation

Definition at line 21 of file TkPixelMeasurementDet.h.

Definition at line 20 of file TkPixelMeasurementDet.h.

Definition at line 22 of file TkPixelMeasurementDet.h.

Definition at line 18 of file TkPixelMeasurementDet.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file TkPixelMeasurementDet.cc.

References thePixelGDU.

15  :
16  MeasurementDet (gdet),
17  theCPE(cpe),
18  empty(true),
20  {
21  thePixelGDU = dynamic_cast<const PixelGeomDetUnit*>(gdet);
22  if (thePixelGDU == 0) {
23  throw MeasurementDetException( "TkPixelMeasurementDet constructed with a GeomDet which is not a PixelGeomDetUnit");
24  }
25  }
const PixelGeomDetUnit * thePixelGDU
MeasurementDet(const GeomDet *gdet)
const PixelClusterParameterEstimator * theCPE
virtual TkPixelMeasurementDet::~TkPixelMeasurementDet ( )
inlinevirtual

Definition at line 38 of file TkPixelMeasurementDet.h.

38 { }

Member Function Documentation

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

Definition at line 68 of file TkPixelMeasurementDet.cc.

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

Referenced by recHits().

70 {
71  const GeomDetUnit& gdu( specificGeomDet());
72  LocalValues lv = theCPE->localParameters( * cluster, gdu, ltp );
73  return TSiPixelRecHit::build( lv.first, lv.second, &geomDet(), cluster, theCPE);
74 }
static RecHitPointer build(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
virtual const GeomDet & geomDet() const
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
PixelClusterParameterEstimator::LocalValues LocalValues
const PixelGeomDetUnit & specificGeomDet() const
const PixelClusterParameterEstimator * theCPE
void TkPixelMeasurementDet::clearBadRocPositions ( )
inline

Clear the list of bad ROCs.

Definition at line 68 of file TkPixelMeasurementDet.h.

References badRocPositions_.

68 { badRocPositions_.clear(); }
std::vector< LocalPoint > badRocPositions_
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 28 of file TkPixelMeasurementDet.cc.

References InvalidTransientRecHit::build(), MeasurementEstimator::estimate(), MeasurementDet::geomDet(), hasBadComponents(), TrackingRecHit::inactive, isActive(), TrackingRecHit::missing, recHits(), query::result, and python.multivaluedict::sort().

32 {
33  std::vector<TrajectoryMeasurement> result;
34 
35  if (isActive() == false) {
36  result.push_back( TrajectoryMeasurement( stateOnThisDet,
38  0.F));
39  return result;
40  }
41 
42  MeasurementDet::RecHitContainer allHits = recHits( stateOnThisDet);
43  for (RecHitContainer::const_iterator ihit=allHits.begin();
44  ihit != allHits.end(); ihit++) {
45  std::pair<bool,double> diffEst = est.estimate( stateOnThisDet, **ihit);
46  if ( diffEst.first) {
47  result.push_back( TrajectoryMeasurement( stateOnThisDet, *ihit,
48  diffEst.second));
49  }
50  //RC else delete *ihit; // we own allHits and have to delete the ones we don't return
51  }
52  if ( result.empty()) {
53  // create a TrajectoryMeasurement with an invalid RecHit and zero estimate
55  result.push_back( TrajectoryMeasurement( stateOnThisDet,
56  InvalidTransientRecHit::build(&geomDet(), type), 0.F));
57  }
58  else {
59  // sort results according to estimator value
60  if ( result.size() > 1) {
61  sort( result.begin(), result.end(), TrajMeasLessEstim());
62  }
63  }
64  return result;
65 }
type
Definition: HCALResponse.h:22
bool isActive() const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
static RecHitPointer build(const GeomDet *geom, Type type=TrackingRecHit::missing, const DetLayer *layer=0)
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
virtual const GeomDet & geomDet() const
tuple result
Definition: query.py:137
bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &) const
bool TkPixelMeasurementDet::hasBadComponents ( const TrajectoryStateOnSurface tsos) const
virtual

Implements MeasurementDet.

Definition at line 90 of file TkPixelMeasurementDet.cc.

References abs, badRocPositions_, asciidump::le, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), LocalTrajectoryError::positionError(), mathSSE::sqrt(), theRocHeight, theRocWidth, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

Referenced by fastMeasurements().

90  {
91  if (badRocPositions_.empty()) return false;
92  LocalPoint lp = tsos.localPosition();
94  double dx = 3*std::sqrt(le.xx()) + theRocWidth, dy = 3*std::sqrt(le.yy()) + theRocHeight;
95  for (std::vector<LocalPoint>::const_iterator it = badRocPositions_.begin(), ed = badRocPositions_.end(); it != ed; ++it) {
96  if ( (std::abs(it->x() - lp.x()) < dx) &&
97  (std::abs(it->y() - lp.y()) < dy) ) return true;
98  }
99  return false;
100 }
float xx() const
Definition: LocalError.h:19
std::vector< LocalPoint > badRocPositions_
T y() const
Definition: PV3DBase.h:57
#define abs(x)
Definition: mlp_lapack.h:159
static const float theRocHeight
static const float theRocWidth
LocalError positionError() const
float yy() const
Definition: LocalError.h:21
T sqrt(T t)
Definition: SSEVec.h:28
const LocalTrajectoryError & localError() const
T x() const
Definition: PV3DBase.h:56
bool TkPixelMeasurementDet::isActive ( ) const
inlinevirtual

Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'.

Implements MeasurementDet.

Definition at line 61 of file TkPixelMeasurementDet.h.

References activeThisEvent_, and activeThisPeriod_.

Referenced by fastMeasurements(), and recHits().

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

Implements MeasurementDet.

Definition at line 77 of file TkPixelMeasurementDet.cc.

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

Referenced by fastMeasurements().

78 {
80  if (empty == true ) return result;
81  if (isActive() == false) return result;
82  for ( const_iterator ci = detSet_.begin(); ci != detSet_.end(); ++ ci ) {
84  result.push_back( buildRecHit( cluster, ts.localParameters() ) );
85  }
86  return result;
87 }
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
bool isActive() const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
const LocalTrajectoryParameters & localParameters() const
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
tuple result
Definition: query.py:137
detset::const_iterator const_iterator
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > handle_
TransientTrackingRecHit::RecHitPointer buildRecHit(const SiPixelClusterRef &cluster, const LocalTrajectoryParameters &ltp) const
iterator end()
Definition: DetSetNew.h:59
iterator begin()
Definition: DetSetNew.h:56
void TkPixelMeasurementDet::setActive ( bool  active)
inline

Turn on/off the module for reconstruction, for the full run or lumi (using info from DB, usually). This also resets the 'setActiveThisEvent' to true.

Definition at line 56 of file TkPixelMeasurementDet.h.

References activeThisEvent_, activeThisPeriod_, and empty.

void TkPixelMeasurementDet::setActiveThisEvent ( bool  active)
inline

Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call to 'update' or 'setEmpty'.

Definition at line 59 of file TkPixelMeasurementDet.h.

References activeThisEvent_, and empty.

59 { activeThisEvent_ = active; if (!active) empty = true; }
void TkPixelMeasurementDet::setBadRocPositions ( std::vector< LocalPoint > &  positions)
inline

Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame.

Definition at line 66 of file TkPixelMeasurementDet.h.

References badRocPositions_.

66 { badRocPositions_.swap(positions); }
std::vector< LocalPoint > badRocPositions_
void TkPixelMeasurementDet::setEmpty ( )
inline

Definition at line 36 of file TkPixelMeasurementDet.h.

References activeThisEvent_, and empty.

const PixelGeomDetUnit& TkPixelMeasurementDet::specificGeomDet ( ) const
inline

Definition at line 48 of file TkPixelMeasurementDet.h.

References thePixelGDU.

Referenced by buildRecHit().

48 {return *thePixelGDU;}
const PixelGeomDetUnit * 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 activeThisEvent_, detSet_, empty, h, handle_, ExpressReco_HICollisions_FallBack::id, and id_.

Referenced by python.Vispa.Gui.VispaWidget.VispaWidget::autosize(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), python.Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), python.Vispa.Gui.FindDialog.FindDialog::reset(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), python.Vispa.Gui.VispaWidget.VispaWidget::setTitle(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and python.Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

29  {
30  detSet_ = detSet;
31  handle_ = h;
32  id_ = id;
33  empty = false;
34  activeThisEvent_ = true;
35  }
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > handle_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

Member Data Documentation

bool TkPixelMeasurementDet::activeThisEvent_
private

Definition at line 77 of file TkPixelMeasurementDet.h.

Referenced by isActive(), setActive(), setActiveThisEvent(), setEmpty(), and update().

bool TkPixelMeasurementDet::activeThisPeriod_
private

Definition at line 77 of file TkPixelMeasurementDet.h.

Referenced by isActive(), and setActive().

std::vector< LocalPoint > TkPixelMeasurementDet::badRocPositions_
private
detset TkPixelMeasurementDet::detSet_
private

Definition at line 73 of file TkPixelMeasurementDet.h.

Referenced by recHits(), and update().

bool TkPixelMeasurementDet::empty
private
edm::Handle<edmNew::DetSetVector<SiPixelCluster> > TkPixelMeasurementDet::handle_
private

Definition at line 74 of file TkPixelMeasurementDet.h.

Referenced by recHits(), and update().

unsigned int TkPixelMeasurementDet::id_
private

Definition at line 75 of file TkPixelMeasurementDet.h.

Referenced by update().

const PixelClusterParameterEstimator* TkPixelMeasurementDet::theCPE
private

Definition at line 72 of file TkPixelMeasurementDet.h.

Referenced by buildRecHit().

const PixelGeomDetUnit* TkPixelMeasurementDet::thePixelGDU
private

Definition at line 71 of file TkPixelMeasurementDet.h.

Referenced by specificGeomDet(), and TkPixelMeasurementDet().

const float TkPixelMeasurementDet::theRocHeight = 8.1
staticprivate

Definition at line 80 of file TkPixelMeasurementDet.h.

Referenced by hasBadComponents().

const float TkPixelMeasurementDet::theRocWidth = 8.1
staticprivate

Definition at line 80 of file TkPixelMeasurementDet.h.

Referenced by hasBadComponents().