LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
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 pStep, double angResol) | |
TrajectoryMCSFitter (const Parameters &p) | |
recob::MCSFitResult | fitMcs (const recob::TrackTrajectory &traj, bool momDepConst=true) const |
recob::MCSFitResult | fitMcs (const recob::Track &track, bool momDepConst=true) const |
recob::MCSFitResult | fitMcs (const recob::Trajectory &traj, bool momDepConst=true) const |
recob::MCSFitResult | fitMcs (const recob::TrackTrajectory &traj, int pid, bool momDepConst=true) const |
recob::MCSFitResult | fitMcs (const recob::Track &track, int pid, bool momDepConst=true) const |
recob::MCSFitResult | fitMcs (const recob::Trajectory &traj, int pid, bool momDepConst=true) 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, bool momDepConst, int pid) const |
const ScanResult | doLikelihoodScan (std::vector< float > &dtheta, std::vector< float > &seg_nradlengths, std::vector< float > &cumLen, bool fwdFit, bool momDepConst, int pid) const |
double | MomentumDependentConstant (const double p) 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 |
Private Attributes | |
int | pIdHyp_ |
int | minNSegs_ |
double | segLen_ |
int | minHitsPerSegment_ |
int | nElossSteps_ |
int | eLossMode_ |
double | pMin_ |
double | pMax_ |
double | pStep_ |
double | angResol_ |
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 segment (radiation) lengths, vector of scattering angles, and PID hypothesis used in the fit.
For configuration options see TrajectoryMCSFitter::Config
Definition at line 33 of file TrajectoryMCSFitter.h.
Definition at line 91 of file TrajectoryMCSFitter.h.
|
inline |
Definition at line 93 of file TrajectoryMCSFitter.h.
References trkf::TrajectoryMCSFitter::Config::angResol, angResol_, trkf::TrajectoryMCSFitter::Config::eLossMode, eLossMode_, trkf::TrajectoryMCSFitter::Config::minHitsPerSegment, minHitsPerSegment_, minNSegs_, trkf::TrajectoryMCSFitter::Config::nElossSteps, nElossSteps_, pIdHyp_, trkf::TrajectoryMCSFitter::Config::pMax, pMax_, trkf::TrajectoryMCSFitter::Config::pMin, pMin_, trkf::TrajectoryMCSFitter::Config::pStep, pStep_, and segLen_.
|
inlineexplicit |
Definition at line 105 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 59 of file TrajectoryMCSFitter.cxx.
References recob::TrackTrajectory::FirstValidPoint(), recob::TrackTrajectory::InvalidIndex, recob::TrackTrajectory::LastValidPoint(), recob::TrackTrajectory::Length(), recob::TrackTrajectory::LocationAtPoint(), max, recob::TrackTrajectory::NextValidPoint(), and R.
Referenced by fitMcs().
const TrajectoryMCSFitter::ScanResult TrajectoryMCSFitter::doLikelihoodScan | ( | std::vector< float > & | dtheta, |
std::vector< float > & | seg_nradlengths, | ||
std::vector< float > & | cumLen, | ||
bool | fwdFit, | ||
bool | momDepConst, | ||
int | pid | ||
) | const |
Definition at line 98 of file TrajectoryMCSFitter.cxx.
References max.
double TrajectoryMCSFitter::energyLossBetheBloch | ( | const double | mass, |
const double | e2 | ||
) | const |
Definition at line 259 of file TrajectoryMCSFitter.cxx.
References E.
Referenced by mass().
double TrajectoryMCSFitter::energyLossLandau | ( | const double | mass2, |
const double | E2, | ||
const double | x | ||
) | const |
Definition at line 241 of file TrajectoryMCSFitter.cxx.
Referenced by mass().
|
inline |
Definition at line 108 of file TrajectoryMCSFitter.h.
References fitMcs(), and pIdHyp_.
Referenced by fitMcs(), trkmkr::KalmanFilterFitTrackMaker::getMomentum(), and trkf::MCSFitProducer::produce().
|
inline |
Definition at line 109 of file TrajectoryMCSFitter.h.
References fitMcs(), and pIdHyp_.
Referenced by fitMcs().
|
inline |
Definition at line 110 of file TrajectoryMCSFitter.h.
References fitMcs(), and pIdHyp_.
Referenced by fitMcs().
recob::MCSFitResult TrajectoryMCSFitter::fitMcs | ( | const recob::TrackTrajectory & | traj, |
int | pid, | ||
bool | momDepConst = true |
||
) | const |
Definition at line 11 of file TrajectoryMCSFitter.cxx.
References trkf::TrajectoryMCSFitter::ScanResult::logL, trkf::TrajectoryMCSFitter::ScanResult::p, and trkf::TrajectoryMCSFitter::ScanResult::pUnc.
|
inline |
Definition at line 113 of file TrajectoryMCSFitter.h.
References fitMcs(), and recob::Track::Trajectory().
Referenced by fitMcs().
|
inline |
Definition at line 114 of file TrajectoryMCSFitter.h.
References breakTrajInSegments(), fitMcs(), linearRegression(), mcsLikelihood(), and recob::Trajectory::NPoints().
double TrajectoryMCSFitter::GetE | ( | const double | initial_E, |
const double | length_travelled, | ||
const double | mass | ||
) | const |
Definition at line 283 of file TrajectoryMCSFitter.cxx.
Referenced by mass().
void TrajectoryMCSFitter::linearRegression | ( | const recob::TrackTrajectory & | traj, |
const size_t | firstPoint, | ||
const size_t | lastPoint, | ||
recob::tracking::Vector_t & | pcdir | ||
) | const |
Definition at line 136 of file TrajectoryMCSFitter.cxx.
References geo::vect::MiddlePointAccumulatorDim< N >::add(), recob::TrackTrajectory::DirectionAtPoint(), recob::TrackTrajectory::LocationAtPoint(), geo::vect::MiddlePointAccumulatorDim< N >::middlePoint(), recob::TrackTrajectory::NextValidPoint(), and norm.
Referenced by fitMcs().
|
inline |
Definition at line 138 of file TrajectoryMCSFitter.h.
References energyLossBetheBloch(), energyLossLandau(), GetE(), util::kBogusD, and x.
double TrajectoryMCSFitter::mcsLikelihood | ( | double | p, |
double | theta0x, | ||
std::vector< float > & | dthetaij, | ||
std::vector< float > & | seg_nradl, | ||
std::vector< float > & | cumLen, | ||
bool | fwd, | ||
bool | momDepConst, | ||
int | pid | ||
) | const |
Definition at line 188 of file TrajectoryMCSFitter.cxx.
References beta, evd::details::end(), and max.
Referenced by fitMcs().
|
inline |
Definition at line 132 of file TrajectoryMCSFitter.h.
|
private |
Definition at line 160 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().
|
private |
Definition at line 156 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().
|
private |
Definition at line 154 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().
|
private |
Definition at line 152 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().
|
private |
Definition at line 155 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().
|
private |
Definition at line 151 of file TrajectoryMCSFitter.h.
Referenced by fitMcs(), and TrajectoryMCSFitter().
|
private |
Definition at line 158 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().
|
private |
Definition at line 157 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().
|
private |
Definition at line 159 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().
|
private |
Definition at line 153 of file TrajectoryMCSFitter.h.
Referenced by TrajectoryMCSFitter().