LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
StandardHit3DBuilder class definiton. More...
Public Types | |
enum | TimeValues { COLLECTARTHITS = 0, BUILDTHREEDHITS = 1, NUMTIMEVALUES } |
enumerate the possible values for time checking if monitoring timing More... | |
using | RecobHitToPtrMap = std::map< const recob::Hit *, art::Ptr< recob::Hit >> |
Defines a structure mapping art representation to internal. More... | |
Public Member Functions | |
StandardHit3DBuilder (fhicl::ParameterSet const &pset) | |
Constructor. More... | |
~StandardHit3DBuilder () | |
Destructor. More... | |
void | configure (const fhicl::ParameterSet &) override |
Interface for configuring the particular algorithm tool. More... | |
void | Hit3DBuilder (const art::Event &evt, reco::HitPairList &hitPairList, RecobHitToPtrMap &) const override |
Given a set of recob hits, run DBscan to form 3D clusters. More... | |
float | getTimeToExecute (IHit3DBuilder::TimeValues index) const override |
If monitoring, recover the time to execute a particular function. More... | |
Private Types | |
using | PlaneHitVectorItrPairVec = std::vector< std::pair< HitVector::iterator, HitVector::iterator >> |
Given the ClusterHit2D objects, build the HitPairMap. More... | |
using | HitMatchPair = std::pair< const reco::ClusterHit2D *, reco::ClusterHit3D > |
This builds a list of candidate hit pairs from lists of hits on two planes. More... | |
using | HitMatchPairVec = std::vector< HitMatchPair > |
using | HitMatchPairVecMap = std::map< geo::WireID, HitMatchPairVec > |
using | ChannelStatusVec = std::vector< size_t > |
define data structure for keeping track of channel status More... | |
using | ChannelStatusByPlaneVec = std::vector< ChannelStatusVec > |
Private Member Functions | |
void | CollectArtHits (const art::Event &evt, RecobHitToPtrMap &hitToPtrMap) const |
Extract the ART hits and the ART hit-particle relationships. More... | |
void | BuildHit3D (reco::HitPairList &hitPairList) const |
Given the ClusterHit2D objects, build the HitPairMap. More... | |
size_t | BuildHitPairMap (PlaneToHitVectorMap &planeToHitVectorMap, reco::HitPairList &hitPairList) const |
Given the ClusterHit2D objects, build the HitPairMap. More... | |
size_t | BuildHitPairMapByTPC (PlaneHitVectorItrPairVec &planeHitVectorItrPairVec, reco::HitPairList &hitPairList) const |
int | findGoodHitPairs (const reco::ClusterHit2D *, HitVector::iterator &, HitVector::iterator &, HitMatchPairVecMap &) const |
void | findGoodTriplets (HitMatchPairVecMap &, HitMatchPairVecMap &, reco::HitPairList &, bool=false) const |
This algorithm takes lists of hit pairs and finds good triplets. More... | |
bool | makeHitPair (reco::ClusterHit3D &pairOut, const reco::ClusterHit2D *hit1, const reco::ClusterHit2D *hit2, float hitWidthSclFctr=1., size_t hitPairCntr=0) const |
Make a HitPair object by checking two hits. More... | |
bool | makeHitTriplet (reco::ClusterHit3D &pairOut, const reco::ClusterHit3D &pairIn, const reco::ClusterHit2D *hit2) const |
Make a 3D HitPair object by checking two hits. More... | |
bool | makeDeadChannelPair (reco::ClusterHit3D &pairOut, const reco::ClusterHit3D &pair, size_t maxStatus=4, size_t minStatus=0, float minOverlap=0.2) const |
Make a 3D HitPair object from a valid pair and a dead channel in the missing plane. More... | |
const reco::ClusterHit2D * | FindBestMatchingHit (const Hit2DSet &hit2DSet, const reco::ClusterHit3D &pair, float pairDeltaTimeLimits) const |
A utility routine for finding a 2D hit closest in time to the given pair. More... | |
int | FindNumberInRange (const Hit2DSet &hit2DSet, const reco::ClusterHit3D &pair, float range) const |
A utility routine for returning the number of 2D hits from the list in a given range. More... | |
geo::WireID | NearestWireID (const float *position, const geo::WireID &wireID) const |
Jacket the calls to finding the nearest wire in order to intercept the exceptions if out of range. More... | |
void | BuildChannelStatusVec (PlaneToWireToHitSetMap &planeToWiretoHitSetMap) const |
Create the internal channel status vector (assume will eventually be event-by-event) More... | |
Private Attributes | |
art::InputTag | m_hitFinderTag |
Data members to follow. More... | |
float | m_numSigmaPeakTime |
float | m_hitWidthSclFctr |
float | m_deltaPeakTimeSig |
bool | m_enableMonitoring |
float | m_wirePitch [3] |
std::vector< float > | m_timeVector |
float | m_zPosOffset |
Hit2DVector | m_clusterHit2DMasterVec |
PlaneToHitVectorMap | m_planeToHitVectorMap |
PlaneToWireToHitSetMap | m_planeToWireToHitSetMap |
ChannelStatusByPlaneVec | m_channelStatus |
size_t | m_numBadChannels |
geo::Geometry * | m_geometry |
const detinfo::DetectorProperties * | m_detector |
const lariov::ChannelStatusProvider * | m_channelFilter |
StandardHit3DBuilder class definiton.
Definition at line 64 of file StandardHit3DBuilder_tool.cc.
|
private |
Definition at line 184 of file StandardHit3DBuilder_tool.cc.
|
private |
define data structure for keeping track of channel status
Definition at line 183 of file StandardHit3DBuilder_tool.cc.
|
private |
This builds a list of candidate hit pairs from lists of hits on two planes.
Definition at line 128 of file StandardHit3DBuilder_tool.cc.
|
private |
Definition at line 129 of file StandardHit3DBuilder_tool.cc.
|
private |
Definition at line 130 of file StandardHit3DBuilder_tool.cc.
|
private |
Given the ClusterHit2D objects, build the HitPairMap.
Definition at line 121 of file StandardHit3DBuilder_tool.cc.
|
inherited |
Defines a structure mapping art representation to internal.
Definition at line 44 of file IHit3DBuilder.h.
|
inherited |
enumerate the possible values for time checking if monitoring timing
Enumerator | |
---|---|
COLLECTARTHITS | |
BUILDTHREEDHITS | |
NUMTIMEVALUES |
Definition at line 57 of file IHit3DBuilder.h.
|
explicit |
Constructor.
pset |
Definition at line 214 of file StandardHit3DBuilder_tool.cc.
References configure().
lar_cluster3d::StandardHit3DBuilder::~StandardHit3DBuilder | ( | ) |
|
private |
Create the internal channel status vector (assume will eventually be event-by-event)
Definition at line 248 of file StandardHit3DBuilder_tool.cc.
References geo::GeometryCore::ChannelToWire(), m_channelFilter, m_channelStatus, m_geometry, m_numBadChannels, geo::GeometryCore::Nchannels(), geo::GeometryCore::Nplanes(), geo::GeometryCore::Nwires(), geo::PlaneID::Plane, and geo::WireID::Wire.
Referenced by BuildHit3D().
|
private |
Given the ClusterHit2D objects, build the HitPairMap.
Driver for processing input 2D hits, transforming to 3D hits and building lists of associated 3D hits (candidate 3D clusters)
Definition at line 338 of file StandardHit3DBuilder_tool.cc.
References BuildChannelStatusVec(), BuildHitPairMap(), lar_cluster3d::IHit3DBuilder::BUILDTHREEDHITS, reco::ClusterHit2D::getHit(), reco::ClusterHit2D::getTimeTicks(), art::left(), m_enableMonitoring, m_numRMS, m_planeToHitVectorMap, m_planeToWireToHitSetMap, m_timeVector, art::right(), and recob::Hit::RMS().
Referenced by Hit3DBuilder().
|
private |
Given the ClusterHit2D objects, build the HitPairMap.
Given input 2D hits, build out the lists of possible 3D hits
The current strategy: ideally all 3D hits would be comprised of a triplet of 2D hits, one from each view However, we have concern that, in particular, the v-plane may have some inefficiency which we have to be be prepared to deal with. The idea, then, is to first make the association of hits in the U and W planes and then look for the match in the V plane. In the event we don't find the match in the V plane then we will evaluate the situation and in some instances keep the U-W pairs in order to keep efficiency high.
Definition at line 422 of file StandardHit3DBuilder_tool.cc.
References BuildHitPairMapByTPC(), m_geometry, m_numSigmaPeakTime, geo::GeometryCore::Ncryostats(), and geo::GeometryCore::NTPC().
Referenced by BuildHit3D().
|
private |
Given input 2D hits, build out the lists of possible 3D hits
The current strategy: ideally all 3D hits would be comprised of a triplet of 2D hits, one from each view However, we have concern that, in particular, the v-plane may have some inefficiency which we have to be be prepared to deal with. The idea, then, is to first make the association of hits in the U and W planes and then look for the match in the V plane. In the event we don't find the match in the V plane then we will evaluate the situation and in some instances keep the U-W pairs in order to keep efficiency high.
Definition at line 482 of file StandardHit3DBuilder_tool.cc.
References findGoodHitPairs(), findGoodTriplets(), reco::ClusterHit2D::getTimeTicks(), and m_numSigmaPeakTime.
Referenced by BuildHitPairMap().
|
private |
Extract the ART hits and the ART hit-particle relationships.
evt | the ART event |
hit2DVector | A container for the internal Cluster3D 2D hit objects |
PlaneToHitVectorMap | A map between view and the internal Cluster3D 2D hit objects |
viewToWireToHitSetMap | This maps 2D hits to wires and stores by view |
hitToPtrMap | This maps our Cluster2D hits back to art Ptr's to reco Hits |
Recover the 2D hits from art and fill out the local data structures for the 3D clustering
Definition at line 1161 of file StandardHit3DBuilder_tool.cc.
References lar_cluster3d::IHit3DBuilder::COLLECTARTHITS, detinfo::DetectorProperties::ConvertTicksToX(), DEFINE_ART_CLASS_TOOL, art::Ptr< T >::get(), art::DataViewImpl::getByLabel(), detinfo::DetectorProperties::GetXTicksOffset(), art::Handle< T >::isValid(), m_clusterHit2DMasterVec, m_detector, m_enableMonitoring, m_geometry, m_hitFinderTag, m_planeToHitVectorMap, m_planeToWireToHitSetMap, m_timeVector, geo::GeometryCore::Ncryostats(), geo::GeometryCore::NTPC(), recob::Hit::PeakTime(), geo::WireID::planeID(), lar_cluster3d::SetHitTimeOrder(), detinfo::DetectorProperties::TriggerOffset(), geo::WireID::Wire, and recob::Hit::WireID().
Referenced by Hit3DBuilder().
|
overridevirtual |
Interface for configuring the particular algorithm tool.
ParameterSet | The input set of parameters for configuration |
Implements lar_cluster3d::IHit3DBuilder.
Definition at line 229 of file StandardHit3DBuilder_tool.cc.
References fhicl::ParameterSet::get(), m_deltaPeakTimeSig, m_detector, m_enableMonitoring, m_geometry, m_hitFinderTag, m_hitWidthSclFctr, m_numSigmaPeakTime, m_wirePitch, m_zPosOffset, and geo::GeometryCore::WirePitch().
Referenced by StandardHit3DBuilder().
|
private |
A utility routine for finding a 2D hit closest in time to the given pair.
Definition at line 1071 of file StandardHit3DBuilder_tool.cc.
References reco::ClusterHit3D::getAvePeakTime().
|
private |
Definition at line 569 of file StandardHit3DBuilder_tool.cc.
References reco::ClusterHit2D::getHit(), m_hitWidthSclFctr, makeHitPair(), and recob::Hit::WireID().
Referenced by BuildHitPairMapByTPC().
|
private |
This algorithm takes lists of hit pairs and finds good triplets.
Definition at line 595 of file StandardHit3DBuilder_tool.cc.
References reco::ClusterHit3D::getPosition(), art::left(), m_deltaPeakTimeSig, m_numBadChannels, makeDeadChannelPair(), makeHitTriplet(), max, NearestWireID(), geo::PlaneID::Plane, art::right(), reco::ClusterHit3D::setID(), and geo::WireID::Wire.
Referenced by BuildHitPairMapByTPC().
|
private |
A utility routine for returning the number of 2D hits from the list in a given range.
Definition at line 1098 of file StandardHit3DBuilder_tool.cc.
References reco::ClusterHit3D::getAvePeakTime().
|
inlineoverridevirtual |
If monitoring, recover the time to execute a particular function.
Implements lar_cluster3d::IHit3DBuilder.
Definition at line 92 of file StandardHit3DBuilder_tool.cc.
|
overridevirtual |
Given a set of recob hits, run DBscan to form 3D clusters.
hitPairList | The input list of 3D hits to run clustering on |
clusterParametersList | A list of cluster objects (parameters from associated hits) |
Implements lar_cluster3d::IHit3DBuilder.
Definition at line 313 of file StandardHit3DBuilder_tool.cc.
References BuildHit3D(), CollectArtHits(), m_clusterHit2DMasterVec, m_planeToHitVectorMap, m_planeToWireToHitSetMap, m_timeVector, and lar_cluster3d::IHit3DBuilder::NUMTIMEVALUES.
|
private |
Make a 3D HitPair object from a valid pair and a dead channel in the missing plane.
Definition at line 994 of file StandardHit3DBuilder_tool.cc.
References geo::CryostatID::Cryostat, reco::ClusterHit2D::getHit(), reco::ClusterHit3D::getHits(), reco::ClusterHit3D::getPosition(), reco::ClusterHit2D::getStatusBits(), m_channelStatus, m_geometry, m_zPosOffset, NearestWireID(), geo::PlaneID::Plane, reco::ClusterHit3D::setPosition(), reco::ClusterHit2D::setStatusBit(), reco::ClusterHit3D::setWireID(), reco::ClusterHit2D::SHAREDINTRIPLET, geo::TPCID::TPC, reco::ClusterHit2D::USEDINTRIPLET, geo::WireID::Wire, recob::Hit::WireID(), geo::GeometryCore::WireIDsIntersect(), geo::WireIDIntersection::y, and geo::WireIDIntersection::z.
Referenced by findGoodTriplets().
|
private |
Make a HitPair object by checking two hits.
Definition at line 732 of file StandardHit3DBuilder_tool.cc.
References geo::CryostatID::Cryostat, reco::ClusterHit2D::getHit(), reco::ClusterHit2D::getStatusBits(), reco::ClusterHit2D::getTimeTicks(), reco::ClusterHit2D::getXPosition(), reco::ClusterHit3D::initialize(), recob::Hit::Integral(), m_deltaPeakTimeSig, m_geometry, m_zPosOffset, recob::Hit::PeakAmplitude(), geo::PlaneID::Plane, recob::Hit::RMS(), reco::ClusterHit2D::setStatusBit(), reco::ClusterHit2D::SHAREDINPAIR, geo::TPCID::TPC, reco::ClusterHit2D::USEDINPAIR, recob::Hit::WireID(), geo::GeometryCore::WireIDsIntersect(), geo::WireIDIntersection::y, and geo::WireIDIntersection::z.
Referenced by findGoodHitPairs(), and makeHitTriplet().
|
private |
Make a 3D HitPair object by checking two hits.
Definition at line 846 of file StandardHit3DBuilder_tool.cc.
References reco::ClusterHit3D::getAvePeakTime(), reco::ClusterHit2D::getHit(), reco::ClusterHit3D::getHits(), reco::ClusterHit3D::getPosition(), reco::ClusterHit3D::getSigmaPeakTime(), reco::ClusterHit2D::getStatusBits(), reco::ClusterHit2D::getTimeTicks(), reco::ClusterHit2D::getXPosition(), reco::ClusterHit3D::initialize(), recob::Hit::Integral(), geo::kU, geo::kV, geo::kW, m_hitWidthSclFctr, makeHitPair(), NearestWireID(), norm, recob::Hit::PeakAmplitude(), geo::PlaneID::Plane, recob::Hit::RMS(), reco::ClusterHit2D::setStatusBit(), reco::ClusterHit2D::SHAREDINTRIPLET, reco::ClusterHit2D::USEDINTRIPLET, weight, geo::WireID::Wire, and recob::Hit::WireID().
Referenced by findGoodTriplets().
|
private |
Jacket the calls to finding the nearest wire in order to intercept the exceptions if out of range.
Definition at line 1123 of file StandardHit3DBuilder_tool.cc.
References geo::GeometryCore::DetLength(), m_geometry, geo::GeometryCore::Nwires(), geo::PlaneID::Plane, geo::GeometryCore::Plane(), geo::WireID::Wire, and geo::PlaneGeo::WireCoordinate().
Referenced by findGoodTriplets(), makeDeadChannelPair(), and makeHitTriplet().
|
private |
Definition at line 211 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildChannelStatusVec().
|
mutableprivate |
Definition at line 206 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildChannelStatusVec(), and makeDeadChannelPair().
|
mutableprivate |
Definition at line 201 of file StandardHit3DBuilder_tool.cc.
Referenced by CollectArtHits(), and Hit3DBuilder().
|
private |
Definition at line 192 of file StandardHit3DBuilder_tool.cc.
Referenced by configure(), findGoodTriplets(), and makeHitPair().
|
private |
Definition at line 210 of file StandardHit3DBuilder_tool.cc.
Referenced by CollectArtHits(), and configure().
|
private |
Definition at line 194 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildHit3D(), CollectArtHits(), and configure().
|
private |
Definition at line 209 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildChannelStatusVec(), BuildHitPairMap(), CollectArtHits(), configure(), makeDeadChannelPair(), makeHitPair(), and NearestWireID().
|
private |
Data members to follow.
Definition at line 189 of file StandardHit3DBuilder_tool.cc.
Referenced by CollectArtHits(), and configure().
|
private |
Definition at line 191 of file StandardHit3DBuilder_tool.cc.
Referenced by configure(), findGoodHitPairs(), and makeHitTriplet().
|
mutableprivate |
Definition at line 207 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildChannelStatusVec(), and findGoodTriplets().
|
private |
Definition at line 190 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildHitPairMap(), BuildHitPairMapByTPC(), and configure().
|
mutableprivate |
Definition at line 202 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildHit3D(), CollectArtHits(), and Hit3DBuilder().
|
mutableprivate |
Definition at line 203 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildHit3D(), CollectArtHits(), and Hit3DBuilder().
|
mutableprivate |
Definition at line 196 of file StandardHit3DBuilder_tool.cc.
Referenced by BuildHit3D(), CollectArtHits(), and Hit3DBuilder().
|
private |
Definition at line 195 of file StandardHit3DBuilder_tool.cc.
Referenced by configure().
|
private |
Definition at line 198 of file StandardHit3DBuilder_tool.cc.
Referenced by configure(), makeDeadChannelPair(), and makeHitPair().