Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98291
b: refs/heads/l1tmuon-upgrade-dev
c: e638453
h: refs/heads/l1tmuon-upgrade-dev
i:
  98289: 25eb892
  98287: d8ddd0e
  • Loading branch information
Vincenzo Innocente committed Dec 22, 2010
1 parent 3af5d55 commit 3248436
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/l1tmuon-upgrade-dev: 6d81c4bf2acd35e73c045c74344aa3aa496d89fc
refs/heads/l1tmuon-upgrade-dev: e638453f5d2355204ebd317cc649c6541588031c
10 changes: 5 additions & 5 deletions trunk/DataFormats/GeometrySurface/interface/Cylinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* using the static build() methods.
* (The normal constructor will become private in the future).
*
* $Date: 2010/12/22 10:17:24 $
* $Revision: 1.3 $
* $Date: 2010/12/22 10:43:10 $
* $Revision: 1.4 $
*/

#include "DataFormats/GeometrySurface/interface/Surface.h"
Expand Down Expand Up @@ -65,14 +65,14 @@ class Cylinder : public virtual Surface {
virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const LocalPoint&) const;

/// tangent plane to surface from global point
Plane fastTangent(const GlobalPoint& apoint) const{
GlobalVector yPlane = rotation.z();
Plane fastTangent(const GlobalPoint& aPoint) const{
GlobalVector yPlane = rotation().z();
GlobalVector xPlane(yPlane.cross(aPoint-position()));
return Plane(aPoint,RotationType(xPlane, yPlane));
}

/// tangent plane to surface from local point
Plane fastTangent(const LocalPoint& apoint) const {
Plane fastTangent(const LocalPoint& aPoint) const {
return fastTangent(toGlobal(aPoint));
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/DataFormats/GeometrySurface/src/Cylinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ Cylinder::tangentPlane (const GlobalPoint& aPoint) const
// to verify, if the point is actually on the cylinder.
//
// local y parallel to axis
GlobalVector yPlane = rotation.z();
GlobalVector yPlane = rotation().z();
// local x normal to y and a vector linking the specified
// point with the axis
GlobalVector xPlane(yPlane.cross(aPoint-position()));
Scalar size = std::max(std::max(xPlane.x(),xPlane.y()), xPlane.z());
Scalar size = std::max(std::max(std::abs(xPlane.x()),std::abs(xPlane.y())), std::abs(xPlane.z()));
if ( size<FLT_MIN )
throw GeometryError("Attempt to construct TangentPlane on cylinder axis");
// // local z defined by x and y (should point outwards from axis)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int go() {
// cylinder
{
std::cout << " Trivial Cylinder" << std::endl;
Rotation ll( GlobalVector( 1, 0, ,0), GlobalVector( 0, 1, 0));
Rotation ll(GlobalVector( 1, 0, ,0), GlobalVector( 0, 1, 0));
Cylinder cyl(Position(0,0,0),ll, 5.);
Plane t = cyl.fastTangent(GlobalPoint(3.,4.,1.));
std::cout << t.position() << " " << t.rotation() << std::endl;
Expand Down

0 comments on commit 3248436

Please sign in to comment.