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