Go to the documentation of this file.00001 #include "TrackPropagation/NavGeometry/interface/NavSurfaceBuilder.h"
00002 #include "TrackPropagation/NavGeometry/interface/NavSurface.h"
00003 #include "DataFormats/GeometrySurface/interface/Plane.h"
00004 #include "DataFormats/GeometrySurface/interface/Cylinder.h"
00005 #include "DataFormats/GeometrySurface/interface/Cone.h"
00006 #include "TrackPropagation/NavGeometry/interface/NavPlane.h"
00007 #include "TrackPropagation/NavGeometry/interface/NavCylinder.h"
00008 #include "TrackPropagation/NavGeometry/interface/NavCone.h"
00009
00010 NavSurface* NavSurfaceBuilder::build( const Surface& surface) const
00011 {
00012 const Plane* plane = dynamic_cast<const Plane*>(&surface);
00013 if (plane != 0) {
00014 return new NavPlane( plane);
00015 }
00016
00017 const Cylinder* cylinder = dynamic_cast<const Cylinder*>(&surface);
00018 if (cylinder != 0) {
00019 return new NavCylinder( cylinder);
00020 }
00021
00022 const Cone* cone = dynamic_cast<const Cone*>(&surface);
00023 if (cone != 0) {
00024 return new NavCone( cone);
00025 }
00026
00027 return 0;
00028 }