CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
THelixFitter Class Reference

A class to fit a TTrackBase object to a helix. More...

#include <THelixFitter.h>

+ Inheritance diagram for THelixFitter:

Public Member Functions

 THelixFitter (const std::string &name)
 Constructor.
 
virtual ~THelixFitter ()
 Destructor.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
bool fit2D (void) const
 sets/returns 2D flag.
 
bool fit2D (bool)
 
bool freeT0 (void) const
 sets/returns free T0 flag.
 
bool freeT0 (bool)
 
unsigned corrections (void) const
 sets/returns correctin flag.
 
unsigned corrections (unsigned)
 
bool sag (void) const
 sets/returns sag correction flag.
 
bool sag (bool)
 
bool propagation (void) const
 sets/returns propagation-delay correction flag.
 
bool propagation (bool)
 
bool tof (void) const
 sets/returns propagation-delay correction flag.
 
bool tof (bool)
 
bool tanl (void) const
 sets/returns tanLambda correction flag.
 
bool tanl (bool)
 
double preChi2 (void) const
 returns sum of chi2 before fit.
 
double chi2 (void) const
 returns sum of chi2 aftter fit.
 
IMagneticFieldSvcgetMagneticFieldPointer (void) const
 
int fit (TTrackBase &) const
 
int fit (TTrackBase &, double *pre_chi2, double *fitted_chi2) const
 
int fit (TTrackBase &, float t0Offset, double *pre_chi2=NULL, double *fitted_chi2=NULL) const
 
int fit (TTrackBase &, float &tev, float &tev_err, double *pre_chi2=NULL, double *fitted_chi2=NULL) const
 
 THelixFitter (const std::string &name)
 Constructor.
 
virtual ~THelixFitter ()
 Destructor.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
bool fit2D (void) const
 sets/returns 2D flag.
 
bool fit2D (bool)
 
bool freeT0 (void) const
 sets/returns free T0 flag.
 
bool freeT0 (bool)
 
unsigned corrections (void) const
 sets/returns correctin flag.
 
unsigned corrections (unsigned)
 
bool sag (void) const
 sets/returns sag correction flag.
 
bool sag (bool)
 
bool propagation (void) const
 sets/returns propagation-delay correction flag.
 
bool propagation (bool)
 
bool tof (void) const
 sets/returns propagation-delay correction flag.
 
bool tof (bool)
 
bool tanl (void) const
 sets/returns tanLambda correction flag.
 
bool tanl (bool)
 
double preChi2 (void) const
 returns sum of chi2 before fit.
 
double chi2 (void) const
 returns sum of chi2 aftter fit.
 
IMagneticFieldSvcgetMagneticFieldPointer (void) const
 
int fit (TTrackBase &) const
 
int fit (TTrackBase &, double *pre_chi2, double *fitted_chi2) const
 
int fit (TTrackBase &, float t0Offset, double *pre_chi2=NULL, double *fitted_chi2=NULL) const
 
int fit (TTrackBase &, float &tev, float &tev_err, double *pre_chi2=NULL, double *fitted_chi2=NULL) const
 
- Public Member Functions inherited from TMFitter
 TMFitter (const std::string &name)
 Constructor.
 
virtual ~TMFitter ()
 Destructor.
 
const std::string & name (void) const
 returns name.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 
virtual int fit (TTrackBase &) const =0
 
 TMFitter (const std::string &name)
 Constructor.
 
virtual ~TMFitter ()
 Destructor.
 
const std::string & name (void) const
 returns name.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 
virtual int fit (TTrackBase &) const =0
 

Additional Inherited Members

- Protected Member Functions inherited from TMFitter
void fitDone (TTrackBase &) const
 sets the fitted flag. (Bad implementation)
 
void fitDone (TTrackBase &) const
 sets the fitted flag. (Bad implementation)
 

Detailed Description

A class to fit a TTrackBase object to a helix.

Definition at line 48 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

Constructor & Destructor Documentation

◆ THelixFitter() [1/2]

THelixFitter::THelixFitter ( const std::string &  name)

Constructor.

Definition at line 122 of file THelixFitter.cxx.

123: TMFitter(name),
124 _fit2D(false),
125 _freeT0(false),
126 _sag(false),
127 _propagation(false),
128 _tof(false),
129 _tanl(false),
130 _pre_chi2(0.),
131 _fitted_chi2(0.),
132 m_pmgnIMF(0) {
133
134 //yzhang delete
135 //StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF);
136 //if(scmgn!=StatusCode::SUCCESS) {
137 // std::cout<< name <<" Unable to open Magnetic field service"<<std::endl;
138 //}else{
139 // std::cout<< name <<" open Magnetic field service"<<std::endl;
140 //}
141
142}
A class to fit a TTrackBase object.
const std::string & name(void) const
returns name.

