9#include <tracking/trackFindingCDC/filters/facet/Chi2FacetFilter.h>
11#include <tracking/trackFindingCDC/fitting/FacetFitter.h>
13#include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
15#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
17#include <framework/core/ModuleParamList.templateDetails.h>
18#include <framework/logging/Logger.h>
23using namespace TrackFindingCDC;
27 : m_param_chi2CutByISuperLayer{35.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0}
32 : m_param_chi2CutByISuperLayer{chi2Cut}
33 , m_param_penaltyFactor(penaltyWidth / chi2Cut)
38 const std::string& prefix)
42 moduleParamList->
addParameter(prefixed(prefix,
"chi2CutByISuperLayer"),
44 "Acceptable chi2 values by superlayer id",
47 moduleParamList->
addParameter(prefixed(prefix,
"penaltyFactor"),
49 "Factor for cut value to obtain the width used in translation from chi2 values to weight penalties",
67 B2ERROR(
"Expected chi2CutByISuperLayer to be of length 1 or "
77 constexpr const int nSteps = 1;
The Module parameter list class.
Class representing a triple of neighboring oriented wire with additional trajectory information.
ISuperLayer getISuperLayer() const
Getter for the common superlayer id of the pair.
std::array< double, ISuperLayerUtil::c_N > m_chi2CutByISuperLayer
Memory for the chi2 cut values distinguished by superlayer.
std::vector< double > m_param_chi2CutByISuperLayer
Parameter : The chi2 cut values distinguished by superlayer.
Weight operator()(const CDCFacet &facet) final
Main filter method returning the weight of the facet Returns NAN if the cell shall be rejected.
Chi2FacetFilter()
Constructor with the default chi2 cut value and width parameter.
double m_param_penaltyFactor
Parameter : The chi2 cut values distinguished by superlayer.
void initialize() final
Initialise the parameter caches before the processing starts.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the set of parameters of the filter to the module parameter list.
std::array< double, ISuperLayerUtil::c_N > m_penaltyWidthByISuperLayer
Memory for the chi2 cut values distinguished by superlayer.
void initialize() override
Receive and dispatch signal before the start of the event processing.
static double fit(const CDCFacet &facet, int nSteps=100)
Fits a proper line to facet and returns the chi2.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Expose the set of parameters of the filter to the module parameter list.
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.
static const ISuperLayer c_N
Constant representing the total number of cdc superlayers.