Proxy tag for a recob::Track
collection proxy.
More...
#include <Track.h>
Public Types | |
enum | TrackType_t { Unfitted, Fitted, NTypes } |
Types of tracks and trajectories. More... | |
using | TrackDataProduct_t = std::vector< recob::Track > |
Type of the main collection. More... | |
using | TrackTrajectoryTag = recob::TrackTrajectory |
Tag used for the "standard" track trajectory information. More... | |
using | TrackFitHitInfoTag = recob::TrackFitHitInfo |
Tag used for the "standard" track fit information. More... | |
using | HitTag = recob::Hit |
Tag used for the associated hits. More... | |
Proxy tag for a recob::Track
collection proxy.
This type can be used to get a proxy for recob::Track
collection:
An example of usage for a simple track processing loop:
In this example, the track proxy accesses the track itself, its associated hits (always implicitly present) and the track fit hit information (explicitly requested). Since both those data products are produced by the same module as the track, there is no need to specify their producer module label.
Unfortunately, the proxy object (tracks
in the example) can be of a different class depending on which data is merged into it: a proxy created by getCollection<proxy::Tracks>(event, tag, proxy::withFitHitInfo())
has different type than e.g. getCollection<proxy::Tracks>(event, tag)
. This implies than when passing proxies as arguments to functions, template types must be used. For example, the following code is equivalent to the one above, but with methods processing a single track (a track proxy) and a single trajectory point (a track point proxy):
As any other proxy object, other data can be merged to the proxy, but no custom interface will be available. For example:
will add a data product std::vector<recob::TrackMomentumFit>
expected to have one element (of type recob::TrackMomentumFit
) per track, which will be accessed with the generic proxy interface:
The other common features of proxy collections are supported, like tagging of different instances of the same data types:
A new, filtered collection of proxies can be created with obvious means and with a less-than-friendly declaration:
The collection thus created (longTracks
) is valid also after the collection proxy (tracks
) has fallen out of scope.
proxy::Tracks
is not the type of the collection proxy returned by getCollection()
. Definition at line 498 of file lardata/RecoBaseProxy/Track.h.
using proxy::Tracks::HitTag = recob::Hit |
Tag used for the associated hits.
Definition at line 510 of file lardata/RecoBaseProxy/Track.h.
using proxy::Tracks::TrackDataProduct_t = std::vector<recob::Track> |
Type of the main collection.
Definition at line 501 of file lardata/RecoBaseProxy/Track.h.
Tag used for the "standard" track fit information.
Definition at line 507 of file lardata/RecoBaseProxy/Track.h.
Tag used for the "standard" track trajectory information.
Definition at line 504 of file lardata/RecoBaseProxy/Track.h.
Types of tracks and trajectories.
Enumerator | |
---|---|
Unfitted |
Represents a track trajectory before the final fit. |
Fitted |
Represents a track trajectory from the final fit. |
NTypes |
Number of supported track types. |
Definition at line 513 of file lardata/RecoBaseProxy/Track.h.