CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TkPhase2OTMeasurementDet Class Referencefinal

#include <TkPhase2OTMeasurementDet.h>

Inheritance diagram for TkPhase2OTMeasurementDet:
MeasurementDet

Public Types

typedef detset::const_iterator const_iterator
 
typedef edmNew::DetSet< Phase2TrackerCluster1Ddetset
 
typedef ClusterParameterEstimator< Phase2TrackerCluster1D >::LocalValues LocalValues
 
typedef edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1DPhase2TrackerCluster1DRef
 
- Public Types inherited from MeasurementDet
typedef TrackingRecHit::ConstRecHitContainer RecHitContainer
 
using SimpleHitContainer = std::vector< BaseTrackerRecHit * >
 
typedef tracking::TempMeasurements TempMeasurements
 

Public Member Functions

TrackingRecHit::RecHitPointer buildRecHit (const Phase2TrackerCluster1DRef &cluster, const LocalTrajectoryParameters &ltp) const
 
bool hasBadComponents (const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &dat) const
 
int index () const
 Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame. More...
 
bool isActive (const MeasurementTrackerEvent &data) const
 Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'. More...
 
bool isEmpty (const Phase2OTMeasurementDetSet &data) const
 
virtual bool measurements (const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &dat, TempMeasurements &result) const
 
virtual RecHitContainer recHits (const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &dat) const
 
