CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
TkGeomDetCompatibilityChecker Class Reference

#include <TkGeomDetCompatibilityChecker.h>

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

13 {
15  SiStripDetId siStripDetId(det->geographicalId());
16  if(!siStripDetId.glued()) return checker.isCompatible( det, tsos, prop, est);
17  else {
18  const GluedGeomDet* glued = static_cast<const GluedGeomDet*>( det);
19  pair<bool, TrajectoryStateOnSurface> mono =
20  checker.isCompatible(glued->monoDet(), tsos, prop, est);
21  pair<bool, TrajectoryStateOnSurface> stereo =
22  checker.isCompatible(glued->stereoDet(), tsos, prop, est);
23  if (mono.first || stereo.first) {
24  TrajectoryStateOnSurface gluedDetState = prop.propagate( tsos, det->specificSurface());
25  if (gluedDetState.isValid()) {
26  return pair<bool, TrajectoryStateOnSurface>( true, gluedDetState);
27  }
28  else {
29  return pair<bool, TrajectoryStateOnSurface>( false, gluedDetState);
30  }
31  }
32  else {
33  return pair<bool, TrajectoryStateOnSurface>( false, TrajectoryStateOnSurface());
34  }
35  }
36 }
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:20
static std::pair< bool, TrajectoryStateOnSurface > isCompatible(const GeomDet *theDet, const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est)
const BoundPlane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:38
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21