LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "ProjectionMatchingAlg.h"
Classes | |
struct | Config |
Public Member Functions | |
ProjectionMatchingAlg (const Config &config) | |
ProjectionMatchingAlg (const fhicl::ParameterSet &pset) | |
double | validate_on_adc (const detinfo::DetectorPropertiesData &detProp, const lariov::ChannelStatusProvider &channelStatus, const pma::Track3D &trk, const img::DataProviderAlg &adcImage, float thr) const |
double | validate_on_adc_test (const detinfo::DetectorPropertiesData &detProp, const lariov::ChannelStatusProvider &channelStatus, const pma::Track3D &trk, const img::DataProviderAlg &adcImage, const std::vector< art::Ptr< recob::Hit >> &hits, TH1F *histoPassing, TH1F *histoRejected) const |
double | validate (const detinfo::DetectorPropertiesData &detProp, const lariov::ChannelStatusProvider &channelStatus, const pma::Track3D &trk, const std::vector< art::Ptr< recob::Hit >> &hits) const |
double | validate (const detinfo::DetectorPropertiesData &detProp, const lariov::ChannelStatusProvider &channelStatus, const TVector3 &p0, const TVector3 &p1, const std::vector< art::Ptr< recob::Hit >> &hits, unsigned int testView, unsigned int tpc, unsigned int cryo) const |
double | twoViewFraction (pma::Track3D &trk) const |
unsigned int | testHits (detinfo::DetectorPropertiesData const &detProp, const pma::Track3D &trk, const std::vector< art::Ptr< recob::Hit >> &hits, double eps=1.0) const |
Count the number of hits that are closer than eps * fHitTestingDist2D to the track 2D projection. More... | |
bool | isContained (const pma::Track3D &trk, float margin=0.0F) const |
pma::Track3D * | buildTrack (const detinfo::DetectorPropertiesData &detProp, const std::vector< art::Ptr< recob::Hit >> &hits_1, const std::vector< art::Ptr< recob::Hit >> &hits_2={}) const |
pma::Track3D * | buildMultiTPCTrack (const detinfo::DetectorPropertiesData &clockData, const std::vector< art::Ptr< recob::Hit >> &hits) const |
pma::Track3D * | buildShowerSeg (const detinfo::DetectorPropertiesData &detProp, const std::vector< art::Ptr< recob::Hit >> &hits, const pma::Vector3D &vtx) const |
pma::Track3D * | buildSegment (const detinfo::DetectorPropertiesData &clockData, const std::vector< art::Ptr< recob::Hit >> &hits_1, const std::vector< art::Ptr< recob::Hit >> &hits_2={}) const |
pma::Track3D * | buildSegment (const detinfo::DetectorPropertiesData &clockData, const std::vector< art::Ptr< recob::Hit >> &hits_1, const std::vector< art::Ptr< recob::Hit >> &hits_2, const geo::Point_t &point) const |
pma::Track3D * | buildSegment (const detinfo::DetectorPropertiesData &detProp, const std::vector< art::Ptr< recob::Hit >> &hits, const TVector3 &point) const |
void | FilterOutSmallParts (const detinfo::DetectorPropertiesData &detProp, double r2d, const std::vector< art::Ptr< recob::Hit >> &hits_in, std::vector< art::Ptr< recob::Hit >> &hits_out, const TVector2 &vtx2d) const |
void | RemoveNotEnabledHits (pma::Track3D &trk) const |
pma::Track3D * | extendTrack (const detinfo::DetectorPropertiesData &clockData, const pma::Track3D &trk, const std::vector< art::Ptr< recob::Hit >> &hits, bool add_nodes) const |
Add more hits to an existing track, reoptimize, optionally add more nodes. More... | |
void | guideEndpoints (const detinfo::DetectorPropertiesData &clockData, pma::Track3D &trk, const std::map< unsigned int, std::vector< art::Ptr< recob::Hit >>> &hits) const |
void | guideEndpoints (const detinfo::DetectorPropertiesData &clockData, pma::Track3D &trk, pma::Track3D::ETrackEnd endpoint, const std::map< unsigned int, std::vector< art::Ptr< recob::Hit >>> &hits) const |
Add 3D reference points to clean endpoint of a track. More... | |
std::vector< pma::Hit3D * > | trimTrackToVolume (pma::Track3D &trk, TVector3 p0, TVector3 p1) const |
bool | alignTracks (pma::Track3D &first, pma::Track3D &second) const |
void | mergeTracks (const detinfo::DetectorPropertiesData &detProp, pma::Track3D &dst, pma::Track3D &src, bool reopt) const |
void | autoFlip (pma::Track3D &trk, pma::Track3D::EDirection dir=Track3D::kForward, double thr=0.0, unsigned int n=0) const |
double | selectInitialHits (pma::Track3D &trk, unsigned int view=geo::kZ, unsigned int *nused=0) const |
Private Member Functions | |
bool | chkEndpointHits_ (const detinfo::DetectorPropertiesData &detProp, int wire, int wdir, double drift_x, int view, unsigned int tpc, unsigned int cryo, const pma::Track3D &trk, const std::vector< art::Ptr< recob::Hit >> &hits) const |
bool | addEndpointRef_ (const detinfo::DetectorPropertiesData &detProp, pma::Track3D &trk, const std::map< unsigned int, std::vector< art::Ptr< recob::Hit >>> &hits, std::pair< int, int > const *wires, double const *xPos, unsigned int tpc, unsigned int cryo) const |
bool | GetCloseHits_ (const detinfo::DetectorPropertiesData &detProp, double r2d, const std::vector< art::Ptr< recob::Hit >> &hits_in, std::vector< size_t > &used, std::vector< art::Ptr< recob::Hit >> &hits_out) const |
bool | Has_ (const std::vector< size_t > &v, size_t idx) const |
void | ShortenSeg_ (const detinfo::DetectorPropertiesData &detProp, pma::Track3D &trk, const geo::TPCGeo &tpcgeom) const |
bool | TestTrk_ (pma::Track3D &trk, const geo::TPCGeo &tpcgeom) const |
Static Private Member Functions | |
static size_t | getSegCount_ (size_t trk_size) |
Private Attributes | |
double const | fOptimizationEps |
double const | fFineTuningEps |
double const | fTrkValidationDist2D |
double const | fHitTestingDist2D |
double const | fMinTwoViewFraction |
geo::GeometryCore const * | fGeom |
Definition at line 62 of file ProjectionMatchingAlg.h.
pma::ProjectionMatchingAlg::ProjectionMatchingAlg | ( | const Config & | config | ) |
Definition at line 31 of file ProjectionMatchingAlg.cxx.
References fFineTuningEps, fGeom, fHitTestingDist2D, fMinTwoViewFraction, fTrkValidationDist2D, geo::kU, geo::kV, geo::kZ, pma::ProjectionMatchingAlg::Config::OptimizationEps, pma::Node3D::SetMargin(), and pma::Element3D::SetOptFactor().
|
inline |
Definition at line 102 of file ProjectionMatchingAlg.h.
References hits(), and lar::dump::vector().
|
private |
Definition at line 1031 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::AddRefPoint(), chkEndpointHits_(), fGeom, hits(), geo::GeometryCore::IntersectionPoint(), pma::Track3D::size(), x, y, and z.
Referenced by guideEndpoints().
bool pma::ProjectionMatchingAlg::alignTracks | ( | pma::Track3D & | first, |
pma::Track3D & | second | ||
) | const |
Flip tracks to get second as a continuation of first; returns false if not possible (tracks in reversed order).
Definition at line 1275 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::back(), larg4::dist(), pma::Dist2(), pma::Track3D::Flip(), pma::Track3D::front(), and pma::Hit3D::Point3D().
Referenced by mergeTracks().
|
inline |
Try to correct track direction of the stopping particle: dir: kForward - particle stop is at the end of the track; kBackward - particle stop is at the beginning of the track; dQ/dx difference has to be above thr to actually flip the track; compares dQ/dx of n hits at each end of the track (default is based on the track length).
Definition at line 264 of file ProjectionMatchingAlg.h.
References pma::Track3D::AutoFlip(), dir, hits(), geo::kZ, n, and lar::dump::vector().
pma::Track3D * pma::ProjectionMatchingAlg::buildMultiTPCTrack | ( | const detinfo::DetectorPropertiesData & | clockData, |
const std::vector< art::Ptr< recob::Hit >> & | hits | ||
) | const |
Build a track from sets of hits, multiple TPCs are OK (like taken from PFParticles), as far as hits origin from at least two wire planes.
Definition at line 499 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::back(), buildSegment(), d, pma::Dist2(), fFineTuningEps, fOptimizationEps, pma::Track3D::front(), getSegCount_(), hits(), mergeTracks(), pma::Track3D::Optimize(), pma::Hit3D::Point3D(), pma::Track3D::Segments(), pma::Track3D::SelectAllHits(), pma::Track3D::size(), and pma::Track3D::SortHits().
Referenced by pma::PMAlgFitter::buildTracks().
pma::Track3D * pma::ProjectionMatchingAlg::buildSegment | ( | const detinfo::DetectorPropertiesData & | clockData, |
const std::vector< art::Ptr< recob::Hit >> & | hits_1, | ||
const std::vector< art::Ptr< recob::Hit >> & | hits_2 = {} |
||
) | const |
Build a straight segment from two sets of hits (they should origin from two wire planes); method is intendet for short tracks or shower initial parts, where only a few hits per plane are available and there is no chance to see a curvature or any other features.
Definition at line 889 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::AddHits(), fFineTuningEps, pma::Track3D::HasTwoViews(), pma::Track3D::Initialize(), pma::Track3D::Optimize(), pma::Track3D::SetEndSegWeight(), pma::Track3D::SortHits(), and pma::Track3D::TPCs().
Referenced by buildMultiTPCTrack(), buildSegment(), buildShowerSeg(), shower::EMShowerAlg::ConstructTrack(), ems::EMShower3D::Make3DSeg(), shower::EMShowerAlg::MakeShower(), ems::EMShower3D::Reoptimize(), and ems::EMShower3D::Validate().
pma::Track3D * pma::ProjectionMatchingAlg::buildSegment | ( | const detinfo::DetectorPropertiesData & | clockData, |
const std::vector< art::Ptr< recob::Hit >> & | hits_1, | ||
const std::vector< art::Ptr< recob::Hit >> & | hits_2, | ||
const geo::Point_t & | point | ||
) | const |
Build a straight segment from two sets of hits (they should origin from two wire planes), starting from a given point (like vertex known from another algorithm); method is intendet for short tracks or shower initial parts, where only a few hits per plane are available and there is no chance to see a curvature or any other features.
Definition at line 919 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::back(), buildSegment(), pma::Dist2(), fFineTuningEps, pma::Track3D::Flip(), pma::Track3D::front(), pma::Track3D::Nodes(), pma::Track3D::Optimize(), pma::Hit3D::Point3D(), and pma::Track3D::SortHits().
pma::Track3D * pma::ProjectionMatchingAlg::buildSegment | ( | const detinfo::DetectorPropertiesData & | detProp, |
const std::vector< art::Ptr< recob::Hit >> & | hits, | ||
const TVector3 & | point | ||
) | const |
Build a straight segment from set of hits (they should origin from two wire planes at least), starting from a given point.
Definition at line 942 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::back(), buildSegment(), pma::Dist2(), fFineTuningEps, pma::Track3D::Flip(), pma::Track3D::front(), hits(), pma::Track3D::Nodes(), pma::Track3D::Optimize(), pma::Hit3D::Point3D(), and pma::Track3D::SortHits().
pma::Track3D * pma::ProjectionMatchingAlg::buildShowerSeg | ( | const detinfo::DetectorPropertiesData & | detProp, |
const std::vector< art::Ptr< recob::Hit >> & | hits, | ||
const pma::Vector3D & | vtx | ||
) | const |
Build a shower segment from sets of hits and attached to the provided vertex.
Definition at line 611 of file ProjectionMatchingAlg.cxx.
References buildSegment(), geo::CryostatID::Cryostat, fGeom, FilterOutSmallParts(), geo::GeometryCore::FindTPCAtPosition(), pma::GetProjectionToPlane(), geo::TPCGeo::HasPlane(), geo::GeometryCore::HasTPC(), hits(), geo::GeometryCore::PositionToCryostatID(), ShortenSeg_(), pma::Track3D::size(), geo::TPCID::TPC, and geo::GeometryCore::TPC().
Referenced by pma::PMAlgFitter::buildShowers().
pma::Track3D * pma::ProjectionMatchingAlg::buildTrack | ( | const detinfo::DetectorPropertiesData & | detProp, |
const std::vector< art::Ptr< recob::Hit >> & | hits_1, | ||
const std::vector< art::Ptr< recob::Hit >> & | hits_2 = {} |
||
) | const |
Build a track from two sets of hits from single TPC, hits should origin from at least two wire planes; number of segments used to create the track depends on the number of hits.
Definition at line 446 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::AddHits(), f, fFineTuningEps, fMinTwoViewFraction, fOptimizationEps, getSegCount_(), pma::Track3D::Initialize(), geo::kU, geo::kV, geo::kZ, pma::Track3D::NHits(), pma::Track3D::Optimize(), pma::Track3D::SelectAllHits(), pma::Track3D::size(), pma::Track3D::SortHits(), pma::Track3D::TPCs(), and twoViewFraction().
Referenced by pma::PMAlgTracker::matchCluster().
|
private |
Definition at line 994 of file ProjectionMatchingAlg.cxx.
References detinfo::DetectorPropertiesData::ConvertTicksToX(), hits(), pma::Track3D::size(), and x.
Referenced by addEndpointRef_().
pma::Track3D * pma::ProjectionMatchingAlg::extendTrack | ( | const detinfo::DetectorPropertiesData & | clockData, |
const pma::Track3D & | trk, | ||
const std::vector< art::Ptr< recob::Hit >> & | hits, | ||
bool | add_nodes | ||
) | const |
Add more hits to an existing track, reoptimize, optionally add more nodes.
Definition at line 964 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::AddHits(), fFineTuningEps, fOptimizationEps, getSegCount_(), hits(), geo::kU, geo::kV, geo::kZ, pma::Track3D::NHits(), pma::Track3D::Nodes(), pma::Track3D::Optimize(), and pma::Track3D::size().
Referenced by pma::PMAlgTracker::extendTrack(), and pma::PMAlgTracker::reassignHits_1().
void pma::ProjectionMatchingAlg::FilterOutSmallParts | ( | const detinfo::DetectorPropertiesData & | detProp, |
double | r2d, | ||
const std::vector< art::Ptr< recob::Hit >> & | hits_in, | ||
std::vector< art::Ptr< recob::Hit >> & | hits_out, | ||
const TVector2 & | vtx2d | ||
) | const |
Get rid of small groups of hits around cascades; used to calculate cascade starting direction using the compact core cluster.
Definition at line 692 of file ProjectionMatchingAlg.cxx.
References pma::Dist2(), GetCloseHits_(), util::size(), and pma::WireDriftToCm().
Referenced by buildShowerSeg().
|
private |
Definition at line 747 of file ProjectionMatchingAlg.cxx.
References pma::Dist2(), fGeom, detinfo::DetectorPropertiesData::GetXTicksCoefficient(), Has_(), recob::Hit::PeakTime(), geo::GeometryCore::Plane(), geo::WireID::Wire, recob::Hit::WireID(), and geo::PlaneGeo::WirePitch().
Referenced by FilterOutSmallParts().
|
staticprivate |
Definition at line 439 of file ProjectionMatchingAlg.cxx.
Referenced by buildMultiTPCTrack(), buildTrack(), and extendTrack().
void pma::ProjectionMatchingAlg::guideEndpoints | ( | const detinfo::DetectorPropertiesData & | clockData, |
pma::Track3D & | trk, | ||
const std::map< unsigned int, std::vector< art::Ptr< recob::Hit >>> & | hits | ||
) | const |
Add 3D reference points to clean endpoints of a track (both need to be in the same TPC).
Definition at line 1079 of file ProjectionMatchingAlg.cxx.
References addEndpointRef_(), pma::Track3D::BackCryo(), pma::Track3D::BackTPC(), detinfo::DetectorPropertiesData::ConvertTicksToX(), fFineTuningEps, fGeom, pma::Track3D::FrontCryo(), pma::Track3D::FrontTPC(), pma::Segment3D::GetDirection3D(), geo::TPCGeo::HasPlane(), hits(), pma::Element3D::Length(), pma::Track3D::NextHit(), pma::Track3D::Optimize(), pma::Track3D::PrevHit(), pma::Track3D::Segments(), pma::Track3D::size(), and geo::GeometryCore::TPC().
Referenced by pma::PMAlgTrackingBase::guideEndpoints().
void pma::ProjectionMatchingAlg::guideEndpoints | ( | const detinfo::DetectorPropertiesData & | clockData, |
pma::Track3D & | trk, | ||
pma::Track3D::ETrackEnd | endpoint, | ||
const std::map< unsigned int, std::vector< art::Ptr< recob::Hit >>> & | hits | ||
) | const |
Add 3D reference points to clean endpoint of a track.
Definition at line 1185 of file ProjectionMatchingAlg.cxx.
References addEndpointRef_(), pma::Track3D::BackCryo(), pma::Track3D::BackTPC(), detinfo::DetectorPropertiesData::ConvertTicksToX(), fFineTuningEps, fGeom, pma::Track3D::FrontCryo(), pma::Track3D::FrontTPC(), pma::Segment3D::GetDirection3D(), geo::TPCGeo::HasPlane(), hits(), pma::Track3D::kBegin, pma::Element3D::Length(), pma::Track3D::NextHit(), pma::Track3D::Optimize(), art::productstatus::present(), pma::Track3D::PrevHit(), pma::Track3D::Segments(), pma::Track3D::size(), and geo::GeometryCore::TPC().
|
private |
Definition at line 867 of file ProjectionMatchingAlg.cxx.
Referenced by GetCloseHits_().
|
inline |
Test if hits at the track endpoinds do not stick out of TPC which they belong to. Here one can implement some configurable margin if needed for real data imeprfections.
Definition at line 167 of file ProjectionMatchingAlg.h.
References pma::Track3D::back(), pma::Track3D::FirstElement(), pma::Track3D::front(), hits(), pma::Track3D::LastElement(), pma::Hit3D::Point3D(), pma::Node3D::SameTPC(), and lar::dump::vector().
Referenced by pma::PMAlgTracker::matchCluster(), and pma::PMAlgTracker::reassignHits_1().
void pma::ProjectionMatchingAlg::mergeTracks | ( | const detinfo::DetectorPropertiesData & | detProp, |
pma::Track3D & | dst, | ||
pma::Track3D & | src, | ||
bool | reopt | ||
) | const |
Add src to dst as it was its continuation; nodes of src are added to dst after its own nodes, hits of src are added to hits of dst, then dst is reoptimized.
Definition at line 1316 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::AddNode(), alignTracks(), pma::Track3D::BackCryo(), pma::Track3D::BackTPC(), pma::Element3D::Cryo(), pma::Dist2(), fFineTuningEps, pma::Track3D::FrontCryo(), pma::Track3D::FrontTPC(), pma::Element3D::IsFrozen(), pma::Track3D::Length(), pma::Track3D::MakeProjection(), n, pma::Track3D::Nodes(), pma::Track3D::Optimize(), pma::Track3D::push_back(), pma::Track3D::ShiftEndsToHits(), pma::Track3D::size(), pma::Track3D::SortHits(), and pma::Element3D::TPC().
Referenced by buildMultiTPCTrack(), and pma::PMAlgTracker::mergeCoLinear().
void pma::ProjectionMatchingAlg::RemoveNotEnabledHits | ( | pma::Track3D & | trk | ) | const |
Definition at line 876 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::release_at(), and pma::Track3D::size().
Referenced by ShortenSeg_().
double pma::ProjectionMatchingAlg::selectInitialHits | ( | pma::Track3D & | trk, |
unsigned int | view = geo::kZ , |
||
unsigned int * | nused = 0 |
||
) | const |
Intendet to calculate dQ/dx in the initial part of EM cascade; collection view is used by default, but it works also with other projections.
Definition at line 1357 of file ProjectionMatchingAlg.cxx.
References lar::util::absDiff(), pma::Hit3D::GetDistToProj(), pma::Hit3D::GetSegFraction(), pma::Track3D::HitDxByView(), pma::Track3D::NextHit(), pma::Track3D::size(), pma::Hit3D::SummedADC(), pma::Hit3D::TagOutlier(), pma::Hit3D::View2D(), and pma::Hit3D::Wire().
Referenced by ems::EMShower3D::ConvertFrom(), and ems::EMShower3D::ConvertFrom2().
|
private |
Definition at line 810 of file ProjectionMatchingAlg.cxx.
References pma::Dist2(), pma::Track3D::front(), pma::Track3D::GetMse(), pma::Track3D::Length(), pma::Track3D::Optimize(), pma::Hit3D::Point3D(), RemoveNotEnabledHits(), pma::Track3D::size(), pma::Track3D::SortHits(), and TestTrk_().
Referenced by buildShowerSeg().
|
inline |
Count the number of hits that are closer than eps * fHitTestingDist2D to the track 2D projection.
Definition at line 157 of file ProjectionMatchingAlg.h.
References hits(), and pma::Track3D::TestHits().
Referenced by pma::PMAlgTracker::matchCluster(), pma::PMAlgTracker::matchTrack(), and pma::PMAlgTracker::reassignHits_1().
|
private |
Definition at line 839 of file ProjectionMatchingAlg.cxx.
References pma::Dist2(), pma::Track3D::front(), geo::TPCGeo::HasPlane(), pma::Track3D::NEnabledHits(), pma::Hit3D::Point3D(), and pma::Track3D::size().
Referenced by ShortenSeg_().
std::vector< pma::Hit3D * > pma::ProjectionMatchingAlg::trimTrackToVolume | ( | pma::Track3D & | trk, |
TVector3 | p0, | ||
TVector3 | p1 | ||
) | const |
Definition at line 1267 of file ProjectionMatchingAlg.cxx.
double pma::ProjectionMatchingAlg::twoViewFraction | ( | pma::Track3D & | trk | ) | const |
Calculate the fraction of trajectory seen by two 2D projections at least; even a prfect track starts/stops with the hit from one 2D view, then hits from other views come, which results with the fraction value high, but always < 1.0; wrong cluster matchings or incomplete tracks give significantly lower values.
Definition at line 418 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::DisableSingleViewEnds(), pma::Track3D::Length(), pma::Track3D::SelectHits(), and pma::Track3D::size().
Referenced by buildTrack(), and pma::PMAlgTracker::matchCluster().
double pma::ProjectionMatchingAlg::validate | ( | const detinfo::DetectorPropertiesData & | detProp, |
const lariov::ChannelStatusProvider & | channelStatus, | ||
const pma::Track3D & | trk, | ||
const std::vector< art::Ptr< recob::Hit >> & | hits | ||
) | const |
Calculate the fraction of the track that is closer than fTrkValidationDist2D to any hit from hits in their plane (a plane that was not used to build the track). Hits should be preselected, so all belong to the same plane.
Definition at line 252 of file ProjectionMatchingAlg.cxx.
References detinfo::DetectorPropertiesData::ConvertTicksToX(), pma::Track3D::Cryos(), pma::Dist2(), pma::Track3D::Dist2(), f, fGeom, pma::Track3D::front(), fTrkValidationDist2D, pma::GetSegmentProjVector(), geo::GeometryCore::HasWire(), hits(), geo::TPCGeo::Plane(), geo::GeometryCore::Plane(), geo::GeometryCore::PlaneWireToChannel(), pma::Hit3D::Point3D(), pma::Node3D::SameTPC(), pma::Track3D::Segments(), lar::to_element, geo::vect::toPoint(), pma::Element3D::TPC(), geo::GeometryCore::TPC(), pma::Track3D::TPCs(), lar::dump::vector(), geo::GeometryCore::WireCoordinate(), pma::Track3D::WireDriftRange(), pma::WireDriftToCm(), and geo::PlaneGeo::WirePitch().
Referenced by pma::PMAlgTracker::validate().
double pma::ProjectionMatchingAlg::validate | ( | const detinfo::DetectorPropertiesData & | detProp, |
const lariov::ChannelStatusProvider & | channelStatus, | ||
const TVector3 & | p0, | ||
const TVector3 & | p1, | ||
const std::vector< art::Ptr< recob::Hit >> & | hits, | ||
unsigned int | testView, | ||
unsigned int | tpc, | ||
unsigned int | cryo | ||
) | const |
Calculate the fraction of the 3D segment that is closer than fTrkValidationDist2D to any hit from hits in the testPlane of TPC/Cryo. Hits from the testPlane are preselected by this function among all provided (so a bit slower than fn above).
double pma::ProjectionMatchingAlg::validate_on_adc | ( | const detinfo::DetectorPropertiesData & | detProp, |
const lariov::ChannelStatusProvider & | channelStatus, | ||
const pma::Track3D & | trk, | ||
const img::DataProviderAlg & | adcImage, | ||
float | thr | ||
) | const |
Calculate the fraction of the track that is close to non-empty pixel (above thr value) in the ADC image of the testView (a view that was not used to build the track).
Definition at line 47 of file ProjectionMatchingAlg.cxx.
References detinfo::DetectorPropertiesData::ConvertXToTicks(), pma::Track3D::Cryos(), f, fGeom, pma::Track3D::front(), pma::GetSegmentProjVector(), geo::GeometryCore::HasWire(), img::DataProviderAlg::Plane(), geo::PlaneID::Plane, geo::GeometryCore::PlaneWireToChannel(), pma::Hit3D::Point3D(), img::DataProviderAlg::poolMax(), pma::Node3D::SameTPC(), pma::Track3D::Segments(), geo::vect::toPoint(), pma::Element3D::TPC(), pma::Track3D::TPCs(), geo::GeometryCore::WireCoordinate(), and recob::Hit::WireID().
Referenced by pma::PMAlgTracker::validate().
double pma::ProjectionMatchingAlg::validate_on_adc_test | ( | const detinfo::DetectorPropertiesData & | detProp, |
const lariov::ChannelStatusProvider & | channelStatus, | ||
const pma::Track3D & | trk, | ||
const img::DataProviderAlg & | adcImage, | ||
const std::vector< art::Ptr< recob::Hit >> & | hits, | ||
TH1F * | histoPassing, | ||
TH1F * | histoRejected | ||
) | const |
Calculate the fraction of the track that is closer than fTrkValidationDist2D to any hit from hits in the testView (a view that was not used to build the track). Creates also histograms of values in pixels for the passing and rejected points on the track, so the threshold value for the ADC-based calibration can be estimated.
Definition at line 125 of file ProjectionMatchingAlg.cxx.
References detinfo::DetectorPropertiesData::ConvertTicksToX(), detinfo::DetectorPropertiesData::ConvertXToTicks(), pma::Track3D::Cryos(), pma::Dist2(), pma::Track3D::Dist2(), f, fGeom, pma::Track3D::front(), fTrkValidationDist2D, pma::GetSegmentProjVector(), geo::GeometryCore::HasWire(), hits(), img::DataProviderAlg::Plane(), geo::TPCGeo::Plane(), geo::GeometryCore::Plane(), geo::GeometryCore::PlaneWireToChannel(), pma::Hit3D::Point3D(), img::DataProviderAlg::poolMax(), pma::Node3D::SameTPC(), pma::Track3D::Segments(), lar::to_element, geo::vect::toPoint(), pma::Element3D::TPC(), geo::GeometryCore::TPC(), pma::Track3D::TPCs(), geo::GeometryCore::WireCoordinate(), pma::Track3D::WireDriftRange(), and geo::PlaneGeo::WirePitch().
Referenced by pma::PMAlgTracker::validate().
|
private |
Definition at line 323 of file ProjectionMatchingAlg.h.
Referenced by buildMultiTPCTrack(), buildSegment(), buildTrack(), extendTrack(), guideEndpoints(), mergeTracks(), and ProjectionMatchingAlg().
|
private |
Definition at line 335 of file ProjectionMatchingAlg.h.
Referenced by addEndpointRef_(), buildShowerSeg(), GetCloseHits_(), guideEndpoints(), ProjectionMatchingAlg(), validate(), validate_on_adc(), and validate_on_adc_test().
|
private |
Definition at line 328 of file ProjectionMatchingAlg.h.
Referenced by ProjectionMatchingAlg().
|
private |
Definition at line 331 of file ProjectionMatchingAlg.h.
Referenced by buildTrack(), and ProjectionMatchingAlg().
|
private |
Definition at line 319 of file ProjectionMatchingAlg.h.
Referenced by buildMultiTPCTrack(), buildTrack(), and extendTrack().
|
private |
Definition at line 326 of file ProjectionMatchingAlg.h.
Referenced by ProjectionMatchingAlg(), validate(), and validate_on_adc_test().