 |
Belle II Software
release-05-01-25
|
10 #include <tracking/trackFindingCDC/filters/facetRelation/Chi2FacetRelationFilter.h>
12 #include <tracking/trackFindingCDC/fitting/FacetFitter.h>
14 #include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
15 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
17 #include <tracking/trackFindingCDC/geometry/UncertainParameterLine2D.h>
19 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
21 #include <framework/core/ModuleParamList.templateDetails.h>
24 using namespace TrackFindingCDC;
28 : m_param_chi2CutByISuperLayer{89.0, 130.0, 130.0, 130.0, 130.0, 130.0, 130.0, 130.0, 130.0}
33 : m_param_chi2CutByISuperLayer{chi2Cut}
34 , m_param_penaltyFactor(penaltyWidth / chi2Cut)
39 const std::string& prefix)
43 moduleParamList->
addParameter(prefixed(prefix,
"chi2CutByISuperLayer"),
45 "Acceptable chi2 values by superlayer id",
48 moduleParamList->
addParameter(prefixed(prefix,
"penaltyFactor"),
50 "Factor for cut value to obtain the width used in translation from chi2 values to weight penalties",
68 B2ERROR(
"Expected chi2CutByISuperLayer to be of length 1 or "
80 constexpr
const int nSteps = 0;
82 const double chi2 = fitLine.
chi2();
static const ISuperLayer c_N
Constant representing the total number of cdc superlayers.
Chi2FacetRelationFilter()
Constructor with the default chi2 cut value and width parameter.
const CDCWireHit & getStartWireHit() const
Getter for the hit wire of the first oriented wire hit.
static double fit(const CDCFacet &facet, int nSteps=100)
Fits a proper line to facet and returns the chi2.
double m_param_penaltyFactor
Parameter : The chi2 cut values distinguished by superlayer.
void initialize() override
Receive and dispatch signal before the start of the event processing.
bool isOnWire(const CDCWire &wire) const
Checks if the wire hit is based on the given wire.
double chi2() const
Getter for the chi square value of the line fit.
const CDCWire & getEndWire() const
Getter for the wire the third oriented wire hit is based on.
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.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Expose the set of parameters of the filter to the module parameter list.
void initialize() final
Initialise the parameter caches before the processing starts.
Class representing a triple of neighboring oriented wire with additional trajectory information.
std::vector< double > m_param_chi2CutByISuperLayer
Parameter : The chi2 cut values distinguished by superlayer.
std::array< double, ISuperLayerUtil::c_N > m_chi2CutByISuperLayer
Memory for the chi2 cut values distinguished by superlayer.
Weight operator()(const CDCFacet &fromFacet, const CDCFacet &toFacet) final
Main filter method returning the weight of the neighborhood relation.
std::array< double, ISuperLayerUtil::c_N > m_penaltyWidthByISuperLayer
Memory for the chi2 cut values distinguished by superlayer.
A parameter line including including an line covariance matrix which is interpreted as located in the...
The Module parameter list class.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the set of parameters of the filter to the module parameter list.
ISuperLayer getISuperLayer() const
Getter for the common superlayer id of the pair.