11#include <top/reconstruction_cpp/RaytracerBase.h>
12#include <top/reconstruction_cpp/PhotonState.h>
13#include <top/reconstruction_cpp/TOPTrack.h>
15#include <Math/Point3D.h>
158 const CerenkovAngle& cer,
double step = 0)
const;
172 int solveReflected(
double xD,
double zD,
int Nxm,
double xmMin,
double xmMax,
174 const CerenkovAngle& cer,
double step = 0)
const;
185 const CerenkovAngle& cer)
const;
252 bool findReflectionPoint(
double xE,
double zE,
double xD,
double zD,
double xmMin,
double xmMax,
253 double& xM,
double& zM,
double& dxdz)
const;
266 double getDeltaXE(
double x,
double xe,
double ze,
double xd,
double zd)
const;
270 mutable bool m_ok[2] = {
false,
false};
Utility for solving inverse ray-tracing problem.
double m_cosTotal
cosine of total reflection angle
int solveReflected(double xD, double zD, int Nxm, double xmMin, double xmMax, const TOPTrack::AssumedEmission &assumedEmission, const CerenkovAngle &cer, double step=0) const
Solve inverse ray-tracing for reflected photon.
PhotonState getReconstructedPhoton(const Solution &sol, double DFic=0) const
Returns reconstructed photon at emission for a given solution of inverse raytracing.
int solveForReflectionPoint(double xM, int Nxm, const TOPTrack::AssumedEmission &assumedEmission, const CerenkovAngle &cer) const
Solve inverse ray-tracing for a given reflection point on the mirror.
InverseRaytracer(int moduleID, double cosTotal)
Class constructor.
bool getStatus() const
Returns status.
bool solve(double dxdz, const CerenkovAngle &cer, const TOPTrack::TrackAngles &trk) const
Solve inverse ray-tracing for unknown azimuthal Cerenkov angle.
ErrorCodes
Error codes returned by solveDirect or solveReflected.
@ c_NoEquationSolution
no solution of equation
@ c_NoReflectionPoint
position on the mirror not found
@ c_NoPhysicsSolution
no physics solution
double getDeltaXE(double x, double xe, double ze, double xd, double zd) const
Returns the difference between input xe and the reflected position at given x.
bool findReflectionPoint(double xE, double zE, double xD, double zD, double xmMin, double xmMax, double &xM, double &zM, double &dxdz) const
Finds reflection point on the mirror using semi-linear optics approximation.
bool isNymDifferent() const
Checks if Nym differs between solutions front and back in at least one of the vectors.
std::vector< Solution > & getSolutions(unsigned i) const
Returns the solutions of inverse ray-tracing.
ROOT::Math::XYZPoint m_emiPoint
temporary storage of emission point
static double s_maxLen
maximal allowed propagation length
double getCosTotal() const
Returns cosine of total reflection angle.
CerenkovAngle m_cer
temporary storage of Cerenkov angle
int solveDirect(double xD, double zD, const TOPTrack::AssumedEmission &assumedEmission, const CerenkovAngle &cer, double step=0) const
Solve inverse ray-tracing for direct photon.
static void setMaxPropagationLen(double maxLen)
Sets maximal allowed propagation length.
std::vector< Solution > m_solutions[2]
storage for the two solutions
void clear() const
Clear the solutions to prepare for the new round.
bool getStatus(unsigned i) const
Returns status.
bool m_ok[2]
status of solutions
TOPTrack::TrackAngles m_trk
temporary storage of track polar and azimuthal angles
State of the Cerenkov photon in the quartz optics.
Base class with geometry data.
@ c_Unified
single bar with average width and thickness
@ c_SemiLinear
semi-linear approximation
Abstract base class for different kinds of events.
Sine and cosine of Cerenkov angle.
double cosThc
cosine of Cerenkov angle
double sinThc
sine of Cerenkov angle
CerenkovAngle()
Default constructor.
Solution of inverse ray-tracing.
int Nxm
number of reflections in x before mirror
double yB
unfolded coordinate y of photon at Bar exit plane
void setDirection(const CerenkovAngle &cer, const TOPTrack::TrackAngles &trk)
Sets photon direction.
bool getStatus() const
Returns status.
double xD
unfolded coordinate x of photon at Detector plane
double step
step for numerical derivative calculation
double cosFic
cosine of azimuthal Cerenkov angle
double getFic() const
Returns Cerenkov azimuthal angle.
int Nym
number of reflections in y before mirror
double ky
photon direction in y at emission
bool totRefl
total reflection status
void setTotalReflStatus(double A, double B, double cosTotal)
Sets total reflection status for direct photon.
double sinFic
sine of azimuthal Cerenkov angle
double kz
photon direction in z at emission
double kx
photon direction in x at emission
double len
propagation length to detector plane
double yD
unfolded coordinate y of photon at Detector plane
double zD
coordinate z of Detector plane
assumed photon emission point in local frame
Sine and cosine of track polar and azimuthal angles at assumed photon emission.