Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
larcorealg
larcorealg
GeoAlgo
larcorealg/larcorealg/GeoAlgo/GeoCone.cxx
Go to the documentation of this file.
1
#include "
larcorealg/GeoAlgo/GeoAlgoException.h
"
// for GeoAlgoException
2
#include "
larcorealg/GeoAlgo/GeoCone.h
"
3
4
#include <math.h>
5
#include <sstream>
6
7
namespace
geoalgo {
8
9
Cone::Cone
() :
HalfLine
()
10
{
11
_length
= 1;
12
_radius
= 1;
13
_angle
= atan(
_radius
/
_length
);
14
}
15
16
Cone::Cone
(
const
double
x
,
const
double
y
,
const
double
z
,
17
const
double
dirx,
const
double
diry,
const
double
dirz,
18
const
double
length,
const
double
radius)
19
:
HalfLine
(x, y, z, dirx, diry, dirz)
20
{
21
if
(length == 0){
22
std::ostringstream
msg
;
23
msg <<
"<<"
<< __FUNCTION__ <<
">>"
24
<<
" Cone Length cannot be 0."
<< std::endl;
25
throw
GeoAlgoException
(msg.str());
26
}
27
_length
= length;
28
_radius
= radius;
29
_angle
= atan(
_radius
/
_length
);
30
}
31
32
Cone::Cone
(
const
Point_t
& start,
const
Vector_t
&
dir
,
33
const
double
length,
const
double
radius)
34
:
HalfLine
( start, dir )
35
{
36
if
(length == 0){
37
std::ostringstream
msg
;
38
msg <<
"<<"
<< __FUNCTION__ <<
">>"
39
<<
" Cone Length cannot be 0."
<< std::endl;
40
throw
GeoAlgoException
(msg.str());
41
}
42
_length
= length;
43
_radius
= radius;
44
_angle
= atan(
_radius
/
_length
);
45
}
46
47
double
Cone::Length
()
const
{
return
_length
; }
48
49
double
Cone::Radius
()
const
{
return
_radius
; }
50
51
double
Cone::Angle
()
const
{
return
_angle
; }
52
53
void
Cone::Length
(
const
double
l)
54
{
55
if
(l == 0){
56
std::ostringstream
msg
;
57
msg <<
"<<"
<< __FUNCTION__ <<
">>"
58
<<
" Cone Length cannot be 0."
<< std::endl;
59
throw
GeoAlgoException
(msg.str());
60
}
61
_length
= l;
62
_angle
= atan(
_radius
/
_length
);
63
}
64
65
void
Cone::Radius
(
const
double
r
) {
_radius
=
r
;
_angle
= atan(
_radius
/
_length
); }
66
}
z
process_name opflash particleana ie ie ie z
Definition:
run_opflash_electron.fcl:92
geoalgo::Cone::_radius
double _radius
Radius of the cone at the base.
Definition:
larcorealg/larcorealg/GeoAlgo/GeoCone.h:62
x
process_name opflash particleana ie x
Definition:
run_opflash_electron.fcl:90
geoalgo::Cone::_angle
double _angle
Opening Angle.
Definition:
larcorealg/larcorealg/GeoAlgo/GeoCone.h:63
geoalgo::Cone::_length
double _length
Helight (length) of the cone.
Definition:
larcorealg/larcorealg/GeoAlgo/GeoCone.h:61
geoalgo::Cone::Length
double Length() const
Length getter.
Definition:
larcorealg/larcorealg/GeoAlgo/GeoCone.cxx:47
GeoCone.h
geoalgo::Cone::Cone
Cone()
Default constructor.
Definition:
larcorealg/larcorealg/GeoAlgo/GeoCone.cxx:9
y
process_name opflash particleana ie ie y
Definition:
run_opflash_electron.fcl:91
GeoAlgoException.h
dropbox.dir
tuple dir
Definition:
dropbox.py:28
geoalgo::HalfLine
Representation of a 3D semi-infinite line. Defines a semi-infinite 3D line by having a start point (P...
Definition:
larcorealg/larcorealg/GeoAlgo/GeoHalfLine.h:30
example_anaunit.msg
string msg
Definition:
Algorithms/mac/example_anaunit.py:4
geoalgo::Cone::Angle
double Angle() const
Angle getter.
Definition:
larcorealg/larcorealg/GeoAlgo/GeoCone.cxx:51
geoalgo::Cone::Radius
double Radius() const
Length getter.
Definition:
larcorealg/larcorealg/GeoAlgo/GeoCone.cxx:49
r
esac echo uname r
Definition:
condor_lar_pubs.sh:698
geoalgo::Vector
Definition:
larcorealg/larcorealg/GeoAlgo/GeoVector.h:33
geoalgo::GeoAlgoException
Definition:
larcorealg/larcorealg/GeoAlgo/GeoAlgoException.h:27
Generated by
1.8.5