Jpp  15.0.5
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
JRECONSTRUCTION::JPosition Class Reference

Auxiliary class to compare fit results with respect to a reference position (e.g. true muon). More...

#include <JEvtToolkit.hh>

Public Member Functions

 JPosition (JVector3D pos)
 Constructor. More...
 
bool operator() (const JFit &first, const JFit &second) const
 Comparison of fit results. More...
 
template<class T >
T operator() (T __begin, T __end) const
 Select best fit result. More...
 

Protected Attributes

JVector3D pos
 

Detailed Description

Auxiliary class to compare fit results with respect to a reference position (e.g. true muon).

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 620 of file JReconstruction/JEvtToolkit.hh.

Constructor & Destructor Documentation

JRECONSTRUCTION::JPosition::JPosition ( JVector3D  pos)
inline

Constructor.

Parameters
posreference position

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

628  {
629  this->pos = pos;
630  }

Member Function Documentation

bool JRECONSTRUCTION::JPosition::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 639 of file JReconstruction/JEvtToolkit.hh.

640  {
641  return this->pos.getDistance(getPosition(first)) < this->pos.getDistance(getPosition(second));
642  }
double getDistance(const JVector3D &pos) const
Get distance to point.
Definition: JVector3D.hh:270
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
JPosition3D getPosition(const JFit &fit)
Get position.
template<class T >
T JRECONSTRUCTION::JPosition::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 652 of file JReconstruction/JEvtToolkit.hh.

653  {
654  return std::min_element(__begin, __end, *this);
655  }

Member Data Documentation

JVector3D JRECONSTRUCTION::JPosition::pos
protected

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


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