10 #include <tracking/trackFindingCDC/numerics/EForwardBackward.h>
11 #include <framework/logging/Logger.h>
32 return static_cast<double>(forwardBackward) * arcLength2D >= 0;
38 if (directionString ==
"forward" or directionString ==
"above" or directionString ==
"after") {
39 return TrackFindingCDC::EForwardBackward::c_Forward;
40 }
else if (directionString ==
"backward" or directionString ==
"below" or directionString ==
"before") {
41 return TrackFindingCDC::EForwardBackward::c_Backward;
42 }
else if (directionString ==
"both" or directionString ==
"unknown") {
43 return TrackFindingCDC::EForwardBackward::c_Unknown;
44 }
else if (directionString ==
"none" or directionString ==
"invalid") {
45 return TrackFindingCDC::EForwardBackward::c_Invalid;
47 B2FATAL(
"Do not understand direction " << directionString <<
". Valid names are " <<
48 "forward/above/after, backward/below/before, both/unknown, none/invalid");
constexpr bool arcLengthInRightDirection(double arcLength2D, TrackFindingCDC::EForwardBackward forwardBackward)
Given the calculated arc length between a start point and an end point, checks if the travelled path ...
TrackFindingCDC::EForwardBackward fromString(const std::string &directionString)
Helper function to turn a direction string into a valid forward backward information.
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.
Abstract base class for different kinds of events.