Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTrackFitter_factory_StraightTrack.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTrackFitter_factory_StraightTrack.h
4 // Created: Tue Mar 12 16:49:20 EDT 2019
5 // Creator: staylor (on Linux ifarm1402.jlab.org 3.10.0-327.el7.x86_64 x86_64)
6 //
7 
8 #ifndef _DTrackFitter_factory_StraightTrack_
9 #define _DTrackFitter_factory_StraightTrack_
10 
11 #include <JANA/JFactory.h>
13 
14 class DTrackFitter_factory_StraightTrack:public jana::JFactory<DTrackFitter>{
15  public:
18  const char* Tag(void){return "StraightTrack";}
19 
21 
22  //------------------
23  // brun
24  //------------------
25  jerror_t brun(JEventLoop *loop, int32_t runnumber)
26  {
27  // (See DTAGHGeometry_factory.h)
28  SetFactoryFlag(NOT_OBJECT_OWNER);
29  ClearFactoryFlag(WRITE_TO_OUTPUT);
30 
31  if( fitter ) delete fitter;
32 
34 
35  return NOERROR;
36  }
37 
38  //------------------
39  // evnt
40  //------------------
41  jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)
42  {
43  // Reuse existing DTrackFitterKalmanSIMD object.
44  if( fitter ) _data.push_back( fitter );
45 
46  return NOERROR;
47  }
48 
49  //------------------
50  // erun
51  //------------------
52  jerror_t erun(void)
53  {
54  if( fitter ) delete fitter;
55  fitter = NULL;
56 
57  return NOERROR;
58  }
59 };
60 
61 #endif // _DTrackFitter_factory_StraightTrack_
62 
The DTrackFitter class is a base class for different charged track fitting algorithms. It does not actually fit the track itself, but provides the interface and some common support features most algorthims will need to implement.
Definition: DTrackFitter.h:61
jerror_t brun(JEventLoop *loop, int32_t runnumber)
jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)