Belle II Software development
|
Utility for solving inverse ray-tracing problem. More...
#include <InverseRaytracer.h>
Classes | |
struct | CerenkovAngle |
Sine and cosine of Cerenkov angle. More... | |
struct | Solution |
Solution of inverse ray-tracing. More... | |
Public Types | |
enum | ErrorCodes { c_NoPhysicsSolution = -1 , c_NoEquationSolution = -2 , c_NoReflectionPoint = -3 } |
Error codes returned by solveDirect or solveReflected. More... | |
enum | EGeometry { c_Unified = 0 , c_Segmented = 1 } |
Treatement of quartz geometry. More... | |
enum | EOptics { c_SemiLinear = 0 , c_Exact = 1 } |
Treatement of spherical mirror optics. More... | |
Public Member Functions | |
InverseRaytracer (int moduleID, double cosTotal) | |
Class constructor. | |
void | clear () const |
Clear the solutions to prepare for the new round. | |
int | solveDirect (double xD, double zD, const TOPTrack::AssumedEmission &assumedEmission, const CerenkovAngle &cer, double step=0) const |
Solve inverse ray-tracing for direct photon. | |
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. | |
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. | |
double | getCosTotal () const |
Returns cosine of total reflection angle. | |
std::vector< Solution > & | getSolutions (unsigned i) const |
Returns the solutions of inverse ray-tracing. | |
bool | getStatus () const |
Returns status. | |
bool | getStatus (unsigned i) const |
Returns status. | |
bool | isNymDifferent () const |
Checks if Nym differs between solutions front and back in at least one of the vectors. | |
PhotonState | getReconstructedPhoton (const Solution &sol, double DFic=0) const |
Returns reconstructed photon at emission for a given solution of inverse raytracing. | |
int | getModuleID () const |
Returns slot ID. | |
EGeometry | getGeometry () const |
Returns quartz geometry treatement. | |
EOptics | getOptics () const |
Returns treatement of spherical mirror optics. | |
const std::vector< BarSegment > & | getBars () const |
Returns geometry data of bar segments. | |
const Mirror & | getMirror () const |
Returns geometry data of spherical mirror. | |
const Prism & | getPrism () const |
Returns geometry data of prism. | |
void | setMirrorCenter (double xc, double yc) |
Sets the mirror center-of-curvature. | |
Static Public Member Functions | |
static void | setMaxPropagationLen (double maxLen) |
Sets maximal allowed propagation length. | |
Protected Attributes | |
int | m_moduleID = 0 |
slot ID | |
EGeometry | m_geometry = c_Unified |
quartz geometry | |
EOptics | m_optics = c_SemiLinear |
spherical mirror optics | |
std::vector< BarSegment > | m_bars |
geometry data of bar segments | |
Mirror | m_mirror |
spherical mirror geometry data | |
Prism | m_prism |
prism geometry data | |
Private Member Functions | |
bool | solve (double dxdz, const CerenkovAngle &cer, const TOPTrack::TrackAngles &trk) const |
Solve inverse ray-tracing for unknown azimuthal Cerenkov angle. | |
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. | |
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. | |
Private Attributes | |
double | m_cosTotal = 0 |
cosine of total reflection angle | |
std::vector< Solution > | m_solutions [2] |
storage for the two solutions | |
bool | m_ok [2] = {false, false} |
status of solutions | |
ROOT::Math::XYZPoint | m_emiPoint |
temporary storage of emission point | |
CerenkovAngle | m_cer |
temporary storage of Cerenkov angle | |
TOPTrack::TrackAngles | m_trk |
temporary storage of track polar and azimuthal angles | |
Static Private Attributes | |
static double | s_maxLen = 10000 |
maximal allowed propagation length | |
Utility for solving inverse ray-tracing problem.
Definition at line 28 of file InverseRaytracer.h.
|
inherited |
Treatement of quartz geometry.
Enumerator | |
---|---|
c_Unified | single bar with average width and thickness |
c_Segmented | segmented bars |
Definition at line 33 of file RaytracerBase.h.
|
inherited |
Treatement of spherical mirror optics.
Enumerator | |
---|---|
c_SemiLinear | semi-linear approximation |
c_Exact | exact optics |
Definition at line 41 of file RaytracerBase.h.
enum ErrorCodes |
Error codes returned by solveDirect or solveReflected.
Enumerator | |
---|---|
c_NoPhysicsSolution | no physics solution |
c_NoEquationSolution | no solution of equation |
c_NoReflectionPoint | position on the mirror not found |
Definition at line 35 of file InverseRaytracer.h.
|
inline |
Class constructor.
moduleID | slot ID |
cosTotal | cosine of total reflection angle |
Definition at line 133 of file InverseRaytracer.h.
void clear | ( | ) | const |
Clear the solutions to prepare for the new round.
Definition at line 59 of file InverseRaytracer.cc.
|
private |
Finds reflection point on the mirror using semi-linear optics approximation.
xE | unfolded emission position in x (unfolding w.r.t mirror) |
zE | emission position in z |
xD | unfolded detection position in x (unfolding w.r.t mirror) |
zD | detection position in z |
xmMin | lower limit for search range in x |
xmMax | upper limit for search range in x |
xM | reflection position in x [out] |
zM | reflection position in z [out] |
dxdz | photon slope in x-z (dx/dz) before mirror [out] |
Definition at line 313 of file InverseRaytracer.cc.
|
inlineinherited |
Returns geometry data of bar segments.
Definition at line 161 of file RaytracerBase.h.
|
inline |
Returns cosine of total reflection angle.
Definition at line 191 of file InverseRaytracer.h.
|
private |
Returns the difference between input xe and the reflected position at given x.
This function is used to find the reflection point on the mirror. All arguments must be given in the mirror frame and in units of mirror radius.
x | position in x on the mirror |
xe | unfolded emission position in x |
ze | emission position in z |
xd | unfolded detection position in x |
zd | detection position in z |
Definition at line 300 of file InverseRaytracer.cc.
|
inlineinherited |
Returns quartz geometry treatement.
Definition at line 149 of file RaytracerBase.h.
|
inlineinherited |
Returns geometry data of spherical mirror.
Definition at line 167 of file RaytracerBase.h.
|
inlineinherited |
|
inlineinherited |
Returns treatement of spherical mirror optics.
Definition at line 155 of file RaytracerBase.h.
|
inlineinherited |
Returns geometry data of prism.
Definition at line 173 of file RaytracerBase.h.
PhotonState getReconstructedPhoton | ( | const Solution & | sol, |
double | DFic = 0 |
||
) | const |
Returns reconstructed photon at emission for a given solution of inverse raytracing.
sol | solution of inverse raytracing |
DFic | additional rotation angle around track (delta Cerenkov azimuthal angle) |
Definition at line 356 of file InverseRaytracer.cc.
|
inline |
Returns the solutions of inverse ray-tracing.
i | to select first (0) or second (1) solutions |
Definition at line 198 of file InverseRaytracer.h.
|
inline |
|
inline |
Returns status.
i | to select status of first (0) or second (1) solutions |
Definition at line 211 of file InverseRaytracer.h.
bool isNymDifferent | ( | ) | const |
Checks if Nym differs between solutions front and back in at least one of the vectors.
Definition at line 259 of file InverseRaytracer.cc.
|
inlinestatic |
Sets maximal allowed propagation length.
maxLen | maximal allowed propagation length |
Definition at line 141 of file InverseRaytracer.h.
|
inherited |
Sets the mirror center-of-curvature.
xc | center of curvature in x |
yc | center of curvature in y |
Definition at line 100 of file RaytracerBase.cc.
|
private |
Solve inverse ray-tracing for unknown azimuthal Cerenkov angle.
Solutions are always two or none (very rare case, phic=0: the two are the same)
dxdz | photon slope (dx/dz) in x-z projection |
cer | sine and cosine of Cerenkov angle |
trk | sine and cosine of track polar and azimuthal angles at photon emission |
Definition at line 268 of file InverseRaytracer.cc.
int solveDirect | ( | double | xD, |
double | zD, | ||
const TOPTrack::AssumedEmission & | assumedEmission, | ||
const CerenkovAngle & | cer, | ||
double | step = 0 |
||
) | const |
Solve inverse ray-tracing for direct photon.
xD | unfolded position in x of photon at detection plane |
zD | position of detection plane |
assumedEmission | photon emission position and track angles |
cer | sine and cosine of Cerenkov angle |
step | step for numerical derivative calculation |
Definition at line 67 of file InverseRaytracer.cc.
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.
xM | position in x of the reflection point on the mirror. |
Nxm | signed number of reflections before mirror |
assumedEmission | photon emission position and track angles |
cer | sine and cosine of Cerenkov angle |
Definition at line 192 of file InverseRaytracer.cc.
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.
xD | unfolded position in x of photon at detection plane (unfolding w.r.t mirror) |
zD | position of detection plane |
Nxm | signed number of reflections before mirror |
xmMin | lower limit for the reflection point search range |
xmMax | upper limit for the reflection point search range |
assumedEmission | photon emission position and track angles |
cer | sine and cosine of Cerenkov angle |
step | step for numerical derivative calculation |
Definition at line 108 of file InverseRaytracer.cc.
|
protectedinherited |
geometry data of bar segments
Definition at line 188 of file RaytracerBase.h.
|
mutableprivate |
temporary storage of Cerenkov angle
Definition at line 272 of file InverseRaytracer.h.
|
private |
cosine of total reflection angle
Definition at line 268 of file InverseRaytracer.h.
|
mutableprivate |
temporary storage of emission point
Definition at line 271 of file InverseRaytracer.h.
quartz geometry
Definition at line 185 of file RaytracerBase.h.
|
protectedinherited |
spherical mirror geometry data
Definition at line 189 of file RaytracerBase.h.
|
protectedinherited |
slot ID
Definition at line 184 of file RaytracerBase.h.
|
mutableprivate |
status of solutions
Definition at line 270 of file InverseRaytracer.h.
|
protectedinherited |
spherical mirror optics
Definition at line 186 of file RaytracerBase.h.
|
protectedinherited |
prism geometry data
Definition at line 190 of file RaytracerBase.h.
|
mutableprivate |
storage for the two solutions
Definition at line 269 of file InverseRaytracer.h.
|
mutableprivate |
temporary storage of track polar and azimuthal angles
Definition at line 273 of file InverseRaytracer.h.
|
staticprivate |
maximal allowed propagation length
Definition at line 275 of file InverseRaytracer.h.