76 mf::LogError(
"Shower3DCylinderTrackHitFinder")
77 <<
"Start position not set, returning " << std::endl;
82 mf::LogError(
"Shower3DCylinderTrackHitFinder")
83 <<
"Direction not set, returning " << std::endl;
87 TVector3 ShowerStartPosition = {-999, -999, -999};
90 TVector3 ShowerDirection = {-999, -999, -999};
94 auto const pfpHandle = Event.getValidHandle<std::vector<recob::PFParticle>>(
fPFParticleLabel);
97 const art::FindManyP<recob::SpacePoint>& fmspp =
101 auto const spHandle = Event.getValidHandle<std::vector<recob::SpacePoint>>(
fPFParticleLabel);
104 const art::FindManyP<recob::Hit>& fmhsp =
108 std::vector<art::Ptr<recob::SpacePoint>> spacePoints = fmspp.at(pfparticle.key());
111 if (spacePoints.empty()) {
113 mf::LogError(
"Shower3DCylinderTrackHitFinder")
114 <<
"No space points, returning " << std::endl;
120 spacePoints, ShowerStartPosition, ShowerDirection);
123 std::vector<art::Ptr<recob::SpacePoint>> trackSpacePoints;
127 std::vector<art::Ptr<recob::Hit>> trackHits;
128 for (
auto const& spacePoint : trackSpacePoints) {
129 const art::Ptr<recob::Hit>
hit = fmhsp.at(spacePoint.key()).
front();
131 trackHits.push_back(hit);
void OrderShowerSpacePoints(std::vector< art::Ptr< recob::SpacePoint >> &showersps, TVector3 const &vertex, TVector3 const &direction) const
void SetElement(T &dataproduct, const std::string &Name, bool checktag=false)
const art::FindManyP< T1 > & GetFindManyP(const art::ValidHandle< std::vector< T2 > > &handle, const art::Event &evt, const art::InputTag &moduleTag)
bool CheckElement(const std::string &Name) const
int GetElement(const std::string &Name, T &Element) const
2D representation of charge deposited in the TDC/wire plane