CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Cone.cc
Go to the documentation of this file.
1 
2 
5 
6 #include <iostream>
7 
9  // FIXME: to be implemented...
10  std::cout << "*** WARNING: Cone::tangentPlane not implemented." <<std::endl;
11  abort();
13 }
14 
16  // FIXME: to be implemented...
17  std::cout << "*** WARNING: Cone::tangentPlane not implemented." <<std::endl;
18  abort();
20 }
21 
22 Surface::Side Cone::side( const GlobalPoint& p, Scalar tolerance) const {
23  // FIXME: should be done in local coordinates as this is not correct in the case the verstex is not on the (global) Z axis!!!!
24 
25  // tolerance is interpreted as max distance from cone surface.
26  // FIXME: check case when vertex().z()==inf.
27  GlobalPoint p1(p.x(), p.y(), p.z()-vertex().z());
28 
29  // handle the singularity of p=vertex (i.e. p1.mag() undefined)
30  if (p1.mag()<tolerance) return SurfaceOrientation::onSurface;
31  double delta = double(p1.theta())- double(openingAngle());
32  if (fabs(delta) < tolerance/p1.mag()) return SurfaceOrientation::onSurface;
33 
34  if (p1.theta() < Geom::pi()/2.) {
36  } else {
38  }
39 }
dbl * delta
Definition: mlp_gen.cc:36
double Scalar
Definition: Definitions.h:27
T y() const
Definition: PV3DBase.h:63
GlobalPoint vertex() const
Global position of the cone vertex.
Definition: Cone.h:55
T z() const
Definition: PV3DBase.h:64
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const
Definition: Cone.cc:8
virtual Side side(const LocalPoint &p, Scalar tolerance) const
Definition: Cone.h:63
double p1[4]
Definition: TauolaWrapper.h:89
double pi()
Definition: Pi.h:31
tuple cout
Definition: gather_cfg.py:121
T x() const
Definition: PV3DBase.h:62
Geom::Theta< float > openingAngle() const
Angle of the cone.
Definition: Cone.h:58