Jpp in_tag_pdf_generation
the software that should make you happy
Loading...
Searching...
No Matches
JRECONSTRUCTION::JShowerEnergy Class Reference

Auxiliary class to compare fit results with respect to a reference energy. More...

#include <JEvtToolkit.hh>

Public Member Functions

 JShowerEnergy (double E)
 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

double energy
 

Detailed Description

Auxiliary class to compare fit results with respect to a reference energy.

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

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

Constructor & Destructor Documentation

◆ JShowerEnergy()

JRECONSTRUCTION::JShowerEnergy::JShowerEnergy ( double E)
inline

Constructor.


Parameters
Ereference energy

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

782 {
783 this->energy = E;
784 }

Member Function Documentation

◆ operator()() [1/2]

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

794 {
795 return fabs(this->energy - first.getE()) < fabs(this->energy - second.getE());
796 }

◆ operator()() [2/2]

template<class T >
T JRECONSTRUCTION::JShowerEnergy::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 806 of file JReconstruction/JEvtToolkit.hh.

807 {
808 return std::min_element(__begin, __end, *this);
809 }

Member Data Documentation

◆ energy

double JRECONSTRUCTION::JShowerEnergy::energy
protected

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


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