88 <<
"Start position not set, returning " <<
std::endl;
94 <<
"Direction not set, returning " <<
std::endl;
100 <<
"Initial Spacepoints not set, returning " <<
std::endl;
104 TVector3 ShowerStartPosition = {-999, -999, -999};
107 TVector3 ShowerDirection = {-999, -999, -999};
110 std::vector<art::Ptr<recob::SpacePoint>> spacepoints;
118 <<
"Insufficient space points points to build track: " << spacepoints.size();
123 const float wirePitchW(detType->WirePitchW());
125 const pandora::CartesianVector vertexPosition(
126 ShowerStartPosition.X(), ShowerStartPosition.Y(), ShowerStartPosition.Z());
128 pandora::CartesianPointVector cartesianPointVector;
130 cartesianPointVector.emplace_back(
131 pandora::CartesianVector(spacePoint->XYZ()[0], spacePoint->XYZ()[1], spacePoint->XYZ()[2]));
143 catch (
const pandora::StatusCodeException&) {
146 <<
"Unable to extract sliding fit trajectory" <<
std::endl;
152 <<
"Insufficient input trajectory points to build track: " << trackStateVector.size();
156 if (trackStateVector.empty())
158 <<
"BuildTrack - No input trajectory points provided " <<
std::endl;
166 trackState.GetPosition().GetY(),
167 trackState.GetPosition().GetZ()));
169 trackState.GetDirection().GetY(),
170 trackState.GetDirection().GetZ()));
173 if (std::fabs(trackState.GetPosition().GetX() -
util::kBogusF) <
174 std::numeric_limits<float>::epsilon() &&
176 std::numeric_limits<float>::epsilon() &&
178 std::numeric_limits<float>::epsilon()) {
199 TVector3
Start = {InitialTrack.
Start().X(), InitialTrack.
Start().Y(), InitialTrack.
Start().Z()};
200 TVector3
End = {InitialTrack.
End().X(), InitialTrack.
End().Y(), InitialTrack.
End().Z()};
201 float tracklength = (Start -
End).Mag();
static constexpr Flag_t NoPoint
The trajectory point is not defined.
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 > > SMatrixSym55
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
std::vector< int > IntVector
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
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 ...
Point_t const & Start() const
Access to track position at different points.
A trajectory in space reconstructed from hits.
key_type key() const noexcept
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.
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
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...
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
QTextStream & endl(QTextStream &s)