10#include <tracking/trackFindingCDC/filters/base/Filter.dcl.h>
11#include <tracking/trackFindingCDC/numerics/WithWeight.h>
12#include <tracking/trackFindingCDC/numerics/Weight.h>
14#include <genfit/MeasuredStateOnPlane.h>
15#include <genfit/Exception.h>
16#include <framework/logging/Logger.h>
26 class ModuleParamList;
43 template <
class AState,
class AnAdvancer>
58 m_advancer.exposeParameters(moduleParamList, prefix);
65 m_advancer.setMaterialEffectsToParameterValue();
67 const std::vector<TrackFindingCDC::WithWeight<const AState*>>& previousStates = pair.first;
68 B2ASSERT(
"Can not extrapolate with nothing", not previousStates.empty());
70 const AState* lastState = previousStates.back();
71 AState* currentState = pair.second;
73 B2ASSERT(
"Can not extrapolate with nothing", lastState->mSoPSet());
74 genfit::MeasuredStateOnPlane mSoP = lastState->getMeasuredStateOnPlane();
76 double returnValue = NAN;
78 genfit::SharedPlanePtr plane = currentState->getPlane(mSoP);
79 returnValue =
m_advancer.extrapolateToPlane(mSoP, plane);
80 }
catch (genfit::Exception& e) {
81 B2DEBUG(29,
"Plane extraction failed: " << e.what());
84 if (not std::isnan(returnValue)) {
85 currentState->setMeasuredStateOnPlane(mSoP);
Filter which can be used on a pair of path (vector of states) and states, which will call the extrapo...
TrackFindingCDC::Weight operator()(const std::pair< const std::vector< TrackFindingCDC::WithWeight< const AState * > >, AState * > &pair) override
Extrapolate and return the result. Update the mSoP of the new state.
AnAdvancer m_advancer
The advancer to use.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the advancer.
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Base class for filters on a generic object type.
A mixin class to attach a weight to an object.
Abstract base class for different kinds of events.