CGEM BOSS 6.6.5.h
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
 
- 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
 

Additional Inherited Members

- Protected Member Functions inherited from TMFitter
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 THelixFitter.h.

Constructor & Destructor Documentation

◆ THelixFitter()

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}
const std::string & name(void) const
returns name.
Definition TMFitter.h:73
TMFitter(const std::string &name)
Constructor.
Definition TMFitter.cxx:17

◆ ~THelixFitter()

THelixFitter::~THelixFitter ( )
virtual

Destructor.

Definition at line 144 of file THelixFitter.cxx.

144 {
145}

Member Function Documentation

◆ chi2()

double THelixFitter::chi2 ( void ) const
inline

returns sum of chi2 aftter fit.

Definition at line 305 of file THelixFitter.h.

305 {
306 return _fitted_chi2;
307}

◆ corrections() [1/2]

unsigned THelixFitter::corrections ( unsigned a)
inline

Definition at line 293 of file THelixFitter.h.

293 {
294 return _corrections = a;
295}

◆ corrections() [2/2]

unsigned THelixFitter::corrections ( void ) const
inline

sets/returns correctin flag.

Definition at line 287 of file THelixFitter.h.

287 {
288 return _corrections;
289}

◆ dump()

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

dumps debug information.

◆ fit() [1/4]

int THelixFitter::fit ( TTrackBase & a) const
inlinevirtual

Implements TMFitter.

Definition at line 231 of file THelixFitter.h.

231 {
232 if (! _freeT0) return main(a, 0.);
233 else {
234 float tev = 0.;
235 float tevError;
236 return main(a, tev, tevError);
237 }
238}
int main()

Referenced by TBuilder::build(), TBuilder::buildRphi(), TBuilder::buildStereo(), TBuilderCurl::buildStereo(), TBuilderCurl::buildStereoMC(), TPerfectFinder::doit(), TTrackManager::mask(), TTrackManager::maskCurl(), TTrackManager::maskNormal(), TTrackManager::merge(), TTrackManager::refit(), and TBuilder::salvage().

◆ fit() [2/4]

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

Definition at line 242 of file 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() [3/4]

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 THelixFitter.h.

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

◆ fit() [4/4]

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

Definition at line 254 of file 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}

◆ fit2D() [1/2]

bool THelixFitter::fit2D ( bool a)
inline

Definition at line 175 of file THelixFitter.h.

175 {
176 return _fit2D = a;
177}

◆ fit2D() [2/2]

bool THelixFitter::fit2D ( void ) const
inline

sets/returns 2D flag.

Definition at line 169 of file THelixFitter.h.

169 {
170 return _fit2D;
171}

Referenced by TTrackManager::determineT0().

◆ freeT0() [1/2]

bool THelixFitter::freeT0 ( bool a)
inline

Definition at line 281 of file THelixFitter.h.

281 {
282 return _freeT0 = a;
283}

◆ freeT0() [2/2]

bool THelixFitter::freeT0 ( void ) const
inline

sets/returns free T0 flag.

Definition at line 275 of file THelixFitter.h.

275 {
276 return _freeT0;
277}

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

◆ getMagneticFieldPointer()

IMagneticFieldSvc * THelixFitter::getMagneticFieldPointer ( void ) const
inline

Definition at line 98 of file THelixFitter.h.

98{return m_pmgnIMF;}

Referenced by TBuilder::build().

◆ preChi2()

double THelixFitter::preChi2 ( void ) const
inline

returns sum of chi2 before fit.

Definition at line 299 of file THelixFitter.h.

299 {
300 return _pre_chi2;
301}

◆ propagation() [1/2]

bool THelixFitter::propagation ( bool a)
inline

Definition at line 199 of file 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/2]

bool THelixFitter::propagation ( void ) const
inline

sets/returns propagation-delay correction flag.

Definition at line 193 of file THelixFitter.h.

193 {
194 return (bool) _propagation;
195}

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

◆ sag() [1/2]

bool THelixFitter::sag ( bool a)
inline

Definition at line 187 of file THelixFitter.h.

187 {
188 return _sag = a;
189}

◆ sag() [2/2]

bool THelixFitter::sag ( void ) const
inline

sets/returns sag correction flag.

Definition at line 181 of file THelixFitter.h.

181 {
182 return _sag;
183}

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

◆ tanl() [1/2]

bool THelixFitter::tanl ( bool a)
inline

Definition at line 225 of file THelixFitter.h.

225 {
226 return _tanl = a;
227}

◆ tanl() [2/2]

bool THelixFitter::tanl ( void ) const
inline

sets/returns tanLambda correction flag.

Definition at line 219 of file THelixFitter.h.

219 {
220 return _tanl;
221}

◆ tof() [1/2]

bool THelixFitter::tof ( bool a)
inline

Definition at line 213 of file THelixFitter.h.

213 {
214 return _tof = a;
215}

◆ tof() [2/2]

bool THelixFitter::tof ( void ) const
inline

sets/returns propagation-delay correction flag.

Definition at line 207 of file THelixFitter.h.

207 {
208 return _tof;
209}

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


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