12 #ifndef TrkCandidate_h 13 #define TrkCandidate_h 18 class DetectorPropertiesData;
26 typedef std::map<unsigned int, std::vector<art::Ptr<recob::Hit>>>
view_hitmap;
42 bool IsGood()
const {
return fGood; }
49 const std::vector<size_t>&
Clusters()
const {
return fClusters; }
50 std::vector<size_t>&
Clusters() {
return fClusters; }
53 int Key()
const {
return fKey; }
58 int TreeId()
const {
return fTreeId; }
61 double Mse()
const {
return fMse; }
67 int Parent()
const {
return fParent; }
70 const std::vector<size_t>&
Daughters()
const {
return fDaughters; }
71 std::vector<size_t>&
Daughters() {
return fDaughters; }
88 size_t size()
const {
return fCandidates.size(); }
89 void resize(
size_t n) {
return fCandidates.resize(n); }
90 bool empty()
const {
return fCandidates.empty(); }
93 void erase_at(
size_t pos) { fCandidates.erase(fCandidates.begin() + pos); }
94 void clear() { fCandidates.clear(); }
105 std::vector<TrkCandidate>
const&
tracks()
const {
return fCandidates; }
106 std::vector<TrkCandidate>&
tracks() {
return fCandidates; }
108 std::vector<TrkCandidate>
const&
parents()
const {
return fParents; }
110 int getCandidateIndex(
pma::Track3D const* candidate)
const;
111 int getCandidateTreeId(
pma::Track3D const* candidate)
const;
113 void merge(
size_t idx1,
size_t idx2);
115 void setParentDaughterConnections();
117 void setTreeId(
int id,
size_t trkIdx,
bool isRoot =
true);
121 void flipTreesByDQdx();
std::vector< TrkCandidate > fCandidates
Implementation of the Projection Matching Algorithm.
void SetKey(int key)
Set key of an external object associated to this track candidate.
int Key() const
Get key of an external object (like a source PFParticle) associated to this track candidate...
TrkCandidate const & back() const
void erase_at(size_t pos)
std::vector< TrkCandidate > const & parents() const
std::map< unsigned int, tpc_view_hitmap > cryo_tpc_view_hitmap
void SetValidation(double v)
double Validation() const
std::map< unsigned int, view_hitmap > tpc_view_hitmap
std::vector< TrkCandidate > fParents
TrkCandidate const & front() const
std::vector< size_t > fDaughters
std::map< unsigned int, std::vector< art::Ptr< recob::Hit > > > view_hitmap
General LArSoft Utilities.
TrkCandidate const & operator[](size_t i) const
std::vector< size_t > fClusters
const std::vector< size_t > & Clusters() const
std::vector< size_t > & Daughters()
const std::vector< size_t > & Daughters() const
std::vector< size_t > & Clusters()
TrkCandidate & operator[](size_t i)
pma::Track3D * Track() const
void push_back(const TrkCandidate &trk)
std::vector< TrkCandidate > const & tracks() const
std::vector< TrkCandidate > & tracks()