Jpp 20.0.0-195-g190c9e876
the software that should make you happy
Loading...
Searching...
No Matches
JRECONSTRUCTION::JPoint Class Reference

Auxiliary class to compare fit results with respect to a reference 4D-position. More...

#include <JEvtToolkit.hh>

Public Member Functions

 JPoint (JPoint4D point)
 Constructor.
 
 JPoint (const JFit &fit)
 Constructor.
 
bool operator() (const JFit &first, const JFit &second) const
 Comparison of fit results.
 
template<class T >
operator() (T __begin, T __end) const
 Select best fit result.
 

Protected Attributes

JPoint4D point
 

Detailed Description

Auxiliary class to compare fit results with respect to a reference 4D-position.

The sort operation results in an ordered set of fit results with increasing distance between the reference position and that of the fit results.

Definition at line 797 of file JReconstruction/JEvtToolkit.hh.

Constructor & Destructor Documentation

◆ JPoint() [1/2]

JRECONSTRUCTION::JPoint::JPoint ( JPoint4D point)
inline

Constructor.

Parameters
pointreference position

Definition at line 804 of file JReconstruction/JEvtToolkit.hh.

805 {
806 this->point = point;
807 }

◆ JPoint() [2/2]

JRECONSTRUCTION::JPoint::JPoint ( const JFit & fit)
inline

Constructor.

Parameters
fitfit

Definition at line 814 of file JReconstruction/JEvtToolkit.hh.

815 {
816 this->point = getPoint(fit);
817 }
JPoint4D getPoint(const JFit &fit)
Get point.

Member Function Documentation

◆ operator()() [1/2]

bool JRECONSTRUCTION::JPoint::operator() ( const JFit & first,
const JFit & second ) const
inline

Comparison of fit results.

Parameters
firstfirst fit
secondsecond fit
Returns
true if first fit better; else false

Definition at line 826 of file JReconstruction/JEvtToolkit.hh.

827 {
828 return this->point.get4Distance(getPoint(first)) < this->point.get4Distance(getPoint(second));
829 }
double get4Distance(JPoint4D point) const
Computes the 4-D distance using the reduced speed of light.
Definition JPoint4D.hh:61

◆ operator()() [2/2]

template<class T >
T JRECONSTRUCTION::JPoint::operator() ( T __begin,
T __end ) const
inline

Select best fit result.

Parameters
__beginbegin of fit results
__endend of fit results
Returns
best fit result

Definition at line 839 of file JReconstruction/JEvtToolkit.hh.

840 {
841 return std::min_element(__begin, __end, *this);
842 }

Member Data Documentation

◆ point

JPoint4D JRECONSTRUCTION::JPoint::point
protected

Definition at line 845 of file JReconstruction/JEvtToolkit.hh.


The documentation for this class was generated from the following file: