13#ifndef THELIXFITTER_FLAG_
14#define THELIXFITTER_FLAG_
16#ifdef TRKRECO_DEBUG_DETAIL
22#include "CLHEP/Matrix/Vector.h"
25#include "TrackUtil/Helix.h"
26#include "TrkReco/TMFitter.h"
27#include "TrkReco/TTrackBase.h"
29#include "MagneticFieldSvc/IBesMagFieldSvc.h"
32#include "CLHEP/Geometry/Point3D.h"
33#include "CLHEP/Matrix/SymMatrix.h"
34#include "CLHEP/Vector/LorentzVector.h"
35#include "CLHEP/Vector/ThreeVector.h"
39using CLHEP::HepVector;
42#define TrackFitNoCorrection 0
43#define TrackFitCorrectOnce 1
44#define TrackFitCorrectEveryIteration 2
58 void dump(
const std::string& message = std::string(
"" ),
59 const std::string& prefix = std::string(
"" ) )
const;
76 bool sag(
void )
const;
84 bool tof(
void )
const;
103 double* fitted_chi2 = NULL )
const;
105 double* fitted_chi2 = NULL )
const;
110 double* fitted_chi2 = NULL )
const;
113 int main(
TTrackBase&,
float& tev,
float& tev_err,
double* pre_chi2 = NULL,
114 double* fitted_chi2 = NULL )
const;
117 void drift(
const TTrack&,
TMLink&,
float t0Offset,
double& distance,
118 double& itsError )
const;
121 void drift(
const TTrack&,
TMLink&,
float t0Offset,
double& distance,
double& itsError,
122 double& ddda )
const;
126 int dxda(
const TMLink& link,
const Helix& helix,
double dPhi, HepVector& dxda,
127 HepVector& dyda, HepVector& dzda )
const;
132 unsigned _corrections;
141 mutable double _pre_chi2;
142 mutable double _fitted_chi2;
150#ifdef TRKRECO_NO_INLINE
154# define THELIXFITTER_INLINE_DEFINE_HERE
157#ifdef THELIXFITTER_INLINE_DEFINE_HERE
170 if ( a ) _propagation = 1;
171 else _propagation = 0;
184 if ( !_freeT0 )
return main( a, 0. );
189 return main( a, tev, tevError );
194 if ( !_freeT0 )
return main( a, 0., pre_chi2, fitted_chi2 );
199 return main( a, tev, tevError, pre_chi2, fitted_chi2 );
204 double* fitted_chi2 )
const {
206 if ( !_freeT0 )
return main( a, t0Offset, pre_chi2, fitted_chi2 );
209 float tev = t0Offset;
211 return main( a, tev, tevError, pre_chi2, fitted_chi2 );
216 double* fitted_chi2 )
const {
218 return main( a, tev, tev_err, pre_chi2, fitted_chi2 );
A class to fit a TTrackBase object to a helix.
double chi2(void) const
returns sum of chi2 aftter fit.
virtual ~THelixFitter()
Destructor.
unsigned corrections(unsigned)
IBesMagFieldSvc * getMagneticFieldPointer(void) const
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
int fit(TTrackBase &, float &tev, float &tev_err, double *pre_chi2=NULL, double *fitted_chi2=NULL) const
bool freeT0(void) const
sets/returns free T0 flag.
bool fit2D(void) const
sets/returns 2D flag.
int fit(TTrackBase &, float t0Offset, double *pre_chi2=NULL, double *fitted_chi2=NULL) const
double preChi2(void) const
returns sum of chi2 before fit.
unsigned corrections(void) const
sets/returns correctin flag.
int fit(TTrackBase &, double *pre_chi2, double *fitted_chi2) const
bool tof(void) const
sets/returns propagation-delay correction flag.
int fit(TTrackBase &) const
bool sag(void) const
sets/returns sag correction flag.
THelixFitter(const std::string &name)
Constructor.
bool tanl(void) const
sets/returns tanLambda correction flag.
bool propagation(void) const
sets/returns propagation-delay correction flag.
A class to fit a TTrackBase object.
const std::string & name(void) const
returns name.
A class to relate TMDCWireHit and TTrack objects.
A virtual class for a track class in tracking.
A class to represent a track in tracking.