Selects tracks with time information. More...
Classes | |
struct | Config |
Module configuration parameters. More... | |
Public Types | |
using | Parameters = art::SharedFilter::Table< Config > |
Public Member Functions | |
TimedTrackSelector (Parameters const ¶ms, art::ProcessingFrame const &) | |
bool | filter (art::Event &event, art::ProcessingFrame const &) override |
void | endJob (art::ProcessingFrame const &) override |
Prints end-job summary. More... | |
Static Public Attributes | |
static constexpr double | NoMinTime { std::numeric_limits<double>::lowest() } |
static constexpr double | NoMaxTime { std::numeric_limits<double>::max() } |
static constexpr unsigned int | NoMinTracks { 0U } |
static constexpr unsigned int | NoMaxTracks { std::numeric_limits<unsigned int>::max() } |
Private Member Functions | |
unsigned int | selectTracks (art::Assns< anab::T0, recob::PFParticle > const &timeTracks, std::vector< art::Ptr< recob::PFParticle >> &selectedTracks) const |
Adds to selectedTracks qualifying tracks from timeTracks . More... | |
bool | isTrackSelected (recob::PFParticle const &track, anab::T0 const &time) const |
Returns whether the specified track (with specified time) qualifies. More... | |
bool | selectedTracksRequirement (unsigned int nTracks) const |
Returns if the number of tracks nTracks satisfies filter requirements. More... | |
Static Private Member Functions | |
static bool | isTrack (recob::PFParticle const &particle) |
Returns whether the specified particle flow object is a track. More... | |
Private Attributes | |
std::vector< art::InputTag > const | fTrackTimeTags |
List of track-time association input tags. More... | |
double const | fMinT0 |
Minimum track time for track selection. More... | |
double const | fMaxT0 |
Maximum track time for track selection. More... | |
unsigned int const | fMinTracks |
Minimum selected tracks for event selection. More... | |
unsigned int const | fMaxTracks |
Maximum selected tracks for event selection. More... | |
bool const | fOnlyPandoraTracks |
Save only tracks identified as such. More... | |
bool const | fSaveTracks |
Whether to save selected tracks into the event. More... | |
std::string const | fLogCategory |
Message facility stream name. More... | |
icarus::ns::util::PassCounter | fPassRate |
Counter of passed events (not thread-safe). More... | |
Selects tracks with time information.
This module produces a list of "tracks" that are associated to a time. Optionally, it can select only the tracks with that time in a specified range.
This module is a filter that will return true
for an event if at least one of its tracks is selected. This threshold can be adjusted by configuration.
The input file is expected to contain the time information and association to "tracks", which are actually represented by recob::PFParticle
rather than recob::Track
. Note that the track data products are not explicitly required.
The filter produces a list of pointers to the selected tracks; the list will mix tracks from different data products if multiple input collections are specified. A track is selected if all the following apply:
The filter passes the event if:
TrackTimeTags
(list of data product tags, required): data product of the times and their associations tracks.MinT0
(real, optional): if specified, tracks are selected only if their associated time is not earlier than this value. Time is in the same time scale as the associated track time, which is expected to be the trigger time scale but in nanoseconds.MaxT0
(real, optional): if specified, tracks are selected only if their associated time is earlier than this value. This time is in the same time scale as MinT0
.MinTracks
(integer, default: 1
): the filter "passes" the event only if at least these many tracks are selected; disable this by setting it to 0
.MaxTracks
(integer, default: a large number): if specified, filter "passes" the event only if at most these many tracks are selected.OnlyPandoraTracks
(flag, default: true
): saves only the particles which have been recognised as track-like. The definition was taken from Pandora (larpandoracontent
v03_26_01
) and includes charged pions and kaons, protons and muons. Note that Pandora itself does not do a full particle type identification and it uses only the codes for muons and electrons, to distinguish track-like and shower-like topologies, plus neutrino codes.SaveTracks
(flag, default: true
): produces a list of art pointers to the selected particles. This is the default behaviour of the module. On the other end, the module can be used solely for its filtering capability, in which case saving the list is not necessary and this option allows omitting it. Definition at line 111 of file TimedTrackSelector_module.cc.
using sbn::TimedTrackSelector::Parameters = art::SharedFilter::Table<Config> |
Definition at line 182 of file TimedTrackSelector_module.cc.
|
explicit |
Definition at line 255 of file TimedTrackSelector_module.cc.
|
override |
Prints end-job summary.
Definition at line 371 of file TimedTrackSelector_module.cc.
|
override |
Definition at line 308 of file TimedTrackSelector_module.cc.
|
staticprivate |
Returns whether the specified particle
flow object is a track.
Definition at line 431 of file TimedTrackSelector_module.cc.
|
private |
Returns whether the specified track (with specified time) qualifies.
Definition at line 408 of file TimedTrackSelector_module.cc.
|
private |
Returns if the number of tracks nTracks
satisfies filter requirements.
Definition at line 448 of file TimedTrackSelector_module.cc.
|
private |
Adds to selectedTracks
qualifying tracks from timeTracks
.
timeTracks | time/track associations | |
[out] | selectedTracks | collection to expand with the qualifying tracks |
timeTracks
and added Definition at line 380 of file TimedTrackSelector_module.cc.
|
private |
Message facility stream name.
Definition at line 211 of file TimedTrackSelector_module.cc.
|
private |
Maximum track time for track selection.
Definition at line 201 of file TimedTrackSelector_module.cc.
|
private |
Maximum selected tracks for event selection.
Definition at line 206 of file TimedTrackSelector_module.cc.
|
private |
Minimum track time for track selection.
Definition at line 200 of file TimedTrackSelector_module.cc.
|
private |
Minimum selected tracks for event selection.
Definition at line 204 of file TimedTrackSelector_module.cc.
|
private |
Save only tracks identified as such.
Definition at line 208 of file TimedTrackSelector_module.cc.
|
private |
Counter of passed events (not thread-safe).
Definition at line 219 of file TimedTrackSelector_module.cc.
|
private |
Whether to save selected tracks into the event.
Definition at line 209 of file TimedTrackSelector_module.cc.
|
private |
List of track-time association input tags.
Definition at line 198 of file TimedTrackSelector_module.cc.
|
static |
Definition at line 116 of file TimedTrackSelector_module.cc.
|
static |
Definition at line 119 of file TimedTrackSelector_module.cc.
|
static |
Definition at line 115 of file TimedTrackSelector_module.cc.
|
static |
Definition at line 117 of file TimedTrackSelector_module.cc.