LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Proxy for a recob::SpacePoint
collection with associated charge.Some algorithms can reconstruct the position of some activity in the active volume of the detector, locating it as a 3D point, and also estimate the electric charge associated to that localized activity.
More...
Classes | |
struct | proxy::ChargedSpacePoints |
Proxy tag for a recob::SpacePoint collection with charge. More... | |
Functions | |
template<typename Tag = proxy::ChargedSpacePoints::ChargeTag> | |
auto | proxy::withCharge (art::InputTag inputTag) |
Adds additional recob::PointCharge information to the proxy. More... | |
template<typename Event , typename... Args> | |
auto | proxy::getChargedSpacePoints (Event const &event, art::InputTag inputTag, Args &&...withArgs) |
Creates and returns a proxy to space points with associated charge. More... | |
Proxy for a recob::SpacePoint
collection with associated charge.
Some algorithms can reconstruct the position of some activity in the active volume of the detector, locating it as a 3D point, and also estimate the electric charge associated to that localized activity.
The prescription is for such algorithms to produce as output two data products:
std::vector<recob::SpacePoint>
) containing the location of each reconstructed activitystd::vector<recob::PointCharge>
) containing the reconstructed charge for each activity.The two data products are implicitly associated by counting the same number of elements, and being sorted so that the i-th charge pertains the i-th location (parallel data product requirement).
Access to this information is facilitated via the low-overhead data proxy proxy::ChargedSpacePoints
.
The charged space point proxy can be obtained directly as:
where tag
is the input tag for both the space points and the charge, which must have been created by the same module (usually, the tag is just the module label).
This proxy can be augmented with the usual proxy operations (see proxy::getCollection()
); proxy::getChargedSpacePoints()
calls are in fact equivalent to:
Currently there are two different type of proxy-like objects for space points with added charge. Each one supports a specific concept:
proxy::ChargedSpacePoints
represents the whole collection of space points; it covers the location and the associated charge. It is obtained by calling getChargedSpacePoints()
as described above.proxy::SpacePointWithCharge
represents a single point with charge information; the location and the charge can be accessed through it. These proxies are obtained from the space point collection proxy above.For the details of the interface and the information that is exposed by each of these proxy classes, please refer to each class documentation. In particular, see proxy::ChargedSpacePoints
documentation for more usage examples.
auto proxy::getChargedSpacePoints | ( | Event const & | event, |
art::InputTag | inputTag, | ||
Args &&... | withArgs | ||
) |
Creates and returns a proxy to space points with associated charge.
Event | type of the event to read data from |
Args | additional arguments |
event | event to read the data from |
inputTag | tag for the reconstructed space points and charge data |
withArgs | additional elements to be merged into the proxy |
proxy::ChargedSpacePoints
, proxy::SpacePointWithCharge
, proxy::ChargedSpacePointsCollectionProxy
, proxy::getCollection()
This function initializes and return a space point proxy with associated charge. The proxy has a recob::SpacePoint
as main data product, and it comes with an association of a single recob::PointCharge
per space point. It is recommended that the interface documented in proxy::ChargedSpacePoints
is used to interact with this proxy. The standard proxy interface is nevertheless also available (the charge is associated with the tag proxy::ChargedSpacePoints::ChargeTag
).
Additional elements can be merged into the proxy, in the usual way of proxy::getCollection()
.
Definition at line 382 of file ChargedSpacePoints.h.
References proxy::withCharge().
Referenced by recob::DumpChargedSpacePoints::analyze().
auto proxy::withCharge | ( | art::InputTag | inputTag | ) |
Adds additional recob::PointCharge
information to the proxy.
[ *
inputTag | the data product label to read the data from |
getCollection()
to use a recob::PointCharge
The `proxy::ChargedSpacePoints` returned by `proxy::getChargedSpacePoints()` comes with its charge by default. If a different one is required, `proxy::withCharge()` can be used: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp} auto points = proxy::getCollection<proxy::ChargedSpacePoints> (event, pointsTag, proxy::withCharge(calibrationTag)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The charge from the data product of type `std::vector<recob::PointCharge>` with input tag `calibrationTag` will be used as default charge of the proxy instead of the one from `pointsTag`.
Definition at line 351 of file ChargedSpacePoints.h.
Referenced by proxy::getChargedSpacePoints().