Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JRECONSTRUCTION::JShowerEnergy Class Reference

#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

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

Constructor & Destructor Documentation

◆ JShowerEnergy()

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

Constructor.


Parameters
Ereference energy

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

696 {
697 this->energy = E;
698 }

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

708 {
709 return fabs(this->energy - first.getE()) < fabs(this->energy - second.getE());
710 }

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

721 {
722 return std::min_element(__begin, __end, *this);
723 }

Member Data Documentation

◆ energy

double JRECONSTRUCTION::JShowerEnergy::energy
protected

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


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