CMS 3D CMS Logo

Public Member Functions

TkGeomDetCompatibilityChecker Class Reference

#include <TkGeomDetCompatibilityChecker.h>

List of all members.

Public Member Functions

std::pair< bool,
TrajectoryStateOnSurface
isCompatible (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est) const

Detailed Description

Definition at line 11 of file TkGeomDetCompatibilityChecker.h.


Member Function Documentation

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().

{
  GeomDetCompatibilityChecker checker;
  SiStripDetId siStripDetId(det->geographicalId());
  if(!siStripDetId.glued()) return checker.isCompatible( det, tsos, prop, est);
  else {
    const GluedGeomDet* glued = static_cast<const GluedGeomDet*>( det);
    pair<bool, TrajectoryStateOnSurface> mono = 
      checker.isCompatible(glued->monoDet(), tsos, prop, est);
    pair<bool, TrajectoryStateOnSurface> stereo = 
      checker.isCompatible(glued->stereoDet(), tsos, prop, est);
    if (mono.first || stereo.first) {
      TrajectoryStateOnSurface gluedDetState = prop.propagate( tsos, det->specificSurface());
      if (gluedDetState.isValid()) {
        return pair<bool, TrajectoryStateOnSurface>( true, gluedDetState);
      }
      else {
        return pair<bool, TrajectoryStateOnSurface>( false, gluedDetState);
      }
    }
    else {
      return pair<bool, TrajectoryStateOnSurface>( false, TrajectoryStateOnSurface());
    }
  }
}