9 #include <tracking/ckf/general/utilities/Advancer.h>
10 #include <tracking/ckf/general/utilities/SearchDirection.h>
12 #include <framework/core/ModuleParamList.templateDetails.h>
14 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15 #include <framework/logging/Logger.h>
16 #include <genfit/MaterialEffects.h>
17 #include <genfit/Exception.h>
20 using namespace TrackFindingCDC;
25 setMaterialEffectsToParameterValue();
27 double returnValue = NAN;
29 const double extrapolatedS = measuredStateOnPlane.extrapolateToPlane(plane);
32 returnValue =
static_cast<double>(m_param_direction) * extrapolatedS;
35 B2DEBUG(29,
"Extrapolation failed: " << e.what());
38 resetMaterialEffects();
44 genfit::MaterialEffects::getInstance()->setNoEffects(not m_param_useMaterialEffects);
49 genfit::MaterialEffects::getInstance()->setNoEffects(
false);
54 moduleParamList->
addParameter(prefixed(prefix,
"useMaterialEffects"),
55 m_param_useMaterialEffects,
56 "Use the material effects during extrapolation.",
57 m_param_useMaterialEffects);
59 moduleParamList->
addParameter(prefixed(prefix,
"direction"), m_param_directionAsString,
60 "The direction where the extrapolation will happen.");
67 m_param_direction =
fromString(m_param_directionAsString);
void resetMaterialEffects() const
Call this to reset the material effects back to their default value (turned on).
double extrapolateToPlane(genfit::MeasuredStateOnPlane &measuredStateOnPlane, const genfit::SharedPlanePtr &plane) const
Extrapolate the mSoP of one plane to another plane and return the traveled distance or NAN,...
void initialize() final
Convert the string parameter to a valid forward backward information.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Expose the parameters.
void setMaterialEffectsToParameterValue() const
Call this to set the material effects handling accorinf to the given parameters.
The Module parameter list class.
virtual void initialize()
Receive signal before the start of the event processing.
Exception class for error handling in GENFIT (provides storage for diagnostic information)
#StateOnPlane with additional covariance matrix.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
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.
Abstract base class for different kinds of events.
std::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.