LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
MCSFitResult.h
Go to the documentation of this file.
1 #ifndef MCSFitResult_h
2 #define MCSFitResult_h
3 
4 namespace recob {
19  class MCSFitResult {
20  public:
21  MCSFitResult()=default;
22  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)
23  : pid_(pid), momFwd_(momFwd), momFwdUnc_(momFwdUnc), llhdFwd_(llhdFwd), momBwd_(momBwd), momBwdUnc_(momBwdUnc), llhdBwd_(llhdBwd), radlengths_(radlengths), angles_(angles) {}
24 
26  int particleIdHyp() const { return pid_; }
27 
29  float fwdMomentum() const { return momFwd_; }
30 
32  float fwdMomUncertainty() const { return momFwdUnc_;}
33 
35  float fwdLogLikelihood() const { return llhdFwd_; }
36 
38  float bwdMomentum() const { return momBwd_; }
39 
41  float bwdMomUncertainty() const { return momBwdUnc_;}
42 
44  float bwdLogLikelihood() const { return llhdBwd_; }
45 
47  const std::vector<float>& segmentRadLengths() const { return radlengths_;}
48 
50  const std::vector<float>& scatterAngles() const { return angles_; }
51 
53  bool isBestFwd() const { return llhdFwd_<llhdBwd_; }
54 
56  float bestMomentum() const { return isBestFwd() ? momFwd_ : momBwd_; }
57 
59  float bestMomUncertainty() const { return isBestFwd() ? momFwdUnc_ : momBwdUnc_;}
60 
62  float bestLogLikelihood() const { return isBestFwd() ? llhdFwd_ : llhdBwd_; }
63 
65  float deltaLogLikelihood() const { return std::abs(llhdFwd_-llhdBwd_); }
66  //
67  private:
68  int pid_;
69  float momFwd_;
70  float momFwdUnc_;
71  float llhdFwd_;
72  float momBwd_;
73  float momBwdUnc_;
74  float llhdBwd_;
75  std::vector<float> radlengths_;
76  std::vector<float> angles_;
77  };
78 }
79 
80 #endif
float bestMomUncertainty() const
momentum uncertainty for best direction fit
Definition: MCSFitResult.h:59
std::vector< float > radlengths_
vector of radiation lengths of the segments used in the fit
Definition: MCSFitResult.h:75
Reconstruction base classes.
float bwdLogLikelihood() const
minimum negative log likelihood value from fit assuming a backward track direction ...
Definition: MCSFitResult.h:44
float momFwdUnc_
momentum uncertainty from fit assuming a forward track direction
Definition: MCSFitResult.h:70
float bwdMomentum() const
momentum value from fit assuming a backward track direction
Definition: MCSFitResult.h:38
float fwdMomUncertainty() const
momentum uncertainty from fit assuming a forward track direction
Definition: MCSFitResult.h:32
int particleIdHyp() const
particle id hypothesis used in the fit
Definition: MCSFitResult.h:26
std::vector< float > angles_
vector of angles between the segments used in the fit
Definition: MCSFitResult.h:76
const std::vector< float > & scatterAngles() const
vector of angles between the segments used in the fit
Definition: MCSFitResult.h:50
float bestLogLikelihood() const
negative log likelihood for best direction fit
Definition: MCSFitResult.h:62
MCSFitResult()=default
bool isBestFwd() const
determines best fit direction based on minumum log likelihood between forward and backward fit ...
Definition: MCSFitResult.h:53
float bestMomentum() const
momentum for best direction fit
Definition: MCSFitResult.h:56
float momBwdUnc_
momentum uncertainty from fit assuming a backward track direction
Definition: MCSFitResult.h:73
int pid_
particle id hypothesis used in the fit
Definition: MCSFitResult.h:68
float deltaLogLikelihood() const
difference in log likelihood between forward and backward fit (absolute value)
Definition: MCSFitResult.h:65
Class storing the result of the Maximum Likelihood fit of Multiple Coulomb Scattering angles between ...
Definition: MCSFitResult.h:19
float llhdFwd_
minimum negative log likelihood value from fit assuming a forward track direction ...
Definition: MCSFitResult.h:71
float momFwd_
momentum value from fit assuming a forward track direction
Definition: MCSFitResult.h:69
float bwdMomUncertainty() const
momentum uncertainty from fit assuming a backward track direction
Definition: MCSFitResult.h:41
float llhdBwd_
minimum negative log likelihood value from fit assuming a backward track direction ...
Definition: MCSFitResult.h:74
float momBwd_
momentum value from fit assuming a backward track direction
Definition: MCSFitResult.h:72
float fwdLogLikelihood() const
minimum negative log likelihood value from fit assuming a forward track direction ...
Definition: MCSFitResult.h:35
float fwdMomentum() const
momentum value from fit assuming a forward track direction
Definition: MCSFitResult.h:29
const std::vector< float > & segmentRadLengths() const
vector of radiation lengths of the segments used in the fit
Definition: MCSFitResult.h:47
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)
Definition: MCSFitResult.h:22