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