8#include <tracking/trackFindingCDC/legendre/quadtree/OffOriginExtension.h>
10#include <tracking/trackFindingCDC/legendre/quadtree/AxialHitQuadTreeProcessor.h>
11#include <tracking/trackFindingCDC/processing/AxialTrackUtil.h>
13#include <tracking/trackFindingCDC/fitting/CDCKarimakiFitter.h>
14#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
16#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
18#include <tracking/trackFindingCDC/numerics/LookupTable.h>
19#include <tracking/trackFindingCDC/geometry/Vector2D.h>
24using namespace TrackFindingCDC;
27 double levelPrecision)
29 , m_levelPrecision(levelPrecision)
34 void* qt __attribute__((unused)))
37 for (
const CDCWireHit* wireHit : inputWireHits) {
38 (*wireHit)->setTakenFlag(
false);
41 std::vector<const CDCWireHit*> candidateHits =
roadSearch(inputWireHits);
48std::vector<const CDCWireHit*>
54 double chi2 = trackTrajectory2D.
getChi2();
65 hit->getAutomatonCell().setTakenFlag(
true);
72 hit->getAutomatonCell().setTakenFlag(
false);
75 if (newWireHits.size() == 0)
return wireHits;
77 std::vector<const CDCWireHit*> combinedWireHits;
80 combinedWireHits.push_back(hit);
84 combinedWireHits.push_back(hit);
88 double combinedChi2 = combinedTrajectory2D.
getChi2();
90 if (combinedChi2 < chi2 * 2.) {
91 return combinedWireHits;
97std::vector<const CDCWireHit*>
104 YSpan curvSpan{curv - curvPrecision, curv + curvPrecision};
110 std::vector<const CDCWireHit*> newWireHits = qtProcessor.
getAssignedItems();
A QuadTreeProcessor for TrackHits.
Base class that receives candidates found by quadtree.
std::vector< const CDCWireHit * > m_allAxialWireHits
Pool of all axial hits from which the road search may select additional hits.
std::vector< CDCTrack > m_tracks
Collected tracks.
Class implementing the fitter using Karimakis method.
static const CDCKarimakiFitter & getNoDriftVarianceFitter()
Static getter for a general fitter that does not use the drift length variances.
Particle trajectory as it is seen in xy projection represented as a circle.
PerigeeCircle getGlobalCircle() const
Getter for the circle in global coordinates.
double getChi2() const
Getter for the chi2 value of the circle fit.
Vector2D getGlobalPerigee() const
Getter for the closest approach on the trajectory to the global origin.
double getCurvature() const
Getter for the curvature as seen from the xy projection.
Class representing a hit wire in the central drift chamber.
Class which holds precomputed values of a function.
void operator()(const std::vector< const CDCWireHit * > &inputWireHits, void *qt) final
Main entry point for the post processing call from the QuadTreeProcessor.
double m_levelPrecision
Precision level for the width of the off origin hough search.
std::vector< const CDCWireHit * > roadSearch(const std::vector< const CDCWireHit * > &wireHits)
Perform transformation for set of given hits; reference position taken as POCA of the fitted trajecto...
std::vector< const CDCWireHit * > getHitsWRTtoRefPos(const Vector2D &refPos, float curv, float theta)
Get hits which are compatible with given trajectory.
OffOriginExtension(std::vector< const CDCWireHit * > allAxialWireHits, double levelPrecision=9)
Constructor.
double phi0() const
Getter for the azimuth angle of the direction of flight at the perigee.
std::vector< AData * > getAssignedItems()
Get items that have been assigned to the seed level The returned elements are unique even if items ar...
typename QuadTree::YSpan YSpan
This pair describes the span in Y for a node.
void seed(const std::vector< AData * > &datas)
Fill in the items in the given vector.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
static Vector2D Phi(const double phi)
Constructs a unit vector with azimuth angle equal to phi.
Abstract base class for different kinds of events.
static void addCandidateFromHits(const std::vector< const CDCWireHit * > &foundAxialWireHits, const std::vector< const CDCWireHit * > &allAxialWireHits, std::vector< CDCTrack > &axialTracks, bool withPostprocessing=true)
Create CDCTrack using CDCWireHit hits and store it in the list. Then call the postprocessing on it.