Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
DataFormats
GeometrySurface
src
Cone.cc
Go to the documentation of this file.
1
2
3
#include "
DataFormats/GeometrySurface/interface/Cone.h
"
4
#include "
DataFormats/GeometrySurface/interface/TangentPlane.h
"
5
6
#include <iostream>
7
8
ConstReferenceCountingPointer<TangentPlane>
Cone::tangentPlane
(
const
GlobalPoint
&)
const
{
9
// FIXME: to be implemented...
10
std::cout
<<
"*** WARNING: Cone::tangentPlane not implemented."
<< std::endl;
11
abort();
12
return
ConstReferenceCountingPointer<TangentPlane>
();
13
}
14
15
ConstReferenceCountingPointer<TangentPlane>
Cone::tangentPlane
(
const
LocalPoint
&)
const
{
16
// FIXME: to be implemented...
17
std::cout
<<
"*** WARNING: Cone::tangentPlane not implemented."
<< std::endl;
18
abort();
19
return
ConstReferenceCountingPointer<TangentPlane>
();
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
)
31
return
SurfaceOrientation::onSurface
;
32
double
delta
= double(
p1
.theta()) -
double
(
openingAngle
());
33
if
(fabs(delta) < tolerance /
p1
.mag())
34
return
SurfaceOrientation::onSurface
;
35
36
if
(
p1
.theta() <
Geom::pi
() / 2.) {
37
return
(delta > 0. ?
SurfaceOrientation::positiveSide
:
SurfaceOrientation::negativeSide
);
38
}
else
{
39
return
(delta > 0. ?
SurfaceOrientation::negativeSide
:
SurfaceOrientation::positiveSide
);
40
}
41
}
SurfaceOrientation::positiveSide
Definition:
Surface.h:18
ConstReferenceCountingPointer
Definition:
ReferenceCounted.h:67
tolerance
const double tolerance
Definition:
HGCalGeomParameters.cc:29
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
Cone::vertex
GlobalPoint vertex() const
Global position of the cone vertex.
Definition:
Cone.h:47
CommonMethods.delta
def delta
Definition:
CommonMethods.py:323
SurfaceOrientation::negativeSide
Definition:
Surface.h:18
PV3DBase::z
T z() const
Definition:
PV3DBase.h:61
fireworks::p1
const TString p1
Definition:
fwPaths.cc:12
SurfaceOrientation::Side
Side
Definition:
Surface.h:18
TangentPlane.h
GloballyPositioned< float >::Scalar
float Scalar
Definition:
GloballyPositioned.h:20
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
Point3DBase< float, GlobalTag >
SurfaceOrientation::onSurface
Definition:
Surface.h:18
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:144
Cone::side
Side side(const LocalPoint &p, Scalar tolerance) const override
Definition:
Cone.h:54
Geom::pi
constexpr double pi()
Definition:
Pi.h:31
PV3DBase::x
T x() const
Definition:
PV3DBase.h:59
Cone::tangentPlane
ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const override
Definition:
Cone.cc:8
Cone.h
Cone::openingAngle
Geom::Theta< float > openingAngle() const
Angle of the cone.
Definition:
Cone.h:50
Generated for CMSSW Reference Manual by
1.8.5