Jpp 20.0.0-195-g190c9e876
the software that should make you happy
Loading...
Searching...
No Matches
JPoint4D.hh
Go to the documentation of this file.
1#ifndef __JPOINT4D__
2#define __JPOINT4D__
3
5
6
7/**
8 * \author mdejong
9 */
10
11namespace JFIT {}
12namespace JPP { using namespace JFIT; }
13
14namespace JFIT {
15
17
18
19 /**
20 * Data structure for vertex fit.
21 */
22 class JPoint4D :
23 public JVertex3D
24 {
25 public:
26 /**
27 * Default constructor.
28 */
30 JVertex3D()
31 {}
32
33
34 /**
35 * Constructor
36 *
37 * \param pos position
38 * \param t time at position
39 */
40 JPoint4D(const JVector3D& pos,
41 const double t) :
42 JVertex3D(pos, t)
43 {}
44
45
46 /**
47 * Constructor
48 *
49 * \param vertex vertex
50 */
51 JPoint4D(const JVertex3D& vertex) :
52 JVertex3D(vertex)
53 {}
54
55 /**
56 * Computes the 4-D distance using the reduced speed of light.
57 *
58 * \param point vertex
59 * \return 4-D distance
60 */
61 double get4Distance(JPoint4D point) const
62 {
63 JGEOMETRY3D::JVector3D pos = this->getPosition() - point.getPosition();
64 double t = (this->getT() - point.getT()) * JPHYSICS::getSpeedOfLight()/JPHYSICS::getIndexOfRefraction();
65 return sqrt(pos.getLengthSquared() + t * t);
66 }
67
68 typedef double JPoint4D::*parameter_type;
69
70 static parameter_type pX() { return &JPoint4D::__x; }
71 static parameter_type pY() { return &JPoint4D::__y; }
72 static parameter_type pZ() { return &JPoint4D::__z; }
73 static parameter_type pT() { return &JPoint4D::__t; }
74 };
75}
76#endif
Data structure for vertex fit.
Definition JPoint4D.hh:24
static parameter_type pT()
Definition JPoint4D.hh:73
static parameter_type pZ()
Definition JPoint4D.hh:72
JPoint4D()
Default constructor.
Definition JPoint4D.hh:29
JPoint4D(const JVertex3D &vertex)
Constructor.
Definition JPoint4D.hh:51
static parameter_type pX()
Definition JPoint4D.hh:70
double get4Distance(JPoint4D point) const
Computes the 4-D distance using the reduced speed of light.
Definition JPoint4D.hh:61
double JPoint4D::* parameter_type
Definition JPoint4D.hh:68
static parameter_type pY()
Definition JPoint4D.hh:71
JPoint4D(const JVector3D &pos, const double t)
Constructor.
Definition JPoint4D.hh:40
const JPosition3D & getPosition() const
Get position.
Data structure for vector in three dimensions.
Definition JVector3D.hh:36
double getLengthSquared() const
Get length squared.
Definition JVector3D.hh:235
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition JVertex3D.hh:160
double getT() const
Get time.
Auxiliary classes and methods for linear and iterative data regression.
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
const double getSpeedOfLight()
Get speed of light.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).