84 <<
"Not Enough trajectory points." <<
std::endl;
101 <<
"Shower start position not set" <<
std::endl;
104 TVector3 StartPosition_vec = {-999, -999, -999};
106 StartPosition.SetCoordinates(
107 StartPosition_vec.X(), StartPosition_vec.Y(), StartPosition_vec.Z());
110 StartPosition = InitialTrack.
Start();
128 int nexttraj = traj + 1;
140 int nextnexttraj = nexttraj + 1;
141 auto nextnextflags = InitialTrack.
FlagsAtPoint(nextnexttraj);
148 nextnextflags = InitialTrack.
FlagsAtPoint(nextnexttraj);
154 <<
"Trajectory point not set as rest of the traj points are bogus." <<
std::endl;
163 NextTrajPosition_vec = InitialTrack.
LocationAtPoint(nexttraj) - StartPosition;
164 NextNextTrajPosition_vec = InitialTrack.
LocationAtPoint(nextnexttraj) - StartPosition;
167 NextTrajPosition_vec =
169 NextNextTrajPosition_vec =
174 TVector3 TrajPosition = {TrajPosition_vec.X(), TrajPosition_vec.Y(), TrajPosition_vec.Z()};
175 TVector3 NextTrajPosition = {
176 NextTrajPosition_vec.X(), NextTrajPosition_vec.Y(), NextTrajPosition_vec.Z()};
177 TVector3 NextNextTrajPosition = {
178 NextNextTrajPosition_vec.X(), NextNextTrajPosition_vec.Y(), NextNextTrajPosition_vec.Z()};
181 if (TrajPosition.Mag() == 0) {
continue; }
182 if (NextTrajPosition.Mag() == 0) {
continue; }
183 if (NextNextTrajPosition.Mag() == 0) {
continue; }
186 if (TrajPosition.Angle(NextTrajPosition) <
fAngleCut &&
187 TrajPosition.Angle(NextNextTrajPosition) <
fAngleCut) {
200 Direction_vec = (TrajPosition - StartPosition).Unit();
234 int prevtraj = traj - 1;
251 int nexttraj = traj + 1;
263 int nextnexttraj = nexttraj + 1;
264 auto nextnextflags = InitialTrack.
FlagsAtPoint(nextnexttraj);
271 nextnextflags = InitialTrack.
FlagsAtPoint(nextnexttraj);
277 <<
"Trajectory point not set as rest of the traj points are bogus." <<
std::endl;
285 TVector3 TrajDirection = {
286 TrajDirection_vec.X(), TrajDirection_vec.Y(), TrajDirection_vec.Z()};
287 TVector3 NextTrajDirection = {
288 NextTrajDirection_vec.X(), NextTrajDirection_vec.Y(), NextTrajDirection_vec.Z()};
289 TVector3 NextNextTrajDirection = {NextNextTrajDirection_vec.X(),
290 NextNextTrajDirection_vec.Y(),
291 NextNextTrajDirection_vec.Z()};
294 if (TrajDirection.Mag() == 0) {
continue; }
295 if (NextTrajDirection.Mag() == 0) {
continue; }
296 if (NextNextTrajDirection.Mag() == 0) {
continue; }
299 if (TrajDirection.Angle(NextTrajDirection) <
fAngleCut &&
300 TrajDirection.Angle(NextNextTrajDirection) <
fAngleCut) {
310 <<
"Trajectory point not set." <<
std::endl;
315 TVector3
Direction = {Direction_vec.X(), Direction_vec.Y(), Direction_vec.Z()};
316 TVector3 DirectionErr = {-999, -999, -999};
static constexpr Flag_t NoPoint
The trajectory point is not defined.
Point_t const & LocationAtPoint(size_t i) const
void SetElement(T &dataproduct, const std::string &Name, bool checktag=false)
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Point_t const & Start() const
Access to track position at different points.
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.
PointFlags_t const & FlagsAtPoint(size_t i) const
Vector_t DirectionAtPoint(size_t i) const
auto const & get(AssnsNode< L, R, D > const &r)
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
QTextStream & endl(QTextStream &s)