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>
71 "The argument to PxHitConverter::ToPxHit() does not point to a recob::Hit");
75 template <
typename Cont,
typename Hit >
76 std::vector<util::PxHit>
79 std::vector<PxHit> pxhits;
80 pxhits.reserve(hits.size());
81 std::transform(hits.begin(), hits.end(), std::back_inserter(pxhits), [
this](
Hit const&
hit) {
87 #endif // UTIL_PXHITCONVERTER_H Namespace for general, non-LArSoft-specific utilities.
GeometryUtilities const & fGeomUtils
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.
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.
Declaration of signal hit object.
2D representation of charge deposited in the TDC/wire plane