LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
recob::MCSFitResult Class Reference

Class storing the result of the Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Track or Trajectory. More...

#include "MCSFitResult.h"

Public Member Functions

 MCSFitResult ()=default
 
 MCSFitResult (int pid, float momFwd, float momFwdUnc, float llhdFwd, float momBwd, float momBwdUnc, float llhdBwd, const std::vector< float > &radlengths, const std::vector< float > &angles)
 
int particleIdHyp () const
 particle id hypothesis used in the fit More...
 
float fwdMomentum () const
 momentum value from fit assuming a forward track direction More...
 
float fwdMomUncertainty () const
 momentum uncertainty from fit assuming a forward track direction More...
 
float fwdLogLikelihood () const
 minimum negative log likelihood value from fit assuming a forward track direction More...
 
float bwdMomentum () const
 momentum value from fit assuming a backward track direction More...
 
float bwdMomUncertainty () const
 momentum uncertainty from fit assuming a backward track direction More...
 
float bwdLogLikelihood () const
 minimum negative log likelihood value from fit assuming a backward track direction More...
 
const std::vector< float > & segmentRadLengths () const
 vector of radiation lengths of the segments used in the fit More...
 
const std::vector< float > & scatterAngles () const
 vector of angles between the segments used in the fit More...
 
bool isBestFwd () const
 determines best fit direction based on minumum log likelihood between forward and backward fit More...
 
float bestMomentum () const
 momentum for best direction fit More...
 
float bestMomUncertainty () const
 momentum uncertainty for best direction fit More...
 
float bestLogLikelihood () const
 negative log likelihood for best direction fit More...
 
float deltaLogLikelihood () const
 difference in log likelihood between forward and backward fit (absolute value) More...
 

Private Attributes

int pid_
 particle id hypothesis used in the fit More...
 
float momFwd_
 momentum value from fit assuming a forward track direction More...
 
float momFwdUnc_
 momentum uncertainty from fit assuming a forward track direction More...
 
float llhdFwd_
 minimum negative log likelihood value from fit assuming a forward track direction More...
 
float momBwd_
 momentum value from fit assuming a backward track direction More...
 
float momBwdUnc_
 momentum uncertainty from fit assuming a backward track direction More...
 
float llhdBwd_
 minimum negative log likelihood value from fit assuming a backward track direction More...
 
std::vector< float > radlengths_
 vector of radiation lengths of the segments used in the fit More...
 
std::vector< float > angles_
 vector of angles between the segments used in the fit More...
 

Detailed Description

Class storing the result of the Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Track or Trajectory.

Class storing the result of the Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Track or Trajectory. It stores: the resulting momentum, momentum uncertainty, and best likelihood value (both for fwd and bwd fit); the vectors of segment (radiation) lengths and of scattering angles; the PID hypothesis used in the fit.

Author
G. Cerati (FNAL, MicroBooNE)
Date
2017
Version
1.0

Definition at line 19 of file MCSFitResult.h.

Constructor & Destructor Documentation

recob::MCSFitResult::MCSFitResult ( )
default
recob::MCSFitResult::MCSFitResult ( int  pid,
float  momFwd,
float  momFwdUnc,
float  llhdFwd,
float  momBwd,
float  momBwdUnc,
float  llhdBwd,
const std::vector< float > &  radlengths,
const std::vector< float > &  angles 
)
inline

Definition at line 22 of file MCSFitResult.h.

31  : pid_(pid)
32  , momFwd_(momFwd)
33  , momFwdUnc_(momFwdUnc)
34  , llhdFwd_(llhdFwd)
35  , momBwd_(momBwd)
36  , momBwdUnc_(momBwdUnc)
37  , llhdBwd_(llhdBwd)
38  , radlengths_(radlengths)
39  , angles_(angles)
40  {}
std::vector< float > radlengths_
vector of radiation lengths of the segments used in the fit
Definition: MCSFitResult.h:94
float momFwdUnc_
momentum uncertainty from fit assuming a forward track direction
Definition: MCSFitResult.h:87
std::vector< float > angles_
vector of angles between the segments used in the fit
Definition: MCSFitResult.h:95
float momBwdUnc_
momentum uncertainty from fit assuming a backward track direction
Definition: MCSFitResult.h:91
int pid_
particle id hypothesis used in the fit
Definition: MCSFitResult.h:85
float llhdFwd_
minimum negative log likelihood value from fit assuming a forward track direction ...
Definition: MCSFitResult.h:89
float momFwd_
momentum value from fit assuming a forward track direction
Definition: MCSFitResult.h:86
float llhdBwd_
minimum negative log likelihood value from fit assuming a backward track direction ...
Definition: MCSFitResult.h:93
float momBwd_
momentum value from fit assuming a backward track direction
Definition: MCSFitResult.h:90

