Jpp
software
JPhysics
DomCrossing.hh
Go to the documentation of this file.
1
/**
2
* \author mdejong
3
*/
4
5
/**
6
* Class to check whether a photon emitted from a position along the
7
* z-axis crosses a DOM (approximated by a disc)
8
* first, inefficient version
9
*/
10
11
class
DomCrossing
{
12
13
private
:
14
double
__Rdom
;
15
public
:
16
17
DomCrossing
(
const
double
Rdom):
__Rdom
(Rdom)
18
{}
19
~DomCrossing
()
20
{}
21
22
bool
operator()
(
const
double
theta,
23
const
double
phi,
24
const
double
z,
25
const
double
R,
26
const
double
dscat)
27
{
28
using namespace
JGEOMETRY3D
;
29
30
const
JVector3D
p0(R,0,0);
31
const
JVector3D
n
(sin(theta),0,cos(theta));
32
const
JVector3D
l0(0,0,z);
33
const
JVector3D
l(sin(theta)*cos(phi),sin(theta)*sin(phi),cos(theta));
34
35
const
double
d =
JVector3D
(p0-l0).
getDot
(
n
)/l.
getDot
(
n
);
36
37
if
(d<0)
return
false
;
38
39
const
JVector3D
crossing = l0+
JVector3D
(l.
getX
()*d,l.
getY
()*d,l.
getZ
()*d);
40
41
const
double
hitdist = (p0-crossing).getLength();
42
43
const
double
dist = sqrt(z*z+R*R);
44
45
if
(hitdist<__Rdom&&dscat>=dist)
return
true
;
46
else
return
false
;
47
48
}
49
50
};
51
52
// DomCrossing shadow;
DomCrossing::DomCrossing
DomCrossing(const double Rdom)
Definition:
DomCrossing.hh:17
DomCrossing
Class to check whether a photon emitted from a position along the z-axis crosses a DOM (approximated ...
Definition:
DomCrossing.hh:11
JGEOMETRY3D::JVector3D::getZ
double getZ() const
Get z position.
Definition:
JVector3D.hh:114
JTOOLS::n
const int n
Definition:
JPolint.hh:628
DomCrossing::~DomCrossing
~DomCrossing()
Definition:
DomCrossing.hh:19
DomCrossing::operator()
bool operator()(const double theta, const double phi, const double z, const double R, const double dscat)
Definition:
DomCrossing.hh:22
JGEOMETRY3D::JVector3D
Data structure for vector in three dimensions.
Definition:
JVector3D.hh:33
DomCrossing::__Rdom
double __Rdom
Definition:
DomCrossing.hh:14
JGEOMETRY3D::JVector3D::getY
double getY() const
Get y position.
Definition:
JVector3D.hh:103
JGEOMETRY3D::JVector3D::getDot
double getDot(const JVector3D &vector) const
Get dot product.
Definition:
JVector3D.hh:281
JGEOMETRY3D
Auxiliary classes and methods for 3D geometrical objects and operations.
Definition:
JAngle3D.hh:18
JGEOMETRY3D::JVector3D::getX
double getX() const
Get x position.
Definition:
JVector3D.hh:93
Generated by
1.8.16