LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pma::PMAlgTrackingBase Class Reference

#include "PMAlgTracking.h"

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

Public Member Functions

const pma::TrkCandidateCollresult ()
 
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 () 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 guideEndpoints (detinfo::DetectorPropertiesData const &detProp, 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 64 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 56 of file PMAlgTracking.cxx.

References fHitMap.

59  : fProjectionMatchingAlg(pmalgConfig), fPMAlgVertexing(pmvtxConfig)
60 {
61  unsigned int cryo, tpc, view;
62  for (auto const& h : allhitlist) {
63  cryo = h->WireID().Cryostat;
64  tpc = h->WireID().TPC;
65  view = h->WireID().Plane;
66 
67  fHitMap[cryo][tpc][view].push_back(h);
68  }
69 }
pma::ProjectionMatchingAlg fProjectionMatchingAlg
Definition: PMAlgTracking.h:90
pma::PMAlgVertexing fPMAlgVertexing
Definition: PMAlgTracking.h:91
pma::cryo_tpc_view_hitmap fHitMap
Definition: PMAlgTracking.h:88
pma::PMAlgTrackingBase::~PMAlgTrackingBase ( )
protected

Definition at line 72 of file PMAlgTracking.cxx.

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

73 {
74  for (auto t : fResult.tracks())
75  t.DeleteTrack();
76 }
pma::TrkCandidateColl fResult
Definition: PMAlgTracking.h:93
std::vector< TrkCandidate > const & tracks() const

Member Function Documentation

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

Definition at line 74 of file PMAlgTracking.h.

References lar::dump::vector().

75  {
77  }
std::vector< std::pair< TVector3, size_t > > getKinks(const pma::TrkCandidateColl &tracks) const
pma::TrkCandidateColl fResult
Definition: PMAlgTracking.h:93
pma::PMAlgVertexing fPMAlgVertexing
Definition: PMAlgTracking.h:91
std::vector<std::pair<TVector3, std::vector<std::pair<size_t, bool> > > > pma::PMAlgTrackingBase::getVertices ( bool  onlyBranching = false) const
inline

Definition at line 68 of file PMAlgTracking.h.

70  {
71  return fPMAlgVertexing.getVertices(fResult, onlyBranching);
72  }
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:93
pma::PMAlgVertexing fPMAlgVertexing
Definition: PMAlgTracking.h:91
void pma::PMAlgTrackingBase::guideEndpoints ( detinfo::DetectorPropertiesData const &  detProp,
pma::TrkCandidateColl tracks 
)
protected

Definition at line 79 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(), and pma::PMAlgTracker::build().

81 {
82  for (auto const& t : tracks.tracks()) {
83  auto& trk = *(t.Track());
84 
85  unsigned int tpc = trk.FrontTPC(), cryo = trk.FrontCryo();
86  if ((tpc == trk.BackTPC()) && (cryo == trk.BackCryo())) {
87  fProjectionMatchingAlg.guideEndpoints(detProp, trk, fHitMap[cryo][tpc]);
88  }
89  else {
91  detProp, trk, pma::Track3D::kBegin, fHitMap[trk.FrontCryo()][trk.FrontTPC()]);
93  detProp, trk, pma::Track3D::kEnd, fHitMap[trk.BackCryo()][trk.BackTPC()]);
94  }
95  }
96 }
pma::ProjectionMatchingAlg fProjectionMatchingAlg
Definition: PMAlgTracking.h:90
void guideEndpoints(const detinfo::DetectorPropertiesData &clockData, pma::Track3D &trk, const std::map< unsigned int, std::vector< art::Ptr< recob::Hit >>> &hits) const
std::vector< TrkCandidate > const & tracks() const
pma::cryo_tpc_view_hitmap fHitMap
Definition: PMAlgTracking.h:88
const pma::TrkCandidateColl& pma::PMAlgTrackingBase::result ( )
inline

Member Data Documentation

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

Definition at line 88 of file PMAlgTracking.h.

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

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

Definition at line 91 of file PMAlgTracking.h.

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


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