Classes | Functions
Space points with charge

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...
 

Detailed Description

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:

  1. a collection of points (std::vector<recob::SpacePoint>) containing the location of each reconstructed activity
  2. a collection of charge information (std::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.

Obtaining a charged space point proxy

The charged space point proxy can be obtained directly as:

auto spacePoints = proxy::getChargedSpacePoints(event, pointsTag);

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).

Extending the proxy collection object

This proxy can be augmented with the usual proxy operations (see proxy::getCollection()); proxy::getChargedSpacePoints() calls are in fact equivalent to:

proxy::getCollection<proxy::ChargedSpacePoints>
(event, tag, proxy::withParallelData<recob::PointCharge>(), ...);

Types of proxies, and what to do with them

Currently there are two different type of proxy-like objects for space points with added charge. Each one supports a specific concept:

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.

Function Documentation

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.

Template Parameters
Eventtype of the event to read data from
Argsadditional arguments
Parameters
eventevent to read the data from
inputTagtag for the reconstructed space points and charge data
withArgsadditional elements to be merged into the proxy
Returns
a proxy to space points with associated charge
See also
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 395 of file ChargedSpacePoints.h.

396  {
397  return proxy::getCollection<ChargedSpacePoints>(
398  event, inputTag, withCharge(inputTag), std::forward<Args>(withArgs)...
399  );
400  } // getChargedSpacePoints()
auto withCharge(art::InputTag inputTag)
Adds additional recob::PointCharge information to the proxy.
template<typename Tag = proxy::ChargedSpacePoints::ChargeTag>
auto proxy::withCharge ( art::InputTag  inputTag)

Adds additional recob::PointCharge information to the proxy.

[ *

Parameters
inputTagthe data product label to read the data from
Returns
an object driving 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 364 of file ChargedSpacePoints.h.

365  { return proxy::withParallelDataAs<recob::PointCharge, Tag>(inputTag); }