Member Function Documentation

float recob::MCSFitResult::bestLogLikelihood ( ) const
inline

negative log likelihood for best direction fit

Definition at line 79 of file MCSFitResult.h.

References isBestFwd(), llhdBwd_, and llhdFwd_.

79 { return isBestFwd() ? llhdFwd_ : llhdBwd_; }
bool isBestFwd() const
determines best fit direction based on minumum log likelihood between forward and backward fit ...
Definition: MCSFitResult.h:70
float llhdFwd_
minimum negative log likelihood value from fit assuming a forward track direction ...
Definition: MCSFitResult.h:89
float llhdBwd_
minimum negative log likelihood value from fit assuming a backward track direction ...
Definition: MCSFitResult.h:93
float recob::MCSFitResult::bestMomentum ( ) const
inline

momentum for best direction fit

Definition at line 73 of file MCSFitResult.h.

References isBestFwd(), momBwd_, and momFwd_.

Referenced by RecoProxyUsageExample::analyze().

73 { return isBestFwd() ? momFwd_ : momBwd_; }
bool isBestFwd() const
determines best fit direction based on minumum log likelihood between forward and backward fit ...
Definition: MCSFitResult.h:70
float momFwd_
momentum value from fit assuming a forward track direction
Definition: MCSFitResult.h:86
float momBwd_
momentum value from fit assuming a backward track direction
Definition: MCSFitResult.h:90
float recob::MCSFitResult::bestMomUncertainty ( ) const
inline

momentum uncertainty for best direction fit

Definition at line 76 of file MCSFitResult.h.

References isBestFwd(), momBwdUnc_, and momFwdUnc_.

76 { return isBestFwd() ? momFwdUnc_ : momBwdUnc_; }
float momFwdUnc_
momentum uncertainty from fit assuming a forward track direction
Definition: MCSFitResult.h:87
bool isBestFwd() const
determines best fit direction based on minumum log likelihood between forward and backward fit ...
Definition: MCSFitResult.h:70
float momBwdUnc_
momentum uncertainty from fit assuming a backward track direction
Definition: MCSFitResult.h:91
float recob::MCSFitResult::bwdLogLikelihood ( ) const
inline

minimum negative log likelihood value from fit assuming a backward track direction

Definition at line 61 of file MCSFitResult.h.

References llhdBwd_.

61 { return llhdBwd_; }
float llhdBwd_
minimum negative log likelihood value from fit assuming a backward track direction ...
Definition: MCSFitResult.h:93
float recob::MCSFitResult::bwdMomentum ( ) const
inline

momentum value from fit assuming a backward track direction

Definition at line 55 of file MCSFitResult.h.

References momBwd_.

55 { return momBwd_; }
float momBwd_
momentum value from fit assuming a backward track direction
Definition: MCSFitResult.h:90
float recob::MCSFitResult::bwdMomUncertainty ( ) const
inline

momentum uncertainty from fit assuming a backward track direction

Definition at line 58 of file MCSFitResult.h.

References momBwdUnc_.

58 { return momBwdUnc_; }
float momBwdUnc_
momentum uncertainty from fit assuming a backward track direction
Definition: MCSFitResult.h:91
float recob::MCSFitResult::deltaLogLikelihood ( ) const
inline

difference in log likelihood between forward and backward fit (absolute value)

Definition at line 82 of file MCSFitResult.h.

References util::abs(), llhdBwd_, and llhdFwd_.

82 { return std::abs(llhdFwd_ - llhdBwd_); }
constexpr auto abs(T v)
Returns the absolute value of the argument.
float llhdFwd_
minimum negative log likelihood value from fit assuming a forward track direction ...
Definition: MCSFitResult.h:89
float llhdBwd_
minimum negative log likelihood value from fit assuming a backward track direction ...
Definition: MCSFitResult.h:93
float recob::MCSFitResult::fwdLogLikelihood ( ) const
inline

minimum negative log likelihood value from fit assuming a forward track direction

Definition at line 52 of file MCSFitResult.h.

References llhdFwd_.

