10#include <klm/bklm/modules/bklmTracking/BKLMTrackFinder.h>
13#include <klm/dataobjects/KLMHit2d.h>
16#include <framework/logging/Logger.h>
46 std::list<KLMHit2d*>& hits,
47 std::list<KLMHit2d*>& track)
52 B2ERROR(
"BKLMTrackFinder: Fitter not registered");
72 if (hit2d->isOnStaTrack() ==
false) {
79 track.push_back(hit2d);
89 B2DEBUG(20,
"BKLMTrackFinder:" <<
"ChiSqr: " << chisqr);
92 std::list<int> hitLayers;
94 hitLayers.push_back(hit2d->getLayer());
99 int layers = (*(--hitLayers.end()) - * (hitLayers.begin()));
100 int noHits = hitLayers.size();
102 if (noHits >= 4 &&
double(noHits) / double(layers) >= 0.75) {
bool filter(const std::list< KLMHit2d * > &seed, std::list< KLMHit2d * > &hits, std::list< KLMHit2d * > &track)
find associated hits and do fit.
void registerFitter(BKLMTrackFitter *fitter)
Register a fitter if not constructed with one.
~BKLMTrackFinder()
Destructor.
bool m_globalFit
do fit in the local system or global system false: local sys; true: global sys.
BKLMTrackFinder()
Default constructor.
BKLMTrackFitter * m_Fitter
pointer to the fitter
double fit(std::list< KLMHit2d * > &listTrackPoint)
do fit and returns chi square of the fit.
double globalDistanceToHit(KLMHit2d *hit, double &error, double &sigma)
Distance from track to a hit in the global system.
double distanceToHit(KLMHit2d *hit, double &error, double &sigma)
Distance from track to a hit in the plane of the module.
void setGlobalFit(bool localOrGlobal)
set the fitting mode, local system or global system
Abstract base class for different kinds of events.