LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
pma::PMAlgTrackingBase Class Reference

#include "PMAlgTracking.h"

Inheritance diagram for pma::PMAlgTrackingBase:
pma::PMAlgFitter pma::PMAlgTracker

Public Member Functions

const pma::TrkCandidateCollresult (void)
 
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > getVertices (bool onlyBranching=false) const
 
std::vector< std::pair< TVector3, size_t > > getKinks (void) const
 

Protected Member Functions

 PMAlgTrackingBase (const std::vector< art::Ptr< recob::Hit > > &allhitlist, const pma::ProjectionMatchingAlg::Config &pmalgConfig, const pma::PMAlgVertexing::Config &pmvtxConfig)
 
 ~PMAlgTrackingBase (void)
 
void guideEndpoints (pma::TrkCandidateColl &tracks)
 

Protected Attributes

pma::cryo_tpc_view_hitmap fHitMap
 
pma::ProjectionMatchingAlg fProjectionMatchingAlg
 
pma::PMAlgVertexing fPMAlgVertexing
 
pma::TrkCandidateColl fResult
 

Detailed Description

Definition at line 55 of file PMAlgTracking.h.

Constructor & Destructor Documentation

pma::PMAlgTrackingBase::PMAlgTrackingBase ( const std::vector< art::Ptr< recob::Hit > > &  allhitlist,
const pma::ProjectionMatchingAlg::Config pmalgConfig,
const pma::PMAlgVertexing::Config pmvtxConfig 
)
protected

Definition at line 46 of file PMAlgTracking.cxx.

References fHitMap.

Referenced by getKinks().

48  :
49  fProjectionMatchingAlg(pmalgConfig),
50  fPMAlgVertexing(pmvtxConfig)
51 {
52  unsigned int cryo, tpc, view;
53  for (auto const& h : allhitlist)
54  {
55  cryo = h->WireID().Cryostat;
56  tpc = h->WireID().TPC;
57  view = h->WireID().Plane;
58 
59  fHitMap[cryo][tpc][view].push_back(h);
60  }
61 }
pma::ProjectionMatchingAlg fProjectionMatchingAlg
Definition: PMAlgTracking.h:79
pma::PMAlgVertexing fPMAlgVertexing
Definition: PMAlgTracking.h:80
pma::cryo_tpc_view_hitmap fHitMap
Definition: PMAlgTracking.h:77
pma::PMAlgTrackingBase::~PMAlgTrackingBase ( void  )
protected

Definition at line 64 of file PMAlgTracking.cxx.

References fResult, and pma::TrkCandidateColl::tracks().

Referenced by getKinks().

65 {
66  for (auto t : fResult.tracks()) t.DeleteTrack();
67 }
std::vector< TrkCandidate > const & tracks(void) const
pma::TrkCandidateColl fResult
Definition: PMAlgTracking.h:82

Member Function Documentation

std::vector< std::pair< TVector3, size_t > > pma::PMAlgTrackingBase::getKinks ( void  ) const
inline

Definition at line 65 of file PMAlgTracking.h.

References fPMAlgVertexing, fResult, pma::PMAlgVertexing::getKinks(), guideEndpoints(), PMAlgTrackingBase(), lar::dump::vector(), and ~PMAlgTrackingBase().

66  { return fPMAlgVertexing.getKinks(fResult); }
std::vector< std::pair< TVector3, size_t > > getKinks(const pma::TrkCandidateColl &tracks) const
pma::TrkCandidateColl fResult
Definition: PMAlgTracking.h:82
pma::PMAlgVertexing fPMAlgVertexing
Definition: PMAlgTracking.h:80
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > pma::PMAlgTrackingBase::getVertices ( bool  onlyBranching = false) const
inline

Definition at line 62 of file PMAlgTracking.h.

References fPMAlgVertexing, fResult, and pma::PMAlgVertexing::getVertices().

63  { return fPMAlgVertexing.getVertices(fResult, onlyBranching); }
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > getVertices(const pma::TrkCandidateColl &tracks, bool onlyBranching=false) const
pma::TrkCandidateColl fResult
Definition: PMAlgTracking.h:82
pma::PMAlgVertexing fPMAlgVertexing
Definition: PMAlgTracking.h:80
void pma::PMAlgTrackingBase::guideEndpoints ( pma::TrkCandidateColl tracks)
protected

Definition at line 70 of file PMAlgTracking.cxx.

References fHitMap, fProjectionMatchingAlg, pma::ProjectionMatchingAlg::guideEndpoints(), pma::Track3D::kBegin, pma::Track3D::kEnd, and pma::TrkCandidateColl::tracks().

Referenced by pma::PMAlgFitter::build(), pma::PMAlgTracker::build(), and getKinks().

71 {
72  for (auto const & t : tracks.tracks())
73  {
74  auto & trk = *(t.Track());
75 
76  unsigned int tpc = trk.FrontTPC(), cryo = trk.FrontCryo();
77  if ((tpc == trk.BackTPC()) && (cryo == trk.BackCryo()))
78  {
80  }
81  else
82  {
84  fHitMap[trk.FrontCryo()][trk.FrontTPC()]);
86  fHitMap[trk.BackCryo()][trk.BackTPC()]);
87  }
88  }
89 }
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)...
std::vector< TrkCandidate > const & tracks(void) const
pma::ProjectionMatchingAlg fProjectionMatchingAlg
Definition: PMAlgTracking.h:79
pma::cryo_tpc_view_hitmap fHitMap
Definition: PMAlgTracking.h:77

Member Data Documentation

pma::cryo_tpc_view_hitmap pma::PMAlgTrackingBase::fHitMap
protected

Definition at line 77 of file PMAlgTracking.h.

Referenced by guideEndpoints(), PMAlgTrackingBase(), and pma::PMAlgTracker::validate().

pma::PMAlgVertexing pma::PMAlgTrackingBase::fPMAlgVertexing
protected

The documentation for this class was generated from the following files: