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);
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
int GetElement(const std::string &Name, T &Element) const
Detector simulation of raw signals on wires.
2D representation of charge deposited in the TDC/wire plane
QTextStream & endl(QTextStream &s)