63 <<
"Vertex and PF particle association is somehow not valid. Stopping";
66 std::vector<art::Ptr<recob::Vertex>> vtx_cand;
68 vtx_cand = fmv.at(pfparticle.
key());
72 mf::LogError(
"ShowerPFPVertexStartPosition") <<
"PFP-Vertex assan not set, returning";
76 if (vtx_cand.size() != 1) {
79 <<
"Wrong number of vertices: " << vtx_cand.size() <<
", returning";
84 if (vtx_cand.size() == 1) {
86 auto ShowerStartPosition(StartPositionVertex->
position());
87 geo::Point_t ShowerStartPositionErr = {-999, -999, -999};
103 auto const spHandle = Event.getValidHandle<std::vector<recob::SpacePoint>>(
fPFParticleLabel);
108 std::vector<art::Ptr<recob::SpacePoint>> spacePoints_pfp = fmspp.at(pfparticle.
key());
111 if (spacePoints_pfp.empty()) {
return 0; }
114 auto const clockData =
120 clockData, detProp, spacePoints_pfp, fmh);
124 spacePoints_pfp, ShowerCentre, ShowerDirection);
127 auto ShowerStartPosition = spacePoints_pfp[0]->position();
129 geo::Point_t ShowerStartPositionErr = {-999, -999, -999};
138 <<
"Start Position has not been set yet. If you are not calculating the start position " 139 "again then maybe you should stop";
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Declaration of signal hit object.
void SetElement(T &dataproduct, const std::string &Name, bool checktag=false)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Definition of vertex object for LArSoft.
key_type key() const noexcept
bool CheckElement(const std::string &Name) const
int GetElement(const std::string &Name, T &Element) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
geo::Point_t ShowerCentre(std::vector< art::Ptr< recob::SpacePoint >> const &showersps) const
void OrderShowerSpacePoints(std::vector< art::Ptr< recob::SpacePoint >> &showersps, geo::Point_t const &vertex, geo::Vector_t const &direction) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
2D representation of charge deposited in the TDC/wire plane
const art::FindManyP< T1 > & GetFindManyP(const art::ValidHandle< std::vector< T2 >> &handle, const art::Event &evt, const art::InputTag &moduleTag)
const Point_t & position() const
Return vertex 3D position.
cet::coded_exception< error, detail::translate > exception