#include <LayerMeasurements.h>
Public Member Functions | |
void | addInvalidMeas (std::vector< TrajectoryMeasurement > &measVec, const DetGroup &group, const DetLayer &layer) const |
std::vector < TrajectoryMeasurementGroup > | groupedMeasurements (const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const |
LayerMeasurements (const MeasurementDetSystem *detSysytem) | |
std::vector < TrajectoryMeasurement > | measurements (const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const |
Private Attributes | |
const MeasurementDetSystem * | theDetSystem |
Definition at line 16 of file LayerMeasurements.h.
LayerMeasurements::LayerMeasurements | ( | const MeasurementDetSystem * | detSysytem | ) | [inline] |
Definition at line 19 of file LayerMeasurements.h.
: theDetSystem (detSysytem) {}
void LayerMeasurements::addInvalidMeas | ( | std::vector< TrajectoryMeasurement > & | measVec, |
const DetGroup & | group, | ||
const DetLayer & | layer | ||
) | const |
Definition at line 162 of file LayerMeasurements.cc.
References newFWLiteAna::build, and combine::missing.
{ if (!measVec.empty()) { // invalidMeas on Det of most compatible hit measVec.emplace_back(measVec.front().predictedState(), InvalidTransientRecHit::build(measVec.front().recHit()->det(), TrackingRecHit::missing), 0.,&layer); } else if (!group.empty()) { // invalid state on first compatible Det measVec.emplace_back(group.front().trajectoryState(), InvalidTransientRecHit::build(group.front().det(), TrackingRecHit::missing), 0.,&layer); } }
vector< TrajectoryMeasurementGroup > LayerMeasurements::groupedMeasurements | ( | const DetLayer & | layer, |
const TrajectoryStateOnSurface & | startingState, | ||
const Propagator & | prop, | ||
const MeasurementEstimator & | est | ||
) | const |
Definition at line 118 of file LayerMeasurements.cc.
References newFWLiteAna::build, tracking::TempMeasurements::clear(), GeometricSearchDet::compatible(), tracking::TempMeasurements::distances, GeomDet::geographicalId(), GeometricSearchDet::groupedCompatibleDets(), tracking::TempMeasurements::hits, i, TrackingRecHit::inactive, MeasurementDet::measurements(), query::result, tracking::TempMeasurements::size(), and python::multivaluedict::sort().
{ vector<TrajectoryMeasurementGroup> result; vector<DetGroup> && groups = layer.groupedCompatibleDets( startingState, prop, est); result.reserve(groups.size()); tracking::TempMeasurements tmps; for (auto& grp : groups) { if ( grp.empty() ) continue; vector<TrajectoryMeasurement> tmpVec; for (auto const & det : grp) { const MeasurementDet* mdet = theDetSystem->idToDet(det.det()->geographicalId()); if (mdet == 0) { throw MeasurementDetException( "MeasurementDet not found"); } if (mdet->measurements( det.trajectoryState(), est,tmps)) for (std::size_t i=0; i!=tmps.size(); ++i) tmpVec.emplace_back(det.trajectoryState(),std::move(tmps.hits[i]),tmps.distances[i],&layer); tmps.clear(); } // sort the final result sort( tmpVec.begin(), tmpVec.end(), TrajMeasLessEstim()); addInvalidMeas( tmpVec, grp,layer); result.emplace_back(std::move(tmpVec), std::move(grp)); } // if the result is empty check if the layer is compatible (for invalid measurement) if (result.empty()) { pair<bool, TrajectoryStateOnSurface> compat = layer.compatible( startingState, prop, est); if ( compat.first) { TrajectoryMeasurement inval( compat.second, InvalidTransientRecHit::build(0, TrackingRecHit::inactive,&layer), 0.F,&layer); vector<TrajectoryMeasurement> tmVec(1,inval); result.push_back( TrajectoryMeasurementGroup( tmVec, DetGroup())); } } return result; }
vector< TrajectoryMeasurement > LayerMeasurements::measurements | ( | const DetLayer & | layer, |
const TrajectoryStateOnSurface & | startingState, | ||
const Propagator & | prop, | ||
const MeasurementEstimator & | est | ||
) | const |
Definition at line 90 of file LayerMeasurements.cc.
References newFWLiteAna::build, GeometricSearchDet::compatible(), GeometricSearchDet::compatibleDets(), TrackingRecHit::inactive, LogDebug, and query::result.
Referenced by HitEff::analyze(), MuonCkfTrajectoryBuilder::collectMeasurement(), InOutConversionSeedFinder::completeSeed(), OutInConversionSeedFinder::completeSeed(), CkfTrajectoryBuilder::findCompatibleMeasurements(), FastTSGFromPropagation::findMeasurements(), TSGFromPropagation::findMeasurements(), NuclearInteractionFinder::findMeasurementsFromTSOS(), SiStripElectronSeedGenerator::findSeedsFromCluster(), RectangularEtaPhiTrackingRegion::hits(), CosmicTrackingRegion::hits(), PixelMatchNextLayers::PixelMatchNextLayers(), and OutInConversionSeedFinder::startSeed().
{ typedef DetLayer::DetWithState DetWithState; vector<DetWithState> const & compatDets = layer.compatibleDets( startingState, prop, est); if (!compatDets.empty()) return get(theDetSystem, layer, compatDets, startingState, prop, est); vector<TrajectoryMeasurement> result; pair<bool, TrajectoryStateOnSurface> compat = layer.compatible( startingState, prop, est); if ( compat.first) { result.push_back( TrajectoryMeasurement( compat.second, InvalidTransientRecHit::build(0, TrackingRecHit::inactive,&layer), 0.F, &layer)); LogDebug("LayerMeasurements")<<"adding a missing hit."; }else LogDebug("LayerMeasurements")<<"adding not measurement."; return result; }
const MeasurementDetSystem* LayerMeasurements::theDetSystem [private] |
Definition at line 41 of file LayerMeasurements.h.