Class for Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Track or Trajectory. More...
#include <TrajectoryMCSFitter.h>
Classes | |
struct | Config |
struct | ScanResult |
Public Types | |
using | Parameters = fhicl::Table< Config > |
Public Member Functions | |
TrajectoryMCSFitter (int pIdHyp, int minNSegs, double segLen, int minHitsPerSegment, int nElossSteps, int eLossMode, double pMin, double pMax, double pStepCoarse, double pStep, double fineScanWindow, const std::array< double, 5 > &angResol, const std::array< double, 5 > &hlParams, double segLenTolerance, bool applySCEcorr) | |
TrajectoryMCSFitter (const Parameters &p) | |
recob::MCSFitResult | fitMcs (const recob::TrackTrajectory &traj) const |
recob::MCSFitResult | fitMcs (const recob::Track &track) const |
recob::MCSFitResult | fitMcs (const recob::Trajectory &traj) const |
recob::MCSFitResult | fitMcs (const recob::TrackTrajectory &traj, int pid) const |
recob::MCSFitResult | fitMcs (const recob::Track &track, int pid) const |
recob::MCSFitResult | fitMcs (const recob::Trajectory &traj, int pid) const |
void | breakTrajInSegments (const recob::TrackTrajectory &traj, std::vector< size_t > &breakpoints, std::vector< float > &segradlengths, std::vector< float > &cumseglens) const |
void | linearRegression (const recob::TrackTrajectory &traj, const size_t firstPoint, const size_t lastPoint, recob::tracking::Vector_t &pcdir) const |
double | mcsLikelihood (double p, double theta0x, std::vector< float > &dthetaij, std::vector< float > &seg_nradl, std::vector< float > &cumLen, bool fwd, int pid) const |
const ScanResult | doLikelihoodScan (std::vector< float > &dtheta, std::vector< float > &seg_nradlengths, std::vector< float > &cumLen, bool fwdFit, int pid, float detAngResol) const |
const ScanResult | doLikelihoodScan (std::vector< float > &dtheta, std::vector< float > &seg_nradlengths, std::vector< float > &cumLen, bool fwdFit, int pid, float pmin, float pmax, float pstep, float detAngResol) const |
double | HighlandFirstTerm (const double p) const |
double | DetectorAngularResolution (const double uz) const |
double | mass (int pid) const |
double | energyLossBetheBloch (const double mass, const double e2) const |
double | energyLossLandau (const double mass2, const double E2, const double x) const |
double | GetE (const double initial_E, const double length_travelled, const double mass) const |
int | minNSegs () const |
double | segLen () const |
double | segLenTolerance () const |
Private Attributes | |
int | pIdHyp_ |
int | minNSegs_ |
double | segLen_ |
int | minHitsPerSegment_ |
int | nElossSteps_ |
int | eLossMode_ |
double | pMin_ |
double | pMax_ |
double | pStepCoarse_ |
double | pStep_ |
double | fineScanWindow_ |
std::array< double, 5 > | angResol_ |
std::array< double, 5 > | hlParams_ |
double | segLenTolerance_ |
bool | applySCEcorr_ |
Class for Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Track or Trajectory.
Class for Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Track or Trajectory.
Inputs are: a Track or Trajectory, and various fit parameters (pIdHypothesis, minNumSegments, segmentLength, pMin, pMax, pStep, angResol)
Outputs are: a recob::MCSFitResult, containing: resulting momentum, momentum uncertainty, and best likelihood value (both for fwd and bwd fit); vector of comulative segment (radiation) lengths, vector of scattering angles, and PID hypothesis used in the fit. Note that the comulative segment length is what is used to compute the energy loss, but the segment length is actually slightly different, so the output can be used to reproduce the original results but they will not be identical (but very close).
For configuration options see TrajectoryMCSFitter::Config
Definition at line 36 of file TrajectoryMCSFitter.h.
Definition at line 119 of file TrajectoryMCSFitter.h.
|
inline |
Definition at line 121 of file TrajectoryMCSFitter.h.
|
inlineexplicit |
Definition at line 138 of file TrajectoryMCSFitter.h.
void TrajectoryMCSFitter::breakTrajInSegments | ( | const recob::TrackTrajectory & | traj, |
std::vector< size_t > & | breakpoints, | ||
std::vector< float > & | segradlengths, | ||
std::vector< float > & | cumseglens | ||
) | const |
Definition at line 61 of file TrajectoryMCSFitter.cxx.
|
inline |
Definition at line 170 of file TrajectoryMCSFitter.h.
const TrajectoryMCSFitter::ScanResult TrajectoryMCSFitter::doLikelihoodScan | ( | std::vector< float > & | dtheta, |
std::vector< float > & | seg_nradlengths, | ||
std::vector< float > & | cumLen, | ||
bool | fwdFit, | ||
int | pid, | ||
float | detAngResol | ||
) | const |
Definition at line 183 of file TrajectoryMCSFitter.cxx.
const TrajectoryMCSFitter::ScanResult TrajectoryMCSFitter::doLikelihoodScan | ( | std::vector< float > & | dtheta, |
std::vector< float > & | seg_nradlengths, | ||
std::vector< float > & | cumLen, | ||
bool | fwdFit, | ||
int | pid, | ||
float | pmin, | ||
float | pmax, | ||
float | pstep, | ||
float | detAngResol | ||
) | const |
Definition at line 142 of file TrajectoryMCSFitter.cxx.
double TrajectoryMCSFitter::energyLossBetheBloch | ( | const double | mass, |
const double | e2 | ||
) | const |
Definition at line 346 of file TrajectoryMCSFitter.cxx.
double TrajectoryMCSFitter::energyLossLandau | ( | const double | mass2, |
const double | E2, | ||
const double | x | ||
) | const |
Definition at line 328 of file TrajectoryMCSFitter.cxx.
|
inline |
Definition at line 141 of file TrajectoryMCSFitter.h.
|
inline |
Definition at line 142 of file TrajectoryMCSFitter.h.
|
inline |
Definition at line 143 of file TrajectoryMCSFitter.h.
recob::MCSFitResult TrajectoryMCSFitter::fitMcs | ( | const recob::TrackTrajectory & | traj, |
int | pid | ||
) | const |
Definition at line 12 of file TrajectoryMCSFitter.cxx.
|
inline |
Definition at line 146 of file TrajectoryMCSFitter.h.
|
inline |
Definition at line 147 of file TrajectoryMCSFitter.h.
double TrajectoryMCSFitter::GetE | ( | const double | initial_E, |
const double | length_travelled, | ||
const double | mass | ||
) | const |
Definition at line 370 of file TrajectoryMCSFitter.cxx.
|
inline |
Definition at line 167 of file TrajectoryMCSFitter.h.
void TrajectoryMCSFitter::linearRegression | ( | const recob::TrackTrajectory & | traj, |
const size_t | firstPoint, | ||
const size_t | lastPoint, | ||
recob::tracking::Vector_t & | pcdir | ||
) | const |
Definition at line 202 of file TrajectoryMCSFitter.cxx.
|
inline |
Definition at line 173 of file TrajectoryMCSFitter.h.
double TrajectoryMCSFitter::mcsLikelihood | ( | double | p, |
double | theta0x, | ||
std::vector< float > & | dthetaij, | ||
std::vector< float > & | seg_nradl, | ||
std::vector< float > & | cumLen, | ||
bool | fwd, | ||
int | pid | ||
) | const |
Definition at line 285 of file TrajectoryMCSFitter.cxx.
|
inline |
Definition at line 185 of file TrajectoryMCSFitter.h.
|
inline |
Definition at line 186 of file TrajectoryMCSFitter.h.
|
inline |
Definition at line 187 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 201 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 204 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 195 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 200 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 202 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 193 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 191 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 194 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 190 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 197 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 196 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 199 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 198 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 192 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 203 of file TrajectoryMCSFitter.h.