Public Member Functions | List of all members
protoana::ProtoDUNESliceUtils Class Reference

#include <ProtoDUNESliceUtils.h>

Public Member Functions

 ProtoDUNESliceUtils ()
 
 ~ProtoDUNESliceUtils ()
 
const std::vector< const recob::Hit * > GetRecoSliceHits (const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
 
const std::vector< const recob::Hit * > GetRecoSliceHits (unsigned int sliceID, art::Event const &evt, const std::string sliceModule) const
 
unsigned int GetNumberRecoSliceHits (const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
 
unsigned int GetNumberRecoSliceHits (const unsigned int sliceID, 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
 

Detailed Description

Definition at line 20 of file ProtoDUNESliceUtils.h.

Constructor & Destructor Documentation

protoana::ProtoDUNESliceUtils::ProtoDUNESliceUtils ( )

Definition at line 7 of file ProtoDUNESliceUtils.cxx.

7  {
8 
9 }
protoana::ProtoDUNESliceUtils::~ProtoDUNESliceUtils ( )

Definition at line 11 of file ProtoDUNESliceUtils.cxx.

11  {
12 
13 }

Member Function Documentation

unsigned int protoana::ProtoDUNESliceUtils::GetNumberRecoSliceHits ( const recob::Slice slice,
art::Event const &  evt,
const std::string  sliceModule 
) const

Definition at line 42 of file ProtoDUNESliceUtils.cxx.

42  {
43 
44  return GetRecoSliceHits(slice,evt,sliceModule).size();
45 
46 }
const std::vector< const recob::Hit * > GetRecoSliceHits(const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
TCEvent evt
Definition: DataStructs.cxx:7
unsigned int protoana::ProtoDUNESliceUtils::GetNumberRecoSliceHits ( const unsigned int  sliceID,
art::Event const &  evt,
const std::string  sliceModule 
) const

Definition at line 49 of file ProtoDUNESliceUtils.cxx.

49  {
50 
51  return GetRecoSliceHits(sliceID,evt,sliceModule).size();
52 
53 }
const std::vector< const recob::Hit * > GetRecoSliceHits(const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
TCEvent evt
Definition: DataStructs.cxx:7
const std::map< unsigned int, std::vector< const recob::Hit * > > protoana::ProtoDUNESliceUtils::GetRecoSliceHitMap ( art::Event const &  evt,
const std::string  sliceModule 
) const

Definition at line 56 of file ProtoDUNESliceUtils.cxx.

56  {
57 
58  auto recoSlices = evt.getValidHandle<std::vector<recob::Slice> >(sliceModule);
59  std::map<unsigned int, std::vector<const recob::Hit*>> hitMap;
60 
61  for(auto const slice : *recoSlices){
62 
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);
66  }
67 
68  }
69 
70  return hitMap;
71 
72 }
const std::vector< const recob::Hit * > GetRecoSliceHits(const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
TCEvent evt
Definition: DataStructs.cxx:7
const std::vector< const recob::Hit * > protoana::ProtoDUNESliceUtils::GetRecoSliceHits ( const recob::Slice slice,
art::Event const &  evt,
const std::string  sliceModule 
) const

Definition at line 16 of file ProtoDUNESliceUtils.cxx.

16  {
17 
18  return GetRecoSliceHits(slice.ID(),evt,sliceModule);
19 
20 }
const std::vector< const recob::Hit * > GetRecoSliceHits(const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
int ID() const
Definition: Slice.h:29
TCEvent evt
Definition: DataStructs.cxx:7
const std::vector< const recob::Hit * > protoana::ProtoDUNESliceUtils::GetRecoSliceHits ( unsigned int  sliceID,
art::Event const &  evt,
const std::string  sliceModule 
) const

Definition at line 23 of file ProtoDUNESliceUtils.cxx.

23  {
24 
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);
28 
29  std::vector<const recob::Hit*> sliceHits;
30 
31  for(const art::Ptr<recob::Hit> hit : inputHits){
32 
33  sliceHits.push_back(hit.get());
34 
35  }
36 
37  return sliceHits;
38 
39 }
Detector simulation of raw signals on wires.
TCEvent evt
Definition: DataStructs.cxx:7

The documentation for this class was generated from the following files: