00001 #include "Geometry/CommonDetUnit/interface/GeomDet.h" 00002 #include "Geometry/CommonDetUnit/interface/ModifiedSurfaceGenerator.h" 00003 #include "DataFormats/TrackingRecHit/interface/AlignmentPositionError.h" 00004 00005 GeomDet::GeomDet( BoundPlane* plane): 00006 thePlane(plane), theAlignmentPositionError(0) {} 00007 00008 GeomDet::GeomDet( const ReferenceCountingPointer<BoundPlane>& plane) : 00009 thePlane(plane), theAlignmentPositionError(0) {} 00010 00011 GeomDet::~GeomDet() 00012 { 00013 delete theAlignmentPositionError; 00014 } 00015 00016 void GeomDet::move( const GlobalVector& displacement) 00017 { 00018 // 00019 // Should recreate the surface like the set* methods ? 00020 // 00021 thePlane->move(displacement); 00022 } 00023 00024 void GeomDet::rotate( const Surface::RotationType& rotation) 00025 { 00026 // 00027 // Should recreate the surface like the set* methods ? 00028 // 00029 thePlane->rotate(rotation); 00030 } 00031 00032 void GeomDet::setPosition( const Surface::PositionType& position, 00033 const Surface::RotationType& rotation) 00034 { 00035 thePlane = ModifiedSurfaceGenerator<BoundPlane>(thePlane).atNewPosition(position, 00036 rotation); 00037 } 00038 00039 void GeomDet::setAlignmentPositionError (const AlignmentPositionError& ape) 00040 { 00041 if (!theAlignmentPositionError) { 00042 theAlignmentPositionError = new AlignmentPositionError(ape); 00043 } 00044 else *theAlignmentPositionError = ape; 00045 00046 }