virtual bool recHits (SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const
 
void setActive (bool active)
 Turn on/off the module for reconstruction, for the full run or lumi (using info from DB, usually). More...
 
void setActiveThisEvent (Phase2OTMeasurementDetSet &data, bool active) const
 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 setEmpty (Phase2OTMeasurementDetSet &data)
 
void setIndex (int i)
 
const PixelGeomDetUnitspecificGeomDet () const
 
 TkPhase2OTMeasurementDet (const GeomDet *gdet, Phase2OTMeasurementConditionSet &conditionSet)
 
void update (Phase2OTMeasurementDetSet &data, const detset &detSet)
 
virtual ~TkPhase2OTMeasurementDet ()
 
- Public Member Functions inherited from MeasurementDet
const GeomDetfastGeomDet () const
 
std::vector< TrajectoryMeasurementfastMeasurements (const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &est, const MeasurementTrackerEvent &data) const
 
virtual const GeomDetgeomDet () const
 
 MeasurementDet (const GeomDet *gdet)
 
const Surface::PositionTypeposition () const
 
virtual bool recHits (const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data, RecHitContainer &result, std::vector< float > &) const
 
const Surfacesurface () const
 

Private Member Functions

Phase2OTMeasurementConditionSetconditionSet ()
 
const Phase2OTMeasurementConditionSetconditionSet () const
 
const ClusterParameterEstimator< Phase2TrackerCluster1D > * cpe () const
 

Private Attributes

unsigned int id_
 
int index_
 
Phase2OTMeasurementConditionSettheDetConditions
 

Additional Inherited Members

- Protected Attributes inherited from MeasurementDet
TrackingRecHit::ConstRecHitPointer theInactiveHit
 
TrackingRecHit::ConstRecHitPointer theMissingHit
 

Detailed Description

Definition at line 16 of file TkPhase2OTMeasurementDet.h.

Member Typedef Documentation

Definition at line 22 of file TkPhase2OTMeasurementDet.h.

Definition at line 21 of file TkPhase2OTMeasurementDet.h.

Definition at line 23 of file TkPhase2OTMeasurementDet.h.

Definition at line 19 of file TkPhase2OTMeasurementDet.h.

Constructor & Destructor Documentation

TkPhase2OTMeasurementDet::TkPhase2OTMeasurementDet ( const GeomDet gdet,
Phase2OTMeasurementConditionSet conditionSet 
)

Definition at line 18 of file TkPhase2OTMeasurementDet.cc.

19  :
20  MeasurementDet (gdet),
21  theDetConditions(&conditions)
22  {
23  if ( dynamic_cast<const PixelGeomDetUnit*>(gdet) == 0) {
24  throw MeasurementDetException( "TkPhase2OTMeasurementDet constructed with a GeomDet which is not a PixelGeomDetUnit");
25  }
26  }
MeasurementDet(const GeomDet *gdet)
Phase2OTMeasurementConditionSet * theDetConditions
virtual TkPhase2OTMeasurementDet::~TkPhase2OTMeasurementDet ( )
inlinevirtual

Definition at line 36 of file TkPhase2OTMeasurementDet.h.

References MeasurementDet::recHits().

36 { }

Member Function Documentation

TrackingRecHit::RecHitPointer TkPhase2OTMeasurementDet::buildRecHit ( const Phase2TrackerCluster1DRef cluster,
const LocalTrajectoryParameters ltp 
) const

Definition at line 56 of file TkPhase2OTMeasurementDet.cc.

References cpe(), MeasurementDet::fastGeomDet(), ClusterParameterEstimator< T >::localParameters(), and specificGeomDet().

Referenced by recHits().

58 {
59 
60  const PixelGeomDetUnit& gdu( specificGeomDet() );
61  auto && params = cpe()->localParameters( *cluster, gdu );
62 
63  return std::make_shared<Phase2TrackerRecHit1D>( params.first, params.second, fastGeomDet(), cluster);
64 
65 }
const PixelGeomDetUnit & specificGeomDet() const
const GeomDet & fastGeomDet() const
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
const ClusterParameterEstimator< Phase2TrackerCluster1D > * cpe() const
Phase2OTMeasurementConditionSet& TkPhase2OTMeasurementDet::conditionSet ( )
inlineprivate

Definition at line 84 of file TkPhase2OTMeasurementDet.h.

84 { return *theDetConditions; }
Phase2OTMeasurementConditionSet * theDetConditions
const Phase2OTMeasurementConditionSet& TkPhase2OTMeasurementDet::conditionSet ( ) const
inlineprivate

Definition at line 85 of file TkPhase2OTMeasurementDet.h.

85 { return *theDetConditions; }
Phase2OTMeasurementConditionSet * theDetConditions
const ClusterParameterEstimator<Phase2TrackerCluster1D>* TkPhase2OTMeasurementDet::cpe ( ) const
inlineprivate

Definition at line 87 of file TkPhase2OTMeasurementDet.h.

Referenced by buildRecHit().

87 { return conditionSet().cpe(); }
const ClusterParameterEstimator< Phase2TrackerCluster1D > * cpe() const
Phase2OTMeasurementConditionSet & conditionSet()
bool TkPhase2OTMeasurementDet::hasBadComponents ( const TrajectoryStateOnSurface tsos,
const MeasurementTrackerEvent dat 
) const
virtual

Implements MeasurementDet.

Definition at line 102 of file TkPhase2OTMeasurementDet.cc.

Referenced by measurements().

102  {
103 /*
104  if (badRocPositions_.empty()) return false;
105  LocalPoint lp = tsos.localPosition();
106  LocalError le = tsos.localError().positionError();
107  double dx = 3*std::sqrt(le.xx()) + theRocWidth, dy = 3*std::sqrt(le.yy()) + theRocHeight;
108  for (std::vector<LocalPoint>::const_iterator it = badRocPositions_.begin(), ed = badRocPositions_.end(); it != ed; ++it) {
109  if ( (std::abs(it->x() - lp.x()) < dx) &&
110  (std::abs(it->y() - lp.y()) < dy) ) return true;
111  }
112 */
113  return false;
114 }
int TkPhase2OTMeasurementDet::index ( ) const
inline

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

Clear the list of bad ROCs

Definition at line 75 of file TkPhase2OTMeasurementDet.h.

Referenced by BeautifulSoup.PageElement::insert(), and recHits().

bool TkPhase2OTMeasurementDet::isActive ( const MeasurementTrackerEvent data) const
inlinevirtual

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

Implements MeasurementDet.

Definition at line 65 of file TkPhase2OTMeasurementDet.h.

References MeasurementDet::hasBadComponents(), diffTreeTool::index, Phase2OTMeasurementDetSet::isActive(), and MeasurementTrackerEvent::phase2OTData().

Referenced by TkStackMeasurementDet::isActive(), measurements(), and recHits().

65 { return data.phase2OTData().isActive(index()); }
const Phase2OTMeasurementDetSet & phase2OTData() const
int index() const
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
bool TkPhase2OTMeasurementDet::isEmpty ( const Phase2OTMeasurementDetSet data) const
inline

Definition at line 34 of file TkPhase2OTMeasurementDet.h.

References Phase2OTMeasurementDetSet::empty(), and diffTreeTool::index.

Referenced by plotting.Plot::clone(), and recHits().

34 {return data.empty(index());}
int index() const
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
bool TkPhase2OTMeasurementDet::measurements ( const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est,
const MeasurementTrackerEvent dat,
TempMeasurements result 
) const
virtual

Implements MeasurementDet.

Definition at line 28 of file TkPhase2OTMeasurementDet.cc.

References tracking::TempMeasurements::add(), MeasurementEstimator::estimate(), F(), hasBadComponents(), isActive(), eostools::move(), recHits(), tracking::TempMeasurements::size(), MeasurementDet::theInactiveHit, and MeasurementDet::theMissingHit.

30  {
31 
32 
33  if (!isActive(data)) {
34  result.add(theInactiveHit, 0.F);
35  return true;
36  }
37 
38  auto oldSize = result.size();
39  MeasurementDet::RecHitContainer && allHits = recHits(stateOnThisDet, data);
40  for (auto && hit : allHits) {
41  std::pair<bool,double> diffEst = est.estimate( stateOnThisDet, *hit);
42  if ( diffEst.first)
43  result.add(std::move(hit), diffEst.second);
44  }
45 
46  if (result.size()>oldSize) return true;
47 
48  // create a TrajectoryMeasurement with an invalid RecHit and zero estimate
49  bool inac = hasBadComponents(stateOnThisDet, data);
50  result.add(inac ? theInactiveHit : theMissingHit, 0.F);
51  return inac;
52 
53 }
TrackingRecHit::ConstRecHitPointer theMissingHit
bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &dat) const
TrackingRecHit::ConstRecHitPointer theInactiveHit
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &dat) const
TrackingRecHit::ConstRecHitContainer RecHitContainer
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
def move(src, dest)
Definition: eostools.py:510
TkPhase2OTMeasurementDet::RecHitContainer TkPhase2OTMeasurementDet::recHits ( const TrajectoryStateOnSurface ts,
const MeasurementTrackerEvent dat 
) const
virtual

