55 TVector3 ShowerCentre = {-999, -999, -999};
61 <<
"Start position not set, returning " <<
std::endl;
67 <<
"Direction not set, returning " <<
std::endl;
72 auto const clockData =
80 const art::FindManyP<recob::SpacePoint>& fmspp =
84 auto const spHandle = Event.getValidHandle<std::vector<recob::SpacePoint>>(
fPFParticleLabel);
86 const art::FindManyP<recob::Hit>& fmh =
90 std::vector<art::Ptr<recob::SpacePoint>> spacePoints_pfp = fmspp.at(pfparticle.
key());
93 if (spacePoints_pfp.empty())
return 1;
97 clockData, detProp, spacePoints_pfp, fmh);
103 TVector3 ShowerStartPosition = {-999, -999, -999};
106 TVector3 ShowerDirection = {-999, -999, -999};
110 double projection = ShowerDirection.Dot(ShowerStartPosition - ShowerCentre);
113 TVector3 ShowerNewStartPosition = projection * ShowerDirection + ShowerCentre;
114 TVector3 ShowerNewStartPositionErr = {-999, -999, -999};
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
TVector3 ShowerCentre(std::vector< art::Ptr< recob::SpacePoint >> const &showersps) const
2D representation of charge deposited in the TDC/wire plane
QTextStream & endl(QTextStream &s)