10 #include <klm/bklm/modules/bklmTracking/BKLMTrackFinder.h>
13 #include <klm/dataobjects/bklm/BKLMHit2d.h>
16 #include <framework/logging/Logger.h>
20 using namespace CLHEP;
47 std::list<BKLMHit2d*>& hits,
48 std::list<BKLMHit2d*>& track)
51 std::list<BKLMHit2d*>::iterator i;
56 B2ERROR(
"BKLMTrackFinder: Fitter not registered");
62 for (i = hits.begin(); i != hits.end(); ++i) {
74 if ((*i)->isOnStaTrack() ==
false) {
91 B2DEBUG(20,
"BKLMTrackFinder:" <<
"ChiSqr: " << chisqr);
94 std::list<int> hitLayers;
95 for (i = track.begin(); i != track.end(); ++i) {
96 hitLayers.push_back((*i)->getLayer());
101 int layers = (*(--hitLayers.end()) - * (hitLayers.begin()));
102 int noHits = hitLayers.size();
104 if (noHits >= 4 &&
double(noHits) / double(layers) >= 0.75) {
bool filter(const std::list< BKLMHit2d * > &seed, std::list< BKLMHit2d * > &hits, std::list< BKLMHit2d * > &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
void setGlobalFit(bool localOrGlobal)
set the fitting mode, local system or global system
double fit(std::list< BKLMHit2d * > &listTrackPoint)
do fit and returns chi square of the fit.
double distanceToHit(BKLMHit2d *hit, double &error, double &sigma)
Distance from track to a hit in the plane of the module.
double globalDistanceToHit(BKLMHit2d *hit, double &error, double &sigma)
Distance from track to a hit in the global system.
Abstract base class for different kinds of events.