◆ ~THelixFitter() [1/2]

THelixFitter::~THelixFitter ( )
virtual

Destructor.

Definition at line 144 of file THelixFitter.cxx.

144 {
145}

◆ THelixFitter() [2/2]

THelixFitter::THelixFitter ( const std::string &  name)

Constructor.

◆ ~THelixFitter() [2/2]

virtual THelixFitter::~THelixFitter ( )
virtual

Destructor.

Member Function Documentation

◆ chi2() [1/2]

double THelixFitter::chi2 ( void  ) const
inline

returns sum of chi2 aftter fit.

Definition at line 305 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

305 {
306 return _fitted_chi2;
307}

◆ chi2() [2/2]

double THelixFitter::chi2 ( void  ) const

returns sum of chi2 aftter fit.

◆ corrections() [1/4]

unsigned THelixFitter::corrections ( unsigned  a)
inline

Definition at line 293 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

293 {
294 return _corrections = a;
295}

◆ corrections() [2/4]

unsigned THelixFitter::corrections ( unsigned  )

◆ corrections() [3/4]

unsigned THelixFitter::corrections ( void  ) const
inline

sets/returns correctin flag.

Definition at line 287 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

287 {
288 return _corrections;
289}

◆ corrections() [4/4]

unsigned THelixFitter::corrections ( void  ) const

sets/returns correctin flag.

◆ dump() [1/2]

void THelixFitter::dump ( const std::string &  message = std::string(""),
const std::string &  prefix = std::string("") 
) const

dumps debug information.

◆ dump() [2/2]

void THelixFitter::dump ( const std::string &  message = std::string(""),
const std::string &  prefix = std::string("") 
) const

dumps debug information.

◆ fit() [1/8]

int THelixFitter::fit ( TTrackBase a) const
inlinevirtual

◆ fit() [2/8]

int THelixFitter::fit ( TTrackBase ) const
virtual

Implements TMFitter.

◆ fit() [3/8]

int THelixFitter::fit ( TTrackBase a,
double *  pre_chi2,
double *  fitted_chi2 
) const
inline

Definition at line 242 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

243 {
244 if (! _freeT0) return main(a, 0., pre_chi2, fitted_chi2);
245 else {
246 float tev = 0.;
247 float tevError;
248 return main(a, tev, tevError, pre_chi2, fitted_chi2);
249 }
250}

◆ fit() [4/8]

int THelixFitter::fit ( TTrackBase ,
double *  pre_chi2,
double *  fitted_chi2 
) const

◆ fit() [5/8]

int THelixFitter::fit ( TTrackBase a,
float &  tev,
float &  tev_err,
double *  pre_chi2 = NULL,
double *  fitted_chi2 = NULL 
) const
inline

Definition at line 267 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

268 {
269 a._fitted = false;
270 return main(a, tev, tev_err, pre_chi2, fitted_chi2);
271}

◆ fit() [6/8]

int THelixFitter::fit ( TTrackBase ,
float &  tev,
float &  tev_err,
double *  pre_chi2 = NULL,
double *  fitted_chi2 = NULL 
) const

◆ fit() [7/8]

int THelixFitter::fit ( TTrackBase a,
float  t0Offset,
double *  pre_chi2 = NULL,
double *  fitted_chi2 = NULL 
) const
inline

Definition at line 254 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

255 {
256 a._fitted = false;
257 if (! _freeT0) return main(a, t0Offset, pre_chi2, fitted_chi2);
258 else {
259 float tev = t0Offset;
260 float tevError;
261 return main(a, tev, tevError, pre_chi2, fitted_chi2);
262 }
263}

◆ fit() [8/8]

int THelixFitter::fit ( TTrackBase ,
float  t0Offset,
double *  pre_chi2 = NULL,
double *  fitted_chi2 = NULL 
) const

◆ fit2D() [1/4]

bool THelixFitter::fit2D ( bool  a)
inline

Definition at line 175 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

175 {
176 return _fit2D = a;
177}

◆ fit2D() [2/4]

bool THelixFitter::fit2D ( bool  )

◆ fit2D() [3/4]

bool THelixFitter::fit2D ( void  ) const
inline

sets/returns 2D flag.

Definition at line 169 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

169 {
170 return _fit2D;
171}

Referenced by TTrackManager::determineT0().

