 |
Belle II Software
release-05-01-25
|
11 #include <tracking/ckf/general/utilities/Advancer.h>
12 #include <tracking/ckf/general/utilities/SearchDirection.h>
14 #include <framework/core/ModuleParamList.templateDetails.h>
16 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
17 #include <framework/logging/Logger.h>
18 #include <genfit/MaterialEffects.h>
19 #include <genfit/Exception.h>
22 using namespace TrackFindingCDC;
27 setMaterialEffectsToParameterValue();
29 double returnValue = NAN;
31 const double extrapolatedS = measuredStateOnPlane.extrapolateToPlane(plane);
34 returnValue = m_param_direction * extrapolatedS;
37 B2DEBUG(50,
"Extrapolation failed: " << e.what());
40 resetMaterialEffects();
46 genfit::MaterialEffects::getInstance()->setNoEffects(not m_param_useMaterialEffects);
51 genfit::MaterialEffects::getInstance()->setNoEffects(
false);
56 moduleParamList->
addParameter(prefixed(prefix,
"useMaterialEffects"),
57 m_param_useMaterialEffects,
58 "Use the material effects during extrapolation.",
59 m_param_useMaterialEffects);
61 moduleParamList->
addParameter(prefixed(prefix,
"direction"), m_param_directionAsString,
62 "The direction where the extrapolation will happen.");
69 m_param_direction =
fromString(m_param_directionAsString);
Exception class for error handling in GENFIT (provides storage for diagnostic information)
TrackFindingCDC::EForwardBackward fromString(const std::string &directionString)
Helper function to turn a direction string into a valid forward backward information.
std::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
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,...
#StateOnPlane with additional covariance matrix.
void initialize() final
Convert the string parameter to a valid forward backward information.
void resetMaterialEffects() const
Call this to reset the material effects back to their default value (turned on).
virtual void initialize()
Receive signal before the start of the event processing.
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 ...
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.
void setMaterialEffectsToParameterValue() const
Call this to set the material effects handling accorinf to the given parameters.
The Module parameter list class.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Expose the parameters.