77 InitialiseProduct<art::Assns<recob::Shower, recob::Track>>(
"ShowerTrackAssn");
78 InitialiseProduct<art::Assns<recob::Track, recob::Hit>>(
"ShowerTrackHitAssn");
91 <<
"Start position not set, returning " << std::endl;
97 <<
"Direction not set, returning " << std::endl;
103 <<
"Initial Spacepoints not set, returning " << std::endl;
113 std::vector<art::Ptr<recob::SpacePoint>> spacepoints;
121 <<
"Insufficient space points points to build track: " << spacepoints.size();
127 const float wirePitchW(detType->
WirePitchW());
129 const pandora::CartesianVector vertexPosition(
130 ShowerStartPosition.X(), ShowerStartPosition.Y(), ShowerStartPosition.Z());
132 pandora::CartesianPointVector cartesianPointVector;
134 cartesianPointVector.emplace_back(
135 pandora::CartesianVector(spacePoint->XYZ()[0], spacePoint->XYZ()[1], spacePoint->XYZ()[2]));
147 catch (
const pandora::StatusCodeException&) {
150 <<
"Unable to extract sliding fit trajectory" << std::endl;
156 <<
"Insufficient input trajectory points to build track: " << trackStateVector.size();
160 if (trackStateVector.empty())
162 <<
"BuildTrack - No input trajectory points provided " << std::endl;
170 trackState.GetPosition().GetY(),
171 trackState.GetPosition().GetZ()));
173 trackState.GetDirection().GetY(),
174 trackState.GetDirection().GetZ()));
177 if (std::fabs(trackState.GetPosition().GetX() -
util::kBogusF) <
178 std::numeric_limits<float>::epsilon() &&
180 std::numeric_limits<float>::epsilon() &&
182 std::numeric_limits<float>::epsilon()) {
203 float tracklength = (InitialTrack.
Start() - InitialTrack.
End()).R();
219 mf::LogError(
"ShowerPandoraSlidingFitTrackFinderAddAssn")
220 <<
"Track not set so the assocation can not be made " << std::endl;
230 GetProducedElementPtr<recob::Shower>(
"shower", ShowerEleHolder);
232 AddSingle<art::Assns<recob::Shower, recob::Track>>(showerptr, trackptr,
"ShowerTrackAssn");
234 std::vector<art::Ptr<recob::Hit>> TrackHits;
237 for (
auto const& TrackHit : TrackHits) {
238 AddSingle<art::Assns<recob::Track, recob::Hit>>(trackptr, TrackHit,
"ShowerTrackHitAssn");
Header file for the pfo helper class.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
static constexpr Flag_t NoPoint
The trajectory point is not defined.
Declaration of signal hit object.
Empty interface to map pandora to specifics in the LArSoft geometry.
void SetElement(T &dataproduct, const std::string &Name, bool checktag=false)
static void GetSlidingFitTrajectory(const pandora::CartesianPointVector &pointVector, const pandora::CartesianVector &vertexPosition, const unsigned int layerWindow, const float layerPitch, LArTrackStateVector &trackStateVector, pandora::IntVector *const pIndexVector=nullptr)
Apply 3D sliding fit to a set of 3D points and return track trajectory.
constexpr int kBogusI
obviously bogus integer value
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 >> SMatrixSym55
std::vector< int > IntVector
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Point_t const & Start() const
Access to track position at different points.
A trajectory in space reconstructed from hits.
key_type key() const noexcept
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space. See recob::tracking::Coord_t for more details on the ...
bool CheckElement(const std::string &Name) const
Provides recob::Track data product.
std::vector< Vector_t > Momenta_t
Type of momentum list.
std::vector< PointFlags_t > Flags_t
Type of point flag list.
int GetElement(const std::string &Name, T &Element) const
static constexpr HitIndex_t InvalidHitIndex
Value marking an invalid hit index.
virtual float WirePitchW() const =0
The wire pitch of the mapped W view.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
std::vector< Point_t > Positions_t
Type of trajectory point list.
LArPandoraDetectorType * GetDetectorType()
Factory class that returns the correct detector type interface.
constexpr float kBogusF
obviously bogus float value
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Point_t const & End() const
Access to track position at different points.
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
std::vector< LArTrackState > LArTrackStateVector
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space. See recob::tracking::Coord_t for more detai...
Helper functions for extracting detector geometry for use in reconsruction.
Set of flags pertaining a point of the track.
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
cet::coded_exception< error, detail::translate > exception