5 #include "canvas/Persistency/Common/FindManyP.h" 25 auto recoSlices = evt.
getValidHandle<std::vector<recob::Slice> >(sliceModule);
26 art::FindManyP<recob::Hit> findHits(recoSlices,evt,sliceModule);
27 std::vector<art::Ptr<recob::Hit>> inputHits = findHits.at(sliceID);
29 std::vector<const recob::Hit*> sliceHits;
33 sliceHits.push_back(
hit.get());
58 auto recoSlices = evt.
getValidHandle<std::vector<recob::Slice> >(sliceModule);
59 std::map<unsigned int, std::vector<const recob::Hit*>> hitMap;
61 for(
auto const slice : *recoSlices){
63 const std::vector<const recob::Hit*> constvec =
GetRecoSliceHits(slice.ID(),
evt,sliceModule);
64 for(
auto const h : constvec){
65 hitMap[slice.ID()].push_back(
h);
unsigned int GetNumberRecoSliceHits(const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
const std::vector< const recob::Hit * > GetRecoSliceHits(const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
const std::map< unsigned int, std::vector< const recob::Hit * > > GetRecoSliceHitMap(art::Event const &evt, const std::string sliceModule) const
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Detector simulation of raw signals on wires.
Declaration of signal hit object.