10 #ifndef UTIL_PXHITCONVERTER_H 11 #define UTIL_PXHITCONVERTER_H 20 #include <type_traits> 25 class GeometryUtilities;
32 void GeneratePxHit(
const std::vector<unsigned int>& hit_index,
34 std::vector<PxHit>& pxhits)
const;
38 std::vector<PxHit>& pxhits)
const;
47 template <
typename HitObj>
51 template <
typename Cont,
typename Hit =
typename Cont::value_type>
63 template <
typename HitObj>
70 "The argument to PxHitConverter::ToPxHit() does not point to a recob::Hit");
74 template <
typename Cont,
typename Hit >
77 std::vector<PxHit> pxhits;
78 pxhits.reserve(hits.size());
79 std::transform(hits.begin(), hits.end(), std::back_inserter(pxhits), [
this](Hit
const&
hit) {
85 #endif // UTIL_PXHITCONVERTER_H Namespace for general, non-LArSoft-specific utilities.
GeometryUtilities const & fGeomUtils
Declaration of signal hit object.
PxHit ToPxHit(HitObj const &hit) const
PxHitConverter(GeometryUtilities const &geomUtils)
void GenerateSinglePxHit(art::Ptr< recob::Hit > const &hit, PxHit &pxhits) const
details::dereference_class< T, details::has_dereference_class< T >::value >::reference_type dereference(T &v)
Returns the value pointed by the argument, or the argument itself.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void GeneratePxHit(const std::vector< unsigned int > &hit_index, const std::vector< art::Ptr< recob::Hit >> hits, std::vector< PxHit > &pxhits) const
Generate: from 1 set of hits => 1 set of PxHits using indexes (association)
std::vector< PxHit > ToPxHitVector(Cont const &hits) const
Returns a vector of PxHit out of a vector of hits.
PxHit HitToPxHit(recob::Hit const &hit) const
Generates and returns a PxHit out of a recob::Hit.
Detector simulation of raw signals on wires.
2D representation of charge deposited in the TDC/wire plane