78 InitialiseProduct<art::Assns<recob::Shower, recob::Track>>(
"ShowerTrackAssn");
79 InitialiseProduct<art::Assns<recob::Track, recob::Hit>>(
"ShowerTrackHitAssn");
92 <<
"Start position not set, returning " << std::endl;
98 <<
"Direction not set, returning " << std::endl;
104 <<
"Initial Spacepoints not set, returning " << std::endl;
114 std::vector<art::Ptr<recob::SpacePoint>> spacepoints;
122 <<
"Insufficient space points points to build track: " << spacepoints.size();
128 const float wirePitchW(detType->
WirePitchW());
130 const pandora::CartesianVector vertexPosition(
131 ShowerStartPosition.X(), ShowerStartPosition.Y(), ShowerStartPosition.Z());
133 pandora::CartesianPointVector cartesianPointVector;
135 cartesianPointVector.emplace_back(
136 pandora::CartesianVector(spacePoint->XYZ()[0], spacePoint->XYZ()[1], spacePoint->XYZ()[2]));
148 catch (
const pandora::StatusCodeException&) {
151 <<
"Unable to extract sliding fit trajectory" << std::endl;
157 <<
"Insufficient input trajectory points to build track: " << trackStateVector.size();
161 if (trackStateVector.empty())
163 <<
"BuildTrack - No input trajectory points provided " << std::endl;
171 trackState.GetPosition().GetY(),
172 trackState.GetPosition().GetZ()));
174 trackState.GetDirection().GetY(),
175 trackState.GetDirection().GetZ()));
178 if (std::fabs(trackState.GetPosition().GetX() -
util::kBogusF) <
179 std::numeric_limits<float>::epsilon() &&
181 std::numeric_limits<float>::epsilon() &&
183 std::numeric_limits<float>::epsilon()) {
204 float tracklength = (InitialTrack.
Start() - InitialTrack.
End()).R();
220 mf::LogError(
"ShowerPandoraSlidingFitTrackFinderAddAssn")
221 <<
"Track not set so the assocation can not be made " << std::endl;
231 GetProducedElementPtr<recob::Shower>(
"shower", ShowerEleHolder);
233 AddSingle<art::Assns<recob::Shower, recob::Track>>(showerptr, trackptr,
"ShowerTrackAssn");
235 std::vector<art::Ptr<recob::Hit>> TrackHits;
238 for (
auto const& TrackHit : TrackHits) {
239 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
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
Provides recob::Track data product.
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.
art framework interface to geometry description
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