#include <RecoTracker/TkDetLayers/interface/TkGeomDetCompatibilityChecker.h>
Public Member Functions | |
std::pair< bool, TrajectoryStateOnSurface > | isCompatible (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est) const |
Definition at line 11 of file TkGeomDetCompatibilityChecker.h.
pair< bool, TrajectoryStateOnSurface > TkGeomDetCompatibilityChecker::isCompatible | ( | const GeomDet * | det, | |
const TrajectoryStateOnSurface & | tsos, | |||
const Propagator & | prop, | |||
const MeasurementEstimator & | est | |||
) | const |
Definition at line 9 of file TkGeomDetCompatibilityChecker.cc.
References GeomDet::geographicalId(), GeomDetCompatibilityChecker::isCompatible(), TrajectoryStateOnSurface::isValid(), GluedGeomDet::monoDet(), GeomDet::specificSurface(), and GluedGeomDet::stereoDet().
00013 { 00014 GeomDetCompatibilityChecker checker; 00015 SiStripDetId siStripDetId(det->geographicalId()); 00016 if(!siStripDetId.glued()) return checker.isCompatible( det, tsos, prop, est); 00017 else { 00018 const GluedGeomDet* glued = static_cast<const GluedGeomDet*>( det); 00019 pair<bool, TrajectoryStateOnSurface> mono = 00020 checker.isCompatible(glued->monoDet(), tsos, prop, est); 00021 pair<bool, TrajectoryStateOnSurface> stereo = 00022 checker.isCompatible(glued->stereoDet(), tsos, prop, est); 00023 if (mono.first || stereo.first) { 00024 TrajectoryStateOnSurface gluedDetState = prop.propagate( tsos, det->specificSurface()); 00025 if (gluedDetState.isValid()) { 00026 return pair<bool, TrajectoryStateOnSurface>( true, gluedDetState); 00027 } 00028 else { 00029 return pair<bool, TrajectoryStateOnSurface>( false, gluedDetState); 00030 } 00031 } 00032 else { 00033 return pair<bool, TrajectoryStateOnSurface>( false, TrajectoryStateOnSurface()); 00034 } 00035 } 00036 }