31 TVector3& showerStartPosition,
32 TVector3& showerDirection);
59 pset.
get<
std::
string>(
"InitialTrackSpacePointsOutputLabel"))
74 <<
"Start position not set, returning " <<
std::endl;
80 <<
"Direction not set, returning " <<
std::endl;
84 TVector3 ShowerStartPosition = {-999, -999, -999};
87 TVector3 ShowerDirection = {-999, -999, -999};
94 const art::FindManyP<recob::SpacePoint>& fmspp =
98 auto const spHandle = Event.getValidHandle<std::vector<recob::SpacePoint>>(
fPFParticleLabel);
101 const art::FindManyP<recob::Hit>& fmhsp =
105 std::vector<art::Ptr<recob::SpacePoint>> spacePoints = fmspp.at(pfparticle.
key());
108 if (spacePoints.empty()) {
111 <<
"No space points, returning " <<
std::endl;
117 spacePoints, ShowerStartPosition, ShowerDirection);
120 std::vector<art::Ptr<recob::SpacePoint>> trackSpacePoints;
124 std::vector<art::Ptr<recob::Hit>> trackHits;
125 for (
auto const& spacePoint : trackSpacePoints) {
128 trackHits.push_back(hit);
137 std::vector<art::Ptr<recob::SpacePoint>>
140 TVector3& showerStartPosition,
141 TVector3& showerDirection)
145 std::vector<art::Ptr<recob::SpacePoint>> trackSpacePoints;
147 for (
const auto& spacePoint : spacePoints) {
151 spacePoint, showerStartPosition, showerDirection);
153 spacePoint, showerStartPosition, showerDirection, proj);
158 trackSpacePoints.push_back(spacePoint);
160 return trackSpacePoints;
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)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
key_type key() const noexcept
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
bool CheckElement(const std::string &Name) const
double SpacePointProjection(art::Ptr< recob::SpacePoint > const &sp, TVector3 const &vertex, TVector3 const &direction) const
int GetElement(const std::string &Name, T &Element) const
Detector simulation of raw signals on wires.
double SpacePointPerpendicular(art::Ptr< recob::SpacePoint > const &sp, TVector3 const &vertex, TVector3 const &direction) const
2D representation of charge deposited in the TDC/wire plane
auto const & get(AssnsNode< L, R, D > const &r)
QTextStream & endl(QTextStream &s)