◆ fit2D() [4/4]

bool THelixFitter::fit2D ( void  ) const

sets/returns 2D flag.

◆ freeT0() [1/4]

bool THelixFitter::freeT0 ( bool  a)
inline

Definition at line 281 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

281 {
282 return _freeT0 = a;
283}

◆ freeT0() [2/4]

bool THelixFitter::freeT0 ( bool  )

◆ freeT0() [3/4]

bool THelixFitter::freeT0 ( void  ) const
inline

sets/returns free T0 flag.

Definition at line 275 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

275 {
276 return _freeT0;
277}

Referenced by TTrackManager::fittingFlag(), and TBuilder::TBuilder().

◆ freeT0() [4/4]

bool THelixFitter::freeT0 ( void  ) const

sets/returns free T0 flag.

◆ getMagneticFieldPointer() [1/2]

IMagneticFieldSvc * THelixFitter::getMagneticFieldPointer ( void  ) const
inline

Definition at line 98 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

98{return m_pmgnIMF;}

Referenced by TBuilder::build().

◆ getMagneticFieldPointer() [2/2]

IMagneticFieldSvc * THelixFitter::getMagneticFieldPointer ( void  ) const
inline

Definition at line 98 of file Reconstruction/TrkReco/TrkReco-00-08-59-patch4-slc6tag/TrkReco/THelixFitter.h.

98{return m_pmgnIMF;}

◆ preChi2() [1/2]

double THelixFitter::preChi2 ( void  ) const
inline

returns sum of chi2 before fit.

Definition at line 299 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

299 {
300 return _pre_chi2;
301}

◆ preChi2() [2/2]

double THelixFitter::preChi2 ( void  ) const

returns sum of chi2 before fit.

◆ propagation() [1/4]

bool THelixFitter::propagation ( bool  a)
inline

Definition at line 199 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

199 {
200 if (a) _propagation = 1;
201 else _propagation = 0;
202 return propagation();
203}
bool propagation(void) const
sets/returns propagation-delay correction flag.

◆ propagation() [2/4]

bool THelixFitter::propagation ( bool  )

◆ propagation() [3/4]

bool THelixFitter::propagation ( void  ) const
inline

sets/returns propagation-delay correction flag.

Definition at line 193 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

193 {
194 return (bool) _propagation;
195}

Referenced by TBuilderCurl::buildStereo(), TTrackManager::determineT0(), TTrackManager::fittingFlag(), propagation(), TBuilderCurl::setParam(), TBuilder::TBuilder(), and TBuilderCurl::TBuilderCurl().

◆ propagation() [4/4]

bool THelixFitter::propagation ( void  ) const

sets/returns propagation-delay correction flag.

◆ sag() [1/4]

bool THelixFitter::sag ( bool  a)
inline

Definition at line 187 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

187 {
188 return _sag = a;
189}

◆ sag() [2/4]

bool THelixFitter::sag ( bool  )

◆ sag() [3/4]

bool THelixFitter::sag ( void  ) const
inline

sets/returns sag correction flag.

Definition at line 181 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

181 {
182 return _sag;
183}

Referenced by TBuilderCurl::buildStereo(), TTrackManager::fittingFlag(), TBuilderCurl::setParam(), TBuilder::TBuilder(), and TBuilderCurl::TBuilderCurl().

◆ sag() [4/4]

bool THelixFitter::sag ( void  ) const

sets/returns sag correction flag.

◆ tanl() [1/4]

bool THelixFitter::tanl ( bool  a)
inline

Definition at line 225 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

225 {
226 return _tanl = a;
227}

◆ tanl() [2/4]

bool THelixFitter::tanl ( bool  )

◆ tanl() [3/4]

bool THelixFitter::tanl ( void  ) const
inline

sets/returns tanLambda correction flag.

Definition at line 219 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

219 {
220 return _tanl;
221}

◆ tanl() [4/4]

bool THelixFitter::tanl ( void  ) const

sets/returns tanLambda correction flag.

◆ tof() [1/4]

bool THelixFitter::tof ( bool  a)
inline

Definition at line 213 of file InstallArea/include/TrkReco/TrkReco/THelixFitter.h.

213 {
214 return _tof = a;
215}

◆ tof() [2/4]

bool THelixFitter::tof ( bool  )

◆ tof() [3/4]

bool THelixFitter::tof ( void  ) const
inline

◆ tof() [4/4]

bool THelixFitter::tof ( void  ) const

sets/returns propagation-delay correction flag.


The documentation for this class was generated from the following files: