Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
DomCrossing Class Reference

Class to check whether a photon emitted from a position along the z-axis crosses a DOM (approximated by a disc) first, inefficient version. More...

#include <DomCrossing.hh>

Public Member Functions

 DomCrossing (const double Rdom)
 
 ~DomCrossing ()
 
bool operator() (const double theta, const double phi, const double z, const double R, const double dscat)
 

Private Attributes

double __Rdom
 

Detailed Description

Class to check whether a photon emitted from a position along the z-axis crosses a DOM (approximated by a disc) first, inefficient version.

Author
mdejong

Definition at line 18 of file DomCrossing.hh.

Constructor & Destructor Documentation

◆ DomCrossing()

DomCrossing::DomCrossing ( const double Rdom)
inline

Definition at line 24 of file DomCrossing.hh.

24 :__Rdom(Rdom)
25 {}
double __Rdom

◆ ~DomCrossing()

DomCrossing::~DomCrossing ( )
inline

Definition at line 26 of file DomCrossing.hh.

27 {}

Member Function Documentation

◆ operator()()

bool DomCrossing::operator() ( const double theta,
const double phi,
const double z,
const double R,
const double dscat )
inline

Definition at line 29 of file DomCrossing.hh.

34 {
35 using namespace JGEOMETRY3D;
36
37 const JVector3D p0(R,0,0);
38 const JVector3D n(sin(theta),0,cos(theta));
39 const JVector3D l0(0,0,z);
40 const JVector3D l(sin(theta)*cos(phi),sin(theta)*sin(phi),cos(theta));
41
42 const double d = JVector3D(p0-l0).getDot(n)/l.getDot(n);
43
44 if(d<0) return false;
45
46 const JVector3D crossing = l0+JVector3D(l.getX()*d,l.getY()*d,l.getZ()*d);
47
48 const double hitdist = (p0-crossing).getLength();
49
50 const double dist = sqrt(z*z+R*R);
51
52 if(hitdist<__Rdom&&dscat>=dist) return true;
53 else return false;
54
55 }
Data structure for vector in three dimensions.
Definition JVector3D.hh:36
double getDot(const JVector3D &vector) const
Get dot product.
Definition JVector3D.hh:282
Auxiliary classes and methods for 3D geometrical objects and operations.
Definition JAngle3D.hh:19
const int n
Definition JPolint.hh:791

Member Data Documentation

◆ __Rdom

double DomCrossing::__Rdom
private

Definition at line 21 of file DomCrossing.hh.


The documentation for this class was generated from the following file: