Belle II Software development
CDCFitter2D.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/fitting/EFitVariance.h>
11
12#include <vector>
13
14namespace Belle2 {
19 namespace TrackFindingCDC {
20 class CDCTrack;
21 class CDCSegment3D;
22 class CDCAxialSegmentPair;
23 class CDCSegment2D;
24 class CDCWireHitSegment;
25 class CDCWireHit;
26 class CDCTrajectory2D;
27 class CDCObservations2D;
28
29 class CDCWire;
30
32 template<class AFitMethod>
33 class CDCFitter2D : public AFitMethod {
34
35 public:
38
41
43 CDCTrajectory2D fit(const CDCObservations2D& observations2D) const;
44
46 CDCTrajectory2D fit(CDCObservations2D&& observations2D) const;
47
49 void update(CDCTrajectory2D& trajectory2D, const CDCObservations2D& observations2D) const;
50
52 void update(CDCTrajectory2D& trajectory2D, CDCObservations2D&& observations2D) const;
53
55 CDCTrajectory2D fit(const CDCTrack& track) const;
56
58 CDCTrajectory2D fit(const CDCSegment3D& segment) const;
59
61 CDCTrajectory2D fit(const CDCSegment2D& fromSegment, const CDCSegment2D& toSegment) const;
62
64 CDCTrajectory2D fit(const CDCSegment2D& segment) const;
65
67 CDCTrajectory2D fit(const std::vector<const CDCWireHit*>& wireHit) const;
68
70 CDCTrajectory2D fit(const std::vector<const CDCWire*>& wires) const;
71
73 CDCTrajectory2D fit(const CDCWireHitSegment& wireHits) const;
74
76 void update(CDCTrajectory2D& trajectory2D, const CDCSegment2D& segment) const;
77
79 void update(CDCTrajectory2D& trajectory2D, const CDCAxialSegmentPair& axialSegmentPair) const;
80
81 private:
83 template<class AHits>
84 CDCTrajectory2D fitGeneric(const AHits& hits) const;
85
87 template<class AStartHits, class AEndHits>
88 CDCTrajectory2D fitGeneric(const AStartHits& startHits, const AEndHits& endHits) const;
89
94 template <class AHits>
95 void updateGeneric(CDCTrajectory2D& trajectory2D, const AHits& hits) const;
96
101 template <class AStartHits, class AEndHits>
102 void updateGeneric(CDCTrajectory2D& trajectory2D,
103 const AStartHits& startHits,
104 const AEndHits& endHits) const;
105
106 public:
107 //set which information should be used from the recohits
108 //useOnlyPosition is standard
109
111 void useOnlyPosition();
112
114 void useOnlyOrientation();
115
118
120 void setFitVariance(EFitVariance fitVariance);
121
122 private:
124 bool m_usePosition = true;
125
127 bool m_useOrientation = false;
128
130 EFitVariance m_fitVariance = EFitVariance::c_Proper;
131 };
132 }
134}
Class representing a pair of reconstructed axial segements in adjacent superlayer.
Class implementing a fit for two dimensional trajectory circle using a generic fitting backend.
Definition: CDCFitter2D.h:33
CDCTrajectory2D fitGeneric(const AHits &hits) const
Fits a collection of hit typs which are convertable to observation circles.
void updateGeneric(CDCTrajectory2D &trajectory2D, const AHits &hits) const
Updates a given trajectory with a fit to a collection of hits types, which are convertable to observa...
bool m_useOrientation
Flag indicating the reference position and drift length with right left orientation shall be used in ...
Definition: CDCFitter2D.h:127
CDCTrajectory2D fit(const CDCObservations2D &observations2D) const
Fits a collection of observation drift circles.
void setFitVariance(EFitVariance fitVariance)
Setup the fitter to use the given variance measure by default.
void update(CDCTrajectory2D &trajectory2D, const CDCObservations2D &observations2D) const
Update the trajectory with a fit to the observations.
void useOnlyOrientation()
Setup the fitter to use only reference position and the drift length with right left orientation.
void usePositionAndOrientation()
Setup the fitter to use both the reconstructed position and the reference position and the drift leng...
bool m_usePosition
Flag indicating the reconstructed position shall be used in the fit.
Definition: CDCFitter2D.h:124
EFitVariance m_fitVariance
Default variance to be used in the fit.
Definition: CDCFitter2D.h:130
void useOnlyPosition()
Setup the fitter to use only the reconstructed positions of the hits.
Class serving as a storage of observed drift circles to present to the Riemann fitter.
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
A segment consisting of three dimensional reconstructed hits.
Definition: CDCSegment3D.h:26
Class representing a sequence of three dimensional reconstructed hits.
Definition: CDCTrack.h:41
Particle trajectory as it is seen in xy projection represented as a circle.
A segment consisting of two dimensional reconsturcted hits.
Abstract base class for different kinds of events.