Implements MeasurementDet.

Definition at line 68 of file TkPhase2OTMeasurementDet.cc.

References begin, edmNew::DetSet< T >::begin(), buildRecHit(), Phase2OTMeasurementDetSet::detSet(), edmNew::DetSet< T >::end(), MeasurementDet::fastGeomDet(), GeomDet::geographicalId(), Phase2OTMeasurementDetSet::handle(), index(), isActive(), isEmpty(), TrajectoryStateOnSurface::localParameters(), LogDebug, edmNew::DetSet< T >::makeRefTo(), or, MeasurementTrackerEvent::phase2OTClustersToSkip(), MeasurementTrackerEvent::phase2OTData(), DetId::rawId(), mps_fire::result, and edmNew::DetSet< T >::size().

Referenced by measurements().

69 {
71  if (isEmpty(data.phase2OTData())== true ) return result;
72  if (isActive(data) == false) return result;
74  if (0 != data.phase2OTData().handle()->data().size()) {
75  begin = &(data.phase2OTData().handle()->data().front());
76  }
77  const detset & detSet = data.phase2OTData().detSet(index());
78  result.reserve(detSet.size());
79  for ( const_iterator ci = detSet.begin(); ci != detSet.end(); ++ ci ) {
80 
81  if (ci < begin){
82  edm::LogError("IndexMisMatch")<<"TkPhase2OTMeasurementDet cannot create hit because of index mismatch.";
83  return result;
84  }
85  unsigned int index = ci-begin;
86  if (!data.phase2OTClustersToSkip().empty() && index>=data.phase2OTClustersToSkip().size()){
87  edm::LogError("IndexMisMatch")<<"TkPhase2OTMeasurementDet cannot create hit because of index mismatch. i.e "<<index<<" >= "<<data.phase2OTClustersToSkip().size();
88  return result;
89  }
90  if(data.phase2OTClustersToSkip().empty() or (not data.phase2OTClustersToSkip()[index]) ) {
91  Phase2TrackerCluster1DRef cluster = detSet.makeRefTo( data.phase2OTData().handle(), ci );
92  result.push_back( buildRecHit( cluster, ts.localParameters() ) );
93  }else{
94  LogDebug("TkPhase2OTMeasurementDet")<<"skipping this cluster from last iteration on "<<fastGeomDet().geographicalId().rawId()<<" key: "<<index;
95  }
96  }
97  return result;
98 }
#define LogDebug(id)
bool isEmpty(const Phase2OTMeasurementDetSet &data) const
const LocalTrajectoryParameters & localParameters() const
edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > Phase2TrackerCluster1DRef
edmNew::DetSet< Phase2TrackerCluster1D > detset
const GeomDet & fastGeomDet() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int index() const
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
TrackingRecHit::ConstRecHitContainer RecHitContainer
#define begin
Definition: vmac.h:30
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
detset::const_iterator const_iterator
TrackingRecHit::RecHitPointer buildRecHit(const Phase2TrackerCluster1DRef &cluster, const LocalTrajectoryParameters &ltp) const
virtual bool TkPhase2OTMeasurementDet::recHits ( SimpleHitContainer result,
const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator ,
const MeasurementTrackerEvent data 
) const
inlinevirtual

