LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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 (detinfo::DetectorPropertiesData const &detProp, 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 60 of file Geometric3DVertexFitter.h.
|
inline |
Definition at line 101 of file Geometric3DVertexFitter.h.
References fhicl::other, track, and lar::dump::vector().
void trkf::Geometric3DVertexFitter::addTrackToVertex | ( | detinfo::DetectorPropertiesData const & | detProp, |
trkf::VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 425 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(), and fitTracksWithVtx().
double trkf::Geometric3DVertexFitter::chi2 | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 463 of file Geometric3DVertexFitter.cxx.
References getParsCovsOnPlane().
Referenced by chi2Unbiased(), computeMeta(), and weightedAverageState().
|
private |
Definition at line 451 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 | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 531 of file Geometric3DVertexFitter.cxx.
References chi2(), trkf::VertexWrapper::findTrack(), fitTracks(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::closestPointAlongTrack | ( | detinfo::DetectorPropertiesData const & | detProp, |
const recob::Track & | track, | ||
const recob::Track & | other | ||
) | const |
Definition at line 201 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().
std::vector< recob::VertexAssnMeta > trkf::Geometric3DVertexFitter::computeMeta | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx | ||
) |
Definition at line 591 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::tracks().
Referenced by computeMeta(), and trkf::VertexFitter::produce().
std::vector< recob::VertexAssnMeta > trkf::Geometric3DVertexFitter::computeMeta | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const std::vector< art::Ptr< recob::Track >> & | arttracks | ||
) |
Definition at line 598 of file Geometric3DVertexFitter.cxx.
References computeMeta().
std::vector< recob::VertexAssnMeta > trkf::Geometric3DVertexFitter::computeMeta | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const TrackRefVec & | trks | ||
) |
Definition at line 609 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 | ( | detinfo::DetectorPropertiesData const & | detProp, |
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(), recob::PFParticle::PdgCode(), and util::size().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTracks | ( | detinfo::DetectorPropertiesData const & | detProp, |
const std::vector< art::Ptr< recob::Track >> & | arttracks | ||
) | const |
Definition at line 31 of file Geometric3DVertexFitter.cxx.
Referenced by chi2Unbiased(), fitPFP(), ipErrUnbiased(), ipUnbiased(), pDistUnbiased(), trkf::VertexFitter::produce(), sipUnbiased(), and unbiasedVertex().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTracks | ( | detinfo::DetectorPropertiesData const & | detProp, |
TrackRefVec & | tracks | ||
) | const |
Definition at line 42 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 | ( | detinfo::DetectorPropertiesData const & | detProp, |
const std::vector< art::Ptr< recob::Track >> & | tracks, | ||
const recob::tracking::Point_t & | vtxPos | ||
) | const |
Definition at line 101 of file Geometric3DVertexFitter.cxx.
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTracksWithVtx | ( | detinfo::DetectorPropertiesData const & | detProp, |
TrackRefVec & | tracks, | ||
const recob::tracking::Point_t & | vtxPos | ||
) | const |
Definition at line 113 of file Geometric3DVertexFitter.cxx.
References addTrackToVertex(), debugLevel, fitTwoTracks(), sip(), and sipCut.
trkf::VertexWrapper trkf::Geometric3DVertexFitter::fitTwoTracks | ( | detinfo::DetectorPropertiesData const & | detProp, |
const recob::Track & | tk1, | ||
const recob::Track & | tk2 | ||
) | const |
Definition at line 261 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(), and fitTracksWithVtx().
|
private |
Definition at line 369 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::covariance(), debugLevel, dir, recob::tracking::Plane::direction(), larg4::dist(), 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 | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 477 of file Geometric3DVertexFitter.cxx.
References getParsCovsOnPlane().
Referenced by computeMeta(), ipUnbiased(), and sip().
|
private |
Definition at line 470 of file Geometric3DVertexFitter.cxx.
References trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par1, and trkf::Geometric3DVertexFitter::ParsCovsOnPlane::par2.
double trkf::Geometric3DVertexFitter::ipErr | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 493 of file Geometric3DVertexFitter.cxx.
References getParsCovsOnPlane().
Referenced by computeMeta(), ipErrUnbiased(), and sip().
|
private |
Definition at line 484 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 | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 555 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), ipErr(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
double trkf::Geometric3DVertexFitter::ipUnbiased | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 543 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), ip(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
double trkf::Geometric3DVertexFitter::pDist | ( | const VertexWrapper & | vtx, |
const recob::Track & | tk | ||
) | const |
Definition at line 513 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::position(), recob::TrackTrajectory::Start(), recob::TrackTrajectory::StartDirection(), and recob::Track::Trajectory().
Referenced by computeMeta(), and pDistUnbiased().
double trkf::Geometric3DVertexFitter::pDistUnbiased | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 579 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), pDist(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
double trkf::Geometric3DVertexFitter::sip | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 506 of file Geometric3DVertexFitter.cxx.
References getParsCovsOnPlane().
Referenced by fitTracks(), fitTracksWithVtx(), and sipUnbiased().
|
private |
Definition at line 500 of file Geometric3DVertexFitter.cxx.
double trkf::Geometric3DVertexFitter::sipUnbiased | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 567 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), sip(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
trkf::VertexWrapper trkf::Geometric3DVertexFitter::unbiasedVertex | ( | detinfo::DetectorPropertiesData const & | detProp, |
const VertexWrapper & | vtx, | ||
const recob::Track & | tk | ||
) | const |
Definition at line 518 of file Geometric3DVertexFitter.cxx.
References trkf::VertexWrapper::findTrack(), fitTracks(), trkf::VertexWrapper::tracksSize(), and trkf::VertexWrapper::tracksWithoutElement().
Referenced by computeMeta().
|
inlineprivate |
Definition at line 188 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, and target.
Referenced by addTrackToVertex(), and fitTwoTracks().
|
private |
Definition at line 137 of file Geometric3DVertexFitter.cxx.
References chi2(), debugLevel, and util::kBogusD.
|
private |
Definition at line 178 of file Geometric3DVertexFitter.h.
Referenced by addTrackToVertex(), closestPointAlongTrack(), computeMeta(), fitPFP(), fitTracks(), fitTracksWithVtx(), fitTwoTracks(), getParsCovsOnPlane(), and weightedAverageState().
|
private |
Definition at line 177 of file Geometric3DVertexFitter.h.
Referenced by closestPointAlongTrack(), fitTwoTracks(), and getParsCovsOnPlane().
|
private |
Definition at line 179 of file Geometric3DVertexFitter.h.
Referenced by fitTracks(), and fitTracksWithVtx().