LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
3D vertex fitter based on the geometric properties (start position, direction, covariance) of the tracks. More...
#include "Geometric3DVertexFitter.h"
Classes | |
struct | Config |
struct | ParsCovsOnPlane |
struct | TracksFromVertexSorter |
Private Member Functions | |
double | chi2 (const ParsCovsOnPlane &pcp) const |
double | ip (const ParsCovsOnPlane &pcp) const |
double | ipErr (const ParsCovsOnPlane &pcp) const |
double | sip (const ParsCovsOnPlane &pcp) const |
ParsCovsOnPlane | getParsCovsOnPlane (const trkf::VertexWrapper &vtx, const recob::Track &tk) const |
std::pair< TrackState, double > | weightedAverageState (ParsCovsOnPlane &pcop) const |
std::pair< TrackState, double > | weightedAverageState (SVector2 &par1, SVector2 &par2, SMatrixSym22 &cov1, SMatrixSym22 &cov2, recob::tracking::Plane &target) const |
Private Attributes | |
std::unique_ptr< TrackStatePropagator > | prop |
int | debugLevel |
double | sipCut |
3D vertex fitter based on the geometric properties (start position, direction, covariance) of the tracks.
This algorithm fits vertices with following procedure. First, tracks are sorted based on their start positions and the number of hits. A vertex is created from the first two tracks: it is defined as the weighted average of the points of closest approaches of the two tracks. Then the other tracks are added, to the vertex: the updated vertex is defined as the weighted average of the n-1 track vertex position and the point of closest approach of the n-th track. Methods to obtain the (unbiased) propagation distance, impact parameter, impact parameter error, impact parameter significance, and chi2 of a track with respect to the vertex are provided.
Inputs are: a set of tracks; interface is provided allowing these to be passed directly of through a PFParticle hierarchy.
Outputs are: a VertexWrapper, containing the vertex and the reference to the tracks actually used in the fit; also methods to produce recob::VertexAssnMeta are provided.
For configuration options see Geometric3DVertexFitter::Config
Definition at line 48 of file Geometric3DVertexFitter.h.
|
inline |
Definition at line 83 of file Geometric3DVertexFitter.h.
References addTrackToVertex(), chi2(), chi2Unbiased(), closestPointAlongTrack(), computeMeta(), fitPFP(), fitTracks(), fitTracksWithVtx(), fitTwoTracks(), ip(), ipErr(), ipErrUnbiased(), ipUnbiased(), fhicl::other, pDist(), pDistUnbiased(), prop, sip(), sipUnbiased(), track, unbiasedVertex(), and lar::dump::vector().
void trkf::Geometric3DVertexFitter::addTrackToVertex | ( | trkf::VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 379 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::addTrackAndUpdateVertex(), recob::Track::CountValidPoints(), trkf::VertexWrapper::covariance(), debugLevel, getParsCovsOnPlane(), util::kBogusD, recob::Track::Length(), trkf::VertexWrapper::position(), recob::Track::Start(), recob::Track::StartDirection(), recob::Track::VertexCovarianceGlobal6D(), and weightedAverageState().
Referenced by fitTracks(), fitTracksWithVtx(), and Geometric3DVertexFitter().
double trkf::Geometric3DVertexFitter::chi2 | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 418 of file Geometric3DVertexFitter.cxx.
References getParsCovsOnPlane().
Referenced by chi2Unbiased(), computeMeta(), Geometric3DVertexFitter(), and weightedAverageState().
|
private |
Definition at line 407 of file Geometric3DVertexFitter.cxx.
References trkf::Geometric3DVertexFitter::ParsCovsOnPlane::cov1, trkf::Geometric3DVertexFitter::ParsCovsOnPlane::cov2, trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par1, and trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par2.
double trkf::Geometric3DVertexFitter::chi2Unbiased | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 473 of file Geometric3DVertexFitter.cxx.
References chi2(), trkf::VertexWrapper::findTrack(), fitTracks(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
Referenced by Geometric3DVertexFitter().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::closestPointAlongTrack | ( | const recob::Track & | track, |
const recob::Track & | other | ||
) | const |
Definition at line 181 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::addTrackAndUpdateVertex(), recob::Track::CountValidPoints(), debugLevel, recob::Track::Length(), recob::Track::ParticleId(), prop, recob::Track::Start(), recob::TrackTrajectory::Start(), recob::TrackTrajectory::StartDirection(), target, recob::Track::Trajectory(), trkf::TrackStatePropagator::UNKNOWN, recob::Track::VertexCovarianceGlobal6D(), recob::Track::VertexCovarianceLocal5D(), and recob::Track::VertexParametersLocal5D().
Referenced by computeMeta(), and Geometric3DVertexFitter().
std::vector< recob::VertexAssnMeta > trkf::Geometric3DVertexFitter::computeMeta | ( | const VertexWrapper & | vtx | ) |
Definition at line 523 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::tracks().
Referenced by computeMeta(), Geometric3DVertexFitter(), and trkf::VertexFitter::produce().
std::vector< recob::VertexAssnMeta > trkf::Geometric3DVertexFitter::computeMeta | ( | const VertexWrapper & | vtx, |
const std::vector< art::Ptr< recob::Track > > & | arttracks | ||
) |
Definition at line 528 of file Geometric3DVertexFitter.cxx.
References computeMeta().
std::vector< recob::VertexAssnMeta > trkf::Geometric3DVertexFitter::computeMeta | ( | const VertexWrapper & | vtx, |
const TrackRefVec & | trks | ||
) |
Definition at line 535 of file Geometric3DVertexFitter.cxx.
References chi2(), closestPointAlongTrack(), d, debugLevel, e, trkf::VertexWrapper::findTrack(), getParsCovsOnPlane(), recob::VertexAssnMeta::IncludedInFit, ip(), ipErr(), util::kBogusF, recob::VertexAssnMeta::NotUsedInFit, pDist(), trkf::VertexWrapper::tracksSize(), trkf::VertexWrapper::tracksWithoutElement(), and unbiasedVertex().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitPFP | ( | size_t | iPF, |
const art::ValidHandle< std::vector< recob::PFParticle > > & | inputPFParticle, | ||
const std::unique_ptr< art::FindManyP< recob::Track > > & | assocTracks | ||
) | const |
Definition at line 3 of file Geometric3DVertexFitter.cxx.
References recob::PFParticle::Daughters(), debugLevel, fitTracks(), recob::PFParticle::IsPrimary(), recob::PFParticle::NumDaughters(), and recob::PFParticle::PdgCode().
Referenced by Geometric3DVertexFitter().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTracks | ( | const std::vector< art::Ptr< recob::Track > > & | arttracks | ) | const |
Definition at line 30 of file Geometric3DVertexFitter.cxx.
Referenced by chi2Unbiased(), fitPFP(), Geometric3DVertexFitter(), ipErrUnbiased(), ipUnbiased(), pDistUnbiased(), trkf::VertexFitter::produce(), sipUnbiased(), and unbiasedVertex().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTracks | ( | TrackRefVec & | tracks | ) | const |
Definition at line 40 of file Geometric3DVertexFitter.cxx.
References addTrackToVertex(), d, debugLevel, fitTwoTracks(), trkf::VertexWrapper::isValid(), sip(), sipCut, std::swap(), and trkf::VertexWrapper::tracksSize().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTracksWithVtx | ( | const std::vector< art::Ptr< recob::Track > > & | tracks, |
const recob::tracking::Point_t & | vtxPos | ||
) | const |
Definition at line 88 of file Geometric3DVertexFitter.cxx.
Referenced by Geometric3DVertexFitter().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTracksWithVtx | ( | TrackRefVec & | tracks, |
const recob::tracking::Point_t & | vtxPos | ||
) | const |
Definition at line 99 of file Geometric3DVertexFitter.cxx.
References addTrackToVertex(), debugLevel, fitTwoTracks(), sip(), and sipCut.
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTwoTracks | ( | const recob::Track & | tk1, |
const recob::Track & | tk2 | ||
) | const |
Definition at line 232 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::addTrack(), trkf::VertexWrapper::addTrackAndUpdateVertex(), recob::Track::CountValidPoints(), trkf::VertexWrapper::covariance(), debugLevel, recob::tracking::Plane::direction(), util::kBogusD, recob::Track::Length(), recob::Track::ParticleId(), trkf::VertexWrapper::position(), recob::tracking::Plane::position(), prop, recob::Track::Start(), recob::TrackTrajectory::Start(), recob::TrackTrajectory::StartDirection(), target, recob::Track::Trajectory(), trkf::TrackStatePropagator::UNKNOWN, recob::Track::VertexCovarianceGlobal6D(), recob::Track::VertexCovarianceLocal5D(), recob::Track::VertexParametersLocal5D(), and weightedAverageState().
Referenced by fitTracks(), fitTracksWithVtx(), and Geometric3DVertexFitter().
|
private |
Definition at line 331 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::covariance(), debugLevel, dir, recob::tracking::Plane::direction(), recob::tracking::Plane::Global6DToLocal5DCovariance(), recob::tracking::Plane::Global6DToLocal5DParameters(), recob::Track::ParticleId(), trkf::VertexWrapper::position(), recob::tracking::Plane::position(), prop, recob::TrackTrajectory::Start(), recob::TrackTrajectory::StartDirection(), target, recob::Track::Trajectory(), trkf::TrackStatePropagator::UNKNOWN, recob::Track::VertexCovarianceLocal5D(), and recob::Track::VertexParametersLocal5D().
Referenced by addTrackToVertex(), chi2(), computeMeta(), ip(), ipErr(), and sip().
double trkf::Geometric3DVertexFitter::ip | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 429 of file Geometric3DVertexFitter.cxx.
References getParsCovsOnPlane().
Referenced by computeMeta(), Geometric3DVertexFitter(), ipUnbiased(), and sip().
|
private |
Definition at line 423 of file Geometric3DVertexFitter.cxx.
References trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par1, and trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par2.
double trkf::Geometric3DVertexFitter::ipErr | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 442 of file Geometric3DVertexFitter.cxx.
References getParsCovsOnPlane().
Referenced by computeMeta(), Geometric3DVertexFitter(), ipErrUnbiased(), and sip().
|
private |
Definition at line 434 of file Geometric3DVertexFitter.cxx.
References trkf::Geometric3DVertexFitter::ParsCovsOnPlane::cov1, trkf::Geometric3DVertexFitter::ParsCovsOnPlane::cov2, trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par1, and trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par2.
double trkf::Geometric3DVertexFitter::ipErrUnbiased | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 493 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), ipErr(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
Referenced by Geometric3DVertexFitter().
double trkf::Geometric3DVertexFitter::ipUnbiased | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 483 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), ip(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
Referenced by Geometric3DVertexFitter().
double trkf::Geometric3DVertexFitter::pDist | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 457 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::position(), recob::TrackTrajectory::Start(), recob::TrackTrajectory::StartDirection(), and recob::Track::Trajectory().
Referenced by computeMeta(), Geometric3DVertexFitter(), and pDistUnbiased().
double trkf::Geometric3DVertexFitter::pDistUnbiased | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 513 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), pDist(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
Referenced by Geometric3DVertexFitter().
double trkf::Geometric3DVertexFitter::sip | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 452 of file Geometric3DVertexFitter.cxx.
References getParsCovsOnPlane().
Referenced by fitTracks(), fitTracksWithVtx(), Geometric3DVertexFitter(), and sipUnbiased().
|
private |
Definition at line 447 of file Geometric3DVertexFitter.cxx.
double trkf::Geometric3DVertexFitter::sipUnbiased | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 503 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), sip(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
Referenced by Geometric3DVertexFitter().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::unbiasedVertex | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 462 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
Referenced by computeMeta(), and Geometric3DVertexFitter().
|
inlineprivate |
Definition at line 126 of file Geometric3DVertexFitter.h.
References trkf::Geometric3DVertexFitter::ParsCovsOnPlane::cov1, trkf::Geometric3DVertexFitter::ParsCovsOnPlane::cov2, trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par1, trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par2, trkf::Geometric3DVertexFitter::ParsCovsOnPlane::plane, target, and weightedAverageState().
Referenced by addTrackToVertex(), fitTwoTracks(), and weightedAverageState().
|
private |
Definition at line 121 of file Geometric3DVertexFitter.cxx.
References chi2(), debugLevel, and util::kBogusD.
|
private |
Definition at line 118 of file Geometric3DVertexFitter.h.
Referenced by addTrackToVertex(), closestPointAlongTrack(), computeMeta(), fitPFP(), fitTracks(), fitTracksWithVtx(), fitTwoTracks(), getParsCovsOnPlane(), and weightedAverageState().
|
private |
Definition at line 117 of file Geometric3DVertexFitter.h.
Referenced by closestPointAlongTrack(), fitTwoTracks(), Geometric3DVertexFitter(), and getParsCovsOnPlane().
|
private |
Definition at line 119 of file Geometric3DVertexFitter.h.
Referenced by fitTracks(), and fitTracksWithVtx().