4 added files
trf++/include/gtrfit
diff -N BiGTrackFitter.hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ BiGTrackFitter.hpp 15 Aug 2011 17:09:06 -0000 1.1
@@ -0,0 +1,38 @@
+// BiGTrackFitter.hpp
+
+#ifndef BiGTrackFitter_H
+#define BiGTrackFitter_H
+
+// Uses SimpleGTrackRefitter to fit a track both backwards and forwards
+// resulting in an optimal fit at either end. Intermediate fits are taken
+// from the forward fit.
+
+#include "SimpleGTrackFitter.hpp"
+
+class BiGTrackFitter : public GTrackFitter {
+
+private: // data
+
+ SimpleGTrackFitter _infit;
+ SimpleGTrackFitter _outfit;
+
+ // Maximum number of loops.
+ int _maxloop;
+
+public: // methods
+
+ // Constructor.
+ // pprop is the internal propagator
+ // maxloop is the number of fit loops
+ BiGTrackFitter(const trf::PropagatorPtr& pprop, //cng D0ClusterRegistry* preg,
+ double chsq_max, int maxloop=1);
+
+ // For backward compatibility.
+ BiGTrackFitter(const trf::PropagatorPtr& pprop /*cng , D0ClusterRegistry* preg=0*/);
+
+ // Fit a tracks.
+ int fit(GTrack& trg) const;
+
+};
+
+#endif
trf++/include/gtrfit
diff -N GTrackResidual.hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ GTrackResidual.hpp 15 Aug 2011 17:09:07 -0000 1.1
@@ -0,0 +1,51 @@
+// GTrackResidual.hpp
+
+#ifndef GTrackResidual_hpp
+#define GTrackResidual_hpp
+
+// Calculates residual (difference between cluster and track
+// measurement) for a track.
+
+#include "trfbase/PropagatorPtr.h"
+
+namespace {
+class GTrackResidualImp;
+}
+namespace trf {
+class Hit;
+class ETrack;
+}
+class GTrack;
+class GTrackState;
+
+class GTrackResidual {
+
+ GTrackResidualImp* _pimp;
+
+public:
+
+ // Constructor.
+ // Specify the propagator to use during fitting.
+ GTrackResidual(const trf::PropagatorPtr& pprop);
+
+ // Destructor.
+ ~GTrackResidual();
+
+ // Calculate a residual.
+ // The state must have a cluster.
+ // Return nonzero for error.
+ int calc(const GTrack& trg, const GTrackState& rstate);
+
+ // Return the track fitted at the hit surface using all
+ // clusters except the one at the specified surface.
+ const trf::ETrack& track() const;
+
+ // Return chisquare.
+ double chisq() const;
+
+ // Return the hit with prediction from the track.
+ const trf::Hit& hit() const;
+
+};
+
+#endif
trf++/include/gtrfit
diff -N GTrackSmoothingRefitter.hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ GTrackSmoothingRefitter.hpp 15 Aug 2011 17:09:07 -0000 1.1
@@ -0,0 +1,36 @@
+#ifndef GTRACKSMOOTHINGREFITTER_HPP
+#define GTRACKSMOOTHINGREFITTER_HPP
+
+#include "gtrfit/SimpleGTrackFitter.hpp"
+#include "gtrfit/GTrackSmoother.hpp"
+#include "trfbase/PropagatorPtr.h"
+
+//cng class D0ClusterRegistry;
+class GTrack;
+
+class GTrackSmoothingRefitter : public GTrackFitter {
+public :
+enum {
+ IN_OUT=1,
+ OUT_IN=-1
+};
+
+public:
+
+ // Refit in one direction (inside to outside or outside to inside)
+ // and smooth in the other
+ GTrackSmoothingRefitter(const trf::PropagatorPtr&, //cng D0ClusterRegistry* ,
+ int direction , double chsq);
+
+ // Fit a tracks.
+ int fit(GTrack& trg) const;
+
+
+protected:
+
+ SimpleGTrackFitter _fitter_inout, _fitter_outin;
+ GTrackSmoother _smoother;
+
+};
+
+#endif
trf++/include/gtrfit
diff -N GTrackSmoothingRefitter2.hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ GTrackSmoothingRefitter2.hpp 15 Aug 2011 17:09:07 -0000 1.1
@@ -0,0 +1,30 @@
+#ifndef GTRACKSMOOTHINGREFITTER2_HPP
+#define GTRACKSMOOTHINGREFITTER2_HPP
+
+#include "gtrfit/SimpleGTrackFitter.hpp"
+#include "gtrfit/GTrackSmoother.hpp"
+#include "trfbase/PropagatorPtr.h"
+
+//cng class D0ClusterRegistry;
+class GTrack;
+
+class GTrackSmoothingRefitter2 : public GTrackFitter {
+
+public:
+
+ // Refit in one direction (inside to outside or outside to inside)
+ // and smooth in the other
+ GTrackSmoothingRefitter2(const trf::PropagatorPtr&, //cng D0ClusterRegistry*,
+ double chsq);
+
+ // Fit a tracks.
+ int fit(GTrack& trg) const;
+
+
+private:
+
+ SimpleGTrackFitter _fitter_inout, _fitter_outin;
+
+};
+
+#endif
CVSspam 0.2.8