LArSoft
v07_13_02
Liquid Argon Software toolkit - http://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 pma::Track3D &trk, const img::DataProviderAlg &adcImage, float thr) const |
double | validate_on_adc_test (const pma::Track3D &trk, const img::DataProviderAlg &adcImage, const std::vector< art::Ptr< recob::Hit > > &hits, TH1F *histoPassing, TH1F *histoRejected) const |
double | validate (const pma::Track3D &trk, const std::vector< art::Ptr< recob::Hit > > &hits) const |
double | validate (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 (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 std::vector< art::Ptr< recob::Hit > > &hits_1, const std::vector< art::Ptr< recob::Hit > > &hits_2=std::vector< art::Ptr< recob::Hit > >()) const |
wire planes; number of segments used to create the track depends on the number of hits. More... | |
pma::Track3D * | buildMultiTPCTrack (const std::vector< art::Ptr< recob::Hit > > &hits) const |
as far as hits origin from at least two wire planes. More... | |
pma::Track3D * | buildShowerSeg (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. More... | |
pma::Track3D * | buildSegment (const std::vector< art::Ptr< recob::Hit > > &hits_1, const std::vector< art::Ptr< recob::Hit > > &hits_2=std::vector< art::Ptr< recob::Hit > >()) const |
pma::Track3D * | buildSegment (const std::vector< art::Ptr< recob::Hit > > &hits_1, const std::vector< art::Ptr< recob::Hit > > &hits_2, const TVector3 &point) const |
pma::Track3D * | buildSegment (const std::vector< art::Ptr< recob::Hit > > &hits, const TVector3 &point) const |
void | FilterOutSmallParts (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 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 (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). More... | |
void | guideEndpoints (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 (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 (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 (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 (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 (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 | fOptimizationEps |
double | fFineTuningEps |
double | fTrkValidationDist2D |
double | fHitTestingDist2D |
double | fMinTwoViewFraction |
geo::GeometryCore const * | fGeom |
detinfo::DetectorProperties const * | fDetProp |
Definition at line 52 of file ProjectionMatchingAlg.h.
pma::ProjectionMatchingAlg::ProjectionMatchingAlg | ( | const Config & | config | ) |
Definition at line 17 of file ProjectionMatchingAlg.cxx.
References fDetProp, fFineTuningEps, fHitTestingDist2D, pma::ProjectionMatchingAlg::Config::FineTuningEps, fMinTwoViewFraction, fOptimizationEps, fTrkValidationDist2D, pma::ProjectionMatchingAlg::Config::HitTestingDist2D, pma::ProjectionMatchingAlg::Config::HitWeightU, pma::ProjectionMatchingAlg::Config::HitWeightV, pma::ProjectionMatchingAlg::Config::HitWeightZ, geo::kU, geo::kV, geo::kZ, pma::ProjectionMatchingAlg::Config::MinTwoViewFraction, pma::ProjectionMatchingAlg::Config::NodeMargin3D, pma::ProjectionMatchingAlg::Config::OptimizationEps, pma::Node3D::SetMargin(), pma::Element3D::SetOptFactor(), and pma::ProjectionMatchingAlg::Config::TrkValidationDist2D.
|
inline |
Definition at line 108 of file ProjectionMatchingAlg.h.
References hits(), twoViewFraction(), validate(), validate_on_adc(), validate_on_adc_test(), and lar::dump::vector().
|
private |
Definition at line 996 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::AddRefPoint(), chkEndpointHits(), fGeom, hits(), geo::GeometryCore::IntersectionPoint(), pma::Track3D::size(), x, y, and z.
Referenced by autoFlip(), and 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 1265 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::back(), pma::Dist2(), pma::Track3D::Flip(), pma::Track3D::front(), and pma::Hit3D::Point3D().
Referenced by isContained(), and 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 235 of file ProjectionMatchingAlg.h.
References addEndpointRef(), pma::Track3D::AutoFlip(), chkEndpointHits(), dir, GetCloseHits(), getSegCount(), Has(), hits(), geo::kZ, n, selectInitialHits(), ShortenSeg(), TestTrk(), and lar::dump::vector().
pma::Track3D * pma::ProjectionMatchingAlg::buildMultiTPCTrack | ( | const std::vector< art::Ptr< recob::Hit > > & | hits | ) | const |
as far as hits origin from at least two wire planes.
Build a track from sets of hits, multiple TPCs are OK (like taken from PFParticles),
Definition at line 481 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(), and isContained().
pma::Track3D * pma::ProjectionMatchingAlg::buildSegment | ( | const std::vector< art::Ptr< recob::Hit > > & | hits_1, |
const std::vector< art::Ptr< recob::Hit > > & | hits_2 = std::vector< art::Ptr<recob::Hit> >() |
||
) | 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 854 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(), isContained(), ems::EMShower3D::Make3DSeg(), shower::EMShowerAlg::MakeShower(), ems::EMShower3D::Reoptimize(), and ems::EMShower3D::Validate().
pma::Track3D * pma::ProjectionMatchingAlg::buildSegment | ( | const std::vector< art::Ptr< recob::Hit > > & | hits_1, |
const std::vector< art::Ptr< recob::Hit > > & | hits_2, | ||
const TVector3 & | 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 886 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 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 909 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 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 576 of file ProjectionMatchingAlg.cxx.
References buildSegment(), geo::GeometryCore::Cryostat(), fGeom, FilterOutSmallParts(), geo::GeometryCore::FindCryostatAtPosition(), geo::GeometryCore::FindTPCAtPosition(), pma::GetProjectionToPlane(), geo::TPCGeo::HasPlane(), geo::GeometryCore::HasTPC(), hits(), ShortenSeg(), pma::Track3D::size(), geo::CryostatGeo::TPC(), and geo::TPCID::TPC.
Referenced by pma::PMAlgFitter::buildShowers(), and isContained().
pma::Track3D * pma::ProjectionMatchingAlg::buildTrack | ( | const std::vector< art::Ptr< recob::Hit > > & | hits_1, |
const std::vector< art::Ptr< recob::Hit > > & | hits_2 = std::vector< art::Ptr<recob::Hit> >() |
||
) | const |
wire planes; number of segments used to create the track depends on the number of hits.
Build a track from two sets of hits from single TPC, hits should origin from at least two
Definition at line 424 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 isContained(), and pma::PMAlgTracker::matchCluster().
|
private |
Definition at line 963 of file ProjectionMatchingAlg.cxx.
References detinfo::DetectorProperties::ConvertTicksToX(), fDetProp, hits(), pma::Track3D::size(), and x.
Referenced by addEndpointRef(), and autoFlip().
pma::Track3D * pma::ProjectionMatchingAlg::extendTrack | ( | 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 931 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(), isContained(), and pma::PMAlgTracker::reassignHits_1().
void pma::ProjectionMatchingAlg::FilterOutSmallParts | ( | 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 654 of file ProjectionMatchingAlg.cxx.
References pma::Dist2(), GetCloseHits(), and pma::WireDriftToCm().
Referenced by buildShowerSeg(), and isContained().
|
private |
Definition at line 709 of file ProjectionMatchingAlg.cxx.
References pma::Dist2(), fDetProp, fGeom, detinfo::DetectorProperties::GetXTicksCoefficient(), Has(), recob::Hit::PeakTime(), geo::TPCGeo::Plane(), geo::GeometryCore::TPC(), geo::WireID::Wire, recob::Hit::WireID(), and geo::PlaneGeo::WirePitch().
Referenced by autoFlip(), and FilterOutSmallParts().
|
staticprivate |
Definition at line 415 of file ProjectionMatchingAlg.cxx.
Referenced by autoFlip(), buildMultiTPCTrack(), buildTrack(), and extendTrack().
void pma::ProjectionMatchingAlg::guideEndpoints | ( | 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 1036 of file ProjectionMatchingAlg.cxx.
References addEndpointRef(), pma::Track3D::BackCryo(), pma::Track3D::BackTPC(), detinfo::DetectorProperties::ConvertTicksToX(), fDetProp, 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(), and isContained().
void pma::ProjectionMatchingAlg::guideEndpoints | ( | 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 1151 of file ProjectionMatchingAlg.cxx.
References addEndpointRef(), pma::Track3D::BackCryo(), pma::Track3D::BackTPC(), detinfo::DetectorProperties::ConvertTicksToX(), fDetProp, 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 834 of file ProjectionMatchingAlg.cxx.
Referenced by autoFlip(), and 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 153 of file ProjectionMatchingAlg.h.
References alignTracks(), pma::Track3D::back(), buildMultiTPCTrack(), buildSegment(), buildShowerSeg(), buildTrack(), extendTrack(), FilterOutSmallParts(), pma::Track3D::FirstElement(), pma::Track3D::front(), guideEndpoints(), hits(), pma::Track3D::LastElement(), mergeTracks(), pma::Hit3D::Point3D(), RemoveNotEnabledHits(), pma::Node3D::SameTPC(), trimTrackToVolume(), and lar::dump::vector().
Referenced by pma::PMAlgTracker::matchCluster(), and pma::PMAlgTracker::reassignHits_1().
void pma::ProjectionMatchingAlg::mergeTracks | ( | 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 1291 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(), isContained(), and pma::PMAlgTracker::mergeCoLinear().
void pma::ProjectionMatchingAlg::RemoveNotEnabledHits | ( | pma::Track3D & | trk | ) | const |
Definition at line 842 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::release_at(), and pma::Track3D::size().
Referenced by isContained(), and 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 1339 of file ProjectionMatchingAlg.cxx.
References 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 autoFlip(), ems::EMShower3D::ConvertFrom(), and ems::EMShower3D::ConvertFrom2().
|
private |
Definition at line 772 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 autoFlip(), and buildShowerSeg().
|
inline |
Count the number of hits that are closer than eps * fHitTestingDist2D to the track 2D projection.
Definition at line 146 of file ProjectionMatchingAlg.h.
References fHitTestingDist2D, hits(), and pma::Track3D::TestHits().
Referenced by pma::PMAlgTracker::matchCluster(), pma::PMAlgTracker::matchTrack(), pma::PMAlgTracker::reassignHits_1(), and pma::PMAlgTracker::reassignHits_2().
|
private |
Definition at line 799 of file ProjectionMatchingAlg.cxx.
References pma::Dist2(), pma::Track3D::front(), geo::TPCGeo::HasPlane(), pma::Track3D::NEnabledHits(), pma::Hit3D::Point3D(), pma::Track3D::size(), and fhicl::has_insertion_operator_impl::test().
Referenced by autoFlip(), and ShortenSeg().
std::vector< pma::Hit3D * > pma::ProjectionMatchingAlg::trimTrackToVolume | ( | pma::Track3D & | trk, |
TVector3 | p0, | ||
TVector3 | p1 | ||
) | const |
Definition at line 1254 of file ProjectionMatchingAlg.cxx.
Referenced by isContained().
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 396 of file ProjectionMatchingAlg.cxx.
References pma::Track3D::DisableSingleViewEnds(), pma::Track3D::Length(), pma::Track3D::SelectHits(), and pma::Track3D::size().
Referenced by buildTrack(), pma::PMAlgTracker::matchCluster(), and ProjectionMatchingAlg().
double pma::ProjectionMatchingAlg::validate | ( | 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 231 of file ProjectionMatchingAlg.cxx.
References detinfo::DetectorProperties::ConvertTicksToX(), pma::Track3D::Cryos(), pma::Dist2(), pma::Track3D::Dist2(), f, fDetProp, fGeom, pma::Track3D::front(), fTrkValidationDist2D, pma::GetSegmentProjVector(), geo::GeometryCore::HasWire(), hits(), geo::TPCGeo::Plane(), geo::GeometryCore::PlaneWireToChannel(), pma::Hit3D::Point3D(), pma::Node3D::SameTPC(), pma::Track3D::Segments(), pma::Element3D::TPC(), geo::GeometryCore::TPC(), pma::Track3D::TPCs(), geo::GeometryCore::WireCoordinate(), pma::Track3D::WireDriftRange(), and geo::PlaneGeo::WirePitch().
Referenced by ProjectionMatchingAlg(), ems::EMShower3D::Validate(), and pma::PMAlgTracker::validate().
double pma::ProjectionMatchingAlg::validate | ( | 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).
Definition at line 341 of file ProjectionMatchingAlg.cxx.
References pma::Dist2(), f, fGeom, fTrkValidationDist2D, pma::GetSegmentProjVector(), geo::GeometryCore::HasWire(), hits(), geo::TPCGeo::Plane(), geo::GeometryCore::PlaneWireToChannel(), geo::GeometryCore::TPC(), geo::GeometryCore::WireCoordinate(), pma::WireDriftToCm(), and geo::PlaneGeo::WirePitch().
double pma::ProjectionMatchingAlg::validate_on_adc | ( | 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 39 of file ProjectionMatchingAlg.cxx.
References detinfo::DetectorProperties::ConvertXToTicks(), pma::Track3D::Cryos(), f, fDetProp, fGeom, pma::Track3D::front(), pma::GetSegmentProjVector(), geo::GeometryCore::HasWire(), img::DataProviderAlg::Plane(), geo::GeometryCore::PlaneWireToChannel(), pma::Hit3D::Point3D(), img::DataProviderAlg::poolMax(), pma::Node3D::SameTPC(), pma::Track3D::Segments(), pma::Element3D::TPC(), pma::Track3D::TPCs(), and geo::GeometryCore::WireCoordinate().
Referenced by ProjectionMatchingAlg(), and pma::PMAlgTracker::validate().
double pma::ProjectionMatchingAlg::validate_on_adc_test | ( | 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 110 of file ProjectionMatchingAlg.cxx.
References detinfo::DetectorProperties::ConvertTicksToX(), detinfo::DetectorProperties::ConvertXToTicks(), pma::Track3D::Cryos(), pma::Dist2(), pma::Track3D::Dist2(), f, fDetProp, fGeom, pma::Track3D::front(), fTrkValidationDist2D, pma::GetSegmentProjVector(), geo::GeometryCore::HasWire(), hits(), img::DataProviderAlg::Plane(), geo::TPCGeo::Plane(), geo::GeometryCore::PlaneWireToChannel(), pma::Hit3D::Point3D(), img::DataProviderAlg::poolMax(), pma::Node3D::SameTPC(), pma::Track3D::Segments(), pma::Element3D::TPC(), geo::GeometryCore::TPC(), pma::Track3D::TPCs(), geo::GeometryCore::WireCoordinate(), pma::Track3D::WireDriftRange(), and geo::PlaneGeo::WirePitch().
Referenced by ProjectionMatchingAlg(), and pma::PMAlgTracker::validate().
|
private |
Definition at line 288 of file ProjectionMatchingAlg.h.
Referenced by chkEndpointHits(), GetCloseHits(), guideEndpoints(), ProjectionMatchingAlg(), validate(), validate_on_adc(), and validate_on_adc_test().
|
private |
Definition at line 279 of file ProjectionMatchingAlg.h.
Referenced by buildMultiTPCTrack(), buildSegment(), buildTrack(), extendTrack(), guideEndpoints(), mergeTracks(), and ProjectionMatchingAlg().
|
private |
Definition at line 287 of file ProjectionMatchingAlg.h.
Referenced by addEndpointRef(), buildShowerSeg(), GetCloseHits(), guideEndpoints(), validate(), validate_on_adc(), and validate_on_adc_test().
|
private |
Definition at line 282 of file ProjectionMatchingAlg.h.
Referenced by ProjectionMatchingAlg(), and testHits().
|
private |
Definition at line 284 of file ProjectionMatchingAlg.h.
Referenced by buildTrack(), and ProjectionMatchingAlg().
|
private |
Definition at line 276 of file ProjectionMatchingAlg.h.
Referenced by buildMultiTPCTrack(), buildTrack(), extendTrack(), and ProjectionMatchingAlg().
|
private |
Definition at line 281 of file ProjectionMatchingAlg.h.
Referenced by ProjectionMatchingAlg(), validate(), and validate_on_adc_test().