CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Geometry/CommonDetUnit/interface/DetPositioner.h

Go to the documentation of this file.
00001 #ifndef DetPositioner_H
00002 #define DetPositioner_H
00003 
00004 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00005 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00006 
00007 /* A base class for classes which modify the positions/orientations of GeomDets.
00008  * The derived classes can call the methods moveGeomDet, rotateGeomDet, setGeomDetPosition,
00009  * setAlignmentPositionError and setSurfaceDeformation to change the position, orientation etc.
00010  */
00011 
00012 class DetPositioner {
00013 public:
00014 
00015   virtual ~DetPositioner() {}
00016 
00017 protected:
00018 
00019   void moveGeomDet( GeomDet& det, const GlobalVector& displacement) {
00020     det.move( displacement);
00021   }
00022 
00023 
00027   void rotateGeomDet( GeomDet& det, const Surface::RotationType& rotation) {
00028     det. rotate( rotation);
00029   }
00030 
00035   void setGeomDetPosition( GeomDet& det, 
00036                            const Surface::PositionType& position, 
00037                            const Surface::RotationType& rotation) {
00038     det.setPosition( position, rotation);
00039   }
00040 
00046   bool setAlignmentPositionError (GeomDet& det, 
00047                                   const AlignmentPositionError& ape) {
00048     return det.setAlignmentPositionError( ape);
00049   }
00050 
00054   void setSurfaceDeformation (GeomDetUnit& detUnit, 
00055                               const SurfaceDeformation* deformation) {
00056     detUnit.setSurfaceDeformation( deformation );
00057   }
00058 
00059 };
00060 
00061 #endif