Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
lardata
lardata
RecoObjects
KHitContainer.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
///
3
/// \file KHitContainer.h
4
///
5
/// \brief A collection of KHitGroups.
6
///
7
/// \author H. Greenlee
8
///
9
/// This class internally maintains three STL lists of KHitGroup objects.
10
///
11
/// 1. Sorted KHitGroup objects (have path length).
12
/// 2. Unsorted KHitGroup objects (don't currently have path length).
13
/// 3. Unused KHitGroup objects.
14
///
15
/// The following methods are provided.
16
///
17
/// 1. Sort
18
///
19
/// A KTrack object and propagation direction are passed as arguments.
20
/// The track is propagated without error to each object on the sorted
21
/// and (maybe) the unsorted list. Reachable objects have their path
22
/// length updated, are moved to the sorted list, and are eventually
23
/// sorted. Unreachable objects are moved to the unsorted list.
24
///
25
/// Here are the envisioned use cases of this class.
26
///
27
/// 1. At the beginning of the event, a set of candidate measurements
28
/// are loaded into the unsorted list.
29
/// 2. Candidate measurements are sorted using a seed track.
30
/// 3. During the progress of the Kalman filter, candidate measurements
31
/// are visited in order from the sorted list.
32
/// 4. If necessary, candidate measurements can be resorted during the
33
/// progress of the Kalman filter using the updated track.
34
/// 5. After candidate measurements are disposed of (added to track or
35
/// rejected), they are moved to the unused list.
36
/// 6. The Kalman filter can be repeated using a new seed track by
37
/// moving all objects to the unsorted list.
38
///
39
/// Most of these use cases involve transfering objects among the three
40
/// lists. These kinds of operations can be accomplished using STL
41
/// list splice method without copying the objects.
42
///
43
////////////////////////////////////////////////////////////////////////
44
45
#ifndef KHITCONTAINER_H
46
#define KHITCONTAINER_H
47
48
#include "
canvas/Persistency/Common/PtrVector.h
"
49
#include "
lardata/RecoObjects/KHitGroup.h
"
50
#include "
lardata/RecoObjects/KTrack.h
"
51
#include "
lardata/RecoObjects/Propagator.h
"
52
#include "
lardataobj/RecoBase/Hit.h
"
53
#include <list>
54
55
namespace
detinfo
{
56
class
DetectorPropertiesData;
57
}
58
59
namespace
trkf
{
60
61
class
KHitContainer
{
62
public
:
63
virtual
~
KHitContainer
() =
default
;
64
65
virtual
void
fill
(
detinfo::DetectorPropertiesData
const
& clock_data,
66
const
art::PtrVector<recob::Hit>
& hits,
67
int
only_plane) = 0;
68
69
const
std::list<KHitGroup>&
70
getSorted
()
const
71
{
72
return
fSorted;
73
}
74
const
std::list<KHitGroup>&
75
getUnsorted
()
const
76
{
77
return
fUnsorted;
78
}
79
const
std::list<KHitGroup>&
80
getUnused
()
const
81
{
82
return
fUnused;
83
}
84
85
// Non-const Accessors.
86
87
std::list<KHitGroup>&
88
getSorted
()
89
{
90
return
fSorted;
91
}
///< Sorted list.
92
std::list<KHitGroup>&
93
getUnsorted
()
94
{
95
return
fUnsorted;
96
}
///< Unsorted list.
97
std::list<KHitGroup>&
98
getUnused
()
99
{
100
return
fUnused;
101
}
///< Unused list.
102
103
/// Clear all lists.
104
void
clear
();
105
106
/// Move all objects to unsorted list (from sorted and unused lists).
107
void
reset
();
108
109
/// (Re)sort objects in unsorted and sorted lists.
110
void
sort(
const
KTrack
&
trk
,
111
bool
addUnsorted,
112
const
Propagator
& prop,
113
Propagator::PropDirection
dir
=
Propagator::UNKNOWN
);
114
115
/// Return the plane with the most KHitGroups in the unsorted list.
116
unsigned
int
getPreferredPlane()
const
;
117
118
private
:
119
// Attributes.
120
121
std::list<KHitGroup>
fSorted
;
///< Sorted KHitGroup objects.
122
std::list<KHitGroup>
fUnsorted
;
///< Unsorted KHitGroup objects.
123
std::list<KHitGroup>
fUnused
;
///< Unused KHitGroup objects.
124
};
125
}
126
127
#endif
fhicl::UNKNOWN
Definition:
extended_value.h:23
trkf::KHitContainer::getUnused
const std::list< KHitGroup > & getUnused() const
Definition:
KHitContainer.h:80
detinfo::DetectorPropertiesData
Definition:
DetectorPropertiesData.h:11
trkf::KHitContainer::getUnused
std::list< KHitGroup > & getUnused()
Unused list.
Definition:
KHitContainer.h:98
PtrVector.h
dir
string dir
Definition:
INukeNucleonCorr.cxx:61
trkf::KHitContainer::fUnused
std::list< KHitGroup > fUnused
Unused KHitGroup objects.
Definition:
KHitContainer.h:123
trkf::KHitContainer
Definition:
KHitContainer.h:61
trk
Definition:
TrackContainmentAlg.hh:22
reset
QTextStream & reset(QTextStream &s)
Definition:
qtextstream.cpp:2048
trkf::KHitContainer::getUnsorted
const std::list< KHitGroup > & getUnsorted() const
Definition:
KHitContainer.h:75
trkf::KHitContainer::fUnsorted
std::list< KHitGroup > fUnsorted
Unsorted KHitGroup objects.
Definition:
KHitContainer.h:122
Propagator.h
Base class for Kalman filter track propagator.
detinfo
General LArSoft Utilities.
Definition:
CalibrationTreeBuilder.h:23
trkf
Definition:
TrackAnaCT_module.cc:245
KHitGroup.h
A collection of measurements on the same surface.
trkf::KTrack
Definition:
KTrack.h:32
Hit.h
Declaration of signal hit object.
trkf::KHitContainer::getSorted
std::list< KHitGroup > & getSorted()
Sorted list.
Definition:
KHitContainer.h:88
translator.fill
def fill(s)
Definition:
translator.py:93
art::PtrVector< recob::Hit >
trkf::Propagator
Definition:
Propagator.h:91
clear
vector< vector< double > > clear
Definition:
INukeNucleonCorr.cxx:114
trkf::KHitContainer::fSorted
std::list< KHitGroup > fSorted
Sorted KHitGroup objects.
Definition:
KHitContainer.h:121
KTrack.h
Basic Kalman filter track class, without error.
trkf::KHitContainer::getUnsorted
std::list< KHitGroup > & getUnsorted()
Unsorted list.
Definition:
KHitContainer.h:93
trkf::Propagator::PropDirection
PropDirection
Propagation direction enum.
Definition:
Propagator.h:94
trkf::KHitContainer::getSorted
const std::list< KHitGroup > & getSorted() const
Definition:
KHitContainer.h:70
Generated by
1.8.11