8#include <tracking/trackFindingCDC/filters/facetRelation/Chi2FacetRelationFilter.h>
10#include <tracking/trackFindingCDC/fitting/FacetFitter.h>
12#include <tracking/trackingUtilities/eventdata/hits/CDCFacet.h>
13#include <tracking/trackingUtilities/eventdata/hits/CDCWireHit.h>
15#include <tracking/trackingUtilities/geometry/UncertainParameterLine2D.h>
17#include <tracking/trackingUtilities/utilities/StringManipulation.h>
19#include <framework/core/ModuleParamList.templateDetails.h>
23using namespace TrackFindingCDC;
24using namespace TrackingUtilities;
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 "
The Module parameter list class.
std::vector< double > m_param_chi2CutByISuperLayer
Parameter : The chi2 cut values distinguished by superlayer.
double m_param_penaltyFactor
Parameter : The chi2 cut values distinguished by superlayer.
void initialize() final
Initialise the parameter caches before the processing starts.
Chi2FacetRelationFilter()
Constructor with the default chi2 cut value and width parameter.
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCFacet &fromFacet, const TrackingUtilities::CDCFacet &toFacet) final
Main filter method returning the weight of the neighborhood relation.
std::array< double, CDC::ISuperLayerUtil::c_N > m_penaltyWidthByISuperLayer
Memory for the chi2 cut values distinguished by superlayer.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the set of parameters of the filter to the module parameter list.
std::array< double, CDC::ISuperLayerUtil::c_N > m_chi2CutByISuperLayer
Memory for the chi2 cut values distinguished by superlayer.
static double fitChi2(const TrackingUtilities::CDCFacet &fromFacet, const TrackingUtilities::CDCFacet &toFacet)
Calculate only the chi2 of a line fitted to the hits of the two facets.
Class representing a triple of neighboring oriented wire with additional trajectory information.
CDC::ISuperLayer getISuperLayer() const
Getter for the common superlayer id of the pair.
const CDC::CDCWire & getEndWire() const
Getter for the wire the third oriented wire hit is based on.
const CDCWireHit & getStartWireHit() const
Getter for the hit wire of the first oriented wire hit.
bool isOnWire(const CDC::CDCWire &wire) const
Checks if the wire hit is based on the given wire.
void initialize() override
Receive and dispatch signal before the start of the event processing.
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.
signed short ISuperLayer
The type of the layer and superlayer ids.
Abstract base class for different kinds of events.
static const ISuperLayer c_N
Constant representing the total number of cdc superlayers.