52 { return llhdFwd_; }
float llhdFwd_
minimum negative log likelihood value from fit assuming a forward track direction ...
Definition: MCSFitResult.h:89
float recob::MCSFitResult::fwdMomentum ( ) const
inline

momentum value from fit assuming a forward track direction

Definition at line 46 of file MCSFitResult.h.

References momFwd_.

46 { return momFwd_; }
float momFwd_
momentum value from fit assuming a forward track direction
Definition: MCSFitResult.h:86
float recob::MCSFitResult::fwdMomUncertainty ( ) const
inline

momentum uncertainty from fit assuming a forward track direction

Definition at line 49 of file MCSFitResult.h.

References momFwdUnc_.

49 { return momFwdUnc_; }
float momFwdUnc_
momentum uncertainty from fit assuming a forward track direction
Definition: MCSFitResult.h:87
bool recob::MCSFitResult::isBestFwd ( ) const
inline

determines best fit direction based on minumum log likelihood between forward and backward fit

Definition at line 70 of file MCSFitResult.h.

References llhdBwd_, and llhdFwd_.

Referenced by bestLogLikelihood(), bestMomentum(), and bestMomUncertainty().

70 { return llhdFwd_ < llhdBwd_; }
float llhdFwd_
minimum negative log likelihood value from fit assuming a forward track direction ...
Definition: MCSFitResult.h:89
float llhdBwd_
minimum negative log likelihood value from fit assuming a backward track direction ...
Definition: MCSFitResult.h:93
int recob::MCSFitResult::particleIdHyp ( ) const
inline

particle id hypothesis used in the fit

Definition at line 43 of file MCSFitResult.h.

References pid_.

43 { return pid_; }
int pid_
particle id hypothesis used in the fit
Definition: MCSFitResult.h:85
const std::vector<float>& recob::MCSFitResult::scatterAngles ( ) const
inline

vector of angles between the segments used in the fit

Definition at line 67 of file MCSFitResult.h.

References angles_.

67 { return angles_; }
std::vector< float > angles_
vector of angles between the segments used in the fit
Definition: MCSFitResult.h:95
const std::vector<float>& recob::MCSFitResult::segmentRadLengths ( ) const
inline

vector of radiation lengths of the segments used in the fit

Definition at line 64 of file MCSFitResult.h.

References radlengths_.

64 { return radlengths_; }
std::vector< float > radlengths_
vector of radiation lengths of the segments used in the fit
Definition: MCSFitResult.h:94

Member Data Documentation

std::vector<float> recob::MCSFitResult::angles_
private

vector of angles between the segments used in the fit

Definition at line 95 of file MCSFitResult.h.

Referenced by scatterAngles().

float recob::MCSFitResult::llhdBwd_
private

minimum negative log likelihood value from fit assuming a backward track direction

Definition at line 93 of file MCSFitResult.h.

Referenced by bestLogLikelihood(), bwdLogLikelihood(), deltaLogLikelihood(), and isBestFwd().

float recob::MCSFitResult::llhdFwd_
private

minimum negative log likelihood value from fit assuming a forward track direction

Definition at line 89 of file MCSFitResult.h.

Referenced by bestLogLikelihood(), deltaLogLikelihood(), fwdLogLikelihood(), and isBestFwd().

float recob::MCSFitResult::momBwd_
private

momentum value from fit assuming a backward track direction

Definition at line 90 of file MCSFitResult.h.

Referenced by bestMomentum(), and bwdMomentum().

float recob::MCSFitResult::momBwdUnc_
private

momentum uncertainty from fit assuming a backward track direction

Definition at line 91 of file MCSFitResult.h.

Referenced by bestMomUncertainty(), and bwdMomUncertainty().

float recob::MCSFitResult::momFwd_
private

momentum value from fit assuming a forward track direction

Definition at line 86 of file MCSFitResult.h.

Referenced by bestMomentum(), and fwdMomentum().

float recob::MCSFitResult::momFwdUnc_
private

momentum uncertainty from fit assuming a forward track direction

Definition at line 87 of file MCSFitResult.h.

Referenced by bestMomUncertainty(), and fwdMomUncertainty().

int recob::MCSFitResult::pid_
private

particle id hypothesis used in the fit

Definition at line 85 of file MCSFitResult.h.

Referenced by particleIdHyp().

std::vector<float> recob::MCSFitResult::radlengths_
private

vector of radiation lengths of the segments used in the fit

Definition at line 94 of file MCSFitResult.h.

Referenced by segmentRadLengths().


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