7#include "JMath/JMath.hh"
8#include "JPhysics/JConstants.hh"
9#include "JGeometry3D/JVector3D.hh"
10#include "JGeometry3D/JVersor3Z.hh"
11#include "JGeometry3D/JPosition3D.hh"
12#include "JGeometry3D/JDirection3D.hh"
13#include "JGeometry3D/JTrack3D.hh"
22namespace JPP {
using namespace JFIT; }
27 using JGEOMETRY3D::JVector3D;
28 using JGEOMETRY3D::JVersor3Z;
29 using JGEOMETRY3D::JTrack3D;
48 using JVersor3Z::getDirection;
78 const JVersor3Z& dir) :
90 void move(
const double step,
const double velocity)
92 __x += step * getDX();
93 __y += step * getDY();
94 __z += step * getDZ();
95 __t += step / velocity;
105 void setZ(
const double z,
const double velocity)
107 move((z -
getZ()) / getDZ(), velocity);
133 JLine1Z ::add(value);
134 JVersor3Z::add(value);
148 JLine1Z ::sub(value);
149 JVersor3Z::sub(value);
163 JLine1Z ::mul(value);
164 JVersor3Z::mul(value);
178 JLine1Z ::div(value);
179 JVersor3Z::div(value);
190 inline operator JTrack3D()
const
192 return JTrack3D(JAxis3D(this->getPosition(),
208 D.sub(this->getPosition());
212 return D.getLengthSquared() - dz*dz;
234 inline double getT(
const JVector3D& pos)
const
240 D.sub(this->getPosition());
243 const double R = sqrt(D.getLengthSquared() - dz*dz);
245 return this->
getT() + (dz + R * getKappaC()) * getInverseSpeedOfLight();
261 D.sub(this->getPosition());
264 const double R = sqrt(D.getLengthSquared() - dz*dz);
266 D.sub(JPosition3D(this->
getDirection()) * (dz - R/getTanThetaC()));
268 return JDirection3D(D);
278 inline double getDot(
const JAxis3D& axis)
const
280 return getDirection(axis.getPosition()).getDot(axis.getDirection());
293 in >>
static_cast<JLine1Z&
> (object);
294 in >>
static_cast<JVersor3Z&
>(object);
309 out << static_cast<const JLine1Z&> (
object);
311 out << static_cast<const JVersor3Z&>(
object);
Data structure for fit of straight line paralel to z-axis.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
Data structure for fit of straight line in positive z-direction.
friend std::istream & operator>>(std::istream &in, JLine3Z &object)
Read object from input.
JVersor3D getDirection(const JVector3D &pos) const
Get photon direction of Cherenkov light on PMT.
JLine3Z(const JLine1Z &line, const JVersor3Z &dir)
Constructor.
JLine3Z & sub(const JLine3Z &value)
Subtraction operator.
friend std::ostream & operator<<(std::ostream &out, const JLine3Z &object)
Write object to output.
void setZ(const double z, const double velocity)
Set z-position.
double getDot(const JAxis3D &axis) const
Get cosine angle of impact of Cherenkov light on PMT.
double getDistanceSquared(const JVector3D &pos) const
Get distance squared.
JLine3Z()
Default constructor.
JLine3Z & negate()
Prefix unary minus.
JLine3Z & div(const double value)
Division operator.
JLine3Z(const JLine1Z &line)
Constructor.
double getDistance(const JVector3D &pos) const
Get distance.
void move(const double step, const double velocity)
Move vertex along this line with given velocity.
static parameter_type pDY()
static parameter_type pDX()
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
JLine3Z & add(const JLine3Z &value)
Addition operator.
double JLine3Z::* parameter_type
JLine3Z & mul(const double value)
Multiplication operator.
Auxiliary classes and methods for linear and iterative data regression.