 |
Belle II Software
release-05-01-25
|
10 #include <tracking/trackFindingCDC/findlets/minimal/SegmentFitter.h>
12 #include <tracking/trackFindingCDC/fitting/CDCObservations2D.h>
14 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
16 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
18 #include <framework/core/ModuleParamList.templateDetails.h>
19 #include <framework/logging/Logger.h>
22 using namespace TrackFindingCDC;
26 return "Fits each segment with a selectable method";
31 moduleParamList->
addParameter(prefixed(prefix,
"karimakiFit"),
33 "Switch to select Karimaki method for fitting instead of Riemann fit",
36 moduleParamList->
addParameter(prefixed(prefix,
"fitPos"),
38 "Positional information of the hits to be used in the fit. "
39 "Options are 'recoPos', 'rlDriftCircle', 'wirePos'.",
42 moduleParamList->
addParameter(prefixed(prefix,
"fitVariance"),
44 "Positional information of the hits to be used in the fit. "
45 "Options are 'unit', 'driftLength', 'pseudo', 'proper'.",
48 moduleParamList->
addParameter(prefixed(prefix,
"updateDriftLength"),
50 "Switch to reestimate the drift length",
53 moduleParamList->
addParameter(prefixed(prefix,
"updateRecoPos"),
55 "Switch to reestimate the position and right left passage information",
68 }
catch (std::invalid_argument& e) {
76 }
catch (std::invalid_argument& e) {
82 if (
m_fitPos != EFitPos::c_RecoPos) {
83 B2WARNING(
"Karimaki fitter only works with the reconstructed position as input.");
104 if (
m_fitPos != EFitPos::c_RecoPos) {
105 observations2D.
clear();
106 observations2D.
setFitPos(EFitPos::c_RecoPos);
110 segment.setTrajectory2D(trajectory2D);
114 segment.setTrajectory2D(trajectory2D);
121 if (not trajectory2D.
isFitted())
continue;
125 if (rlInfo != recoHit2D.getRLInfo()) ++nRLChanges;
126 recoHit2D.setRLInfo(rlInfo);
127 const CDCRLWireHit& rlWireHit = recoHit2D.getRLWireHit();
129 recoHit2D.setRecoPos2D(recoPos2D);
131 if (nRLChanges > 0) B2DEBUG(100,
"RL changes " << nRLChanges);
bool m_param_updateDriftLength
Parameter : Switch to reestimate the drift length before the fit.
std::size_t size() const
Returns the number of observations stored.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
EFitPos m_fitPos
Option which positional information from the hits should be used.
std::string m_param_fitPosString
Parameter : Option string which positional information from the hits should be used.
void apply(std::vector< CDCSegment2D > &outputSegments) override
Main algorithm applying the fit to each segment.
void clear()
Removes all observations stored.
EFitVariance m_fitVariance
Option which variance information from the hits should be used.
void initialize() override
Signals the beginning of the event processing.
Particle trajectory as it is seen in xy projection represented as a circle.
void setFitPos(EFitPos fitPos)
Setter for the indicator that the reconstructed position should be favoured.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters to a module.
double updateDriftLength(CDCRecoHit2D &recoHit2D)
Update the drift length of the reconstructed hit in place.
void initialize() override
Receive and dispatch signal before the start of the event processing.
std::size_t appendRange(const CDCSegment2D &segment2D)
Appends all reconstructed hits from the two dimensional segment.
ERightLeft isRightOrLeft(const Vector2D &point) const
Checks if the given point is to the right or to the left of the trajectory.
Class serving as a storage of observed drift circles to present to the Riemann fitter.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
DriftLengthEstimator m_driftLengthEstimator
Instance of the drift length estimator to be used.
Class representing a two dimensional reconstructed hit in the central drift chamber.
Abstract base class for different kinds of events.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Vector2D reconstruct2D(const CDCTrajectory2D &trajectory2D) const
Reconstructs a position of primary ionisation on the drift circle.
CDCTrajectory2D fit(const CDCObservations2D &observations2D) const
Fits a collection of observation drift circles.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
CDCKarimakiFitter m_karimakiFitter
Instance of the karimaki fitter to be used.
std::string getDescription() override
Short description of the findlet.
bool isFitted() const
Checks if the circle is already set to a valid value.
A reconstructed sequence of two dimensional hits in one super layer.
std::string m_param_fitVarianceString
Parameter : Option string which variance information from the hits should be used.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Add the parameters of the estimator to the module.
The Module parameter list class.
CDCRiemannFitter m_riemannFitter
Instance of the riemann fitter to be used.
bool m_param_karimakiFit
Parameter : Switch to use Karimaki fit.
bool m_param_updateRecoPos
Parameter : Switch to reevaluate the position and right left passage information based in the fit.