Print

Print


Commit in trf++/include/gtrfit on MAIN
GTrackFitter.hpp+32added 1.1
GTrackSmoother.hpp+44added 1.1
SimpleGTrackFitter.hpp+51added 1.1
+127
3 added files
global track fitting

trf++/include/gtrfit
GTrackFitter.hpp added at 1.1
diff -N GTrackFitter.hpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ GTrackFitter.hpp	11 Aug 2011 00:04:09 -0000	1.1
@@ -0,0 +1,32 @@
+// GTrackFitter.hpp
+
+#ifndef GTrackFitter_H
+#define GTrackFitter_H
+
+//
+// File: GTrackFitter.hpp
+// Purpose: Base class for global GTrack fitters.  This class contains
+//          no attributes, and a single pure virtual method called "fit"
+//          which fits an existing GTrack in situ.
+//
+// Created: 11-Dec-2003  Herbert Greenlee
+
+#include "gtrbase/GTrack.hpp"
+
+class GTrackFitter {
+
+public:
+
+  // Constructor/destructor.
+
+  GTrackFitter() {}
+  virtual ~GTrackFitter() {}
+
+  // Fit a track.
+  // Return 0 for success.
+
+  virtual int fit(GTrack& trg) const = 0;
+
+};
+
+#endif

trf++/include/gtrfit
GTrackSmoother.hpp added at 1.1
diff -N GTrackSmoother.hpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ GTrackSmoother.hpp	11 Aug 2011 00:04:09 -0000	1.1
@@ -0,0 +1,44 @@
+#ifndef GTRACKSMOOTHER_HPP
+#define GTRACKSMOOTHER_HPP
+
+
+#include "trfbase/PropagatorPtr.h"
+
+class GTrack;
+// cng class D0ClusterRegistry;
+
+
+// Class to perform Kalman smoothing. The GTrack has be fit first.
+// The smoothing direction is determined from the GTrack itself. 
+// If GTrack was fit FORWARD the backward smoothing will be done.
+// And vice versa. Input GTrack need to have only one (last or first) OPTIMAL 
+// state and the rest are all FORWARD ( or BACKWARD ).
+
+class GTrackSmoother {
+
+public :
+
+  GTrackSmoother(const trf::PropagatorPtr& pprop
+		 /* cng , D0ClusterRegistry* preg=0 */ );
+  
+  GTrackSmoother(const GTrackSmoother& );
+
+  ~GTrackSmoother();
+
+  // Fit a track.
+  // Return 0 for success.
+  // n_nomiss_states is the number of states ( without misses) to
+  // smooth before exiting. Less or equal to 0 means to smooth all states
+  int smooth(GTrack& trg, int n_nomiss_states = 0 ) const;
+
+protected :
+
+  // Propagator.
+  trf::PropagatorPtr _pprop;
+
+  // D0ClusterRegistry takes ownership of newly generated trf clusters.
+// cng   D0ClusterRegistry* _preg;
+
+};
+
+#endif

trf++/include/gtrfit
SimpleGTrackFitter.hpp added at 1.1
diff -N SimpleGTrackFitter.hpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SimpleGTrackFitter.hpp	11 Aug 2011 00:04:09 -0000	1.1
@@ -0,0 +1,51 @@
+// SimpleGTrackFitter.hpp
+
+#ifndef SimpleGTrackFitter_H
+#define SimpleGTrackFitter_H
+
+// A class which fits a GTrack.
+
+#include "trfbase/PropagatorPtr.h"
+#include "trffit/AddFitterPtr.h"
+#include "trffit/AddFitKalman.h"
+#include "gtrfit/GTrackFitter.hpp"
+
+//cng class D0ClusterRegistry;
+
+class SimpleGTrackFitter : public GTrackFitter {
+
+public:  // enums
+
+  // Propagator.
+  trf::PropagatorPtr _pprop;
+
+  // Fit order.
+  int _order;
+
+  // Add fitter.
+  trf::AddFitter* _pfit;
+
+  // D0ClusterRegistry takes ownership of newly generated trf clusters.
+//cng  D0ClusterRegistry* _preg;
+
+  // Maximum chi-square.
+  double _chsq_max;
+
+public:  // methods
+
+  // Constructor.
+  // order = fit order (1 for going out, -1 for going in).
+  SimpleGTrackFitter(const trf::PropagatorPtr& pprop, int order,
+		     /* cng D0ClusterRegistry* preg, */
+                     double chsq_max);
+
+  // Destructor
+  ~SimpleGTrackFitter();
+
+  // Fit a track.
+  // Return 0 for success.
+  int fit(GTrack& trg) const;
+
+};
+
+#endif
CVSspam 0.2.8