LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "SpacePointAlg.h"
Classes | |
struct | HitMCInfo |
Public Member Functions | |
SpacePointAlg (const fhicl::ParameterSet &pset) | |
bool | filter () const noexcept |
bool | merge () const noexcept |
double | maxDT () const noexcept |
double | maxS () const noexcept |
int | minViews () const noexcept |
bool | enableU () const noexcept |
bool | enableV () const noexcept |
bool | enableW () const noexcept |
void | update (detinfo::DetectorPropertiesData const &detProp) const |
double | correctedTime (detinfo::DetectorPropertiesData const &detProp, const recob::Hit &hit) const |
double | separation (const art::PtrVector< recob::Hit > &hits) const |
bool | compatible (detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, bool useMC=false) const |
void | fillSpacePoint (detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &sptv, int sptid) const |
void | fillSpacePoints (detinfo::DetectorPropertiesData const &detProp, std::vector< recob::SpacePoint > &spts, std::multimap< double, KHitTrack > const &trackMap) const |
Fill a collection of space points. More... | |
void | fillComplexSpacePoint (detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &sptv, int sptid) const |
void | makeSpacePoints (detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const |
void | makeMCTruthSpacePoints (detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const |
const art::PtrVector< recob::Hit > & | getAssociatedHits (const recob::SpacePoint &spt) const |
void | clearHitMap () const |
int | numHitMap () const |
Private Member Functions | |
void | makeSpacePoints (detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts, bool useMC) const |
Private Attributes | |
double | fMaxDT |
Maximum time difference between planes. More... | |
double | fMaxS |
Maximum space separation between wires. More... | |
int | fMinViews |
Mininum number of views per space point. More... | |
bool | fEnableU |
Enable flag (U). More... | |
bool | fEnableV |
Enable flag (V). More... | |
bool | fEnableW |
Enable flag (W). More... | |
bool | fFilter |
Filter flag. More... | |
bool | fMerge |
Merge flag. More... | |
bool | fPreferColl |
Sort by collection wire. More... | |
double | fTickOffsetU |
Tick offset for plane U. More... | |
double | fTickOffsetV |
Tick offset for plane V. More... | |
double | fTickOffsetW |
Tick offset for plane W. More... | |
std::map< const recob::Hit *, HitMCInfo > | fHitMCMap |
std::map< int, art::PtrVector< recob::Hit > > | fSptHitMap |
Definition at line 80 of file SpacePointAlg.h.
trkf::SpacePointAlg::SpacePointAlg | ( | const fhicl::ParameterSet & | pset | ) |
Definition at line 38 of file SpacePointAlg.cxx.
References fEnableU, fEnableV, fEnableW, fFilter, fMaxDT, fMaxS, fMerge, fMinViews, fPreferColl, fTickOffsetU, fTickOffsetV, fTickOffsetW, and fhicl::ParameterSet::get().
|
inline |
Definition at line 149 of file SpacePointAlg.h.
Referenced by trkf::SeedFinderAlgorithm::FindSeeds(), cluster::ClusterMatchAlg::Match_SpacePoint(), trkf::Track3DKalmanHit::prepareForInput(), trkf::TrackKalmanCheater::produce(), and trkf::Track3DKalmanHit::produce().
bool trkf::SpacePointAlg::compatible | ( | detinfo::DetectorPropertiesData const & | detProp, |
const art::PtrVector< recob::Hit > & | hits, | ||
bool | useMC = false |
||
) | const |
Definition at line 255 of file SpacePointAlg.cxx.
References util::abs(), geo::CryostatID::Cryostat, larg4::dist(), fHitMCMap, fMaxDT, fMaxS, geo::WireGeo::GetCenter(), geo::WireGeo::GetEnd(), detinfo::DetectorPropertiesData::GetXTicksOffset(), geo::WireGeo::HalfL(), trkf::SpacePointAlg::HitMCInfo::pchit, recob::Hit::PeakTime(), geo::PlaneID::Plane, art::PtrVector< T >::size(), t1, t2, geo::TPCID::TPC, trkf::SpacePointAlg::HitMCInfo::trackIDs, recob::Hit::View(), recob::Hit::WireID(), and geo::GeometryCore::WireIDToWireGeo().
Referenced by fillSpacePoints(), and makeSpacePoints().
double trkf::SpacePointAlg::correctedTime | ( | detinfo::DetectorPropertiesData const & | detProp, |
const recob::Hit & | hit | ||
) | const |
Definition at line 150 of file SpacePointAlg.cxx.
References fTickOffsetU, fTickOffsetV, fTickOffsetW, detinfo::DetectorPropertiesData::GetXTicksOffset(), geo::kU, geo::kV, geo::kW, recob::Hit::PeakTime(), recob::Hit::View(), and recob::Hit::WireID().
Referenced by trkf::SpacePointAna::analyze().
|
inlinenoexcept |
Definition at line 91 of file SpacePointAlg.h.
Referenced by trkf::SeedFinderAlgorithm::GetSeedsFromSortedHits(), trkf::SpacePointFinder::produce(), and trkf::SpacePointCheater::produce().
|
inlinenoexcept |
Definition at line 92 of file SpacePointAlg.h.
Referenced by trkf::SeedFinderAlgorithm::GetSeedsFromSortedHits(), trkf::SpacePointFinder::produce(), and trkf::SpacePointCheater::produce().
|
inlinenoexcept |
Definition at line 93 of file SpacePointAlg.h.
References hits().
Referenced by trkf::SeedFinderAlgorithm::GetSeedsFromSortedHits(), trkf::SpacePointFinder::produce(), and trkf::SpacePointCheater::produce().
void trkf::SpacePointAlg::fillComplexSpacePoint | ( | detinfo::DetectorPropertiesData const & | detProp, |
const art::PtrVector< recob::Hit > & | hits, | ||
std::vector< recob::SpacePoint > & | sptv, | ||
int | sptid | ||
) | const |
Definition at line 603 of file SpacePointAlg.cxx.
References geo::PlaneID::asPlaneID(), art::PtrVector< T >::begin(), geo::CryostatID::Cryostat, art::PtrVector< T >::end(), art::PtrVector< T >::front(), fSptHitMap, geo::WireGeo::GetCenter(), geo::WireGeo::GetEnd(), detinfo::DetectorPropertiesData::GetXTicksCoefficient(), detinfo::DetectorPropertiesData::GetXTicksOffset(), geo::WireGeo::HalfL(), hits(), geo::TPCGeo::Nplanes(), recob::Hit::PeakTime(), geo::PlaneID::Plane, recob::Hit::SigmaPeakTime(), art::PtrVector< T >::size(), ssc, geo::TPCID::TPC, geo::GeometryCore::TPC(), w, weight, recob::Hit::WireID(), geo::GeometryCore::WireIDToWireGeo(), and geo::GeometryCore::WirePitch().
Referenced by makeSpacePoints().
void trkf::SpacePointAlg::fillSpacePoint | ( | detinfo::DetectorPropertiesData const & | detProp, |
const art::PtrVector< recob::Hit > & | hits, | ||
std::vector< recob::SpacePoint > & | sptv, | ||
int | sptid | ||
) | const |
Definition at line 403 of file SpacePointAlg.cxx.
References geo::PlaneID::asPlaneID(), art::PtrVector< T >::begin(), geo::CryostatID::Cryostat, art::PtrVector< T >::end(), fSptHitMap, geo::WireGeo::GetCenter(), geo::WireGeo::GetEnd(), detinfo::DetectorPropertiesData::GetXTicksCoefficient(), detinfo::DetectorPropertiesData::GetXTicksOffset(), geo::WireGeo::HalfL(), hits(), recob::Hit::PeakTime(), geo::PlaneID::Plane, recob::Hit::SigmaPeakTime(), art::PtrVector< T >::size(), ssc, geo::TPCID::TPC, w, recob::Hit::WireID(), geo::GeometryCore::WireIDToWireGeo(), and geo::GeometryCore::WirePitch().
Referenced by fillSpacePoints(), and makeSpacePoints().
void trkf::SpacePointAlg::fillSpacePoints | ( | detinfo::DetectorPropertiesData const & | detProp, |
std::vector< recob::SpacePoint > & | spts, | ||
std::multimap< double, KHitTrack > const & | trackMap | ||
) | const |
Fill a collection of space points.
Fill a collection of space points.
Arguments:
spts - Collection of space points to fill. sptalg - Space point algorithm object.
This method uses the hits contained in this track to construct space points.
This method does not have any knowledge of what constitutes a good space point, except that Hits are required to be consecutive when sorted by path distance, and space points are required to pass compatibility tests used by the space point algorithm object. This method will make space points from either two or three Hits (even for three-plane detectors), if the space point algorithm is configured to allow it.
Definition at line 543 of file SpacePointAlg.cxx.
References art::PtrVector< T >::clear(), compatible(), fillSpacePoint(), trkf::KHitWireX::getHit(), trkf::KHitTrack::getHit(), hits(), numHitMap(), art::PtrVector< T >::push_back(), art::PtrVector< T >::size(), and track.
Referenced by trkf::Track3DKalmanHit::createOutputs(), and trkf::TrackKalmanCheater::produce().
|
inlinenoexcept |
Definition at line 86 of file SpacePointAlg.h.
const art::PtrVector< recob::Hit > & trkf::SpacePointAlg::getAssociatedHits | ( | const recob::SpacePoint & | spt | ) | const |
Definition at line 1435 of file SpacePointAlg.cxx.
References fSptHitMap, and recob::SpacePoint::ID().
Referenced by trkf::SpacePointAna::analyze(), trkf::Track3DKalmanHit::createOutputs(), trkf::SeedFinderAlgorithm::FindSeedAtEnd(), trkf::SeedFinderAlgorithm::FindSeeds(), makeSpacePoints(), trkf::TCTrack::produce(), trkf::SpacePointCheater::produce(), trkf::SpacePointFinder::produce(), and trkf::TrackKalmanCheater::produce().
void trkf::SpacePointAlg::makeMCTruthSpacePoints | ( | detinfo::DetectorClocksData const & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
const art::PtrVector< recob::Hit > & | hits, | ||
std::vector< recob::SpacePoint > & | spts | ||
) | const |
Definition at line 773 of file SpacePointAlg.cxx.
References makeSpacePoints().
Referenced by trkf::SpacePointAna::analyze(), and trkf::SpacePointCheater::produce().
void trkf::SpacePointAlg::makeSpacePoints | ( | detinfo::DetectorClocksData const & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
const art::PtrVector< recob::Hit > & | hits, | ||
std::vector< recob::SpacePoint > & | spts | ||
) | const |
Definition at line 761 of file SpacePointAlg.cxx.
Referenced by trkf::SpacePointAna::analyze(), trkf::SeedFinderAlgorithm::FindSeeds(), trkf::FeatureTracker::Get3DFeaturePoints(), makeMCTruthSpacePoints(), cluster::ClusterMatchAlg::Match_SpacePoint(), trkf::TCTrack::produce(), and trkf::SpacePointFinder::produce().
|
private |
Definition at line 785 of file SpacePointAlg.cxx.
References util::abs(), util::begin(), art::PtrVector< T >::begin(), c1, c2, recob::SpacePoint::Chisq(), art::PtrVector< T >::clear(), compatible(), geo::CryostatID::Cryostat, geo::GeometryCore::Cryostat(), tca::debug, trkf::SpacePointAlg::HitMCInfo::dist2, util::empty(), art::PtrVector< T >::end(), art::PtrVector< T >::erase(), fEnableU, fEnableV, fEnableW, fFilter, fHitMCMap, fillComplexSpacePoint(), fillSpacePoint(), fMaxDT, fMaxS, fMerge, fMinViews, fPreferColl, fSptHitMap, getAssociatedHits(), geo::WireGeo::GetEnd(), geo::WireGeo::GetStart(), detinfo::DetectorPropertiesData::GetXTicksOffset(), geo::WireGeo::HalfL(), cheat::BackTrackerService::HitToAvgSimIDEs(), mf::isDebugEnabled(), geo::GeometryCore::Iterate(), geo::kCollection, geo::kU, geo::kV, geo::kZ, geo::GeometryCore::Ncryostats(), geo::TPCGeo::Nplanes(), geo::CryostatGeo::NTPC(), trkf::SpacePointAlg::HitMCInfo::pchit, recob::Hit::PeakTime(), geo::PlaneID::Plane, geo::GeometryCore::Plane(), art::PtrVector< T >::push_back(), art::PtrVector< T >::reserve(), geo::GeometryCore::SignalType(), cheat::BackTrackerService::SimIDEsToXYZ(), art::PtrVector< T >::size(), util::size(), t1, t2, geo::CryostatGeo::TPC(), geo::TPCID::TPC, geo::GeometryCore::TPC(), trkf::SpacePointAlg::HitMCInfo::trackIDs, update(), recob::Hit::View(), geo::PlaneGeo::Wire(), geo::WireID::Wire, recob::Hit::WireID(), geo::GeometryCore::WireIDToWireGeo(), geo::GeometryCore::WirePitch(), x, and trkf::SpacePointAlg::HitMCInfo::xyz.
|
inlinenoexcept |
Definition at line 88 of file SpacePointAlg.h.
Referenced by cluster::ClusterMatchAlg::Match_SpacePoint().
|
inlinenoexcept |
Definition at line 89 of file SpacePointAlg.h.
|
inlinenoexcept |
Definition at line 87 of file SpacePointAlg.h.
Referenced by trkf::SpacePointAna::analyze(), and trkf::SpacePointAna::bookHistograms().
|
inlinenoexcept |
Definition at line 90 of file SpacePointAlg.h.
Referenced by trkf::SpacePointCheater::produce(), and trkf::SpacePointFinder::produce().
|
inline |
Definition at line 152 of file SpacePointAlg.h.
Referenced by fillSpacePoints().
double trkf::SpacePointAlg::separation | ( | const art::PtrVector< recob::Hit > & | hits | ) | const |
Definition at line 172 of file SpacePointAlg.cxx.
References geo::CryostatID::Cryostat, larg4::dist(), geo::WireGeo::GetCenter(), geo::WireGeo::GetEnd(), geo::WireGeo::HalfL(), geo::PlaneID::Plane, art::PtrVector< T >::size(), geo::TPCID::TPC, recob::Hit::WireID(), and geo::GeometryCore::WireIDToWireGeo().
Referenced by trkf::SpacePointAna::analyze().
void trkf::SpacePointAlg::update | ( | detinfo::DetectorPropertiesData const & | detProp | ) | const |
Definition at line 77 of file SpacePointAlg.cxx.
References detinfo::DetectorPropertiesData::GetXTicksOffset(), geo::GeometryCore::Iterate(), geo::kCollection, geo::kHorizontal, geo::kInduction, geo::kU, geo::kV, geo::kVertical, geo::kZ, geo::GeometryCore::SignalType(), and geo::GeometryCore::TPC().
Referenced by makeSpacePoints().
|
private |
Enable flag (U).
Definition at line 168 of file SpacePointAlg.h.
Referenced by makeSpacePoints(), and SpacePointAlg().
|
private |
Enable flag (V).
Definition at line 169 of file SpacePointAlg.h.
Referenced by makeSpacePoints(), and SpacePointAlg().
|
private |
Enable flag (W).
Definition at line 170 of file SpacePointAlg.h.
Referenced by makeSpacePoints(), and SpacePointAlg().
|
private |
Filter flag.
Definition at line 171 of file SpacePointAlg.h.
Referenced by makeSpacePoints(), and SpacePointAlg().
|
mutableprivate |
Definition at line 186 of file SpacePointAlg.h.
Referenced by compatible(), and makeSpacePoints().
|
private |
Maximum time difference between planes.
Definition at line 165 of file SpacePointAlg.h.
Referenced by compatible(), makeSpacePoints(), and SpacePointAlg().
|
private |
Maximum space separation between wires.
Definition at line 166 of file SpacePointAlg.h.
Referenced by compatible(), makeSpacePoints(), and SpacePointAlg().
|
private |
Merge flag.
Definition at line 172 of file SpacePointAlg.h.
Referenced by makeSpacePoints(), and SpacePointAlg().
|
private |
Mininum number of views per space point.
Definition at line 167 of file SpacePointAlg.h.
Referenced by makeSpacePoints(), and SpacePointAlg().
|
private |
Sort by collection wire.
Definition at line 173 of file SpacePointAlg.h.
Referenced by makeSpacePoints(), and SpacePointAlg().
|
mutableprivate |
Definition at line 187 of file SpacePointAlg.h.
Referenced by fillComplexSpacePoint(), fillSpacePoint(), getAssociatedHits(), and makeSpacePoints().
|
private |
Tick offset for plane U.
Definition at line 174 of file SpacePointAlg.h.
Referenced by correctedTime(), and SpacePointAlg().
|
private |
Tick offset for plane V.
Definition at line 175 of file SpacePointAlg.h.
Referenced by correctedTime(), and SpacePointAlg().
|
private |
Tick offset for plane W.
Definition at line 176 of file SpacePointAlg.h.
Referenced by correctedTime(), and SpacePointAlg().