Reimplemented from MeasurementDet.

Definition at line 41 of file TkPhase2OTMeasurementDet.h.

References MeasurementDet::measurements(), and mps_fire::result.

42  {
43  assert("not implemented for Pixel yet"==nullptr);
44  }
void TkPhase2OTMeasurementDet::setActive ( bool  active)
inline

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

Definition at line 60 of file TkPhase2OTMeasurementDet.h.

References diffTreeTool::index.

60 { conditionSet().setActive(index(), active); }
void setActive(int i, bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...
int index() const
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
Phase2OTMeasurementConditionSet & conditionSet()
void TkPhase2OTMeasurementDet::setActiveThisEvent ( Phase2OTMeasurementDetSet data,
bool  active 
) const
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 63 of file TkPhase2OTMeasurementDet.h.

References diffTreeTool::index, and Phase2OTMeasurementDetSet::setActiveThisEvent().

63 { data.setActiveThisEvent(index(), active); }
int index() const
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
void setActiveThisEvent(bool active)
void TkPhase2OTMeasurementDet::setEmpty ( Phase2OTMeasurementDetSet data)
inline

Definition at line 33 of file TkPhase2OTMeasurementDet.h.

References diffTreeTool::index, and Phase2OTMeasurementDetSet::setEmpty().

33 { data.setEmpty(index()); }
int index() const
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
void TkPhase2OTMeasurementDet::setIndex ( int  i)
inline

Definition at line 76 of file TkPhase2OTMeasurementDet.h.

References mps_fire::i.

const PixelGeomDetUnit& TkPhase2OTMeasurementDet::specificGeomDet ( ) const
inline

Definition at line 53 of file TkPhase2OTMeasurementDet.h.

References MeasurementDet::fastGeomDet().

Referenced by buildRecHit().

53 {return static_cast<PixelGeomDetUnit const &>(fastGeomDet());}
const GeomDet & fastGeomDet() const
void TkPhase2OTMeasurementDet::update ( Phase2OTMeasurementDetSet data,
const detset detSet 
)
inline

Definition at line 28 of file TkPhase2OTMeasurementDet.h.

References diffTreeTool::index, Phase2OTMeasurementDetSet::setActiveThisEvent(), and Phase2OTMeasurementDetSet::update().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

28  {
29  data.update(index(), detSet);
30  data.setActiveThisEvent(index(), true);
31  }
int index() const
Sets the list of bad ROCs, identified by the positions of their centers in the local coordinate frame...
void setActiveThisEvent(bool active)
void update(int i, const Phase2DetSet &detSet)

Member Data Documentation

unsigned int TkPhase2OTMeasurementDet::id_
private

Definition at line 79 of file TkPhase2OTMeasurementDet.h.

int TkPhase2OTMeasurementDet::index_
private

Definition at line 82 of file TkPhase2OTMeasurementDet.h.

Phase2OTMeasurementConditionSet* TkPhase2OTMeasurementDet::theDetConditions
private

Definition at line 83 of file TkPhase2OTMeasurementDet.h.