Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:29

0001 //#include "Utilities/Configuration/interface/Architecture.h"
0002 
0003 #include "DataFormats/GeometryCommonDetAlgo/interface/TransverseBoundPlaneFactory.h"
0004 
0005 BoundPlane* TransverseBoundPlaneFactory::operator()(const Surface::GlobalPoint& origin,
0006                                                     const Surface::GlobalVector& dir) const {
0007   // z axis perpendicular to transverse momentum
0008   GlobalVector zAxis = GlobalVector(dir.x(), dir.y(), 0.).unit();
0009 
0010   // y axis coincides with global z
0011   GlobalVector yAxis(0., 0., 1.);
0012 
0013   // x axis obtained by cross product
0014   GlobalVector xAxis = (yAxis.cross(zAxis)).unit();
0015 
0016   Surface::RotationType rot(
0017       xAxis.x(), xAxis.y(), xAxis.z(), yAxis.x(), yAxis.y(), yAxis.z(), zAxis.x(), zAxis.y(), zAxis.z());
0018 
0019   //  Surface::RotationType rot(yAxis, zAxis);
0020 
0021   return new BoundPlane(origin, rot);
0022 }