Jpp  15.0.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
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 11 of file DomCrossing.hh.

Constructor & Destructor Documentation

DomCrossing::DomCrossing ( const double  Rdom)
inline

Definition at line 17 of file DomCrossing.hh.

17  :__Rdom(Rdom)
18  {}
double __Rdom
Definition: DomCrossing.hh:14
DomCrossing::~DomCrossing ( )
inline

Definition at line 19 of file DomCrossing.hh.

20  {}

Member Function Documentation

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

Definition at line 22 of file DomCrossing.hh.

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  }
const int n
Definition: JPolint.hh:660
Data structure for vector in three dimensions.
Definition: JVector3D.hh:34
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
double getDot(const JVector3D &vector) const
Get dot product.
Definition: JVector3D.hh:282

Member Data Documentation

double DomCrossing::__Rdom
private

Definition at line 14 of file DomCrossing.hh.


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