23 #ifndef __RestCore_TRestPhysics_H__
24 #define __RestCore_TRestPhysics_H__
61 constexpr
double AU = 1.49597870691E11;
64 constexpr
double solarRadius = 6.95700E8;
66 TVector3
MoveToPlane(
const TVector3& pos,
const TVector3& dir,
const TVector3& n,
const TVector3& a);
68 TVector3
MoveByDistance(
const TVector3& pos,
const TVector3& dir, Double_t d);
82 const Double_t R3,
const Double_t focal);
84 TVector3
GetConeNormal(
const TVector3& pos,
const Double_t alpha,
const Double_t R = 0);
86 TVector3
GetParabolicNormal(
const TVector3& pos,
const Double_t alpha,
const Double_t R3);
89 const Double_t focal);
91 TMatrixD
GetConeMatrix(
const TVector3& d,
const Double_t cosTheta);
94 const TVector3& v,
const Double_t cosTheta);
96 const TVector3& axis,
const TVector3& v);
98 Double_t
DistanceToAxis(
const TVector3& axisPoint,
const TVector3& axisVector,
const TVector3& point);
100 Double_t
GetDistance(
const TVector3& v1,
const TVector3& v2);
101 Double_t
GetDistance2(
const TVector3& v1,
const TVector3& v2);
This namespace serves to define physics constants and other basic physical operations.
constexpr double lightSpeed
Speed of light in m/s.
constexpr double mElectron
Electron mass in Kg.
TVector3 GetHyperbolicVectorIntersection(const TVector3 &pos, const TVector3 &dir, const Double_t beta, const Double_t R3, const Double_t focal)
TVector3 MoveByDistance(const TVector3 &pos, const TVector3 &dir, Double_t d)
This method transports a position pos by a distance d in the direction defined by dir.
TVector3 GetParabolicVectorIntersection(const TVector3 &pos, const TVector3 &dir, const Double_t alpha, const Double_t R3)
TVector3 GetParabolicNormal(const TVector3 &pos, const Double_t alpha, const Double_t R3)
This method returns the normal vector on a parabolic surface pointing towards the inside of the parab...
constexpr double PhMeterIneV
A meter in eV.
constexpr double vacuumPermeability
Vacuum permeability in H/m.
Double_t GetDistance(const TVector3 &v1, const TVector3 &v2)
This method returns the cartesian distance between vector v2 and v1.
TVector3 GetConeNormal(const TVector3 &pos, const Double_t alpha, const Double_t R=0)
This method will return a vector that is normal to the cone surface. The position pos should be at th...
constexpr double kBoltzman
Boltzman constant in J/K.
Double_t GetConeVectorIntersection(const TVector3 &pos, const TVector3 &dir, const TVector3 &d, const TVector3 &v, const Double_t cosTheta)
This method will find the intersection of the trajectory defined by the vector starting at pos and mo...
TVector3 GetPlaneVectorIntersection(const TVector3 &pos, const TVector3 &dir, TVector3 const &n, TVector3 const &a)
This method will find the intersection of the trajectory defined by the vector starting at pos and mo...
constexpr double qElectron
Electron charge in C.
Double_t DistanceToAxis(const TVector3 &axisPoint, const TVector3 &axisVector, const TVector3 &point)
This method will return the distance from point to the straight defined by axisPoint and axisVector.
constexpr double kelvinToeV
A kelvin in eV.
TMatrixD GetConeMatrix(const TVector3 &d, const Double_t cosTheta)
It returns the cone matrix M = d^T x d - cosTheta^2 x I, extracted from the document by "David Eberly...
TVector3 MoveToPlane(const TVector3 &pos, const TVector3 &dir, const TVector3 &n, const TVector3 &a)
This method will translate the vector with direction dir starting at position pos to the plane define...
Double_t GetDistance2(const TVector3 &v1, const TVector3 &v2)
This method returns the squared cartesian distance between vector v2 and v1.
TVector3 MoveByDistanceFast(const TVector3 &pos, const TVector3 &dir, Double_t d)
This method transports a position pos by a distance d in the direction defined by dir....
constexpr double naturalElectron
Electron charge in natural units.
constexpr double hPlanck
Planck constant in J*s.
constexpr double AU
Average Sun-Earth distance in m.
TVector3 GetHyperbolicNormal(const TVector3 &pos, const Double_t beta, const Double_t R3, const Double_t focal)
This method returns the normal vector on a hyperbolic surface pointing towards the inside of the hype...
TVector3 GetVectorReflection(const TVector3 &dir, const TVector3 &n)
This method will return the reflected vector respect to a plane defined by its normal vector n....
constexpr double vacuumPermitivity
Vacuum permitivity in F/m.
Double_t GetVectorsAngle(const TVector3 &v1, const TVector3 &v2)
This method will return the angle in radians between 2 vectors.
constexpr double secondIneV
A second in eV (using natural units)